[issue896330] pyconfig.h is not placed in --includedir

2020-07-02 Thread Ned Deily


Change by Ned Deily :


--
nosy:  -Mario Gonzalez

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue896330] pyconfig.h is not placed in --includedir

2020-07-02 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg372730

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33665] tkinter.ttk.Scrollbar.fraction() under-estimates length

2020-07-02 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you for testing it E. Paine. I agree that it is not a Tkinter issue.

--
resolution:  -> third party
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41066] Update documentation for Pathlib

2020-07-02 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40213] contextlib.aclosing()

2020-07-02 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Do you have use cases or want to add it for pure "symmetry" reasons?

contextlib.closing() was added when context managers were new, and many classes 
that own resources did have the close() method but did not support the context 
manager protocol. Now most of these classes are context managers, and new 
classes usually are written with the support of  the context manager protocol 
from beginning. The usefulness of contextlib.closing() is much smaller now.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41197] Async magic methods in contextlib.closing

2020-07-02 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Warning is not error. It may left unnoticed, especially if the code is executed 
on server. And in this particular case turning the warning into exception by 
setting warning filters does not help, because it would be raised in the 
context where exceptions are swallowed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41197] Async magic methods in contextlib.closing

2020-07-02 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This seems to be a duplicate of issue40213 with a link to implementation in 
trio.

--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41196] APPDATA directory is different in store installed python

2020-07-02 Thread Eryk Sun


Eryk Sun  added the comment:

> What it really means for apps that are trying to share state across
> different Python runtimes is that they're not going to have such a 
> great time.

I tried impersonating the token of Explorer in the current thread (i.e. 
GetShellWindow, GetWindowThreadProcessId, OpenProcess, OpenProcessToken, 
ImpersonateLoggedOnUser), but writing to AppData was still redirected. 
Apparently redirection for apps only looks at the process token. A crude 
workaround is to script PowerShell or CMD in a child process.

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-02 Thread Inada Naoki


Inada Naoki  added the comment:

Hmm.  You are right. The warnings are shown by default.

On the other hand, some project uses custom `setup.py test` command. It hides 
the DeprecationWarning.

https://github.com/warner/python-ed25519/blob/master/setup.py
https://github.com/warner/python-ed25519/blob/master/src/ed25519/test_ed25519.py#L42

How about emitting FutureWarning instead of DeprecationWarning?

DeprecationWarning is hidden to avoid end users see noisy warnings.
But test is for developers, not end users.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41180] marshal load bypass code.__new__ audit event

2020-07-02 Thread Yunfan Zhan


Yunfan Zhan  added the comment:

Before this, we only audit code.__new__ and code.replace, as these methods 
allow constructing arbitrary code objects, and we don't audit code object 
coming from the normal way (like compile,exec,eval).
If the event is raised in PyCode_NewWithPosOnlyArgs, is it ok that the compiled 
code is also audited?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41199] Docstring convention not followed for dataclasses documentation page

2020-07-02 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41199] Docstring convention not followed for dataclasses documentation page

2020-07-02 Thread Jackstraw


New submission from Jackstraw :

The InventoryItem class on the dataclasses page 
[https://docs.python.org/3.7/library/dataclasses.html#module-dataclasses] has 
single quotes for the docstring, as opposed to double quotes (as described by 
PEP-257.

--
assignee: docs@python
components: Documentation
messages: 372899
nosy: JackStraw, docs@python
priority: normal
severity: normal
status: open
title: Docstring convention not followed for dataclasses documentation page
type: enhancement
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-02 Thread miss-islington


miss-islington  added the comment:


New changeset bfec674254ea22ef9c0c335587eb65683f4145c7 by Miss Islington (bot) 
in branch '3.9':
bpo-39960: Allow heap types in the "Carlo Verre" hack check that override 
"tp_setattro()" (GH-21092)
https://github.com/python/cpython/commit/bfec674254ea22ef9c0c335587eb65683f4145c7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41169] socket.inet_pton raised when pass an IPv6 address like "[::]" to it

2020-07-02 Thread Wator Sead


Wator Sead  added the comment:

The point is square brackets, not the address, they (socket.inet_pton and 
socket.socket) behave different. Can make it not be accepted, any conditions?

--
versions:  -Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-02 Thread Guido van Rossum


Guido van Rossum  added the comment:

Stefan can you do the 3.8 backport?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-02 Thread miss-islington


miss-islington  added the comment:


New changeset 148f32913573c29250dfb3f0d079eb8847633621 by scoder in branch 
'master':
bpo-39960: Allow heap types in the "Carlo Verre" hack check that override 
"tp_setattro()" (GH-21092)
https://github.com/python/cpython/commit/148f32913573c29250dfb3f0d079eb8847633621


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20435
pull_request: https://github.com/python/cpython/pull/21288

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41198] Round built-in function not shows zeros acording significant figures and calculates different numbers of odd and even

2020-07-02 Thread Tim Peters


Tim Peters  added the comment:

Cool! So the only thing surprising to me here is just how far off balance the 
arange() run was.  So I'd like to keep this open long enough for Mark to 
notice, just in case it's pointing to something fishy in numpy.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Michael Torrie
On 7/2/20 4:46 PM, Random832 wrote:
> It's possible that this wasn't explained clearly enough in the commit
> message itself (though I would argue it was definitely adequately
> explained in the ensuing on-list discussion, and wonder how much of
> that discussion you've actually read), but the point is that the
> *whole idea* of "standard English" is tied to white supremacy, not
> any particular standard whether via its authors or otherwise.

Good to know.  Nothing at all was explained in the commit message
justifying that particular sentence, leaving one unfamiliar with the
background to wonder what she was referring to.

I definitely agree the words "standard English" are pretty meaningless
to would-be python developers anyway and the new phrase in the PEP 8 is
much better.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue17805] No such class: multiprocessing.pool.AsyncResult

2020-07-02 Thread Volker Weißmann

Volker Weißmann  added the comment:

Tomorror, or in a few days, I'm gonna create a pullrequest for it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Bev In TX

> On Jul 2, 2020, at 5:48 PM, Random832  wrote:
> 
> but the point is that the *whole idea* of "standard English" is tied to white 
> supremacy

Bunkum.  It is racist to claim that standards are against people, when their 
purpose to to make the written word understood by all who read it, as opposed 
to having to understand all dialects.  There are numerous “white” dialects 
whose words and grammars are not included in those standards.

Bev in TX

 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41162] Clear audit hooks after destructors

2020-07-02 Thread Steve Dower


Steve Dower  added the comment:

PR 21222 (with test updates) is a good fix, though we know there can still be 
arbitrary code executed afterwards. But it's not in a place where we can 
reliably hook.

Probably the best thing to do is to make sure that events are raised for 
anything that would be required to add code there. Though that may not be 
feasible either, but since nobody should be doing that kind of thing 
deliberately, detection is just as valuable as prevention.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Random832
On Thu, Jul 2, 2020, at 18:29, Michael Torrie wrote:
> Come again?  I can see no other link in the verbage with the "relics of
> white supremacy" that she referred to.  If there are other links, they
> should be included in the commit message.  I agree with Rhodri that an
> explanation would be interesting.  Far be it from me to demand one.  So
> whatever.

It's possible that this wasn't explained clearly enough in the commit message 
itself (though I would argue it was definitely adequately explained in the 
ensuing on-list discussion, and wonder how much of that discussion you've 
actually read), but the point is that the *whole idea* of "standard English" is 
tied to white supremacy, not any particular standard whether via its authors or 
otherwise.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: FW: Pycharm Won't Do Long Underscore

2020-07-02 Thread Michael Torrie
On 7/2/20 2:55 PM, Danilo Coccia wrote:
> Il 30/06/2020 23:46, Joe Pfeiffer ha scritto:
>> "Peter J. Holzer"  writes:
>>> I agree. Although there are some fonts with special ligatures for
>>> programming. I have never used one, but that seems like an interesting
>>> concept.
>>
>> I've never heard of that before.  I'd be curious to try one.
>>
> 
> I've been using this one, and I like it:
>   https://github.com/tonsky/FiraCode
>   https://www.fontsquirrel.com/fonts/fira-code
> 
> Works well with PyCharm.

Hmm. That is... interesting.  I'm not at all sure how I feel about that.
 On the one hand it partly appeals, but on the other hand it quite
repulses me.  I don't find the FireCode samples any easier to read than
a normal font. In fact I find it slightly more difficult to read, since
my brain is not used to looking for those symbols.  Hmmm.  Yeah I dunno
about this one!  Very interesting. Thanks for sharing it.

I tried it, and it's definitely not for me!


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Michael Torrie
On 7/2/20 1:26 PM, Jon Ribbens via Python-list wrote:
> On 2020-07-02, Michael Torrie  wrote:
>> Agreed. She just needs to fix her commit message to remove the sentence
>> about the relics of white supremacy.  The fact she would conflate an
>> author's name with some kind of race-related thing is a bit
>> embarrassing, frankly.
> 
> She didn't - you did.

Come again?  I can see no other link in the verbage with the "relics of
white supremacy" that she referred to.  If there are other links, they
should be included in the commit message.  I agree with Rhodri that an
explanation would be interesting.  Far be it from me to demand one.  So
whatever.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue17805] No such class: multiprocessing.pool.AsyncResult

2020-07-02 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi Volker Weißmann, this issue has been closed for 7 years, if you want to 
propose a change, please open a new issue.

--
nosy: +remi.lapeyre

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41198] Round built-in function not shows zeros acording significant figures and calculates different numbers of odd and even

2020-07-02 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

If you change the starting point of the rounding away from zero, the bias flips 
back and forth, which is exactly what I would expect from Banker's Rounding:


def check_bias(start):
d = 0.001
ne = no = 0
for i in range(1000):
digit = int(round(start + i * d, 1) * 10)
if digit & 1:
no += 1
else:
ne += 1
return ne, no


# Python 3.7
>>> check_bias(0.0)
(501, 499)
>>> check_bias(0.1)
(500, 500)
>>> check_bias(0.2)
(499, 501)
>>> check_bias(0.3)
(499, 501)
>>> check_bias(0.4)
(500, 500)
>>> check_bias(0.5)
(499, 501)
>>> check_bias(0.6)
(501, 499)


I ran the same check_bias in Python 2.7, which doesn't use bankers rounding, 
and the bias is consistently in one direction:

# Python 2.7
>>> check_bias(0.0)
(500, 500)
>>> check_bias(0.1)
(499, 501)
>>> check_bias(0.2)
(498, 502)
>>> check_bias(0.3)
(498, 502)
>>> check_bias(0.4)
(499, 501)
>>> check_bias(0.5)
(498, 502)
>>> check_bias(0.6)
(500, 500)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17805] No such class: multiprocessing.pool.AsyncResult

2020-07-02 Thread Volker Weißmann

Volker Weißmann  added the comment:

The documentation here: 
https://docs.python.org/3/library/multiprocessing.html#module-multiprocessing.pool
says that apply_async is "A variant of the apply() method which returns a 
result object."
You should replace "a result object" with "a AsyncResult/ApplyResult object" 
and a link to 
https://docs.python.org/2/library/multiprocessing.html#multiprocessing.pool.AsyncResult

--
nosy: +Volker Weißmann
versions: +Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 
3.9 -Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Ethan Furman

On 07/02/2020 12:14 PM, Michael Torrie wrote:


The fact she would conflate an
author's name with some kind of race-related thing is a bit
embarrassing, frankly.


It seems she has studied literary and English history, at least as related to 
the 20th century, so I don't think any name conflation is going on.  I have 
asked for links that would support her view as expressed in the commit message, 
but haven't yet seen any.

--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list


Re: PEP 622

2020-07-02 Thread Chris Angelico
On Fri, Jul 3, 2020 at 7:48 AM Stephen Carboni
 wrote:
>
> Why are OR patterns going to use the bitwise operator instead of
> logical or operator?
>
> https://www.python.org/dev/peps/pep-0622/#combining-multiple-patterns-or-patterns
>

Keep reading :)

https://www.python.org/dev/peps/pep-0622/#use-some-other-syntax-instead-of-for-or-patterns

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41198] Round built-in function not shows zeros acording significant figures and calculates different numbers of odd and even

2020-07-02 Thread Tim Peters


Tim Peters  added the comment:

I assumed Mark would tell us what's up with the arange() oddity, so let's see 
whether he does.  There is no truly good way to generate "evenly spaced" binary 
floats using a non-representable conceptual decimal delta.  The dumbass ;-) way 
doesn't show a discrepancy in pure Python:

>>> num = ne = no = 0
>>> d = 0.001
>>> while num < 1.0:
... digit = int(round(num, 1) * 10)
... if digit & 1:
... no += 1
... else:
... ne += 1
... num += d
>>> ne, no
(500, 500)

However, a somewhat less naive way does show a discrepancy, but less so than 
what arange() apparently does:

>>> ne = no = 0
>>> for i in range(1000):
... digit = int(round(i * d, 1) * 10)
... if digit & 1:
... no += 1
... else:
... ne += 1
>>> ne, no
(501, 499)

I assume that's because of the specific nearest/even behavior I already showed 
for multipliers i=250 and i=750.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Jon Ribbens via Python-list
On 2020-07-02, Michael Torrie  wrote:
> Agreed. She just needs to fix her commit message to remove the sentence
> about the relics of white supremacy.  The fact she would conflate an
> author's name with some kind of race-related thing is a bit
> embarrassing, frankly.

She didn't - you did.
-- 
https://mail.python.org/mailman/listinfo/python-list


PEP 622

2020-07-02 Thread Stephen Carboni
Why are OR patterns going to use the bitwise operator instead of
logical or operator?

https://www.python.org/dev/peps/pep-0622/#combining-multiple-patterns-or-patterns

-Steve
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41198] Round built-in function not shows zeros acording significant figures and calculates different numbers of odd and even

2020-07-02 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Thank you for your long and detailed bug report, but please post one issue per 
bug report.

Tim, we agree that the notion of significant figures is irrelevant; is Carlos' 
even/odd test sufficiently flawed that we should close this bug report, or keep 
it open to investigate the rounding bias issue? My feeling is that it is 
sufficiently flawed that we can just close this, but it's too early in the 
morning for me to articulate why :-)

--
nosy: +steven.daprano

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41198] Round built-in function not shows zeros acording significant figures and calculates different numbers of odd and even

2020-07-02 Thread Carlos Neves

Carlos Neves  added the comment:

Hi Peters,

I will pay more attention to the Python docs :)
Thank you for your direction.

Carlos A. Neves

Em qui., 2 de jul. de 2020 às 18:22, Tim Peters
 escreveu:
>
>
> Tim Peters  added the comment:
>
> For the first, your hardware's binary floating-point has no concept of 
> significant trailing zeroes. If you need such a thing, use Python's `decimal` 
> module instead, which does support a "significant trailing zero" concept. You 
> would need an entirely new data type to graft such a notion onto Python's (or 
> numpy's!) binary floats.
>
> For the second, we'd have to dig into exactly what numpy's `arange()` does. 
> Very few of the numbers you're working with are exactly representable in 
> binary floating point except for 0.0. For example, "0.001" is approximated by 
> a binary float whose exact decimal value is
>
> 0.00120816681711721685132943093776702880859375
>
> Sometimes the rounded (by machine float arithmetic) multiples of that are 
> exactly representable, but usually not. For example,
>
> >>> 0.001 * 250
> 0.25
>
> rounds to the exactly representable 1/4, and
>
> >>> 0.001 * 750
> 0.75
>
> to the exactly representable 3/4. However, `round()` uses 
> round-to-nearest/even, and then
>
> >>> round(0.25, 1)
> 0.2
> >>> round(0.75, 1)
> 0.8
>
> both resolve the tie to the closest even value (although neither of those 
> _results_ are exactly representable in binary floating-point - although if 
> you go on to multiply them by 10.0, they do round (in hardware) to exactly 
> 2.0 and 8.0).
>
> Note that numpy's arange() docs do warn you against using it ;-)
>
> """
> When using a non-integer step, such as 0.1, the results will often not be 
> consistent. It is better to use numpy.linspace for these cases.
> """
>
> --
> nosy: +tim.peters
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35105] Document that CPython accepts "invalid" identifiers

2020-07-02 Thread Roy Smith


Roy Smith  added the comment:

Just as another edge case, type() can do the same thing:

Foo = type("Foo", (object,), {"a b": 1})
f = Foo()

for example, will create a class attribute named "a b".  Maybe this actually 
calls setattr() under the covers, but if it's going to be documented, it should 
be noted in both places.

--
nosy: +roysmith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41198] Round built-in function not shows zeros acording significant figures and calculates different numbers of odd and even

2020-07-02 Thread Tim Peters


Tim Peters  added the comment:

For the first, your hardware's binary floating-point has no concept of 
significant trailing zeroes. If you need such a thing, use Python's `decimal` 
module instead, which does support a "significant trailing zero" concept. You 
would need an entirely new data type to graft such a notion onto Python's (or 
numpy's!) binary floats.

For the second, we'd have to dig into exactly what numpy's `arange()` does. 
Very few of the numbers you're working with are exactly representable in binary 
floating point except for 0.0. For example, "0.001" is approximated by a binary 
float whose exact decimal value is

0.00120816681711721685132943093776702880859375

Sometimes the rounded (by machine float arithmetic) multiples of that are 
exactly representable, but usually not. For example,

>>> 0.001 * 250
0.25

rounds to the exactly representable 1/4, and

>>> 0.001 * 750
0.75

to the exactly representable 3/4. However, `round()` uses 
round-to-nearest/even, and then

>>> round(0.25, 1)
0.2
>>> round(0.75, 1)
0.8

both resolve the tie to the closest even value (although neither of those 
_results_ are exactly representable in binary floating-point - although if you 
go on to multiply them by 10.0, they do round (in hardware) to exactly 2.0 and 
8.0).

Note that numpy's arange() docs do warn you against using it ;-)

"""
When using a non-integer step, such as 0.1, the results will often not be 
consistent. It is better to use numpy.linspace for these cases.
"""

--
nosy: +tim.peters

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: FW: Pycharm Won't Do Long Underscore

2020-07-02 Thread Danilo Coccia
Il 30/06/2020 23:46, Joe Pfeiffer ha scritto:
> "Peter J. Holzer"  writes:
> 
>> On 2020-06-24 15:33:16 -0600, Joe Pfeiffer wrote:
>>> One other note -- while you may want various good-looking fonts with
>>> ligatures in other domains, for writing code a monospace font with no
>>> ligatures lets you see exactly what's there and saves a host of
>>> problems.  My personal favorite for these purposes is called "Terminus
>>> Regular", but which specific one you pick is much less important than
>>> that you use one.
>>
>> I agree. Although there are some fonts with special ligatures for
>> programming. I have never used one, but that seems like an interesting
>> concept.
> 
> I've never heard of that before.  I'd be curious to try one.
> 

I've been using this one, and I like it:
  https://github.com/tonsky/FiraCode
  https://www.fontsquirrel.com/fonts/fira-code

Works well with PyCharm.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41177] ConvertingList and ConvertingTuple lack iterators and ConvertingDict lacks items()

2020-07-02 Thread Michael DePalatis


Michael DePalatis  added the comment:

I think the other issue here is that the ConvertingX classes aren't documented 
apart from comments in the code where they are defined.

--
nosy: +mivade

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-02 Thread Stefan Behnel


Stefan Behnel  added the comment:

I think we missed the train for fixing 3.7 (which was questionable anyway), but 
I added a test, so it's ready for merging into 3.8+ (minus merge conflicts for 
the test in 3.8, probably).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41196] APPDATA directory is different in store installed python

2020-07-02 Thread Steve Dower


Steve Dower  added the comment:

As an aside, virtual environments will have the same redirection as the base 
interpreter, so this is really only an issue between a 3.7 install and a 3.8 
install, or a Store install and a traditional install.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41196] APPDATA directory is different in store installed python

2020-07-02 Thread Steve Dower


Steve Dower  added the comment:

This is by (Windows's) design - separate apps are treated as separate by the 
Windows app model. In the latest and N-1 updates to Windows, the AppData 
redirection only applies to newly created files, not those that already exist. 
[1] Before then, it used copy-on-write.

The design is based on having seen many apps break because of inadvertently 
sharing data, and also apps failing to clean up after themselves well (of which 
Python is *very* guilty). The built-in "Reset App" and "Uninstall App" 
functions would not be viable without this separation.

What it really means for apps that are trying to share state across different 
Python runtimes is that they're not going to have such a great time. The best 
option I can offer is to use the user's Documents folder instead, which is 
explicitly shared (though may also be synced between machines, so not always 
appropriate).

The next best option is to recommend that the Store package only be used on its 
own, and not in conjunction with other Python installs. Those who need multiple 
versions or mostly-but-not-quite-separate installs will need to use the 
traditional installer.

But what it means for all the other tools that write to AppData is that they 
don't have to worry about old settings laying around or causing additional 
clutter. The standard "Reset app" action is a viable way to fix issues in 
configuration or cached files (and uninstall all packages). From a user point 
of view, I really like these features.

1: 
https://docs.microsoft.com/windows/msix/desktop/desktop-to-uwp-behind-the-scenes

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38980] Compile libpython with -fno-semantic-interposition

2020-07-02 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Yes this should become part of --with-optimizations when building on a platform 
using a compiler that (a) supports it and (b) where it matters.

If this is only relevant on --enable-shared builds (not the default), i'd 
assume also make it conditional on that.

I never use --enable-shared builds myself.

--
nosy: +gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41198] Round built-in function not shows zeros acording significant figures and calculates different numbers of odd and even

2020-07-02 Thread Carlos Neves


New submission from Carlos Neves :

Hi,

I am observing unexpected behavior with round built-in function about (1) 
significant figures in analytical methods and (2) number of odd and even 
numbers obtained by this function.

https://docs.python.org/3/library/functions.html#round

https://en.wikipedia.org/wiki/Significant_figures

1. Significant Figures
==

For example, when I say 1.20 in analytical methods, I am confident about the 
last digit, the zero. It has a meaning. But, when I use Python,

>>> round (1.203, 2)
1.2
>>>

the zero not appears. It is not occur when the second digit is not zero. 

>>> round (1.213, 2)
1.21
>>>

The zero should be printed like the other numbers to be consistent with the 
significant figures. Maybe other functions could present the same behavior.

2. Rounding procedure
=

I wrote the following code to test the number of odd and even numbers during a 
round procedure. I should get half-and-a-half of odd and even numbers. But the 
result using the round function is different. We observed 5 even more and 5 odd 
less. This behavior causes a systematic error.

https://en.wikipedia.org/wiki/Rounding

I hope to be contributing to the improvement of the code.

Thank advanced.


##
# This code count the number of odd and even number with different procedures: 
truncate, round simple and round function 
# Test condition: Rounding with one digit after the decimal point.

import numpy as np

even_0 = 0
odd_0 = 0

even_1 = 0
odd_1 = 0

even_2 = 0
odd_2 = 0

even_3 = 0
odd_3 = 0

# generate 1000 numbers from 0.000 up to 1 with step of 0.001
x = np.arange(0,1,0.001) 

# printing 
for i in range(len(x)): 

x_truncated = int((x[i]*10)+0.0)/10 # no rounding
x_rounded_simple = int((x[i]*10)+0.5)/10 # rounding up at 5
x_rounded_function = round(x[i],1) # rounding by function with one 
digit after the decimal point

# counting odd and even numbers
if int(x[i]*1000) % 2 == 0:
even_0 += 1
else:
odd_0 += 1

if int(x_truncated*10) % 2 == 0:
even_1 += 1
else:
odd_1 += 1

if int(x_rounded_simple*10) % 2 == 0:
even_2 += 1
else:
odd_2 += 1

if int(x_rounded_function*10) % 2 == 0:
even_3 += 1
else:
odd_3 += 1

print ("{0:.3f} {1:.1f} {2:.1f} {3:.1f}".format((x[i]), x_truncated, 
x_rounded_simple, x_rounded_function))

print ("Result:")
print ("Raw: Even={0}, Odd={1}".format(even_0,odd_0))   
print ("Truncated: Even={0}, Odd={1}".format(even_1,odd_1))
print ("Rounded simple: Even={0}, Odd={1}".format(even_2,odd_2))
print ("Rounded Function: Even={0}, Odd={1}".format(even_3,odd_3))

##

Output
...
0.995 0.9 1.0 1.0
0.996 0.9 1.0 1.0
0.997 0.9 1.0 1.0
0.998 0.9 1.0 1.0
0.999 0.9 1.0 1.0
Result:
Raw: Even=500, Odd=500
Truncated: Even=500, Odd=500
Rounded simple: Even=500, Odd=500
Rounded Function: Even=505, Odd=495



--
components: Library (Lib)
messages: 372878
nosy: Carlos Neves, lemburg, mark.dickinson, rhettinger, stutzbach
priority: normal
severity: normal
status: open
title: Round built-in function not shows zeros acording significant figures and 
calculates different numbers of odd and even
type: behavior
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38980] Compile libpython with -fno-semantic-interposition

2020-07-02 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

and to echo others: Do not worry about LD_PRELOAD users trying to override 
internals.  That is not a supported use case.  It is always a hack.  anyone 
using it knows this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41180] marshal load bypass code.__new__ audit event

2020-07-02 Thread Steve Dower


Steve Dower  added the comment:

Actually, a quick search of codeobject.c and a look at tkmk's PR makes it seem 
like the audit event should be being raised from inside 
PyCode_NewWithPosOnlyArgs anyway (which IIRC didn't exist when I first added 
the event, though it was probably there before it was merged).

In general, events should be raised after parameters have been validated, but 
before any work is done. And when all the other calls feed through a single 
function, just auditing that one function is enough.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41197] Async magic methods in contextlib.closing

2020-07-02 Thread Ramzan Bekbulatov


Ramzan Bekbulatov  added the comment:

In this case:

```python3
class A:
async def close(self):
pass

with closing(A()):
pass
```

Python will raise `RuntimeWarning: coroutine 'A.close' was never awaited`.

In another case:

```python3
class B:
def close(self):
pass

async with closing(B()):
pass
```

Python will raise `TypeError: object NoneType can't be used in 'await' 
expression` (because it will try to await result of close method).

-

I was surprised that `contextlib` has no async analogue of this `closing` 
class, because async scripts often use any kind of closings. Do you think it's 
better to extract to `asyncclosing` class?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Michael Torrie
On 7/2/20 11:11 AM, Dieter Maurer wrote:
> In the replaced sentence
> `When writing English, follow Strunk and White`
> I interpret "Strunk and White" as a reference to some
> document containing rules for readable English and "Strunk and White"
> are likely the authors of this document. I do not associate "White"
> with "white" in contrast to "black" (or some other colour).
> However, I do not know this document nor "Strunk and White". Thus,
> the PEP text should get improved. If it is refers to a standard,
> it should be be an online standard and the PEP should include its URL.
> Otherwise, non-english people are indeed at a disadvantage.

Yes Strunk and White is a well-known book on writing style.  That's the
names of the authors. William Strunk and EB White.
https://en.wikipedia.org/wiki/The_Elements_of_Style

> In contrast, The replacement is well understandable and applicable
> to all languages.

Agreed. She just needs to fix her commit message to remove the sentence
about the relics of white supremacy.  The fact she would conflate an
author's name with some kind of race-related thing is a bit
embarrassing, frankly.

> Thus, in my view, the change is really an improvement.
> One could motivate it differently, however.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33665] tkinter.ttk.Scrollbar.fraction() under-estimates length

2020-07-02 Thread E. Paine


Change by E. Paine :


Added file: https://bugs.python.org/file49293/ttkscrl.tcl

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33665] tkinter.ttk.Scrollbar.fraction() under-estimates length

2020-07-02 Thread E. Paine


E. Paine  added the comment:

I agree that the `tkinter.ttk.Scrollbar.fraction` under-estimates the length of 
the trough and I have written a program to try to measure this precisely.

When tested (only on Linux, granted), this deficit was measured to be 9 pixels 
(unless I got the maths wrong!). Tcl/Tk gave **exactly** the same numbers when 
run using 'wish'.

Thank you pez for reporting this, but 2 years on it should be closed as third 
party (please do take it up with the tcl team if you feel it is a real issue).

--
nosy: +epaine
title: tkinter.ttk.Scrollbar.fraction() is inaccurate, or at least inconsistent 
compared to the non ttk version -> tkinter.ttk.Scrollbar.fraction() 
under-estimates length
versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7
Added file: https://bugs.python.org/file49292/ttkscrl.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41197] Async magic methods in contextlib.closing

2020-07-02 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

And what happen when you accidentally use synchronous "with" instead of "async 
with" with closing()?

with closing(SomeAPI()) as api:
...

I think it is intentionally that different functions/methods/classes are used 
for synchronous and asynchronous operations.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41139] cgi uses the locale encoding for log files

2020-07-02 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Available options:

1. Do nothing (keep cgi.log() and continue to use the default encoding for 
open()).
2. Remove cgi.log(). I think that the deprecation period is not needed because 
the function is not documented, is not imported by star-import, and is not 
shown in help.
3. Make cgi.log() using UTF-8 for open(). This may break some existing code if 
cgi.log() is ever used.
4. Completely rewrite cgi.log() using the logging module.

In all options except 2 cgi.log() needs to be documented and advertised as a 
new feature. And we should ask ourself: do we need this feature? Does it have 
advantages over the logging package?

It was more visible in 2.0. But since adding __all__ in 2.1 (in 
e99d5ea25ba994491c773d9b5872332334ccd1c5) it is a hidden feature.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Mats Wichmann
On 7/2/20 12:04 PM, Rhodri James wrote:
> On 02/07/2020 18:11, Dieter Maurer wrote:
>> I am no member of the Council. Thus, your questions are not directed
>> to me. **BUT** you made your questions public and thus you are
>> likely prepared to receive public comments.
> 
> Fortunately you don't answer any of the questions, so I don't need to
> have an opinion on that :-)
> 
>> The commit message tries to provide the motivation for
>> the change. In my view, it is good to document change motivations
>> and a commit message is not a bad place for that.
> 
> True.  However, the motivation as appeared in the discussions was
> (approximately) that many people, especially those whose first language
> is not English, find being given a list of writing guidelines like
> Strunk and White's "The Elements of Style" intimidating.  That's fair
> enough, though a bit more consideration suggests that many people have
> exactly the opposite problem.  The wording could be amended to reassure
> both, and I've been contemplating doing so.

Indeed, without weighing in on this case itself, the purpose of calling
out a "standard langauge" for formal documents is to remove sources of
ambiguity, not to promote one viewpoint or another: not sure how to
express something? Let's see if  the style manual has anything to guide
me. Not to intimidate someone about having set an impossible bar for
writing.  So if there's a way to express that, I'm sure everybody would
be happier!
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41197] Async magic methods in contextlib.closing

2020-07-02 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +yselivanov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12029] Allow catching virtual subclasses in except clauses

2020-07-02 Thread Simon Charette


Change by Simon Charette :


--
nosy: +charettes

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41197] Async magic methods in contextlib.closing

2020-07-02 Thread Рамзан Б .

New submission from Рамзан Б. :

# Async magic methods in contextlib.closing

I think `__aenter__` and `__aexit__` methods should be added to 
`contextlib.closing`, so that we can use `contextlib.closing` in async code too.

For example:

```python3
class SomeAPI:
...

async def request(self):
pass

async def close(self):
await self.session.close()


async with closing(SomeAPI()) as api:
response = await api.request()
print(response)
```

Also these methods can be moved to another class (like `asyncclosing` along the 
lines of `asynccontextmanager`).

--
components: Library (Lib)
messages: 372871
nosy: Рамзан Б.
priority: normal
pull_requests: 20434
severity: normal
status: open
title: Async magic methods in contextlib.closing
type: enhancement
versions: Python 3.10, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41139] cgi uses the locale encoding for log files

2020-07-02 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
 added the comment:

My bad. I meant cgi.log(), I pressed submit changes in a hurry.

+1 for utf-8.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41196] APPDATA directory is different in store installed python

2020-07-02 Thread aku911


aku911  added the comment:

This is causing this issue here:
https://github.com/microsoft/vscode-python/issues/11412

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41196] APPDATA directory is different in store installed python

2020-07-02 Thread aku911


New submission from aku911 :

Install the windows store python then run this code:

import os
os.listdir(os.environ['APPDATA'])

Install another version of python and run the same code.

You'll get different results.

This can cause issues when trying to share data in a user's APPDATA folder.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Rhodri James

On 02/07/2020 18:11, Dieter Maurer wrote:

I am no member of the Council. Thus, your questions are not directed
to me. **BUT** you made your questions public and thus you are
likely prepared to receive public comments.


Fortunately you don't answer any of the questions, so I don't need to 
have an opinion on that :-)



The commit message tries to provide the motivation for
the change. In my view, it is good to document change motivations
and a commit message is not a bad place for that.


True.  However, the motivation as appeared in the discussions was 
(approximately) that many people, especially those whose first language 
is not English, find being given a list of writing guidelines like 
Strunk and White's "The Elements of Style" intimidating.  That's fair 
enough, though a bit more consideration suggests that many people have 
exactly the opposite problem.  The wording could be amended to reassure 
both, and I've been contemplating doing so.


The political diatribe about the linguistic contribution to white 
supremacy of standardized English appeared nowhere in the discussion. 
Had it done so, I suspect Keala would have realised quite quickly that 
using it would be (and has been) controversial and divisive, the exact 
opposite of her stated intentions.


All of which is quite beside the point for the questions I raised.  As I 
said, it doesn't matter whether you agree with that political opinion 
raised, disagree with it, or do not give a monkey's, should _any_ 
political opinion be in the repo?


--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


[issue41196] APPDATA directory is different in store installed python

2020-07-02 Thread aku911


Change by aku911 :


--
components: Windows
nosy: aku911, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: APPDATA directory is different in store installed python
type: behavior
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41139] cgi uses the locale encoding for log files

2020-07-02 Thread Ethan Furman


Ethan Furman  added the comment:

Which functionality?

- cgi.log()

- opening with current locale

I don't mind keeping the function, but if the file isn't already opened I think 
using UTF-8 is an appropriate choice.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41139] cgi uses the locale encoding for log files

2020-07-02 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
 added the comment:

I am for keeping this functionality. Unless others in this nosy list think 
otherwise.

--
nosy: +thatiparthy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Dieter Maurer
Rhodri James wrote at 2020-7-2 14:39 +0100:
>We've had the requested 24 hour cooling off, and I don't imagine anyone
>is surprised that the situation remains unchanged.  The commit message
>that caused the controversy is still in the PEP repository, and is still
>controversial.  Whether you think it's the best thing since the last
>best thing or the biggest load of bollocks since the last biggest load
>of bollocks is irrelevant.  It's there, it espouses a political stance,
>and by implication the Steering Council support it.
>
>Since explicit is better than implicit :-), I would like to formally ask
>the Steering Council to answer the following questions.

I am no member of the Council. Thus, your questions are not directed
to me. **BUT** you made your questions public and thus you are
likely prepared to receive public comments.

The commit message tries to provide the motivation for
the change. In my view, it is good to document change motivations
and a commit message is not a bad place for that.

In the replaced sentence
`When writing English, follow Strunk and White`
I interpret "Strunk and White" as a reference to some
document containing rules for readable English and "Strunk and White"
are likely the authors of this document. I do not associate "White"
with "white" in contrast to "black" (or some other colour).
However, I do not know this document nor "Strunk and White". Thus,
the PEP text should get improved. If it is refers to a standard,
it should be be an online standard and the PEP should include its URL.
Otherwise, non-english people are indeed at a disadvantage.

In contrast, The replacement is well understandable and applicable
to all languages.

Thus, in my view, the change is really an improvement.
One could motivate it differently, however.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Ethan Furman

On 07/02/2020 06:39 AM, Rhodri James wrote:


We've had the requested 24 hour cooling off, and I don't imagine anyone is 
surprised that the situation remains unchanged.  The commit message that caused 
the controversy is still in the PEP repository, and is still controversial.  
Whether you think it's the best thing since the last best thing or the biggest 
load of bollocks since the last biggest load of bollocks is irrelevant.  It's 
there, it espouses a political stance, and by implication the Steering Council 
support it.

Since explicit is better than implicit :-), I would like to formally ask the 
Steering Council to answer the following questions.


An issue asking basically the same thing has been created:

  https://github.com/python/steering-council/issues/31

--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list


[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +20433
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21284

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32958] socket module calls with long host names can fail with idna codec error

2020-07-02 Thread Steve Bowman


Steve Bowman  added the comment:

When will this issue be fixed?  Thanks!

--
nosy: +sdbowman

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41073] [C API] PyType_GetSlot() should accept static types

2020-07-02 Thread hai shi


hai shi  added the comment:

> You'll probably need some table like typeslots.inc to record which sub-slots 
> struct each slot belongs to.

Looks like it's a good way to solve this probleam, Let me try it ;)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread STINNER Victor


STINNER Victor  added the comment:

I can reproduce the crash using the following script.py:
---
import gc; gc.set_threshold(5)
import sys

old_modules = dict(sys.modules)
sys.modules.clear()
sys.modules.update(old_modules)

import _ast
import gc
gc.collect()
---

And the command:
---
./python -i < script.py
---

PyInit__ast() is called twice. That's surprising: builtin extension modules 
should only be initialized once.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

If I'm not wrong, this is the commit that introduced the regression.

commit ac46eb4ad6662cf6d771b20d8963658b2186c48c (HEAD -> bpo-x)
Author: Dino Viehland 
Date:   Wed Sep 11 10:16:34 2019 -0700

bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957)

Summary: This mostly migrates Python-ast.c to PEP384 and removes all 
statics from the whole file. This modifies the generator itself that generates 
the Python-ast.c. It leaves in the usage of _PyObject_LookupAttr even though 
it's not fully PEP384 compatible (this could always be shimmed in by anyone who 
needs it).

--
nosy: +dino.viehland

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov


Change by Arcadiy Ivanov :


--
components: +Interpreter Core
type:  -> crash

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
nosy: +pablogsal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

> old_modules = dict(sys.modules)
> sys.modules.clear()
> sys.modules.update(old_modules)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

That's not an entirely accurate reproducer as the references to the modules are 
still held in the collection when the sys.modules.clear() is called.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

A shorter reproducer;

>>> import sys
>>> sys.modules.clear()
Traceback (most recent call last):
  File "", line 1, in 
RuntimeError: lost builtins module
>>> import _ast
>>> import gc
>>> gc.collect()
Modules/gcmodule.c:114: gc_decref: Assertion "gc_get_refs(g) > 0" failed: 
refcount is too small
Enable tracemalloc to get the memory block allocation traceback

object address  : 0x7f4c22f843b0
object refcount : 2
object type : 0x5605f3385660
object type name: module
object repr : 

Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed
Python runtime state: initialized

Current thread 0x7f4c23a5d280 (most recent call first):
  File "", line 1 in 
[1]21945 abort (core dumped)  ./python

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

So as soon as I started using CPython 3.9.0b3 with debug, the stack trace 
changed and the corruption apparently occurs in the GC, probably because the 
assertion is triggered vs release-style build:

Modules/gcmodule.c:114: gc_decref: Assertion "gc_get_refs(g) > 0" failed: 
refcount is too small
Enable tracemalloc to get the memory block allocation traceback

object address  : 0x7f8566e1b110
object refcount : 1
object type : 0x85e160
object type name: module
object repr : 

Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed
Python runtime state: initialized

Current thread 0x7f85743c5740 (most recent call first):
  File "", line 587 in 
_compile_bytecode
  File "", line 918 in get_code
  File "", line 786 in exec_module
  File "", line 680 in _load_unlocked
  File "", line 986 in _find_and_load_unlocked
  File "", line 1007 in _find_and_load
  File 
"./src/main/python/pybuilder/_vendor/pkg_resources/extern/__init__.py", line 43 
in load_module
  File "", line 627 in 
_load_backward_compatible
  File "", line 664 in _load_unlocked
  File "", line 986 in _find_and_load_unlocked
  File "", line 1007 in _find_and_load
  File 
"./src/main/python/pybuilder/_vendor/pkg_resources/_vendor/packaging/requirements.py",
 line 9 in 
  File "", line 228 in 
_call_with_frames_removed
  File "", line 790 in exec_module
  File "", line 680 in _load_unlocked
  File "", line 986 in _find_and_load_unlocked
  File "", line 1007 in _find_and_load
  File "./src/main/python/pybuilder/extern/__init__.py", line 69 in 
load_module
  File "", line 627 in 
_load_backward_compatible
  File "", line 664 in _load_unlocked
  File "", line 986 in _find_and_load_unlocked
  File "", line 1007 in _find_and_load
  File "./src/main/python/pybuilder/_vendor/pkg_resources/__init__.py", 
line 84 in 
  File "", line 228 in 
_call_with_frames_removed
  File "", line 790 in exec_module
  File "", line 680 in _load_unlocked
  File "", line 986 in _find_and_load_unlocked
  File "", line 1007 in _find_and_load
  File "./src/main/python/pybuilder/extern/__init__.py", line 69 in 
load_module
  File "", line 627 in 
_load_backward_compatible
  File "", line 664 in _load_unlocked
  File "", line 986 in _find_and_load_unlocked
  File "", line 1007 in _find_and_load
  File "./src/main/python/pybuilder/pip_common.py", line 19 in 
  File "", line 228 in 
_call_with_frames_removed
  File "", line 790 in exec_module
  File "", line 680 in _load_unlocked
  File "", line 986 in _find_and_load_unlocked
  File "", line 1007 in _find_and_load
  File "./src/main/python/pybuilder/pluginloader.py", line 33 in 
  File "", line 228 in 
_call_with_frames_removed
  File "", line 790 in exec_module
  File "", line 680 in _load_unlocked
  File "", line 986 in _find_and_load_unlocked
  File "", line 1007 in _find_and_load
  File "./src/main/python/pybuilder/reactor.py", line 38 in 
  File "", line 228 in 
_call_with_frames_removed
  File "", line 790 in exec_module
  File "", line 680 in _load_unlocked
  File "", line 986 in _find_and_load_unlocked
  File "", line 1007 in _find_and_load
  File "./src/main/python/pybuilder/cli.py", line 37 in 
  File "", line 228 in 
_call_with_frames_removed
  File "", line 790 in exec_module
  File "", line 680 in _load_unlocked
  File "", line 986 in _find_and_load_unlocked
  File "", line 1007 in _find_and_load
  File "./src/main/python/pybuilder/__init__.py", line 32 in bootstrap
  File "/tmp/IntegrationTestSupportte4n5vz_/build.py", line 31 in 
  File 
"/home/arcivanov/.pyenv/versions/3.9.0b3-debug/lib/python3.9/runpy.py", line 87 
in _run_code
  File 
"/home/arcivanov/.pyenv/versions/3.9.0b3-debug/lib/python3.9/runpy.py", line 97 
in _run_module_code
  File 
"/home/arcivanov/.pyenv/versions/3.9.0b3-debug/lib/python3.9/runpy.py", line 
268 in run_path
  File 
"/home/arcivanov/Documents/src/arcivanov/pybuilder/src/integrationtest/python/smoke_itest_support.py",
 line 72 in smoke_test
  File 
"/home/arcivanov/Documents/src/arcivanov/pybuilder/src/integrationtest/python/smoke_clean_tests.py",
 line 30 in test_build_then_clean
  File 
"/home/arcivanov/.pyenv/versions/3.9.0b3-debug/lib/python3.9/unittest/case.py", 
line 550 in _callTestMethod
  File 
"/home/arcivanov/.pyenv/versions/3.9.0b3-debug/lib/python3.9/unittest/case.py", 
line 593 in run
  File 
"/home/arcivanov/.pyenv/versions/3.9.0b3-debug/lib/python3.9/unittest/case.py", 
line 653 in __call__
  File 
"/home/arcivanov/.pyenv/versions/3.9.0b3-debug/lib/python3.9/unittest/suite.py",
 line 122 in run
  File 
"/home/arcivanov/.pyenv/versions/3.9.0b3-debug/lib/python3.9/unittest/suite.py",
 line 84 in 

[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-07-02 Thread STINNER Victor


STINNER Victor  added the comment:

Using https://github.com/sphinx-doc/sphinx/pull/7905 but without -W, I'm able 
to build the unmodified Python documentation with Sphinx 3!

I tried c_allow_pre_v3=1.

The PR was updated to add a second c_warn_on_allowed_pre_v3=0 option so we can 
keep -W.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

To complete this report, this is a regression. This exact code runs perfectly 
in 2.7, 3.5 - 3.8.

This is the PR in Travis: 
https://travis-ci.org/github/pybuilder/pybuilder/builds/704312142

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

My guess is that the issue is related to the sys.modules manipulation, i.e. 
these parts of the integration test harness:

def smoke_test(self, *args):
old_argv = list(sys.argv)
del sys.argv[:]
sys.argv.append(self.build_py)
sys.argv.extend(args)

old_modules = dict(sys.modules)
old_meta_path = list(sys.meta_path)
old_cwd = getcwd()
chdir(self.tmp_directory)
try:
return run_path(self.build_py, run_name="__main__")
except SystemExit as e:
self.assertEqual(e.code, 0, "Test did not exit successfully")
finally:
del sys.argv[:]
sys.argv.extend(old_argv)

sys.modules.clear()
sys.modules.update(old_modules)

del sys.meta_path[:]
sys.meta_path.extend(old_meta_path)
chdir(old_cwd)

def smoke_test_module(self, module, *args):
old_argv = list(sys.argv)
del sys.argv[:]
sys.argv.append("bogus")
sys.argv.extend(args)

old_modules = dict(sys.modules)
old_meta_path = list(sys.meta_path)
old_cwd = getcwd()
chdir(self.tmp_directory)
try:
return run_module(module, run_name="__main__")
except SystemExit as e:
self.assertEqual(e.code, 0, "Test did not exit successfully")
finally:
del sys.argv[:]
sys.argv.extend(old_argv)

sys.modules.clear()
sys.modules.update(old_modules)

del sys.meta_path[:]
sys.meta_path.extend(old_meta_path)
chdir(old_cwd)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

How to reproduce:

1. Clone github.com/pybuilder/pybuilder
2. Checkout https://github.com/pybuilder/pybuilder/pull/724
3. Run `PYTHONWARNINGS=ignore python ./build.py -v -X`

The failure occurs in the integration test smoke test in smoke_clean_tests.py

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

Once any of the integration tests run, the integration test environment is 
created and the test can be run directly from the command line via:

'.../pybuilder/target/venv/test/cpython-3.9.0.beta.3/bin/python' 
'.../pybuilder/src/integrationtest/python/smoke_clean_tests.py'

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Rhodri James
We've had the requested 24 hour cooling off, and I don't imagine anyone 
is surprised that the situation remains unchanged.  The commit message 
that caused the controversy is still in the PEP repository, and is still 
controversial.  Whether you think it's the best thing since the last 
best thing or the biggest load of bollocks since the last biggest load 
of bollocks is irrelevant.  It's there, it espouses a political stance, 
and by implication the Steering Council support it.


Since explicit is better than implicit :-), I would like to formally ask 
the Steering Council to answer the following questions.


1. Does the Steering Council think political statements have any place 
in the Python repositories?


2. If so, for the avoidance of doubt does the Steering Council support 
the statements in commit 0c6427d? 
(https://github.com/python/peps/commit/0c6427dcec1e98ca0bd46a876a7219ee4a9347f4)


3. If not, what do they intend to do about the above commit?

If the answer to question 1 is a qualified yes or no, both follow-up 
questions apply.


If the answer to question 1 is a prevarication, non-answer or silence, 
people will still draw their own conclusions.  I mention this merely to 
reinforce the idea that these things are still answers as well as 
hostages to fortune.


--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

No C extensions, working on giving you a reproducer.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread STINNER Victor


STINNER Victor  added the comment:

Can you please provide a reproducer? Does PyBuilder use C extensions?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41195] Interface to OpenSSL's security level

2020-07-02 Thread Matthew Hughes


Change by Matthew Hughes :


--
pull_requests: +20431
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21282

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41183] Workaround or fix for SSL ".._KEY_TOO_SMALL" test failures

2020-07-02 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset f52bf62fe12d46267e958f80dbe1f4425b55cd0f by Christian Heimes in 
branch '3.5':
bpo-41183: Update finite DH params to 3072 bits (#21278)
https://github.com/python/cpython/commit/f52bf62fe12d46267e958f80dbe1f4425b55cd0f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41193] traceback when exiting on read-only file system

2020-07-02 Thread STINNER Victor


STINNER Victor  added the comment:

Well, two errors were already ignored (bpo-19891). I just made the "except" 
more generic. I don't think that we can do anything more useless than ignoring 
the error if the filesystem is read-only. I don't think that a warning would be 
useful.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41175] Static analysis issues reported by GCC 10

2020-07-02 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



RE: trying to improve my knn algorithm

2020-07-02 Thread Raine Pretorius
Hi,

I think you sent this to the wrong person.



[cid:storage_emulated_0__EmailTempImage_5_TempSignature_signature_20200630_205218_jpg_1593543161247]

[cid:storage_emulated_0__EmailTempImage_5_TempSignature_signature_20200630_205334_jpg_1593543223538]

[cid:storage_emulated_0__EmailTempImage_5_TempSignature_signature_20200630_205420_jpg_1593543265258][cid:storage_emulated_0__EmailTempImage_5_TempSignature_signature_20200630_205456_jpg_1593543303538]

Kind Regards,
Raine Pretorius
[cid:storage_emulated_0__EmailTempImage_5_TempSignature_signature_20200630_205658_jpg_1593543438262]



 Original message 
From: Peter Otten <__pete...@web.de>
Date: 2020/07/02 11:09 (GMT+02:00)
To: python-list@python.org
Subject: Re: trying to improve my knn algorithm

kyroha...@gmail.com wrote:

> This is another account but I am the op. Why do you mean normalize? Sorry
> I’m new at this.

Take three texts containing the words

covid, vaccine, program, python

Some preparatory imports because I'm using numpy:

>>> from numpy import array
>>> from numpy.linalg import norm

The texts as vectors, the first entry representing "covid" etc.:

>>> text1 = array([1, 1, 0, 0])  # a short text about health
>>> text2 = array([5, 5, 0, 0])  # a longer text about health
>>> text3 = array([0, 0, 1, 1])  # a short text about programming in Python

Using your distance algorithm you get

>>> norm(text1-text2)
5.6568542494923806
>>> norm(text1-text3)
2.0

The two short texts have greater similarity than the texts about the same
topic!

You get a better result if you divide by the total number of words, i. e.
replace absolute word count with relative word frequency

>>> text1/text1.sum()
array([ 0.5,  0.5,  0. ,  0. ])

>>> norm(text1/text1.sum() - text2/text2.sum())
0.0
>>> norm(text1/text1.sum() - text3/text3.sum())
1.0

or normalize the vector length:

>>> norm(text1/norm(text1) - text2/norm(text2))
0.0
>>> norm(text1/norm(text1) - text3/norm(text3))
1.4142135623730949


--
https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41193] traceback when exiting on read-only file system

2020-07-02 Thread Zbyszek Jędrzejewski-Szmek

Zbyszek Jędrzejewski-Szmek  added the comment:

Wow, that was quick. Thanks!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



EuroPython 2020: Our Keynotes

2020-07-02 Thread M.-A. Lemburg
We’re happy to announce our keynote lineup for EuroPython 2020.

  * EuroPython 2020 Keynotes *
 https://ep2020.europython.eu/events/keynotes/


Guido van Rossum - Q
--

In this session, you’ll get a chance to get your questions answered by
Guido van Rossum, our retired BDFL.

In order to submit a question, please use the following Google form:
Guido van Rossum Q: Question Submission:

https://forms.gle/cAaBgUeVEBgjaDrH7


Siddha Ganju - 30 Golden Rules of Deep Learning Performance
---

“Watching paint dry is faster than training my deep learning model.”
“If only I had ten more GPUs, I could train my model in time.”
“I want to run my model on a cheap smartphone, but it’s probably too
heavy and slow.”

If this sounds like you, then you might like this talk.

Exploring the landscape of training and inference, we cover a myriad of
tricks that step-by-step improve the efficiency of most deep learning
pipelines, reduce wasted hardware cycles, and make them cost-effective.
We identify and fix inefficiencies across different parts of the
pipeline, including data preparation, reading and augmentation,
training, and inference.

With a data-driven approach and easy-to-replicate TensorFlow examples,
finely tune the knobs of your deep learning pipeline to get the best out
of your hardware.  And with the money you save, demand a raise!

Naomi Ceder - Staying for the Community:
Building Community in the face of Covid-19
--

Python communities around the world, large and small are facing loss -
from the loss of in person meetups and conferences to the loss of
employment and even the potential loss of health and life.  As
communities we are all confronting uncertainty and unanswered questions.
In this talk I would like to reflect on some of those questions.  What
are communities doing now to preserve a sense of community in the face
of this crisis?  What might we do and what options will we have for
coming events?  How can we build and foster community and still keep
everyone safe?  What challenges might we all face in the future?  What
sources of support can we find?  What are our sources of optimism and
hope?


Alejandro Saucedo - Meditations on First Deployment:
A Practical Guide to Responsible Development


As the impact of software increasingly reaches farther and wider, our
professional responsibility as developers becomes more critical to
society. The production systems we design, build and maintain often
bring inherent adversities with complex technical, societal and even
ethical challenges. The skillsets required to tackle these challenges
require us to go beyond the algorithms, and require cross-functional
collaboration that often goes beyond a single developer.  In this talk
we introduce intuitive and practical insights from a few of the core
ethics themes in software including Privacy, Equity, Trust and
Transparency.  We cover their importance, the growing societal
challenges, and how organisations such as The Institute for Ethical AI,
The Linux Foundation, the Association for Computer Machinery, NumFocus,
the IEEE and the Python Software Foundation are contributing to these
critical themes through standards, policy advise and open source
software initiatives.  We finally will wrap up the talk with practical
steps that any individual can take to get involved and contribute to
some of these great open initiatives, and contribute to these critical
ongoing discussions.


EuroPython 2020 is waiting for you
--

We’ve compiled a full program for the event:

- more than 120 sessions,
- more than 120 speakers from around the world,
- 4 brilliant keynotes,
- 2 exciting lightning talk blocks,
- 4 all-day tracks, with a whole track dedicated to data science topics,
- a poster track,
- a virtual social event,
- an after party,
- and lots of socializing on our conference platform.

Conference tickets are available on our registration page.  We hope to
see lots of you at the conference from July 23-26.  Rest assured that
we’ll make this a great event again — even within the limitations of
running the conference online.

https://ep2020.europython.eu/registration/buy-tickets/


Help spread the word


Please help us spread this message by sharing it on your social networks
as widely as possible. Thank you !

Link to the blog post:

https://blog.europython.eu/post/622517324925321216/europython-2020-our-keynotes

Tweet:

https://twitter.com/europython/status/1278608198870749184

Thanks,
--
EuroPython 2020 Team
https://ep2020.europython.eu/
https://www.europython-society.org/
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org

[issue41193] traceback when exiting on read-only file system

2020-07-02 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Zbyszek for your bug report. It's now fixed in 3.8, 3.9 and master 
branches.

--
components: +Library (Lib)
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41193] traceback when exiting on read-only file system

2020-07-02 Thread miss-islington


miss-islington  added the comment:


New changeset 0b4c87ef8f88a4c4c325e964fa4919cef3997605 by Miss Islington (bot) 
in branch '3.9':
bpo-41193: Ignore OSError in readline write_history() (GH-21279)
https://github.com/python/cpython/commit/0b4c87ef8f88a4c4c325e964fa4919cef3997605


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41193] traceback when exiting on read-only file system

2020-07-02 Thread miss-islington


miss-islington  added the comment:


New changeset 53d2b715d10e5c81cb9c86fd25e88ace4e41bc25 by Miss Islington (bot) 
in branch '3.8':
bpo-41193: Ignore OSError in readline write_history() (GH-21279)
https://github.com/python/cpython/commit/53d2b715d10e5c81cb9c86fd25e88ace4e41bc25


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41195] Interface to OpenSSL's security level

2020-07-02 Thread Matthew Hughes


Matthew Hughes  added the comment:

> Applications should not change this setting
> A read-only getter for the policy sounds like a good idea, though.

Thanks for the feedback, sounds reasonable to me. I'll happily work on getting 
a PR up for the read-only setter.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18080] setting CC no longer overrides default linker for extension module builds on OS X

2020-07-02 Thread Ned Deily


Ned Deily  added the comment:

Jason, what action(s) are you expecting with regard to this and by whom? This 
issue has been long closed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41194] SIGSEGV in Python 3.9.0b3 in Python-ast.c:1412

2020-07-02 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

If you aren't able to share some reproducer snippets, would you try a bisect? 
An interesting commit would be this ac46eb4ad66 to try and check if this crash 
happens before and after it?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41195] Interface to OpenSSL's security level

2020-07-02 Thread Christian Heimes


Christian Heimes  added the comment:

I'm not sure it's a good idea to expose a setter for security level. In general 
the security level is a system-wide policy decision that should be controlled 
by administrators. Applications should not change this setting.

Python libraries tend to follow bad practices and cargo cult when it comes to 
TLS settings. Many years ago OpenSSL and Linux distributions had bad default 
settings. Nowadays OpenSSL has good defaults and distributions often set even 
stricter defaults.

A read-only getter for the policy sounds like a good idea, though.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41193] traceback when exiting on read-only file system

2020-07-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20430
pull_request: https://github.com/python/cpython/pull/21281

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41193] traceback when exiting on read-only file system

2020-07-02 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +20429
pull_request: https://github.com/python/cpython/pull/21280

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >