[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-18 Thread Furkan Önder

Furkan Önder  added the comment:

Hello Samy,
I sent you pr from the docs-dict-ordered branch in your cpython repository. Now 
both of us have merged pr. I closed my own pr. You can also close your pr and 
send these changes again as bpo-39879.

It's my pr,https://github.com/AkechiShiro/cpython/pull/1

--

___
Python tracker 

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



[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 56bfdebfb17ea9d3245b1f222e92b8e3b1ed6118 by Victor Stinner in 
branch 'master':
bpo-39984: Pass tstate to _PyEval_SignalAsyncExc() (GH-19049)
https://github.com/python/cpython/commit/56bfdebfb17ea9d3245b1f222e92b8e3b1ed6118


--

___
Python tracker 

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



[issue39999] Fix some issues with AST node classes

2020-03-18 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

The proposed PR fixes some issues related to recent changes in the AST node 
classes.

1. Re-add removed classes Suite, Param, AugLoad and AugStore. They are not used 
in Python 3, are not created by the parser and are not accepted by the 
compiler. Param was used in 2.7, other classes were not used longer time. But 
some third-party projects (e.g. pyflakes) use them for isinstance checks.

2. Add docstrings for all dummy AST classes (Constant subclasses, Index, 
ExtTuple and the above four classes). Otherwise they inherited docstrings from 
the parent class.

3. Add docstrings for all attribute aliases.

4. Set __module__ = "ast" instead of "_ast" for all classes defined in the _ast 
module. Otherwise the help for the ast module would show only dummy classes, 
not actual AST node classes. It also makes pickles more compatible between 
versions.

--
components: Library (Lib)
messages: 364504
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Fix some issues with AST node classes
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue40000] Improve AST validation for Constant nodes

2020-03-18 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

When something that isn't constant found in a ast.Constant node's body, python 
reports errors like this

>>> e = ast.Expression(body=ast.Constant(value=type))
>>> ast.fix_missing_locations(e)
<_ast.Expression object at 0x7fc2c23981c0>
>>> compile(e, "", "eval")
Traceback (most recent call last):
  File "", line 1, in 
TypeError: got an invalid type in Constant: type

But if something is part of constant tuple and frozenset isn't constant, the 
error reporting is wrong 

>>> e = ast.Expression(body=ast.Constant(value=(1,2,type)))
>>> compile(e, "", "eval")
Traceback (most recent call last):
  File "", line 1, in 
TypeError: got an invalid type in Constant: tuple

This should've been 

TypeError: got an invalid type in Constant: type

--
messages: 364505
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: Improve AST validation for Constant nodes

___
Python tracker 

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



[issue40000] Improve AST validation for Constant nodes

2020-03-18 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
assignee:  -> BTaskaya
components: +Library (Lib)
type:  -> enhancement
versions: +Python 3.9

___
Python tracker 

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



[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-18 Thread Petr Viktorin


Petr Viktorin  added the comment:

I think we are speaking past each other.

In my (current) view, the semantics are spelled out in the documentation: "any 
non-zero value will be True when unpacking".
There's also a mention that this corresponds to the _Bool type in C. While this 
was the case with compilers in the past, it's no longer true with clang 9.


In your view, the semantics are dictated by the correspondence to _Bool, and 
the "non-zero value will be True when unpacking" is the fluff to be ignored and 
removed.


The docs assume the two behaviors (_Bool and non-zero) are equivalent. In this 
bug we find out that they are not, so to fix the bug, we need to make a choice 
which one to keep and which one to throw out.
I see nothing that would make one view inherently better than the other.


What "array libraries expect" is IMO not relevant: under any of the two views, 
libraries that are well-written (under that view) will be fine. Problems come 
when the library and Python choose different sides, e.g. when a non-C library 
can't use _Bool and thus packs arrays with the expectation that "any non-zero 
value will be True when unpacking".

What is a minimal change in *implementation* is a bigger change in *behavior*: 
unpacking of arrays will now depend greatly on details like the compiler used 
to build Python. I see that as the greater evil: since the data can be sharted 
across environments, languages and compilers, keeping the semantics 
well-defined seems better than leaving them to the compiler.
I don't see a compelling reason to choose _Bool semantics, but perhaps there is 
one.

--

___
Python tracker 

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



[issue39999] Fix some issues with AST node classes

2020-03-18 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> 1. Re-add removed classes Suite, Param, AugLoad and AugStore. They are not 
> used in Python 3, are not created by the parser and are not accepted by the 
> compiler. Param was used in 2.7, other classes were not used longer time. But 
> some third-party projects (e.g. pyflakes) use them for isinstance checks.

I dont think Suite used in anywhere related to CPython, and for others (Param 
and Aug contexts, which both used in pyflakes) I dont think it is necessary 
to have them. For most of the part they can just do this

if not PY27:
 class Param(ast.expr_context): pass

and looks like pyflakes already have a PR about this (not this way, but it is 
common to have version-specific conditions in AST tools).

--
nosy: +BTaskaya

___
Python tracker 

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



[issue40000] Improve AST validation for Constant nodes

2020-03-18 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue39999] Fix some issues with AST node classes

2020-03-18 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue39999] Fix some issues with AST node classes

2020-03-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Yes, and this what PR 19056 does. It is not difficult, and if we can avoid a 
breakage, why not do this? We have kept all other deprecated classes, like Num 
and ExtSlice. In 3.10 we can add runtime warnings, and remove them in some 
future releases.

We alreade got a benefit of simplifying the compiler. Maintaining dummy classes 
does not cost much.

--

___
Python tracker 

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



[issue40000] Improve AST validation for Constant nodes

2020-03-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

You got an anniversary issue!

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue17023] Subprocess does not find executable on Windows if it is PATH with quotes

2020-03-18 Thread Oskar Persson


Change by Oskar Persson :


--
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue39999] Fix some issues with AST node classes

2020-03-18 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

I see, thanks for the explanation.

--

___
Python tracker 

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



[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-18 Thread Stefan Krah


Stefan Krah  added the comment:

I think this issue should be about fixing the tests so that people
looking at the sanitizer buildbots can move on.

GH-18969 fixes "?" and "!?", which clearly used wrong
semantics with the new compiler behavior. This should be an
uncontroversial fix that also takes care of test_struct.


Can we please discuss native _Bool in another issue?

There is no non-hackish way of unpacking _Bool if new compilers
essentially treat values outside [0, 1] as a trap representation.


You could determine sizeof(_Bool), use the matching unsigned type,
unpack as that, then cast to _Bool. But do you really want to force
that procedure on all array libraries that want to be PEP-3118
compatible?

I'd rather deprecate _Bool and use uint8_t, but that definitely
deserves a separate issue.

--

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-03-18 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +18409
pull_request: https://github.com/python/cpython/pull/19057

___
Python tracker 

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



[issue17023] Subprocess does not find executable on Windows if it is PATH with quotes

2020-03-18 Thread Eryk Sun


Eryk Sun  added the comment:

Why are new versions getting added to an issue that was closed 5 years ago? 

That said, I'd like to clarify that this was not and is not a bug. It happens 
that the CMD shell strips quotes out, but that doesn't make it valid. PATH in 
Windows is delimited by semicolons, not spaces, so paths with spaces should 
never be quoted. In particular, WINAPI SearchPathW, which CreateProcessW calls, 
leaves quotes in the directory name when testing whether a file is in the 
directory.

Also, the conclusion that Linux doesn't suffer from this problem is incorrect. 
The shell command that was used actually strips the quotes out as part of 
command-line pre-processing, i.e. `PATH=$PATH:"test"` results in the same PATH 
value as `PATH=$PATH:test`. But it will fail to find "script.sh" if you escape 
the quotes to make the shell add them literally to PATH, e.g. 
`PATH=$PATH:\"test\"`.

--
nosy: +eryksun
resolution: wont fix -> not a bug

___
Python tracker 

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



[issue39979] Cannot tune scrypt with large enough parameters

2020-03-18 Thread Gle


Gle  added the comment:

Alright, I understand the difference in behaviour now. Thanks a lot for the 
clear explanation !

Would be nice to have something like:
"""maxmem must be greater than (n * 2 * r * 64) plus a bit of internal
   memory for OpenSSL book keeping.
   Basically, set maxmem = (n * 2 * r * 65)
"""
in the documentation.

Thanks again, and sorry to have bothered you with this non-bug.
Have a happy day !

--
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



[issue40001] ignore errors in SimpleCookie

2020-03-18 Thread Aviram


New submission from Aviram :

SimpleCookie (http/cookies.py) load method fails if one of the has an issue.
In real life scenarios, we want to be tolerant toward faulty cookies, and just 
ignore those. 
My suggestion is to add ignore_errors keyword argument to the load method of 
SimpleCookie, skipping invalid Morsels.

--
components: Library (Lib)
messages: 364514
nosy: aviramha
priority: normal
severity: normal
status: open
title: ignore errors in SimpleCookie
type: enhancement
versions: Python 3.5, Python 3.6, 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



[issue28009] Fix uuid.uuid1() core logic of uuid.getnode() needs refresh

2020-03-18 Thread Michael Felt


Michael Felt  added the comment:

I'll take a look as well.

On 17/03/2020 16:14, STINNER Victor wrote:
> STINNER Victor  added the comment:
>
>> New changeset 0bcbfa43d55d9558cdcb256d8998366281322080 by Tal Einat (Michael 
>> Felt) in branch 'master':
>> bpo-28009: Fix uuid.uuid1() and uuid.get_node() on AIX (GH-8672)
> This change introduced a regression: bpo-39991.
>
> I pushed the commit eb886db1e99a15f15a2342aa496197a5f88fa9c8 to fix my case, 
> but I'm not sure that the fix covers all cases.
>
> --
> nosy: +vstinner
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue40001] ignore errors in SimpleCookie

2020-03-18 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +18410
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19058

___
Python tracker 

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



[issue39979] Cannot tune scrypt with large enough parameters

2020-03-18 Thread Christian Heimes


Christian Heimes  added the comment:

PS: You are getting a different output because you are feeding a different 
input to hashlib.scrypt(). The first parameter is the password, not password + 
salt.

--

___
Python tracker 

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



[issue28009] Fix uuid.uuid1() core logic of uuid.getnode() needs refresh

2020-03-18 Thread Michael Felt


Michael Felt  added the comment:

I may be mistaken, but I do not think the change introduced a regression.

While it is true that this case would not have appeared if there was
still a count of the field-separators an IPv6 address with 5 ':' and 17
characters would have failed as well. The value being examined is based
on it's position, and previously the additional assumption is that
whatever is in that position is a MACADDR if it uses the system
separator ('.' on AIX, ':' elsewhere).

If anyone is interested I will think about what are assumptions are - is
this a value we should be considering, or not.

IMHO - while issue39991 is resolved - I am not -yet- convinced that the
"root cause" has been identified and properly coded

Michael

On 17/03/2020 16:14, STINNER Victor wrote:
> STINNER Victor  added the comment:
>
>> New changeset 0bcbfa43d55d9558cdcb256d8998366281322080 by Tal Einat (Michael 
>> Felt) in branch 'master':
>> bpo-28009: Fix uuid.uuid1() and uuid.get_node() on AIX (GH-8672)
> This change introduced a regression: bpo-39991.
>
> I pushed the commit eb886db1e99a15f15a2342aa496197a5f88fa9c8 to fix my case, 
> but I'm not sure that the fix covers all cases.
>
> --
> nosy: +vstinner
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue28009] Fix uuid.uuid1() core logic of uuid.getnode() needs refresh

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

> I may be mistaken, but I do not think the change introduced a regression.

I'm talking about this:
https://bugs.python.org/issue39991#msg364435

I don't want to blame anyone. My intent here is to get more eyes on the changes 
that I merged in bpo-39991 to make sure that I didn't break any existing cases, 
and that I covered all cases.


> While it is true that this case would not have appeared if there was
still a count of the field-separators an IPv6 address with 5 ':' and 17
characters would have failed as well.

Right, I pushed a second fix to also handle this case: commit 
ebf6bb9f5ef032d1646b418ebbb645ea0b217da6.


> IMHO - while issue39991 is resolved - I am not -yet- convinced that the "root 
> cause" has been identified and properly coded

If you still see cases which are not handled properly with commit 
ebf6bb9f5ef032d1646b418ebbb645ea0b217da6, feel free to reopen bpo-39991.

--

___
Python tracker 

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



[issue40002] Cookie load error inconsistency

2020-03-18 Thread Bar Harel


New submission from Bar Harel :

ATM loading cookies is inconsistent.
If you encounter an invalid cookie, BaseCookie.load will sometimes raise 
CookieError and sometimes silently ignore the load:
 
from http.cookies import SimpleCookie
s = SimpleCookie()
s.load("invalid\x00=cookie") # Silently ignored
s.load("invalid/=cookie") # Raises CookieError

--
components: Library (Lib)
messages: 364519
nosy: bar.harel
priority: normal
severity: normal
status: open
title: Cookie load error inconsistency
versions: 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



[issue40002] Cookie load error inconsistency

2020-03-18 Thread Aviram


Change by Aviram :


--
keywords: +patch
nosy: +aviramha
nosy_count: 1.0 -> 2.0
pull_requests: +18411
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19058

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-18 Thread Lahfa Samy


Lahfa Samy  added the comment:

Thank you for your quick work, I have successfully merged your changes in the 
branch of the first PR, now awaiting review from Zachary.

--

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4657a8a0d006c76699ba3d1d4d21a04860bb2586 by Dong-hee Na in branch 
'master':
bpo-1635741: Port _heapq module to multiphase initialization (GH19057)
https://github.com/python/cpython/commit/4657a8a0d006c76699ba3d1d4d21a04860bb2586


--

___
Python tracker 

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



[issue40002] Cookie load error inconsistency

2020-03-18 Thread Bar Harel


Change by Bar Harel :


--
pull_requests: +18412
pull_request: https://github.com/python/cpython/pull/19059

___
Python tracker 

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



[issue20986] test_startup_imports fails in test_site when executed inside venv

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

I close the issue. This bug has no activity for 6 years and was reported on 
Python 3.4, whereas the development branch is now the future Python 3.9. If you 
can still reproduce the issue, please reopen the issue or open a new issue (add 
a reference to this one).

--
nosy: +vstinner
resolution:  -> out of date
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



[issue27807] Prevent site-packages .pth files from causing test_site failure

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

Fedora and RHEL downstream issue: 
https://bugzilla.redhat.com/show_bug.cgi?id=1814392

--
nosy: +vstinner

___
Python tracker 

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



[issue35691] cpython3.7.2 make test failed

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

It's likely a duplicate of bpo-28087.

--
nosy: +vstinner
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> macOS 12 poll syscall returns prematurely

___
Python tracker 

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



[issue27807] Prevent site-packages .pth files from causing test_site failure

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-35691 as a duplicate of this issue.

--

___
Python tracker 

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



[issue35691] cpython3.7.2 make test failed

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

Oops, I mean: bpo-27807 "Prevent site-packages .pth files from causing 
test_site failure".

--
superseder: macOS 12 poll syscall returns prematurely -> Prevent site-packages 
.pth files from causing test_site failure

___
Python tracker 

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



[issue27807] Prevent site-packages .pth files from causing test_site failure: test_site.test_startup_imports() failure

2020-03-18 Thread STINNER Victor


Change by STINNER Victor :


--
title: Prevent site-packages .pth files from causing test_site failure -> 
Prevent site-packages .pth files from causing test_site failure: 
test_site.test_startup_imports() failure

___
Python tracker 

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



[issue28087] macOS 12 poll syscall returns prematurely

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

No update since 2017, I close the issue.

--
resolution:  -> fixed
stage: commit 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



[issue27807] Prevent site-packages .pth files from causing test_site failure: test_site.test_startup_imports() failure

2020-03-18 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40003] test.regrtest: add an option to run test.bisect_cmd on failed tests, use it on Refleaks buildbots

2020-03-18 Thread STINNER Victor


New submission from STINNER Victor :

There are some tests which fail randomly in general, but fail in a 
deterministic way on some specific buildbot workers.

bpo-39932 is a good example: test_multiprocessing_fork fails with 
"test_multiprocessing_fork leaked [0, 2, 0] file descriptors". The test fails 
while run in paralle, but it also fails when re-run sequentially. Except that 
when I connect to the buildbot worker, it does not fail anymore.

test_multiprocessing_fork contains 356 test methods, the test file 
(Lib/test/_test_multiprocessing.py) has 5741 lines of Python code, and the 
multiprocessing is made of 8149 lines of Python code and 1133 lines of C code. 
It's hard to audit such code. The multiprocessing uses multiple proceses, 
pipes, signals, etc. It's really hard to debug.

I propose to add an --bisect-failed option to test.regrtest to run 
test.bisect_cmd on failed tests. We can start to experiment it on Refleaks 
buildbots. Regular tests (not Refleaks tests) are easier to reproduce in 
general.

It should speedup analysis of reference leak and "altered environment" test 
failures. Having less test methods to audit is way simpler.

The implement should be that at the end of regrtest, after tests are re-run, 
run each failed test in test.bisect_cmd with the same command line arguments 
than test.regrtest.

test.bisect_cmd uses 100 iterations by default. It's ok if the bisection fails 
to reduce the number of test methods. At least, it should reduce the list in 
some cases.

--
components: Tests
messages: 364528
nosy: vstinner
priority: normal
severity: normal
status: open
title: test.regrtest: add an option to run test.bisect_cmd on failed tests, use 
it on Refleaks buildbots
versions: Python 3.9

___
Python tracker 

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



[issue40000] Improve AST validation for Constant nodes

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

Congratulations Batuhan! You win with the bug number 4! A nice number ;-) 
To be honest, I wanted to get it, but I didn't want to cheat by opening a 
stupid issue.

--
nosy: +vstinner

___
Python tracker 

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



[issue40000] Improve AST validation for Constant nodes

2020-03-18 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

sorry to take it Victor, maybe you can get the perfect issue number when we 
migrate to github?

--

___
Python tracker 

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



[issue40002] Cookie load error inconsistency

2020-03-18 Thread Bar Harel


Bar Harel  added the comment:

The only issue I fear is breakage if people count on it silently ignoring 
errors.
But then again it's inconsistent, and sometimes it will throw errors either 
way, so I still believe this issue should be addressed.

--

___
Python tracker 

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



[issue28009] Fix uuid.uuid1() core logic of uuid.getnode() needs refresh

2020-03-18 Thread Michael Felt


Michael Felt  added the comment:

On 18/03/2020 13:55, STINNER Victor wrote:
> STINNER Victor  added the comment:
>
>> I may be mistaken, but I do not think the change introduced a regression.

I meant - I had never considered IPv6 in the Address column, just as I
suspect, whoever wrote the original.

Your feedback made me realize that something like "fe80::78:9a:de:f0"
would have been mistaken as a valid macaddr.

> I'm talking about this:
> https://bugs.python.org/issue39991#msg364435
>
> I don't want to blame anyone. My intent here is to get more eyes on the 
> changes that I merged in bpo-39991 to make sure that I didn't break any 
> existing cases, and that I covered all cases.

I will look closely at PR19045 - not because I expect to find anything
wrong, but because I thought this is what you requested.

Regards,
Michael

>
>> While it is true that this case would not have appeared if there was
> still a count of the field-separators an IPv6 address with 5 ':' and 17
> characters would have failed as well.
>
> Right, I pushed a second fix to also handle this case: commit 
> ebf6bb9f5ef032d1646b418ebbb645ea0b217da6.
>
>
>> IMHO - while issue39991 is resolved - I am not -yet- convinced that the 
>> "root cause" has been identified and properly coded
> If you still see cases which are not handled properly with commit 
> ebf6bb9f5ef032d1646b418ebbb645ea0b217da6, feel free to reopen bpo-39991.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue28009] Fix uuid.uuid1() core logic of uuid.getnode() needs refresh

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

> I will look closely at PR19045 - not because I expect to find anything wrong, 
> but because I thought this is what you requested.

I cannot run functional tests on AIX. I can only rely on unit tests which 
contains a dump of AIX commands. That's why a review wouldn't hurt ;-)

--

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-03-18 Thread Stefan Krah


Stefan Krah  added the comment:

Since xlc has elementary bugs like

   https://github.com/openssl/openssl/issues/10624

it may be worth checking out if this is an optimizer bug with -q64.

--

___
Python tracker 

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



[issue40004] String comparison with dotted numerical values wrong

2020-03-18 Thread Boštjan Mejak

New submission from Boštjan Mejak :

I stumbled upon a possible bug in the Python interpreter while doing some 
Python version comparisons.

Look at this:
"3.10.2" < "3.8.2"
True  # This is not true as a version number comparison

Now look at this:
"3.10.2" < "3.08.2"
False  # Adding a leading 0 compares those two version numbers correctly

Is it possible Python is fixed to correctly compare such numbers? That would 
make comparing Python version numbers possible in the future.

import platform
if platform.python_version() < "3.8.2":
# Do something

This is currently possible and correct, but this will break when Python version 
number becomes 3.10 and you wanna compare this version number to, say, 3.9.

--
components: Interpreter Core
messages: 364535
nosy: PedanticHacker, gvanrossum
priority: normal
severity: normal
status: open
title: String comparison with dotted numerical values wrong
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, 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



[issue27807] Prevent site-packages .pth files from causing test_site failure: test_site.test_startup_imports() failure

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d18de46117d661a4acaf2380cc5ebb1cf6a000e9 by Victor Stinner in 
branch 'master':
bpo-27807: Skip test_site.test_startup_imports() if pth file (GH-19060)
https://github.com/python/cpython/commit/d18de46117d661a4acaf2380cc5ebb1cf6a000e9


--

___
Python tracker 

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



[issue40004] String comparison with dotted numerical values wrong

2020-03-18 Thread Guido van Rossum


Guido van Rossum  added the comment:

That's why for over a decade we've been recommending not to use string 
comparisons to compare versions. You have to parse the version and then compare 
the numeric values.

--
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



[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1c60567b9a4c8f77e730de9d22690d8e68d7e5f6 by Dong-hee Na in branch 
'master':
bpo-37207: Use PEP 590 vectorcall to speed up frozenset() (GH-19053)
https://github.com/python/cpython/commit/1c60567b9a4c8f77e730de9d22690d8e68d7e5f6


--

___
Python tracker 

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



[issue40004] String comparison with dotted numerical values wrong

2020-03-18 Thread Boštjan Mejak

Boštjan Mejak  added the comment:

What is then the most Pythonic way of comparing two version numbers?

--

___
Python tracker 

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



[issue40004] String comparison with dotted numerical values wrong

2020-03-18 Thread Guido van Rossum


Guido van Rossum  added the comment:

That's a question for a user forum. There's some code in 
Lib/distutils/version.py.

--

___
Python tracker 

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



[issue39980] importlib.resources.path() may return incorrect path when using custom loader

2020-03-18 Thread Krzysztof Rusek


Krzysztof Rusek  added the comment:

I can confirm that this problem doesn't occur when using recent version of 
importlib_resources (checked importlib_resources==1.3.1).

--

___
Python tracker 

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



[issue22246] add strptime(s, '%s')

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue22014] Improve display of OS exception <-> errno mapping

2020-03-18 Thread Brett Cannon


Brett Cannon  added the comment:

Is this still important now that OSError has so many subclasses that correspond 
to specific error codes?

--

___
Python tracker 

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



[issue22543] -W option cannot use non-standard categories

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue22789] Compress the marshalled data in PYC files

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue22858] unittest.__init__:main shadows unittest.main

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue37127] Handling pending calls during runtime finalization may cause problems.

2020-03-18 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +18415
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/19061

___
Python tracker 

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



[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18414
pull_request: https://github.com/python/cpython/pull/19061

___
Python tracker 

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



[issue21724] resetwarnings doesn't reset warnings registry

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue21737] runpy.run_path() fails with frozen __main__ modules

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue21736] Add __file__ attribute to frozen modules

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue21760] inspect documentation describes module type inaccurately

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue21550] Add Python implementation of the tar utility

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue37127] Handling pending calls during runtime finalization may cause problems.

2020-03-18 Thread STINNER Victor

STINNER Victor  added the comment:

> pending->finishing was addd in bpo-33608 by the change: commit 
> 842a2f07f2f08a935ef470bfdaeef40f87490cfc

Since this change, Py_AddPendingCall() now requires the thread to have a Python 
thread state: it is used if pending->finishing is non-zero.

The function documentation says:

"This function doesn’t need a current thread state to run, and it doesn’t need 
the global interpreter lock."

https://docs.python.org/dev/c-api/init.html#c.Py_AddPendingCall

The current implementation seems to contradict the documentation.

We may update the documentation to replace "doesn't need" with "requires" (a 
Python thread state).

Or the implementation can use PyGILState_Ensure() and PyGILState_Release() to 
create a temporary Python thread state if the thread doesn't have one.

Removing pending->finishing would only partially fix the issue. With PR 19061, 
tstate is required to access "ceval" structure.

trip_signal() called by the C signal handler has a similar issue: it only 
requires non-NULL tstate if pending->finishing is non-zero.

--

___
Python tracker 

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



[issue37127] Handling pending calls during runtime finalization may cause problems.

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

My notes on Python finalization: 
https://pythondev.readthedocs.io/finalization.html

--

___
Python tracker 

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



[issue21577] Help for ImportError should show a more useful signature.

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
versions: +Python 3.9 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue21614] Case sensitivity problem in multiprocessing.

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue37127] Handling pending calls during runtime finalization may cause problems.

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

trip_signal() has another problem. If pending->finishing is non-zero, 
_PyEval_AddPendingCall() uses the C API whereas the current thread may not hold 
the GIL. That's forbidden by the C API.

The more I think about it, the more I think that pending->finishing is fragile 
and should be removed.

I understood that pending->finishing was added to workaround crashes during 
Python finalization. I fixed multiple crashes related to daemon threads during 
Python finalization in bpo-39877. Maybe the bugs that I fixed were the ones 
which pending->finishing was supposed to work around.

--

___
Python tracker 

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



[issue21199] Python on 64-bit Windows uses signed 32-bit type for read length

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

Same bug on AMD64 FreeBSD Non-Debug 3.x:
https://buildbot.python.org/all/#/builders/214/builds/472

==
ERROR: test_crash 
(test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) [crash 
during func execution on worker]
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/test/test_concurrent_futures.py",
 line 1119, in test_crash
executor.shutdown(wait=True)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/concurrent/futures/process.py",
 line 721, in shutdown
self._executor_manager_thread_wakeup.wakeup()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/concurrent/futures/process.py",
 line 93, in wakeup
self._writer.send_bytes(b"")
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/multiprocessing/connection.py",
 line 205, in send_bytes
self._send_bytes(m[offset:offset + size])
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/multiprocessing/connection.py",
 line 416, in _send_bytes
self._send(header + buf)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/multiprocessing/connection.py",
 line 373, in _send
n = write(self._handle, buf)
OSError: [Errno 9] Bad file descriptor

Stdout:
8.35s 

Stderr:
Warning -- threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 
3)
Dangling thread: <_MainThread(MainThread, started 34369908736)>
Dangling thread: <_ExecutorManagerThread(Thread-114, stopped daemon 
34396434432)>
Dangling thread: 

--

--

___
Python tracker 

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



[issue21242] Generalize configure check for working Python executable

2020-03-18 Thread Brett Cannon


Brett Cannon  added the comment:

`make regen-all` has probably taken care of this.

--

___
Python tracker 

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



[issue21243] Auto-generate exceptions.c from a Python file

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
versions: +Python 3.9 -Python 3.6

___
Python tracker 

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



[issue21199] [2.7] Python on 64-bit Windows uses signed 32-bit type for read length

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

Python 3 doesn't have this issue. Python 2 no longer accepts bugfixes. I close 
the issue.

Note: there was a similar issue specific to macOS: bpo-24658 and PR 9938 
(closed since Python 2 moved to end of life).

--
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
title: Python on 64-bit Windows uses signed 32-bit type for read length -> 
[2.7] Python on 64-bit Windows uses signed 32-bit type for read length

___
Python tracker 

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



[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8849e5962ba481d5d414b3467a256aba2134b4da by Victor Stinner in 
branch 'master':
bpo-39984: trip_signal() uses PyGILState_GetThisThreadState() (GH-19061)
https://github.com/python/cpython/commit/8849e5962ba481d5d414b3467a256aba2134b4da


--

___
Python tracker 

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



[issue37127] Handling pending calls during runtime finalization may cause problems.

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8849e5962ba481d5d414b3467a256aba2134b4da by Victor Stinner in 
branch 'master':
bpo-39984: trip_signal() uses PyGILState_GetThisThreadState() (GH-19061)
https://github.com/python/cpython/commit/8849e5962ba481d5d414b3467a256aba2134b4da


--

___
Python tracker 

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



[issue21459] DragonFlyBSD support

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue21108] Add examples for importlib in doc

2020-03-18 Thread Brett Cannon


Brett Cannon  added the comment:

There are now examples in the importlib docs.

--
resolution:  -> out of date
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



[issue21249] removing pythonXY.zip from sys.path results in additional test failures

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue21242] Generalize configure check for working Python executable

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
resolution:  -> out of date
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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

> Same bug on AMD64 FreeBSD Non-Debug 3.x:
> https://buildbot.python.org/all/#/builders/214/builds/472

Oh, test_crash failed twice, but not on the same test case:

* ERROR: test_crash 
(test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) [crash 
during func execution on worker]
* ERROR: test_crash 
(test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest) [crash 
during func execution on worker]

The second failure was when test_concurrent_futures was re-run sequentially.

--

___
Python tracker 

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



[issue20125] We need a good replacement for direct use of load_module(), post-PEP 451

2020-03-18 Thread Brett Cannon


Brett Cannon  added the comment:

I don't think this is still needed as the importlib docs now has enough 
examples to show people how to get to get similar results with a few method 
calls.

--
resolution:  -> out of date
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



[issue20205] inspect.getsource(), P302 loader and '<..>' filenames

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20123] pydoc.synopsis fails to load binary modules

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20131] warnings module offers no documented, programmatic way to reset "seen-warning" flag

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20506] Command to display all available Import Library

2020-03-18 Thread Brett Cannon


Brett Cannon  added the comment:

When a replacement for pkgutil.walk_packages() is added to importlib to work 
appropriately with the import system then this should be doable. See 
https://bugs.python.org/issue19939 for work to replace pkgutil as appropriate.

--

___
Python tracker 

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



[issue20506] Command to display all available Import Library

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20439] inspect.Signature: Add Signature.format method to match formatargspec functionality

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20341] Argument Clinic: add "nullable ints"

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20461] Argument Clinic included return converters hard code use of ``_return_value``

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20360] inspect.Signature could provide readable expressions for default values for builtins

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20459] No Argument Clinic documentation on how to specify a return converter

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue21078] multiprocessing.managers.BaseManager.__init__'s "serializer" argument is not documented

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20613] Wrong line information in bytecode generated by compiler module

2020-03-18 Thread Brett Cannon


Brett Cannon  added the comment:

Since 2.7 development is done there is no compiler packages anymore to worry 
about. :)

--
resolution:  -> out of date
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



[issue20899] Nested namespace imports do not work inside zip archives

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue40002] Cookie load error inconsistency

2020-03-18 Thread Bar Harel


Bar Harel  added the comment:

For reference, docs already state:

"On encountering an invalid cookie, CookieError is raised, so if your cookie 
data comes from a browser you should always prepare for invalid data and catch 
CookieError on parsing."

--

___
Python tracker 

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



[issue20890] Miscellaneous PEP 101 additions

2020-03-18 Thread Brett Cannon


Brett Cannon  added the comment:

These parts of the devguide don't seem to exist anymore, so I'm closing as 
outdated.

--
resolution:  -> out of date
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



[issue21087] imp.frozen_init() incorrectly removes module during reload

2020-03-18 Thread Brett Cannon


Brett Cannon  added the comment:

No one has cared in nearly 6 years, so I'm closing as "won't fix". :)

--
resolution:  -> wont fix
stage: test needed -> 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



[issue40005] Getting different result in python 2.7 and 3.7.

2020-03-18 Thread Bharat Solanki


New submission from Bharat Solanki :

Hi Team,

Below code is giving different result in python 2.7 and 3.7 version. Code is 
running fine when i am using 2.7 but in 3.7, it is showing error.  

from multiprocessing import Pool
import traceback
class Utils: def __init__(self): self.count = 10

def function(): global u1 u1 = Utils() l1 = range(3) process_pool = Pool(1) 
try: process_pool.map(add, l1, 1) process_pool.close() process_pool.join() 
except Exception as e: process_pool.terminate() process_pool.join() 
print(traceback.format_exc()) print(e)
def add(num): total = num + u1.count print(total)
if __name__ == "__main__": function()

Could you please help me on this how can it run in 3.7 version.

Thanks,
Bharat

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 364559
nosy: Bharatsolanki
priority: normal
severity: normal
status: open
title: Getting different result in python 2.7 and 3.7.
type: compile error
versions: Python 2.7

___
Python tracker 

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



[issue40005] Getting different result in python 2.7 and 3.7.

2020-03-18 Thread Eric V. Smith


Eric V. Smith  added the comment:

Note that 2.7 is no longer supported.

If you think you found a bug in 3.7, then please:
- Reformat your code so that we can understand it.
- Show us what output you actually get.
- Show us what output you expect, and why.

--
nosy: +eric.smith

___
Python tracker 

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



[issue40006] enum: Add documentation for _create_pseudo_member_ and composite members

2020-03-18 Thread Ram Rachum


New submission from Ram Rachum :

Looking at the enum source code, there's a method `_create_pseudo_member_` 
that's used in a bunch of places. Its docstring says "Create a composite member 
iff value contains only members", which would have been useful if I had any 
idea what "composite member" meant.

It would be good if the documentation for the enum module would include more 
information about these two concepts.

--
assignee: docs@python
components: Documentation
messages: 364561
nosy: cool-RR, docs@python
priority: normal
severity: normal
status: open
title: enum: Add documentation for _create_pseudo_member_ and composite members
type: enhancement
versions: 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



[issue40006] enum: Add documentation for _create_pseudo_member_ and composite members

2020-03-18 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +barry, eli.bendersky, ethan.furman

___
Python tracker 

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



  1   2   >