[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

Re: Error 0x80070643

2020-04-29 Thread Bob Gailer
On Apr 29, 2020 5:17 PM, "Antonis13XD" wrote: > > On Wed, Apr 29, 2020, 1:59 PM Antonis13XD > > > Hello python team! > > > > My name is antonis and I am a new fella who wants to be a programmer in > > python language. However, my thirst for learning I faced with an issue. > > More

[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

Re: Errors in python\3.8.3\Lib\nntplib.py

2020-04-29 Thread G Connor
On 4/29/2020 5:29 PM, Chris Angelico wrote: > Try opening the file in binary mode instead. Changed: f = open(postfile,'r')to : f = open(postfile,'rb') and it worked. Thanks man! -- https://mail.python.org/mailman/listinfo/python-list

[RELEASE] Python 3.8.3rc1 is now ready for testing

2020-04-29 Thread Łukasz Langa
Python 3.8.3rc1 is the release candidate of the third maintenance release of Python 3.8. Go get it here: https://www.python.org/downloads/release/python-383rc1/ Assuming no critical problems are found prior to 2020-05-11, the scheduled

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

[RELEASE] Python 3.8.3rc1 is now ready for testing

2020-04-29 Thread Łukasz Langa
Python 3.8.3rc1 is the release candidate of the third maintenance release of Python 3.8. Go get it here: https://www.python.org/downloads/release/python-383rc1/ Assuming no critical problems are found prior to 2020-05-11, the scheduled

[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

Re: [RELEASE] Python 3.9.0a6 is now available for testing

2020-04-29 Thread Paul Moore
m[-1]!= '\n'and'\n'or' ' This is '\n' if m[-1] != '\n' else ' ' ... just written in a way that was common before the if-expression was invented, using and and or. In itself, it's fine. The problem is that the space in "and '\n'" is omitted (presumably for brevity for some reason?)

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

Re: Errors in python\3.8.3\Lib\nntplib.py

2020-04-29 Thread Chris Angelico
On Thu, Apr 30, 2020 at 7:18 AM G Connor wrote: > > module: python\3.8.2\Lib\nntplib.py > lines 903-907 > --- > for line in f: > if not line.endswith(_CRLF): > line = line.rstrip(b"\r\n") + _CRLF > if line.startswith(b'.'): > line =

SSL Certificate Verify Failed (_ssl.c:600) using Windows Server 2019

2020-04-29 Thread separated via Python-list
hello python-list and the subsribers, I just bought a rdp from someone and try to install python in order to running youtube-dl but when I just run a simple youtube-dl command like 'youtube-dl [youtube video url]' it got me this message : ERROR: Unable to download webpage: (caused by

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

Errors in python\3.8.3\Lib\nntplib.py

2020-04-29 Thread G Connor
module: python\3.8.2\Lib\nntplib.py lines 903-907 --- for line in f: if not line.endswith(_CRLF): line = line.rstrip(b"\r\n") + _CRLF if line.startswith(b'.'): line = b'.' + line --- When I try

Re: Error 0x80070643

2020-04-29 Thread Antonis13XD
On Wed, Apr 29, 2020, 1:59 PM Antonis13XD > Hello python team! > > My name is antonis and I am a new fella who wants to be a programmer in > python language. However, my thirst for learning I faced with an issue. > More specifically, when I try to install 3.8.2 version of python, it > shows

[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

Re: [RELEASE] Python 3.9.0a6 is now available for testing

2020-04-29 Thread Rhodri James
On 29/04/2020 20:23, Schachner, Joseph wrote: norm=lambda m: m+(m and(m[-1]!= '\n'and'\n'or' ')or'\n') Parentheses 1 2 1 0 quotes 1 0 1 0 1

[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

RE: [RELEASE] Python 3.9.0a6 is now available for testing

2020-04-29 Thread Schachner, Joseph
> norm=lambda m: m+(m and(m[-1]!= '\n'and'\n'or' ')or'\n') Parentheses 1 2 1 0 quotes 1 0 1 0 1 01 0 OK I don't

[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

Re: Function to avoid a global variable

2020-04-29 Thread Tony Flury via Python-list
On 28/04/2020 06:49, jf...@ms4.hinet.net wrote: bvdp於 2020年4月28日星期二 UTC+8上午9時46分35秒寫道: Oh my, that is very cool! So, I can do this: def foo(i): if not 'bar' in foo.__dict__: foo.bar = 5 foo.bar += i You can have function attribute created this way if you like: def

[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

Re: [RELEASE] Python 3.9.0a6 is now available for testing

2020-04-29 Thread Peter J. Holzer
On 2020-04-28 17:52:58 +0200, Łukasz Langa wrote: > Many new features for Python 3.9 are still being planned and written. Among > the new major new features and changes so far: [...] > PEP 617 , New PEG parser for > CPython [...] On 2020-04-29 15:51:37

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

Re: Techniques to extend code without modifying it? (besides modules and decorators)

2020-04-29 Thread Christian Seberino
> > a pattern like: > if : > elif : > > Thanks. I really like this simple yet powerful suggestion you made. See this... import new_code ... if foo: new_code.do_new_stuff(..) We can massively modify existing code by *ONLY* adding one import and a 2 line if snippet!!! Very nice! cs

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

  1   2   >