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

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

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

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

[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

[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

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

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

[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

[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

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

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

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

[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

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

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

[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

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

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

[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

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

[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

[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

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

[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

[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

[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

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

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

2020-04-29 Thread Shantanu
New submission from Shantanu : While the signature was updated in the documentation, the text below wasn't, and still reflects the old default of 10. https://docs.python.org/3.9/library/compileall.html#compileall.compile_dir -- assignee: docs@python components: Documentation

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

2020-04-29 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19126 pull_request: https://github.com/python/cpython/pull/19805 ___ Python tracker ___

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

2020-04-29 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19125 pull_request: https://github.com/python/cpython/pull/19804 ___ Python tracker ___

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

2020-04-29 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19124 pull_request: https://github.com/python/cpython/pull/19803 ___ Python tracker ___

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

2020-04-29 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19123 pull_request: https://github.com/python/cpython/pull/19802 ___ Python tracker ___

[issue40334] PEP 617: new PEG-based parser

2020-04-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 69e802ed812e38cb68a4ab74af64b4f719b6cc78 by Lysandros Nikolaou in branch 'master': bpo-40334: Fix test_peg_parser to actually use the old parser (GH-19778) https://github.com/python/cpython/commit/69e802ed812e38cb68a4ab74af64b4f719b6cc78

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

2020-04-29 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +19122 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19801 ___ Python tracker ___

[issue40444] multiprocessing.Pool deadlocks with only print statements

2020-04-29 Thread Darin Tay
New submission from Darin Tay : I ran into a deadlock that I've reduced to a small and consistent repro, tested on 3.7.5 and 3.8.0. Reading through https://bugs.python.org/issue6721 now I suspect it is just another case of that, but not certain. In particular, I'm not using any explicit

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

2020-04-29 Thread STINNER Victor
New submission from STINNER Victor : Attached PRs removed unused imports from the Python standard library. I used pyflakes and looked for "imported but unused" warnings. I ignored tons of warnings, since many are false alarms: imports done on purpose. Previous editions: * 2014: bpo-20976 *

[issue40434] Update of reasoning why there is no case statement

2020-04-29 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: What is your reasoning on referencing just one of the PEPs and not both of them? -- nosy: +nanjekyejoannah ___ Python tracker ___

[issue40291] socket library support for CAN_J1939

2020-04-29 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks, good luck using this! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue40291] socket library support for CAN_J1939

2020-04-29 Thread miss-islington
miss-islington added the comment: New changeset 360371f79c48f15bbcee7aeecacf97a899913b25 by karl ding in branch 'master': bpo-40291: Add support for CAN_J1939 sockets (GH-19538) https://github.com/python/cpython/commit/360371f79c48f15bbcee7aeecacf97a899913b25 -- nosy:

[issue40254] pyspecific directives are not translatable

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

[issue40441] Plural typo in Design and History FAQ

2020-04-29 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: After merging the associated PR, I believe this is resolved. Thanks Alex for reporting and solving this -- nosy: +nanjekyejoannah stage: -> resolved ___ Python tracker

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

2020-04-29 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-39995: race condition in concurrent.futures. More specific to _ThreadWakeup class, but with similar symptoms. -- nosy: +vstinner ___ Python tracker

[issue40440] allow array.array construction from memoryview w/o copy

2020-04-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: array.array should copy the content, to be able to modify it. It implements both the storage for data and the view of that storage. What you want is already implemented as the memoryview object. >>> import array >>> x = array.array('b', [1,2,3,4]) >>> x

[issue40442] Spurious warning emitted during fork() can deadlock a multi-threaded process

2020-04-29 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40427] importlib of module results in different id than when imported with import keyword

2020-04-29 Thread John Andersen
John Andersen added the comment: Thank you! :) I must have missed that somehow -- ___ Python tracker ___ ___ Python-bugs-list

[issue40440] allow array.array construction from memoryview w/o copy

2020-04-29 Thread Benjamin Keen
Change by Benjamin Keen : -- keywords: +patch pull_requests: +19121 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19800 ___ Python tracker ___

[issue40435] IDLE should catch user config file UnicodeDecodeError

2020-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: I want this left open to fix IDLE exiting instead of continuing. The original IDLE authors could not anticipate all the things that users around the world (and OS developers) might do, and we maintainers are still plugging holes as they are reported.

[issue6721] Locks in the standard library should be sanitized on fork

2020-04-29 Thread Deomid Ryabkov
Deomid Ryabkov added the comment: https://bugs.python.org/issue40442 is a fresh instance of this, entirely self-inflicted. -- nosy: +rojer ___ Python tracker ___

[issue40442] Spurious warning emitted during fork() can deadlock a multi-threaded process

2020-04-29 Thread Deomid Ryabkov
Change by Deomid Ryabkov : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40442] Spurious warning emitted during fork() can deadlock a multi-threaded process

2020-04-29 Thread Deomid Ryabkov
New submission from Deomid Ryabkov : I know, I know - forking a multi-threaded process is bad. But it happens. This is related to https://bugs.python.org/issue40399 and https://bugs.python.org/issue6721 but is distinct because the problem is entirely self-inflicted. What happens: 1) A

[issue40437] add string.snake function

2020-04-29 Thread Eric V. Smith
Eric V. Smith added the comment: > One can also argue why python need to maintain str conversion at all if we > have such good extensions in different libs. Back when we were starting python 3.x there was discussion or removing these from str and bytes, but it was decided that breaking

[issue40437] add string.snake function

2020-04-29 Thread jeffolsi10
jeffolsi10 added the comment: Rémi Lapeyre not all of them. I can give list of many examples where snake case is needed. But the question is: Are we discussing if snake case is even needed or are we discussing if this should be in python core. Those are two totally different things. 1. The

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

2020-04-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The original issue was about different error messages in REPL and eval(). But it is not related to string prefixes. We have the same difference without involving strings: >>> a b File "", line 1 a b ^ SyntaxError: invalid syntax >>> eval("a

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

2020-04-29 Thread Ammar Askar
Ammar Askar added the comment: Thank you for your work on this Domenico. For reviewing the code, would you mind creating a Github pull request for it as described here https://devguide.python.org/pullrequest/ -- nosy: +ammar2 ___ Python tracker

[issue40441] Plural typo in Design and History FAQ

2020-04-29 Thread alexpovel
New submission from alexpovel : The documentation under "Design and History FAQ" has a typo in its "Why doesn’t Python have a “with” statement for attribute assignments?" section: https://docs.python.org/3/faq/design.html#why-doesn-t-python-have-a-with-statement-for-attribute-assignments

[issue35829] datetime: parse "Z" timezone suffix in fromisoformat()

2020-04-29 Thread Ammar Askar
Ammar Askar added the comment: There's been some additional discussion on https://discuss.python.org/t/parse-z-timezone-suffix-in-datetime/2220 -- nosy: +ammar2 ___ Python tracker

[issue40437] add string.snake function

2020-04-29 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I don't understand the motivation, why would it be very useful when working with titles of columns that are to be used in databases columns? Databases can handle columns with spaces in their name: postgres=# create temporary table foo ("column with spaces"

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

2020-04-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Indeed, reverting commit 41d5b94af44e34ac05d4cd57460ed104ccf96628 makes it work with both parsers: ~/github/python/master master* ❯ ./python -X oldparser Python 3.9.0a6+ (heads/master-dirty:84724dd239, Apr 29 2020, 20:29:53) [GCC 9.3.0] on linux Type

[issue40439] Error in an external reference

2020-04-29 Thread Ammar Askar
Ammar Askar added the comment: Thank you for the report Patrick! For reference this is on the lexical analysis page: https://docs.python.org/3/reference/lexical_analysis.html > A non-normative HTML file listing all valid identifier characters for Unicode > 4.1 can be found at >

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

2020-04-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > If it's all handled by the tokenizer, how come it's different in the > newparser? Is not different in the new parser: both parsers have analogous behaviour now: ~/github/python/master master ❯ ./python Python 3.9.0a6+ (heads/master:84724dd239, Apr

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

[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

[issue40440] allow array.array construction from memoryview w/o copy

2020-04-29 Thread Benjamin Keen
New submission from Benjamin Keen : Currently the array.array object can export a memoryview, but there is no way to construct one from a memoryview without making a copy of the underlying data. So in that sense array.array only supports one half of the buffer protocol and this is to allow

[issue40234] Disallow daemon threads in subinterpreters optionally.

2020-04-29 Thread Jesús Cea Avión
Change by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[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

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

2020-04-29 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 84724dd239c30043616487812f6a710b1d70cd4b by Dong-hee Na in branch 'master': bpo-1635741: Port _stat module to multiphase initialization (GH-19798) https://github.com/python/cpython/commit/84724dd239c30043616487812f6a710b1d70cd4b --

[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

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

2020-04-29 Thread Jonathan Crall
Jonathan Crall 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?). In python3.8 the compile flags I

[issue40437] add string.snake function

2020-04-29 Thread Eric V. Smith
Eric V. Smith added the comment: I remain unconvinced, but I'm only one person. You might want to bring this up on python-ideas to see if it can get some more support. But be aware this is going to have much less support that the recent PEP 616 removeprefix/removesuffix discussion, which

[issue40328] Add tools for generating mappings_XX.h

2020-04-29 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 113feb3ec2b08948a381175d33b6ff308d24fceb by Dong-hee Na in branch 'master': bpo-40328: Add tool for generating cjk mapping headers (GH-19602) https://github.com/python/cpython/commit/113feb3ec2b08948a381175d33b6ff308d24fceb --

[issue40437] add string.snake function

2020-04-29 Thread jeffolsi10
jeffolsi10 added the comment: it can. This is why I'm asking this. Consider APIs that return list of names in camelCase. You must convert the keys to snakeCase to create tables from it as it's bad practice to have capitalised letters in columns or table names. Further more, consider someone

[issue40217] The garbage collector doesn't take in account that objects of heap allocated types hold a strong reference to their type

2020-04-29 Thread STINNER Victor
STINNER Victor added the comment: > Please backport to 3.8, then it will become part of 3.8.3rc1 which I'll be > releasing tomorrow. I propose to *not* fix this bug in Python 3.8: * Python 3.8 stdlib doesn't seem to be impacted by this bug * The number of third party C extension modules

[issue34990] year 2038 problem in compileall.py

2020-04-29 Thread STINNER Victor
STINNER Victor added the comment: I would prefer to mimick importlib._bootstrap_external which uses: def _pack_uint32(x): """Convert a 32-bit integer to little-endian.""" return (int(x) & 0x).to_bytes(4, 'little') Using 64-bit timestamp (PR 19651), treat timestamp as unsigned

[issue39837] Make Azure Pipelines optional on GitHub PRs

2020-04-29 Thread STINNER Victor
STINNER Victor added the comment: > Otherwise there were so many posts I didn't find an explicit ask of what you > wanted changed, Victor. I would like to make Azure Pipelines optional on GitHub PRs. I changed the issue title to make my request more explicit. --

[issue40286] Add randbytes() method to random.Random

2020-04-29 Thread STINNER Victor
STINNER Victor added the comment: It removed the C implementation of randbytes(): it was the root issue which started discussions here and in bpo-40346. I rejected bpo-40346 (BaseRandom) and related PRs. I close the issue. -- stage: patch review -> resolved status: open -> closed

[issue40286] Add randbytes() method to random.Random

2020-04-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2d8757758d0d75882fef0fe0e3c74c4756b3e81e by Victor Stinner in branch 'master': bpo-40286: Remove C implementation of Random.randbytes() (GH-19797) https://github.com/python/cpython/commit/2d8757758d0d75882fef0fe0e3c74c4756b3e81e --

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

2020-04-29 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +19119 pull_request: https://github.com/python/cpython/pull/19798 ___ Python tracker ___

[issue40399] IO streams locking can be broken after fork() with threads

2020-04-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: The TextIOWrapper uses an underlying BufferedWriter, which is thread-safe (and therefore has an internal lock). -- ___ Python tracker ___

[issue40399] IO streams locking can be broken after fork() with threads

2020-04-29 Thread Delgan
Delgan added the comment: Yeah, I just wanted to illustrate the issue with a more realistic example. The thread is often abstracted away by a class or a library. Conclusion: do not abstract it away. :) I've noticed that the mere fact of using "sys.stderr.write()", without even involving a

[issue39837] Make Azure Pipelines optional on GitHub PRs

2020-04-29 Thread Brett Cannon
Brett Cannon added the comment: Best place to report workflow issues or to have discussions about it is https://github.com/python/core-workflow/. Otherwise there were so many posts I didn't find an explicit ask of what you wanted changed, Victor. --

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

2020-04-29 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: What's also possible is to handle keywords at tokenizer level and return a different token type for each one of them (like with async and await), which is currently handled at parser level. This would enable us to allow reserved keywords right before a

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-29 Thread STINNER Victor
STINNER Victor added the comment: I created this issue to propose PR 19631 (BaseRandom class) which looked like as a good idea to me: simple base class which fix different kind of problems. But it seems like other people would prefer a complete rewrite from scratch and require a PEP. I

[issue40437] add string.snake function

2020-04-29 Thread Eric V. Smith
Eric V. Smith added the comment: So then it appears the snake case function couldn't be used for database column names, without some additional processing. So, what is the use case for it? I just don't see a lot of use for this. -- ___ Python

[issue40437] add string.snake function

2020-04-29 Thread jeffolsi10
jeffolsi10 added the comment: I'd like also to point that there are few other cases: https://stackoverflow.com/questions/11273282/whats-the-name-for-hyphen-separated-case This is PascalCase: SomeSymbol This is camelCase: someSymbol This is snake_case: some_symbol So a possible function could

[issue9216] FIPS support for hashlib

2020-04-29 Thread miss-islington
miss-islington added the comment: New changeset e3dfb9b967c560f4d094092dcae4a16fc9634681 by Victor Stinner in branch 'master': bpo-9216: Expose OpenSSL FIPS_mode() as _hashlib.get_fips_mode() (GH-19703) https://github.com/python/cpython/commit/e3dfb9b967c560f4d094092dcae4a16fc9634681

[issue40286] Add randbytes() method to random.Random

2020-04-29 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19118 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/19797 ___ Python tracker ___

[issue40437] add string.snake function

2020-04-29 Thread jeffolsi10
jeffolsi10 added the comment: snake case has very specific definition : https://en.wikipedia.org/wiki/Snake_case I expect the function to implement the definition and not something that I or someone else desire. As for your question about '$' char I could ask the same thing for lower() The

[issue40228] Make setting line number in frame more robust.

2020-04-29 Thread Mark Shannon
Mark Shannon added the comment: New changeset 57697245e1deafdedf68e5f21ad8890be591efc0 by Mark Shannon in branch 'master': bpo-40228: More robust frame.setlineno. (GH-19437) https://github.com/python/cpython/commit/57697245e1deafdedf68e5f21ad8890be591efc0 --

[issue40439] Error in an external reference

2020-04-29 Thread Patrick A.
New submission from Patrick A. : This URL doesn't exist anymore. If you click on this URL you have a 404 not found. https://www.dcl.hpi.uni-potsdam.de/home/loewis/table-3131.html The website was changed and Dr. Martin v. Löwis is not hosted on the new site. Regards -- assignee:

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

2020-04-29 Thread Eric V. Smith
Eric V. Smith added the comment: I think you're right, since rb obviously works, too. I just wanted to make sure we're covering all the bases. There's some code in either the stdlib or the test suite where I generate all of the valid prefixes (it's something like 80 prefixes). I can dig it

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

2020-04-29 Thread STINNER Victor
STINNER Victor added the comment: Thanks Miro for the bug report, it's now fixed ;-) In PR 19792, Miro proposed to skip test_gdb is gdb is available but exit with non-zero exit code. I chose to raise a hard exception instead, to notify CI owners that something is wrong. I prefer to not make

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

2020-04-29 Thread miss-islington
miss-islington added the comment: New changeset beba1a808000d5fc445cb28eab96bdb4cdb7c959 by Miss Islington (bot) in branch '3.7': bpo-40436: Fix code parsing gdb version (GH-19792) https://github.com/python/cpython/commit/beba1a808000d5fc445cb28eab96bdb4cdb7c959 --

  1   2   >