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

2020-04-29 Thread Thomas Moreau
Thomas Moreau added the comment: I did GH 19788 with a few modifications. There is only one lock that seems to mater for the perf, and I actually added one other (the one in _python_exit, which necessitate another bug fix for fork context). I did not benchmark to see if it was worth it in

[issue40443] Remove unused imports in the stdlib (April 2020 edition)

2020-04-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset 57572b103ebd8732ac21922f0051a7f140d0e405 by Victor Stinner in branch 'master': bpo-40443: Remove unused imports in tests (GH-19805) https://github.com/python/cpython/commit/57572b103ebd8732ac21922f0051a7f140d0e405 --

[issue40445] compileall.compile_dir docs aren't updated for bpo-38112

2020-04-29 Thread Shantanu
Change by Shantanu : -- keywords: +patch pull_requests: +19127 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19806 ___ Python tracker ___

[issue40443] Remove unused imports in the stdlib (April 2020 edition)

2020-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 6900f16d2207ca4fc252fa9d778ca0b13a3c95e0 by Victor Stinner in branch 'master': bpo-40443: Remove unused imports in idlelib (GH-19801) https://github.com/python/cpython/commit/6900f16d2207ca4fc252fa9d778ca0b13a3c95e0 -- nosy:

[issue40443] Remove unused imports in the stdlib (April 2020 edition)

2020-04-29 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +19129 pull_request: https://github.com/python/cpython/pull/19808 ___ Python tracker

[issue40443] Remove unused imports in the stdlib (April 2020 edition)

2020-04-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +19130 pull_request: https://github.com/python/cpython/pull/19809 ___ Python tracker ___

[issue40441] Plural typo in Design and History FAQ

2020-04-29 Thread Ammar Askar
Change by Ammar Askar : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-29 Thread Tim Peters
Tim Peters added the comment: New changeset 3209cbd99b6d65aa18b3beb124fac9c792b8993d by lrjball in branch 'master': bpo-40394 - difflib.SequenceMatched.find_longest_match default args (GH-19742) https://github.com/python/cpython/commit/3209cbd99b6d65aa18b3beb124fac9c792b8993d --

[issue40446] pow(a, b, p) where b=int((p-1)/2) spits out gibbrish for big p

2020-04-29 Thread Basic ICT Repairs
Basic ICT Repairs added the comment: Hi, I was calculating Legendre coefficients, and quadratic residues and encountered what I believe to be a bug while using this code: for a in range (5): exp=int((p-1)/2) x=pow(a,exp,p) print(x) If p is an odd prime, then x can

[issue40446] pow(a, b, p) where b=int((p-1)/2) spits out gibbrish for big p

2020-04-29 Thread Ammar Askar
Ammar Askar added the comment: And just to add on, the reason this gives you the correct result in Python 2 is that `/` performs integer division whereas in Python 3 the `/` operator provides a float as a result. See https://docs.python.org/3/howto/pyporting.html#division for more details.

[issue40435] IDLE should catch user config file UnicodeDecodeError

2020-04-29 Thread 左迟
左迟 added the comment: Well, I have uploaded my ~/.idlerc/config-main.cfg. And apeeding "encodin=utf-8" is my first time to edit config-main.cfg file manually. The content of config-main.cfg is below: 1 [EditorWindow] 2 font-size = 16 3 font-bold = False 4 encoding = utf-8 5 font =

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-04-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I think we should backport the fix 4454057269b995341b04d13f0bf97f96080f27d0 (change constants) to 3.8 given that the likelihood of users using the actual hardcoded value of the constants instead of the constants themselves is very low. Also, given

[issue40446] pow(a, b, p) where b=int((p-1)/2) spits out gibbrish for big p

2020-04-29 Thread Basic ICT Repairs
New submission from Basic ICT Repairs : Hi, I was calculating Legendre coefficients, and quadratic residues and encountered what I believe to be a bug while using this code: for a in range (5): exp=int((p-1)/2) x=pow(a,exp,p) print(x) If p is an odd prime, then x can

[issue40446] pow(a, b, p) where b=int((p-1)/2) spits out gibbrish for big p

2020-04-29 Thread Steven D'Aprano
Steven D'Aprano added the comment: Hi, The behaviour you are calling "gibbrish" is correct, as the expression `(p-1)/2` calculates a 64-bit floating point number, which may lose precision even for small values of p, but will definitely lose precision for large p. Calling `int()` on that

[issue40446] pow(a, b, p) where b=int((p-1)/2) spits out gibbrish for big p

2020-04-29 Thread Tim Peters
Change by Tim Peters : -- resolution: fixed -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-04-29 Thread Peter Ludemann
Peter Ludemann added the comment: The documentation change gives two possible successors: https://libcst.readthedocs.io/ (https://github.com/Instagram/LibCST) https://parso.readthedocs.io/ And I've also seen this mentioned: https://github.com/pyga/awpa Is it possible to settle on one of

[issue40358] pathlib's relative_to should behave like os.path.relpath

2020-04-29 Thread Roundup Robot
Change by Roundup Robot : -- nosy: +python-dev nosy_count: 5.0 -> 6.0 pull_requests: +19128 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19807 ___ Python tracker

[issue40358] pathlib's relative_to should behave like os.path.relpath

2020-04-29 Thread Domenico Ragusa
Domenico Ragusa added the comment: I may have forgotten to use the proper format for the title of each commit, should I delete the pull request and make a new one or can it be fixed when (or if) it's pulled? On Thu, Apr 30, 2020 at 2:03 AM Roundup Robot wrote: > > > Change by Roundup Robot :

[issue40443] Remove unused imports in the stdlib (April 2020 edition)

2020-04-29 Thread miss-islington
miss-islington added the comment: New changeset 95e208dce505c542b8e4f8f42c57e6d4793b6895 by Miss Islington (bot) in branch '3.8': bpo-40443: Remove unused imports in idlelib (GH-19801) https://github.com/python/cpython/commit/95e208dce505c542b8e4f8f42c57e6d4793b6895 --

[issue40377] APPDATA location in Microsoft Store version

2020-04-29 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> third party ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40443] Remove unused imports in the stdlib (April 2020 edition)

2020-04-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset b1e11c31c523dc082985e9de779ceeb47224e536 by Victor Stinner in branch 'master': bpo-40443: Remove unused imports in tests (GH-19804) https://github.com/python/cpython/commit/b1e11c31c523dc082985e9de779ceeb47224e536 --

[issue40269] Inconsistent complex behavior with (-1j)

2020-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: After reading through the comments, I don't think we should change repr(complex) unless there is computational issue, such as eval(repr(z) != z. Raymond, I agree with your overlooked doc tweek. If you submit a PR, you can ask me to review. --

[issue40443] Remove unused imports in the stdlib (April 2020 edition)

2020-04-29 Thread miss-islington
miss-islington added the comment: New changeset 48ef06b62682c19b7860dcf5d9d610e589a49840 by Miss Islington (bot) in branch '3.7': bpo-40443: Remove unused imports in idlelib (GH-19801) https://github.com/python/cpython/commit/48ef06b62682c19b7860dcf5d9d610e589a49840 --

[issue40316] Add zero function to time, datetime, which acts as the use case of replace to limit resolution

2020-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: I recommend posting this to python-ideas for discussion. -- nosy: +terry.reedy ___ Python tracker ___

[issue40394] difflib.SequenceMatcher.find_longest_match default arguments

2020-04-29 Thread Tim Peters
Tim Peters added the comment: All done. Thank you, Lewis! You're now an official Python contributor, and are entitled to all the fame, fortune, and power that follows. Use your new powers only for good :-) -- resolution: -> fixed stage: patch review -> resolved status: open ->

[issue40405] asyncio.as_completed documentation misleading

2020-04-29 Thread Kyle Stanley
Kyle Stanley added the comment: @Bar as requested by Guido, let's continue the discussion in the PR: https://github.com/python/cpython/pull/19753#pullrequestreview-403185142. -- ___ Python tracker

[issue40256] Python 3.8 Not Launching on Bootcamp Windows 10.

2020-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: I presume you mean the Mac Bootcamp program that allows one to run Windows on Macs. I don't know if it runs *all* Windows programs or whether we specifically support running Windows python under Bootcamp. I imagine that there might be problems with some

[issue40444] multiprocessing.Pool deadlocks with only print statements

2020-04-29 Thread Darin Tay
Darin Tay added the comment: Ah yes, I should have mentioned this is on Linux! I also got around to testing on 3.8.2 (linux), where it still reproduces. -- ___ Python tracker

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-04-29 Thread Guido van Rossum
Guido van Rossum added the comment: It's typically not up to the core devs to pick a winning third party library; we tend to recommend libraries that are already essentially category winners, like requests. In a sense pointing to LibCST *and* parso is redundant because LibCST builds on

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-04-29 Thread Carl Meyer
Carl Meyer added the comment: Right, although I think it still makes sense to link both LibCST and parso since they provide different levels of abstraction that would be suitable for different types of tools (e.g. I would rather write an auto-formatter on top of parso, because LibCST's

[issue40444] multiprocessing.Pool deadlocks with only print statements

2020-04-29 Thread Tim Peters
Tim Peters added the comment: Just noting that the program runs to completion without issues under 3.8.1, but on Win10. Of course Windows doesn't support fork(). -- nosy: +tim.peters ___ Python tracker

[issue40262] SSL recv_into requires the object to implement __len__ unlike socket one

2020-04-29 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40283] Documentation of turtle.circle()

2020-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: It would be bizarre if the current doc were correct, but have you verified by experiment that the change is correct? The patch itself would be trivial, hence the keyword addition. PR author can request that I review. -- keywords: +easy, newcomer

[issue40389] No straightforward way to get repr of Optional

2020-04-29 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 138a9b9c2a394f30f222c23391f9515a7df9d809 by Vlad Serebrennikov in branch 'master': bpo-40389: Improve repr of typing.Optional (#19714) https://github.com/python/cpython/commit/138a9b9c2a394f30f222c23391f9515a7df9d809 -- nosy:

[issue40389] No straightforward way to get repr of Optional

2020-04-29 Thread Guido van Rossum
Change by Guido van Rossum : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue40438] Python 3.9 eval on list comprehension sometimes returns coroutines

2020-04-29 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > This can be closed, but for completeness, the test you ran didn't verify that > the bug was fixed. This is because the hard coded compile flags I gave in my > example seem to have changed in Python 3.9 (is this documented?). Yes, this is documented on

[issue40437] add string.snake function

2020-04-29 Thread jeffolsi10
jeffolsi10 added the comment: I feel this should be in core. I still don't understand why capitalize is supported and others do not. snake case is very well defined. Issues like tabs and spaces are not relevant. can you show example that you have that dilemma? To be honest I don't feel very

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

2020-04-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > What's also possible is to handle keywords at tokenizer level Sadly, the tokenizer is unaware of keywords (maybe except async and await because their history as soft keywords) as that distinction usually is up to the parser as the parser is the one

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

2020-04-29 Thread Guido van Rossum
Guido van Rossum added the comment: If it's all handled by the tokenizer, how come it's different in the new parser? Anyway, it seems we really have to support what the old parser supported here. I don't know exactly what rules it uses. Maybe only look for a string quote following a name that

[issue40291] socket library support for CAN_J1939

2020-04-29 Thread Senthil Kumaran
Change by Senthil Kumaran : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40437] add string.snake function

2020-04-29 Thread jeffolsi10
New submission from jeffolsi10 : Like we have: capitalize swapcase and others we should also have snake case Which converts: before: First Name, Last Name, Employee Status, Subject after: first_name, last_name, employee_status, subject This is very useful when working with titles of columns

[issue40435] IDLE should catch user config file UnicodeDecodeError

2020-04-29 Thread 左迟
左迟 added the comment: Hi! Thanks for your useful comment. And I'm sorry for uploading the image but not pasting it in the comment. When I append "encoding=utf-8" to ~/.idlerc/config-main.cfg, the idle turns to be good and works well. Yes, the "[] Beta: Use Unicode UTF8 for worldwide language

[issue40435] IDLE should catch user config file UnicodeDecodeError

2020-04-29 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: Failed to launch IDLE in a UTF-8 code page terminal environment -> IDLE should catch user config file UnicodeDecodeError ___ Python tracker

[issue40402] Race condition in multiprocessing/connection.py: broken handle

2020-04-29 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +19113 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19790 ___ Python tracker

[issue40436] pythoninfo collect_gdb() blows up when gdb fails to run

2020-04-29 Thread Miro Hrončok
New submission from Miro Hrončok : We had this weird traceback when running pythoninfo in Fedora build with Python 3.9.0a6: + /builddir/build/BUILD/Python-3.9.0a6/build/optimized/python -m test.pythoninfo ERROR: collect_gdb() failed Traceback (most recent call last): File

[issue40435] Failed to launch IDLE in a UTF-8 code page terminal environment

2020-04-29 Thread 左迟
New submission from 左迟 : Environment: 1.OS: Windows 10 1909 Pro 2.Python version: 3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)] 3.Error message: UnicodeDecodeError: 'CP_UTF8' codec can't decode byte 0xd0 in position 23: No mapping for the Unicode character exists in the

[issue33428] pathlib.Path.glob does not follow symlinks

2020-04-29 Thread Danya Alexeyevsky
Danya Alexeyevsky added the comment: I can reproduce the bug with Linux and python 3.7.5: ``` Python 3.7.5 (default, Apr 19 2020, 20:18:17) [GCC 9.2.1 20191008] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from pathlib import Path >>>

[issue40435] Failed to launch IDLE in a UTF-8 code page terminal environment

2020-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: The uploaded .png has the traceback. (Pasting it into the post would have been fine and a bit easier for all of us.) The error occurred when IDLE's config tried to load the user config files, ~/.idlerc/config-xyz.cfg. (~ is usually C:/Users/yourname.)

<    1   2