[issue39837] Remove Azure Pipelines from GitHub PRs

2020-04-28 Thread hai shi


hai shi  added the comment:

> Sadly (again), closing/reopening a PR re-runs all CIs. At the first run, GH 
> Action macOS job passed. At the second run, the "Tests" step of GH Action 
> macOS job, but I'm clueless with its logs: (...)

Oh, I encountered the same trouble twice :(
https://github.com/python/cpython/runs/628458496

--
nosy: +shihai1991

___
Python tracker 

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



[issue40405] asyncio.as_completed documentation misleading

2020-04-28 Thread Guido van Rossum


Guido van Rossum  added the comment:

Please work this out in the PR between the two of you, Kyle and Bar.

--

___
Python tracker 

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



[issue40405] asyncio.as_completed documentation misleading

2020-04-28 Thread Kyle Stanley


Kyle Stanley  added the comment:

Alternatively, I think "can wait for" would also read better than "allows to 
wait for", if that is preferred over my above suggestion.

--

___
Python tracker 

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



[issue39966] mock 3.9 bug: Wrapped objects without __bool__ raise exception

2020-04-28 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks Avram for the report. I have reopened issue25597. Closing this as the 
regression change has been reverted for 3.9.

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



[issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc)

2020-04-28 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

The change has been reverted as per issue39966. I am reopening this for further 
discussion.

--
resolution: fixed -> 
stage: resolved -> 
status: closed -> open

___
Python tracker 

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



[issue40405] asyncio.as_completed documentation misleading

2020-04-28 Thread Kyle Stanley


Kyle Stanley  added the comment:

> based upon the order of completion

I forgot to explain this in the above message. I think something that mentions 
"order of completion" should be included. Although it's implied in the name 
`as_completed`, to me it seems worthwhile to be fully explicit with what 
exactly is meant by "earliest".

--

___
Python tracker 

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



[issue40405] asyncio.as_completed documentation misleading

2020-04-28 Thread Kyle Stanley


Kyle Stanley  added the comment:

Yury Selivanov wrote:
> I'd suggest to change to: "Return an iterator of coroutines.  Each coroutine 
> allows to wait for the earliest next result from the set of the remaining 
> awaitables."

The first sentence looks good to me, but I'm not certain about the second 
sentence, particularly "allows to wait". Instead, I'm thinking something like 
this might read better:

"Each coroutine represents the earliest next result from the set of the 
remaining awaitables, based upon the order of completion."

Thoughts?

--
nosy: +aeros

___
Python tracker 

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



[issue35113] inspect.getsource returns incorrect source for classes when class definition is part of multiline strings

2020-04-28 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Closing this as fixed with the enhancement to show decorator for classes too 
for 3.9. Thank you all for the help on this.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.6, 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



[issue40317] inspect.getsource() examines incorrect target

2020-04-28 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

yes, thanks Ammar. Thanks Grzegorz for the report.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> inspect.getsource returns incorrect source for classes when 
class definition is part of multiline strings
versions: +Python 3.9 -Python 2.7, 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



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Kyle Stanley


Change by Kyle Stanley :


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



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Kyle Stanley


Kyle Stanley  added the comment:


New changeset cc011b5190b63f0be561ddec38fc4cd9e60cbf6a by Kyle Stanley in 
branch '3.8':
[3.8] bpo-40431: Fix syntax typo in turtledemo (GH-19777) (#19784)
https://github.com/python/cpython/commit/cc011b5190b63f0be561ddec38fc4cd9e60cbf6a


--

___
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-04-28 Thread Kyle Stanley


Kyle Stanley  added the comment:

Also, thanks to Victor for coming up with an interim solution, and for the 
feedback from Antoine and Thomas. GH-19760 is a significant improvement from my 
initial proposal in GH-19751.

--

___
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-04-28 Thread Kyle Stanley


Kyle Stanley  added the comment:

I am a bit concerned about the performance implication of accessing the thread 
wakeup through a lock in the call queue, but for now I think it's reasonable to 
address the buildbot failure with a locking solution while we try to find a 
better one.

I'm not certain if we'll be able to find one that correctly addresses the 
failures with zero additional locking, but I think we may be able to reduce the 
number of times we use the lock compared to the implementation in GH-19760. 
I'll spend some time exploring that as I find the time to, and report back with 
any significant findings.

--

___
Python tracker 

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



[issue40433] Equality operations between lists and arrays

2020-04-28 Thread Ahmed Amr


New submission from Ahmed Amr :

Hi, I was thinking if we could add equality between array and list to work out 
of the box on the supported datatypes by arrays.

Currently, comparing a list and an array with the same contents returns False.

Also, creating an array of floats from a listA, then turning that array into a 
listB, returns different contents between listA and listB.

It's somehow counter-intuitive for me as even if the underlying implementations 
are different between array and list, they can be viewed as an array data 
structure but with different restrictions/implementations, along with that, 
arrays compare to each other correctly, and lists compare to each other 
correctly.

based on that, switching some lists to arrays in a python codebase may break 
some equality conditions within that code between lists and arrays

--
files: equality_between_arrays_and_lists.py
messages: 367615
nosy: Ahmed Amr
priority: normal
severity: normal
status: open
title: Equality operations between lists and arrays
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: 
https://bugs.python.org/file49098/equality_between_arrays_and_lists.py

___
Python tracker 

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



[issue40428] [C API] Remove PyTuple_ClearFreeList() function (move it to the internal C API)

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset bb4a585d903e7fe0a46ded8c2ee3f47435ad6a66 by Zackery Spytz in 
branch 'master':
bpo-40428: Remove references to Py*_ClearFreeList in the docs (GH-19783)
https://github.com/python/cpython/commit/bb4a585d903e7fe0a46ded8c2ee3f47435ad6a66


--

___
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-04-28 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue40432] Pegen regenerate project for Windows not working

2020-04-28 Thread anthony shaw


Change by anthony shaw :


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

___
Python tracker 

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



[issue40432] Pegen regenerate project for Windows not working

2020-04-28 Thread anthony shaw


New submission from anthony shaw :

The additional tasks in the MSBuild project for pegen regeneration are not 
functional:

- Setting PYTHONPATH= inline cannot be done in Windows using that method
- The task does not inherit environment variables that way
- The path to the peg_generator module is in Unix path format

PR to follow

--
assignee: anthonypjshaw
components: Build
messages: 367613
nosy: anthonypjshaw, pablogsal
priority: normal
severity: normal
status: open
title: Pegen regenerate project for Windows not working
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



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Kyle Stanley


Change by Kyle Stanley :


--
pull_requests: +19107
pull_request: https://github.com/python/cpython/pull/19784

___
Python tracker 

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



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Kyle Stanley


Change by Kyle Stanley :


--
versions:  -Python 3.7

___
Python tracker 

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



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Kyle Stanley


Kyle Stanley  added the comment:

Victor Stinner wrote:
> If you backport the change, please remove the NEWS entry, since it's not a 
> SyntaxError in 3.7 and 3.8.

Good point. In that case, I'll do a manual backport of the PR just to 3.8 and 
skip the news entry. As mentioned above, I think most of the value in fixing it 
when the SyntaxError isn't present is mainly just for providing a good example 
in the latest stable version of the stdlib, so I don't think there would be 
much additional value in also backporting it to 3.7.

--

___
Python tracker 

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



[issue40428] [C API] Remove PyTuple_ClearFreeList() function (move it to the internal C API)

2020-04-28 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
nosy_count: 1.0 -> 2.0
pull_requests: +19106
pull_request: https://github.com/python/cpython/pull/19783

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-04-28 Thread Kyle Stanley


Kyle Stanley  added the comment:

For addressing the backwards compatibility concern, I think we should just 
convert it to a SyntaxWarning for cases like the above to indicate that it's 
not really correct syntax, but not harmful enough to justify code breakage. I 
think it fits the documented description of SyntaxWarning well, which is to 
address "dubious syntax". 

Lysandros Nikolaou wrote:
> A possible solution would be to only emit a SyntaxError if the NAME directly 
> preceding a STRING token contains one of the valid string prefixes (either 
> one of 'f', 'r', 'u', 'b'). This would still output a nicer error message, 
> but would not break code like the one of the example. What do you think about 
> this?

That would certainly help to minimize the breakage, so I'd be in favor of that 
over a SyntaxError for all invalid prefixes. But, I'm not certain that it's 
additionally harmful if an invalid string prefix proceeds a valid one. Is there 
any additional harm, other than from a visual perspective?

--
nosy: +aeros

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 6d6508765514c7c10719478a0430f5e47c9a96ac by Lysandros Nikolaou in 
branch 'master':
bpo-40334: Disallow invalid single statements in the new parser (GH-19774)
https://github.com/python/cpython/commit/6d6508765514c7c10719478a0430f5e47c9a96ac


--

___
Python tracker 

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



[issue40344] Programming FAQ about "What is the most efficient way to concatenate many strings together?" -- Improving the example

2020-04-28 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
stage: patch review -> 

___
Python tracker 

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



[issue40344] Programming FAQ about "What is the most efficient way to concatenate many strings together?" -- Improving the example

2020-04-28 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
keywords:  -patch

___
Python tracker 

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



[issue40344] Programming FAQ about "What is the most efficient way to concatenate many strings together?" -- Improving the example

2020-04-28 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests:  -19105

___
Python tracker 

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



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

If you backport the change, please remove the NEWS entry, since it's not a 
SyntaxError in 3.7 and 3.8.

--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 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



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

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

I'm still getting more and more buildbot emails about test_concurrent_futures, 
so I merged my PR 19760 to fix buildbots.

Please revert or modify my PR 19760 if you have a better approach, but please 
check that test_killed_child() and ProcessPoolForkExecutorDeadlockTest tests 
don't fail with my msg367463 patch.

I would still appreciated a post-commit review of my change, since I don't know 
well concurrent.futures code :

bpo-39995: Fix concurrent.futures _ThreadWakeup (GH-19760)
https://github.com/python/cpython/commit/a4dfe8ede5a37576e17035dccfe109ba7752237e

--

___
Python tracker 

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



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Kyle Stanley


Kyle Stanley  added the comment:

> I don't think that it's worth it to backport the change to 3.7 and 3.8: in 
> Python 3.7 and 3.8, the code is accepted.

> Python 3.7 and 3.8 are not broken, so there is no need to fix them :-)

I think we could very reasonably change  `else"#fca"` -> `else "#fca"` on the 
current bugfix branches, or at least 3.8. Even when it doesn't cause a syntax 
error and the attempted prefix is ignored, it's still more syntactically 
correct compared to attempting to use an "e-string" (which of course doesn't 
exist) and has nearly zero cost on our end to fix. 

While it's a low priority issue since it doesn't raise an error, that doesn't 
necessarily mean it's correct. In the latest stable version of the stdlib, we 
should aim to provide a good example IMO, especially if it comes at practically 
zero cost to us.

--
nosy: +aeros
resolution: fixed -> 
stage: resolved -> patch review
status: closed -> open
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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +19104
pull_request: https://github.com/python/cpython/pull/19782

___
Python tracker 

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



[issue40344] Programming FAQ about "What is the most efficient way to concatenate many strings together?" -- Improving the example

2020-04-28 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +19105
pull_request: https://github.com/python/cpython/pull/19782

___
Python tracker 

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



[issue40344] Programming FAQ about "What is the most efficient way to concatenate many strings together?" -- Improving the example

2020-04-28 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

Sorry for the noise, wrong issue (thought 344, but actually was 334)

--

___
Python tracker 

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



[issue40344] Programming FAQ about "What is the most efficient way to concatenate many strings together?" -- Improving the example

2020-04-28 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests:  -19103

___
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-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a4dfe8ede5a37576e17035dccfe109ba7752237e by Victor Stinner in 
branch 'master':
bpo-39995: Fix concurrent.futures _ThreadWakeup (GH-19760)
https://github.com/python/cpython/commit/a4dfe8ede5a37576e17035dccfe109ba7752237e


--

___
Python tracker 

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



[issue40344] Programming FAQ about "What is the most efficient way to concatenate many strings together?" -- Improving the example

2020-04-28 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
keywords: +patch
nosy: +BTaskaya
nosy_count: 4.0 -> 5.0
pull_requests: +19103
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19782

___
Python tracker 

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



[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 703647732359200c54f1d2e695cc3a06b9a96c9a by Victor Stinner in 
branch 'master':
bpo-40421: Add PyFrame_GetBack() function (GH-19765)
https://github.com/python/cpython/commit/703647732359200c54f1d2e695cc3a06b9a96c9a


--

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 66abe98a816de84f89e2de4aa78cf09056227c25 by Hai Shi in branch 
'master':
bpo-40275: Move requires_hashdigest() to test.support.hashlib_helper (GH-19716)
https://github.com/python/cpython/commit/66abe98a816de84f89e2de4aa78cf09056227c25


--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 2208134918ee673451e4fc525bbeab71142d794a by Pablo Galindo in 
branch 'master':
bpo-40334: Explicitly cast to int in pegen.c to fix a compiler warning 
(GH-19779)
https://github.com/python/cpython/commit/2208134918ee673451e4fc525bbeab71142d794a


--

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-04-28 Thread hai shi


Change by hai shi :


--
pull_requests: +19102
pull_request: https://github.com/python/cpython/pull/19761

___
Python tracker 

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



[issue40429] [C API] PyThreadState_GetFrame() and PyFrame_GetCode() should return a strong refrence

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4386b9045e5fe1151e65c2816264b571eb9f by Victor Stinner in 
branch 'master':
bpo-40429: PyThreadState_GetFrame() returns a strong ref (GH-19781)
https://github.com/python/cpython/commit/4386b9045e5fe1151e65c2816264b571eb9f


--

___
Python tracker 

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



[issue39837] Remove Azure Pipelines from GitHub PRs

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

> Sadly (again), closing/reopening a PR re-runs all CIs. At the first run, GH 
> Action macOS job passed. At the second run, the "Tests" step of GH Action 
> macOS job, but I'm clueless with its logs: (...)

Oops, I looked at two different PRs. In fact, the two CI failures are unrelated.

--

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-04-28 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

A possible solution would be to only emit a SyntaxError if the NAME directly 
preceding a STRING token contains one of the valid string prefixes (either one 
of 'f', 'r', 'u', 'b'). This would still output a nicer error message, but 
would not break code like the one of the example. What do you think about this?

--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 37af21b667a9f41437b5b8e451497d7725016df5 by Lysandros Nikolaou in 
branch 'master':
bpo-40334: Fix shifting of nested f-strings in the new parser (GH-19771)
https://github.com/python/cpython/commit/37af21b667a9f41437b5b8e451497d7725016df5


--

___
Python tracker 

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



[issue40429] [C API] PyThreadState_GetFrame() and PyFrame_GetCode() should return a strong refrence

2020-04-28 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19101
pull_request: https://github.com/python/cpython/pull/19781

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

I think that a linter can be very pedantic on such code. My concern is about 
backward compatibility.

The >else"#fca"< code was added 6 years ago (commit 
8b95d5e0bf00d9d0098579d29fd6bb9322071879) and nobody complained, it "just 
worked". If we keep the SyntaxError, random projects will be broken, but I 
don't see much benefits for the users.

In short, I concur with Guido :-)

--

___
Python tracker 

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



[issue40428] [C API] Remove PyTuple_ClearFreeList() function (move it to the internal C API)

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

Note: I created this issue while working on bpo-40421, when I moved 
PyFrame_ClearFreeList() definition from Include/frameobject.h to 
Include/cpython/frameobject.h.

--

___
Python tracker 

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



[issue40428] [C API] Remove PyTuple_ClearFreeList() function (move it to the internal C API)

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ae00a5a88534fd45939f86c12e038da9fa6f9ed6 by Victor Stinner in 
branch 'master':
bpo-40428: Remove PyTuple_ClearFreeList() function (GH-19769)
https://github.com/python/cpython/commit/ae00a5a88534fd45939f86c12e038da9fa6f9ed6


--

___
Python tracker 

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



[issue40428] [C API] Remove PyTuple_ClearFreeList() function (move it to the internal C API)

2020-04-28 Thread STINNER Victor


Change by STINNER Victor :


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



[issue40429] [C API] PyThreadState_GetFrame() and PyFrame_GetCode() should return a strong refrence

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset cc0dc7e484c9626857e9a8b4c40eee37473702ed by Victor Stinner in 
branch 'master':
bpo-40429: Refactor super_init() (GH-19776)
https://github.com/python/cpython/commit/cc0dc7e484c9626857e9a8b4c40eee37473702ed


--

___
Python tracker 

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



[issue39837] Remove Azure Pipelines from GitHub PRs

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

> Sadly, I had to close/reopen my PR since there is no button to only restart 
> the failure job, or even restart all Azure Pipeline jobs. This retrigger all 
> CI jobs :-(

Sadly (again), closing/reopening a PR re-runs all CIs. At the first run, GH 
Action macOS job passed. At the second run, the "Tests" step of GH Action macOS 
job, but I'm clueless with its logs:

https://github.com/python/cpython/pull/19776/checks?check_run_id=627916923

2020-04-28T23:33:03.5559341Z ##[section]Starting: Request a runner to run this 
job
2020-04-28T23:33:04.1879823Z Requesting a hosted runner in current repository's 
account/organization with labels: 'macos-latest', require runner match: True
2020-04-28T23:33:04.2799035Z Labels matched hosted runners has been found, 
waiting for one of them get assigned for this job.
2020-04-28T23:33:04.3183702Z ##[section]Finishing: Request a runner to run this 
job

On the web UI, I see that 6 steps completed, only the last "Tests" step failed. 
But can't I see logs of other steps?

I would prefer to be able to merge a PR even when Azure Pipelines fails: make 
the job optional.

Hopefully, GH Action macOS job is optional and so I can merge my PR ;-)

Note: I'm not sure if it's the right place to report GH Action macOS failure, 
but it seems to be related to Azure Pipelines.

--

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-04-28 Thread Guido van Rossum


Guido van Rossum  added the comment:

Personally I don't think that `else"stuff"` should become a syntax error. It's 
no different from other edge cases where for some reason the space seems 
optional, like `1and 2`.

--

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

> I personally think the new behaviour is more consistent and more likely to 
> catch errors.

Would it be possible to emit a SyntaxWarning in 3.9 and only emit a SyntaxError 
in 3.10?

--

___
Python tracker 

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



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

> I am OK. I don't see why not to backport it, but I don't care much.

Python 3.7 and 3.8 are not broken, so there is no need to fix them :-) Thanks 
for the fix.

I reported the issue to:
https://bugs.python.org/issue40246#msg367587

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue40246] Different error messages for same error - invalid string prefixes

2020-04-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I personally think the new behaviour is more consistent and more likely to 
catch errors.

--

___
Python tracker 

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



[issue38880] Subinterpreters: List interpreters associated with a channel end

2020-04-28 Thread miss-islington


miss-islington  added the comment:


New changeset f7bbf58aa9299e9dd00b7a1bdd1113b4dcb6dfdf by Lewis Gaul in branch 
'master':
bpo-38880: List interpreters associated with a channel end (GH-17323)
https://github.com/python/cpython/commit/f7bbf58aa9299e9dd00b7a1bdd1113b4dcb6dfdf


--
nosy: +miss-islington

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests: +19100
pull_request: https://github.com/python/cpython/pull/19780

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue.

The following code works on Python 3.8, but fails with SyntaxError on Python 
3.9.0a6 with the old and the new parser (see bpo-40431):

clear = "NORMAL"
print(dict(state=clear, bg="#d00" if clear else"#fca"))

Well, the code looks like a typo error... but it worked previously.

Not sure if we should keep the SyntaxError or not. Fixing the code is trivial: 
see PR 19777 attached to bpo-40431; replace >else"#fca"< with >else "#fca"<.

Note: I first reported the issue to https://bugs.python.org/issue40334#msg367580

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-04-28 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

On bpo-40334 @vstinner reported that this change broke some code in turtledemo. 
The code looks like this:

print(dict(state=clear, bg="#d00" if clear else"#fca"))

Due to the absence of a space between `else` and `"`, the else keyword is now 
interpreted as an invalid string prefix. Is that acceptable?

--
nosy: +vstinner

___
Python tracker 

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



[issue40430] ast.Slice is no longer a subclass of ast.slice

2020-04-28 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

This has been discussee and rejected (for certain reasonsons): 
https://github.com/python/cpython/pull/19056#discussion_r396087689

--
nosy: +BTaskaya, serhiy.storchaka

___
Python tracker 

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



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Miro Hrončok

Miro Hrončok  added the comment:

I am OK. I don't see why not to backport it, but I don't care much.

--

___
Python tracker 

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



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

I don't think that it's worth it to backport the change to 3.7 and 3.8: in 
Python 3.7 and 3.8, the code is accepted.

I also reported the issue to: https://bugs.python.org/issue40334#msg367580

Miro: are you ok to close the issue (not backport)?

--

___
Python tracker 

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



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 49f70db83e2c62ad06805927f53f6c3e8f4b798e by Miro Hrončok in 
branch 'master':
bpo-40431: Fix syntax typo in turtledemo (GH-19777)
https://github.com/python/cpython/commit/49f70db83e2c62ad06805927f53f6c3e8f4b798e


--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> The following code works on Python 3.8, but fails with SyntaxError on Python 
> 3.9.0a6 with the old and the new parser (see bpo-40431):


This is not due to the new parser but due to 
https://bugs.python.org/issue40246. Please, report it there as well (you can 
reopen that issue for further discussion).

--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

The following code works on Python 3.8, but fails with SyntaxError on Python 
3.9.0a6 with the old and the new parser (see bpo-40431):

clear = "NORMAL"
print(dict(state=clear, bg="#d00" if clear else"#fca"))

Well, the code looks like a typo error... but it worked previously. Not sure if 
we should keep the SyntaxError or not. Fixing the code is trivial: see PR 19777 
attached to bpo-40431; replace >else"#fca"< with >else "#fca"<.

--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +19099
pull_request: https://github.com/python/cpython/pull/19779

___
Python tracker 

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



[issue40317] inspect.getsource() examines incorrect target

2020-04-28 Thread Ammar Askar


Ammar Askar  added the comment:

Did you mean to close this Karthik?

--
nosy: +ammar2

___
Python tracker 

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



[issue39837] Remove Azure Pipelines from GitHub PRs

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

Another Azure Pipeline failure on my 
https://github.com/python/cpython/pull/19769 PR, it looks like a random 
networking failure.

Sadly, I had to close/reopen my PR since there is no button to only restart the 
failure job, or even restart all Azure Pipeline jobs. This retrigger all CI 
jobs :-(

https://dev.azure.com/Python/cpython/_build/results?buildId=61891=logs=c83831cd-3752-5cc7-2f01-8276919eb334=6bd3fafc-d115-560e-4a08-fa9326c4b5c7

The win64 job of Azure Pipelines PR fails to build Python because it failed to 
fetch bzip2:

Fetching bzip2-1.0.6...
(...)
  File "C:\hostedtoolcache\windows\Python\3.8.2\x64\lib\http\client.py", line 
915, in connect
self.sock = self._create_connection(
  File "C:\hostedtoolcache\windows\Python\3.8.2\x64\lib\socket.py", line 787, 
in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "C:\hostedtoolcache\windows\Python\3.8.2\x64\lib\socket.py", line 918, 
in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed
(...)
  File "C:\hostedtoolcache\windows\Python\3.8.2\x64\lib\urllib\request.py", 
line 1362, in https_open
return self.do_open(http.client.HTTPSConnection, req,
  File "C:\hostedtoolcache\windows\Python\3.8.2\x64\lib\urllib\request.py", 
line 1322, in do_open
raise URLError(err)
urllib.error.URLError: 
(...)
c1 : fatal error C1083: Cannot open source file: 
'd:\a\1\b\externals\bzip2-1.0.6\blocksort.c': No such file or directory 
[D:\a\1\s\PCbuild\_bz2.vcxproj]
c1 : fatal error C1083: Cannot open source file: 
'd:\a\1\b\externals\bzip2-1.0.6\bzlib.c': No such file or directory 
[D:\a\1\s\PCbuild\_bz2.vcxproj]
c1 : fatal error C1083: Cannot open source file: 
'd:\a\1\b\externals\bzip2-1.0.6\compress.c': No such file or directory 
[D:\a\1\s\PCbuild\_bz2.vcxproj]
c1 : fatal error C1083: Cannot open source file: 
'd:\a\1\b\externals\bzip2-1.0.6\crctable.c': No such file or directory 
[D:\a\1\s\PCbuild\_bz2.vcxproj]
c1 : fatal error C1083: Cannot open source file: 
'd:\a\1\b\externals\bzip2-1.0.6\decompress.c': No such file or directory 
[D:\a\1\s\PCbuild\_bz2.vcxproj]
c1 : fatal error C1083: Cannot open source file: 
'd:\a\1\b\externals\bzip2-1.0.6\huffman.c': No such file or directory 
[D:\a\1\s\PCbuild\_bz2.vcxproj]
c1 : fatal error C1083: Cannot open source file: 
'd:\a\1\b\externals\bzip2-1.0.6\randtable.c': No such file or directory 
[D:\a\1\s\PCbuild\_bz2.vcxproj]

--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like building Python on Windows 64-bit emits a few warnings:

D:\a\1\s\Parser\pegen\pegen.c(610,91): warning C4267: '=': conversion from 
'size_t' to 'int', possible loss of data [D:\a\1\s\PCbuild\pythoncore.vcxproj]
D:\a\1\s\Parser\pegen\pegen.c(611,52): warning C4267: '=': conversion from 
'size_t' to 'int', possible loss of data [D:\a\1\s\PCbuild\pythoncore.vcxproj]
D:\a\1\s\Parser\pegen\pegen.c(612,103): warning C4267: '=': conversion from 
'size_t' to 'int', possible loss of data [D:\a\1\s\PCbuild\pythoncore.vcxproj]

--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Pablo: Would you mind to increase ware-gentoo-x86 timeout? Ex: 30 min instead 
> of 15 min.


Done: https://github.com/python/buildmaster-config/pull/190

--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +19098
pull_request: https://github.com/python/cpython/pull/19778

___
Python tracker 

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



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Miro Hrončok

Change by Miro Hrončok :


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

___
Python tracker 

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



[issue40429] [C API] PyThreadState_GetFrame() and PyFrame_GetCode() should return a strong refrence

2020-04-28 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19096
pull_request: https://github.com/python/cpython/pull/19776

___
Python tracker 

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



[issue40431] turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"

2020-04-28 Thread Miro Hrončok

New submission from Miro Hrončok :

With Python 3.9.0a6 we get the following syntax error when bytecompiling the 
standard library in Fedora:


Compiling '/usr/lib64/python3.9/turtledemo/__main__.py'...
***   File "/usr/lib64/python3.9/turtledemo/__main__.py", line 275
bg="#d00" if clear == NORMAL else"#fca")
^
SyntaxError: invalid string prefix


I've looked and the bad code is there for all branches, but only with 3.9.0a6 I 
get the SyntaxError.

I wonder whether this is a know new SyntaxError or not. This "worked" with 
3.9.0a5:

>>> "yes" if False else"no"
'no'

Happy to submit a PR for turtledemo.

--
components: Demos and Tools
messages: 367575
nosy: hroncok, petr.viktorin, vstinner
priority: normal
severity: normal
status: open
title: turtledemo/__main__.py: SyntaxError: invalid string prefix else"#fca"
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



[issue40429] [C API] PyThreadState_GetFrame() and PyFrame_GetCode() should return a strong refrence

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8852ad4208e34825f74e24945edb5bcf055d94fe by Victor Stinner in 
branch 'master':
bpo-40429: PyFrame_GetCode() now returns a strong reference (GH-19773)
https://github.com/python/cpython/commit/8852ad4208e34825f74e24945edb5bcf055d94fe


--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +19095
pull_request: https://github.com/python/cpython/pull/19775

___
Python tracker 

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



[issue32604] Expose the subinterpreters C-API in Python for testing use.

2020-04-28 Thread miss-islington


miss-islington  added the comment:


New changeset 5e8c691594d68925213d36296ce7c4b3e90bcb1d by Eric Snow in branch 
'master':
bpo-32604: Add support for a "default" arg in channel_recv(). (GH-19770)
https://github.com/python/cpython/commit/5e8c691594d68925213d36296ce7c4b3e90bcb1d


--
nosy: +miss-islington

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +19094
pull_request: https://github.com/python/cpython/pull/19774

___
Python tracker 

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



[issue40429] [C API] PyThreadState_GetFrame() and PyFrame_GetCode() should return a strong refrence

2020-04-28 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19093
pull_request: https://github.com/python/cpython/pull/19773

___
Python tracker 

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



[issue40429] [C API] PyThreadState_GetFrame() and PyFrame_GetCode() should return a strong refrence

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 6d86a2331e6b64a2ae80c1a21f81baa5a71ac594 by Victor Stinner in 
branch 'master':
bpo-40429: PyFrame_GetCode() result cannot be NULL (GH-19772)
https://github.com/python/cpython/commit/6d86a2331e6b64a2ae80c1a21f81baa5a71ac594


--

___
Python tracker 

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



[issue40430] ast.Slice is no longer a subclass of ast.slice

2020-04-28 Thread Anthony Sottile


New submission from Anthony Sottile :

unclear if this is intentional or not, I noticed this while seeing that 
`ast.Subscript.slice` is no longer `Index` / `Slice` / `ExtSlice`

# python3.8

>>> isinstance(ast.Slice(), ast.slice)
True

# python3.9a6

>>> isinstance(ast.Slice(), ast.slice)
False

--
messages: 367571
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: ast.Slice is no longer a subclass of ast.slice
type: behavior
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



[issue40429] [C API] PyThreadState_GetFrame() and PyFrame_GetCode() should return a strong refrence

2020-04-28 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40429] [C API] PyThreadState_GetFrame() and PyFrame_GetCode() should return a strong refrence

2020-04-28 Thread STINNER Victor


New submission from STINNER Victor :

I recently added PyThreadState_GetFrame() and PyFrame_GetCode() functions to 
the C API of Python 3.9.

Currently, these functions return borrowed references.

I asked on capi-sig and Brett confirms that borrowed refrences should be 
avoided:
https://mail.python.org/archives/list/capi-...@python.org/thread/LHESBBB3IYTXMBUKQ3WZI5CWB4WUH5YZ/

Borrowed references should be avoidedd!
https://github.com/vstinner/misc/blob/master/cpython/pep-opaque-c-api.rst#borrowed-references

I will work on a PR to modify these functions to return a strong reference 
instead.

--
components: C API
messages: 367570
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] PyThreadState_GetFrame() and PyFrame_GetCode() should return a 
strong refrence
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



[issue38787] PEP 573: Module State Access from C Extension Methods

2020-04-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The PEP is listed as accepted, with you as the BDFL-delegate, but it lacks a 
link to the public acceptance message (usually on pydev list).

The PR was not rejected by a core dev but was closed without explanation by the 
author on the same day the last commits were added.  Perhaps OP just gave up 
getting tests to pass.  But they disappear on closes.  

However, the contribution had been made under the CLA and you or Petr or any 
other core dev should be able to download it to a local branch, try to whip it 
into shape, and make a new PR before beta 1, in about a month.  Or start from 
scratch.

I cannot test downloading at the moment.  Apparently, OP's fork branch has been 
altered, so that merely reopening is not an option.  The OP used force-pushes 
rather than update merges, and this often creates problems.

--

___
Python tracker 

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



[issue39117] Performance regression for making bound methods

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

By the way, in sorted(data, key=str.upper): str.upper is an unbound method, no?

$ ./python
Python 3.9.0a6+ (heads/master:d9a43e20fa, Apr 28 2020, 23:50:37) 
>>> type(str.upper)


--

___
Python tracker 

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



[issue39117] Performance regression for making bound methods

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

I compared sorted(data, key=str.upper) performance between before the removal 
of the free list (parent of commit 3e54b575313c64f541e98216ed079fafed01ff5d) 
and the current master branch, I get:

Mean +- std dev: [master] 167 us +- 4 us -> [cache] 179 us +- 7 us: 1.07x 
slower (+7%)

I cannot reproduce the "70% slowdown".

Raymond: How did you compile Python? What is your OS? How did you run your 
benchmark?

---

It's a quick & dirty benchmark run. I didn't use LTO+PGO and I didn't isolate 
my CPU. Maybe the difference of 12 ns is just caused by the noise of my coarse 
benchmark procedure.

I used commands:

# master
git checkout master
git clean -fdx
./configure && make && ./python -m venv env && env/bin/python -m pip install 
pyperf
env/bin/python -m pyperf timeit -s 'import random; data = [f"x{i}" for i in 
range(1000)]; random.shuffle(data)' 'sorted(data, key=str.upper)' -o 
../master.json

# before removal of the free list
git checkout 3e54b575313c64f541e98216ed079fafed01ff5d^
git clean -fdx
./configure && make && ./python -m venv env && env/bin/python -m pip install 
pyperf
env/bin/python -m pyperf timeit -s 'import random; data = [f"x{i}" for i in 
range(1000)]; random.shuffle(data)' 'sorted(data, key=str.upper)' -o 
../master.json

That's a Fedora 31 using GCC -O3 (GCC 9.3.1).

--

The commit before the removal of the free list is:

commit 76b645124b3aaa34bc664eece43707c01ef1b382 (HEAD)
Date:   Fri Jul 26 03:30:33 2019 +0200

Well, maybe I did a mistake.

--

___
Python tracker 

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



[issue39117] Performance regression for making bound methods

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

>  read_boundmethod  27.7 ns47.1 ns

Extract of Tools/scripts/var_access_benchmark.py:

def read_boundmethod(trials=trials, a=A()):
for t in trials:
a.m;a.m;a.m;a.m;a.m
a.m;a.m;a.m;a.m;a.m
a.m;a.m;a.m;a.m;a.m
a.m;a.m;a.m;a.m;a.m
a.m;a.m;a.m;a.m;a.m

Which kind of code pattern is impacted by this performance regression, apart 
this micro-benchmark? Do you notice a significant slowdown in pyperformance?

When pyperformance was run before the change was merged, there was no 
significant difference:
https://bugs.python.org/issue37340#msg348425

In bpo-37340, you wrote that sorted(data, key=str.upper) is 70% slower. Would 
you mind to provide the benchmark?

--
nosy: +vstinner

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +19091
pull_request: https://github.com/python/cpython/pull/19771

___
Python tracker 

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



[issue32604] Expose the subinterpreters C-API in Python for testing use.

2020-04-28 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +19090
pull_request: https://github.com/python/cpython/pull/19770

___
Python tracker 

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



[issue37340] remove free_list for bound method objects

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

> sorted(data, key=str.upper)

Oh, I guess that it's bpo-39117.

--

___
Python tracker 

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



[issue40334] PEP 617: new PEG-based parser

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

On x86 Gentoo Non-Debug with X 3.x buildbot, test_peg_generator timed out twice 
after 15 minutes (first time when tests are run in parallel, then when the test 
is run sequentially).

Maybe the buildbot worker is just slow. On a previous build (749), 
test_peg_generator timed out after 15 min (parallel run), but then passed in 12 
minutes when re-run in verbose mode.

The buildbot worker should get a larger timeout. I suggest to increase the 
timeout, or the test should be optimized to take less time.

Pablo: Would you mind to increase ware-gentoo-x86 timeout? Ex: 30 min instead 
of 15 min.

--

The failed build 750:
https://buildbot.python.org/all/#/builders/188/builds/750

0:58:45 load avg: 4.59 [423/423/2] test_peg_generator crashed (Exit code 1)
(... many compiler warnings ...)
Timeout (0:15:00)!
Thread 0xb7bba700 (most recent call first):
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/subprocess.py",
 line 1873 in _try_wait
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/subprocess.py",
 line 1915 in _wait
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/subprocess.py",
 line 1185 in wait
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/distutils/spawn.py",
 line 75 in spawn
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/distutils/ccompiler.py",
 line 910 in spawn
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/distutils/unixccompiler.py",
 line 117 in _compile
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/distutils/ccompiler.py",
 line 574 in compile
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/distutils/command/build_ext.py",
 line 529 in build_extension
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/distutils/command/build_ext.py",
 line 474 in _build_extensions_serial
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/distutils/command/build_ext.py",
 line 449 in build_extensions
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/distutils/command/build_ext.py",
 line 340 in run
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Tools/peg_generator/pegen/build.py",
 line 89 in compile_c_extension
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Tools/peg_generator/pegen/testutil.py",
 line 101 in generate_parser_c_extension
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_peg_generator/test_c_parser.py",
 line 76 in build_extension
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_peg_generator/test_c_parser.py",
 line 79 in run_test
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_peg_generator/test_c_parser.py",
 line 240 in test_return_stmt_noexpr_action
  (...)

--
nosy: +vstinner

___
Python tracker 

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



[issue37340] remove free_list for bound method objects

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

> This caused a performance regression (70%) for a fundamental operation.  See 
> issue 37340.

Which issue? This is bpo-37340.

--

___
Python tracker 

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



[issue40428] [C API] Remove PyTuple_ClearFreeList() function (move it to the internal C API)

2020-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

Only PyTuple_ClearFreeList() was exported by PC/python3.def.

--

___
Python tracker 

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



[issue40428] [C API] Remove PyTuple_ClearFreeList() function (move it to the internal C API)

2020-04-28 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40428] [C API] Remove PyTuple_ClearFreeList() function (move it to the internal C API)

2020-04-28 Thread STINNER Victor


Change by STINNER Victor :


--
title: [C API] Remove PyTuple_ClearFreeList() function -> [C API] Remove 
PyTuple_ClearFreeList() function (move it to the internal C API)

___
Python tracker 

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



[issue40428] [C API] Remove PyTuple_ClearFreeList() function

2020-04-28 Thread STINNER Victor


Change by STINNER Victor :


--
title: [C API] Move PyXXX_ClearFreeLists() functions to the internal C API -> 
[C API] Remove PyTuple_ClearFreeList() function

___
Python tracker 

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



[issue40428] [C API] Move PyXXX_ClearFreeLists() functions to the internal C API

2020-04-28 Thread STINNER Victor


New submission from STINNER Victor :

The following C functions are implementation details and should not be called 
directly:

- PyAsyncGen_ClearFreeLists()
- PyContext_ClearFreeList()
- PyDict_ClearFreeList()
- PyFloat_ClearFreeList()
- PyFrame_ClearFreeList()
- PyList_ClearFreeList()
- PySet_ClearFreeList()
- PyTuple_ClearFreeList()

To call them all at once, simply call explicitly PyGC_Collect().

Attached PR move these functions to the internal C API and stop to export them.

--
components: C API
messages: 367561
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Move PyXXX_ClearFreeLists() functions to the internal C API
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



[issue40425] Refleak in CDataObject

2020-04-28 Thread Joseph Sible


Change by Joseph Sible :


--
nosy: +Joseph Sible

___
Python tracker 

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



[issue40390] Implement _xxsubinterpreters.channel_send_wait().

2020-04-28 Thread Eric Snow


Eric Snow  added the comment:

Thanks, Ben.  I'll take a look.

--
components: +Library (Lib) -C API
title: Implement a C API for channel_send_wait for subinterpreters. -> 
Implement _xxsubinterpreters.channel_send_wait().

___
Python tracker 

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



  1   2   >