[issue43858] Provide method to get list of logging level names

2021-05-30 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch pull_requests: +25054 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26459 ___ Python tracker ___

[issue44270] shutil.which: does not find path/cmd.ext where ext is not given

2021-05-30 Thread Eryk Sun
Eryk Sun added the comment: Michael, thank you for the PR, but please associate it with the existing issue bpo-24505. -- nosy: +eryksun resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> shutil.which wrong result on Windows versions:

[issue44270] shutil.which: does not find path/cmd.ext where ext is not given

2021-05-30 Thread Michael Hirsch, Ph.D.
Michael Hirsch, Ph.D. added the comment: Correction: Example: on Windows if ./foo.exe exists, then shutil.which('./foo') returns None. -- ___ Python tracker ___

[issue44270] shutil.which: does not find path/cmd.ext where ext is not given

2021-05-30 Thread Michael Hirsch, Ph.D.
Change by Michael Hirsch, Ph.D. : -- keywords: +patch pull_requests: +25053 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26458 ___ Python tracker

[issue44270] shutil.which: does not find path/cmd.ext where ext is not given

2021-05-30 Thread Michael Hirsch, Ph.D.
New submission from Michael Hirsch, Ph.D. : The early short-circuit logic in shutil.which() when cmd includes a directory component incorrectly gives None on Windows if the correct filename suffix was not also given. Example: on Windows if ./foo.exe exists, then shutil.which('./foo.exe')

[issue44206] Add a version number to dict keys.

2021-05-30 Thread Inada Naoki
Inada Naoki added the comment: Can we close this issue? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43964] ctypes CDLL search path issue on MacOS

2021-05-30 Thread Ned Deily
Ned Deily added the comment: Thanks for the report! I've spent some time investigating it and the story behind it turns out to be a bit complicated, so bear with me. It's all tied in to Apple's attempts to improve the security of macOS. As of macOS 10.15 Catalina, Apple introduced new

[issue44262] tarfile: some content different output

2021-05-30 Thread Filipe Laíns
Filipe Laíns added the comment: Yeah, I understand. What you want is achieved by making sure the mtime from the tar archive, and files on the archive, is reproducible, like I demonstrated here. Can this be closed? -- ___ Python tracker

[issue44262] tarfile: some content different output

2021-05-30 Thread Vasco Gervasi
Vasco Gervasi added the comment: Dear Filipe, sorry I did not explaing the use case, obiously this is a toy example to show my problem. So I have pipeline, that from a repository generate a tar file, using a python script; if the hash of the tar file is different it will trigger other

[issue44269] smtplib AUTH command doesn't handle EAI arguments

2021-05-30 Thread John L
New submission from John L : In an EAI (SMTPUTF8) mail session, AUTH usernames and passwords can be UTF-8, not just ASCII. The fix is easy. In smtplib.py, in three places in the auth() and auth_cram_md5() routines change ".encode('ascii')" to ".encode(self.command_encoding)" I have tried

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-30 Thread Anthony Sottile
Anthony Sottile added the comment: I have also shown that the performance is indeed not better in the nominal case, as demonstrated in the first case -- ___ Python tracker

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-30 Thread Anthony Sottile
Anthony Sottile added the comment: the toil is still present, the existing, good apis are deprecated and the new, bad apis are slow -- and the odd subclasses are still present -- ___ Python tracker

[issue44268] gettext: deprecate selecting plural form by fractional numbers (part 2)

2021-05-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Pablo, can we add these warnings in 3.10? Thanks for checking! Yeah, I think it makes sense to go ahead adding these warnings to 3.10 . Please, add me as a reviewer to the backport PR to 3.10. -- ___

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-30 Thread Jason R. Coombs
Jason R. Coombs added the comment: There are known performance concerns. I recommend to set those aside for now or move them to a separate issue because (a) The performance is theoretically better in the nominal case because it avoids a sort/group operation. (b) There are known performance

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-30 Thread Anthony Sottile
Anthony Sottile added the comment: oops, tiny typo in those code examples, they should say `group=` instead of `name=` -- though the performance is unchanged: (first example) ```console $ ./venv39/bin/python t.py 0.6641988754272461 $ ./venv310/bin/python t.py 1.3172023296356201 ``` (second

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-30 Thread Anthony Sottile
Anthony Sottile added the comment: the `.select(...)` api is at least twice as slow as indexing as well: setup: ``` virtualenv venv39 -p python3.9 venv39/bin/pip install flake8 pytest pytest-randomly virtualenv venv39 -p python3.10 venv310/bin/pip install flake8 pytest pytest-randomly ```

[issue34852] Counter-intuitive behavior of Server.close() / wait_closed()

2021-05-30 Thread Aymeric Augustin
Aymeric Augustin added the comment: Would it make sense to add `await asyncio.sleep(0)` in `Server.wait_closed()` to ensure that all connections reach `connection_made()` before `wait_closed()` returns? This would be fragile but it would be an improvement over the current behavior,

[issue43413] tuple subclasses allow arbitrary kwargs

2021-05-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44262] tarfile: some content different output

2021-05-30 Thread Filipe Laíns
Filipe Laíns added the comment: tarfile will keep the mtime from the file, the issue is that you are touching the files in the beginning of the script. When you write to the files, you change the mtime (last modified time), which produces a different TarInfo. If you comment out the code that

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-30 Thread Anthony Sottile
Anthony Sottile added the comment: also https://github.com/miurahr/aqtinstall/issues/221 (this links to importlib-metadata tracker, not sure how you missed it) -- ___ Python tracker

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-30 Thread Anthony Sottile
Anthony Sottile added the comment: I also need `.sort(key=...)` for what it's worth, the error in this issue was just the first encountered I think my only satisfactory outcome would be: - the original api returns actual dicts - the sub-api returns actual lists - the new select is

[issue43413] tuple subclasses allow arbitrary kwargs

2021-05-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Surprisingly there were almost no tests for keyword arguments in subclasses. PR 26456 makes checks for some classes (like tuple, list, frozenset) more strict: if subclass does not define __init__ or __new__, it will reject arbitrary keyword arguments. It

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-30 Thread Jason R. Coombs
Jason R. Coombs added the comment: Thanks Zac for your input. > Just chiming in with a plea to slow down the rate of changes to > importlib.metadata - I understand that you want to tidy up the API, but even > deprecations cause substantial work downstream. It would be difficult to go much

[issue43413] tuple subclasses allow arbitrary kwargs

2021-05-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +25052 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26456 ___ Python tracker

[issue44262] tarfile: some content different output

2021-05-30 Thread Vasco Gervasi
Vasco Gervasi added the comment: Dear Filipe, thanks for your answer. Following your suggestion, I have tried the attached file. The output is: $ python /data/compress.py b'68963e137ced6ee2aa5a93e155b201a3c172e2683d4b15a0eab7c1d8d43e48b4 /tmp/py_gzip.tgz\n'

[issue43858] Provide method to get list of logging level names

2021-05-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I can add getLevelNamesDict() which would return a copy of _nameToLevel That seem like the best approach. -- assignee: -> vinay.sajip nosy: +rhettinger ___ Python tracker

[issue43858] Provide method to get list of logging level names

2021-05-30 Thread Andy Lowry
Andy Lowry added the comment: @andrei.avk Yes, that sounds just fine. Many thanks. -- ___ Python tracker ___ ___ Python-bugs-list

[issue44265] Create an MSI Package

2021-05-30 Thread Eric V. Smith
Eric V. Smith added the comment: See https://bugs.python.org/issue25124 for a discussion on why MSI won't be supported going forward. -- nosy: +eric.smith ___ Python tracker

[issue21550] Add Python implementation of the tar utility

2021-05-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: test needed -> resolved status: open -> closed ___ Python tracker ___

[issue44260] _Random.seed() is called twice

2021-05-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +25051 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26455 ___ Python tracker

[issue44268] gettext: deprecate selecting plural form by fractional numbers (part 2)

2021-05-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Non-integer numbers in GNUTranslations.ngettext() are deprecated since 3.7 (see issue28692 for rationale). But I forget to add deprecation warning for default implementation (which just tests n == 1) and forget to add the "deprecated" directive in the

[issue44267] Wrong PEP 515 parsing in decimal module (both C and Python versions)

2021-05-30 Thread Sergey B Kirpichev
Sergey B Kirpichev added the comment: On Sun, May 30, 2021 at 08:58:56AM +, Mark Dickinson wrote: > Yep, you're absolutely right. I should have said "after the PEP is final" Unfortunately, neither correction can fix that the PEP does not "accurately describes the state of the

[issue44267] Wrong PEP 515 parsing in decimal module (both C and Python versions)

2021-05-30 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44267] Wrong PEP 515 parsing in decimal module (both C and Python versions)

2021-05-30 Thread Mark Dickinson
Mark Dickinson added the comment: > Regarding mail thread: I don't think that following the PEP will slow down string conversion. Sorry, I just don't think it's worth re-opening this discussion; Stefan Krah had good reasons (not just speed) to avoid implementing a precise interpretation of

[issue44267] Wrong PEP 515 parsing in decimal module (both C and Python versions)

2021-05-30 Thread Mark Dickinson
Mark Dickinson added the comment: > Well, then I something misunderstood in PEP 0 Yep, you're absolutely right. I should have said "after the PEP is final", not "after the PEP is accepted". PEP 515 was marked final on April 28th, 2017. > The current behaviour is documented. Thanks; I

[issue44267] Wrong PEP 515 parsing in decimal module (both C and Python versions)

2021-05-30 Thread Sergey B Kirpichev
Sergey B Kirpichev added the comment: On Sun, May 30, 2021 at 08:32:40AM +, Mark Dickinson wrote: > Standards Track PEPs are historical documents; it's quite common that an > actual implementation ends up diverging from a PEP in small ways after > the PEP is accepted, and we don't usually

[issue44267] Wrong PEP 515 parsing in decimal module (both C and Python versions)

2021-05-30 Thread Mark Dickinson
Mark Dickinson added the comment: > If this is not a bug - it should be adjusted Standards Track PEPs are historical documents; it's quite common that an actual implementation ends up diverging from a PEP in small ways after the PEP is accepted, and we don't usually do post-hoc updates in

[issue44267] Wrong PEP 515 parsing in decimal module (both C and Python versions)

2021-05-30 Thread Sergey B Kirpichev
Sergey B Kirpichev added the comment: On Sun, May 30, 2021 at 08:20:14AM +, Mark Dickinson wrote: > There was some discussion of this on the python-dev mailing list at the time I see. > It's probably best left alone. PEP 515 is clear. If this is not a bug - it should be adjusted (as it

[issue44267] Wrong PEP 515 parsing in decimal module (both C and Python versions)

2021-05-30 Thread Mark Dickinson
Mark Dickinson added the comment: There was some discussion of this on the python-dev mailing list at the time - see https://mail.python.org/pipermail/python-dev/2016-March/143556.html and the surrounding thread. It's probably best left alone. --

[issue41249] TypedDict inheritance doesn't work with get_type_hints and postponed evaluation of annotations across modules

2021-05-30 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44260] _Random.seed() is called twice

2021-05-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Consider moving seeding from _random.Random.__new__ to _random.Random.__init__. Since random.Random.__init__ doesn't call the super(), the C version never gets called, avoiding the double seeding. But, it still lets _random.Random function as a

[issue43855] test_ssl: test_msg_callback_deadlock_bpo43577() failed on macOS of GitHub Action

2021-05-30 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: See also bpo-44229 -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list

[issue44229] Intermittent connection errors in ssl tests on macOS CI

2021-05-30 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: See also bpo-43855. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44229] Intermittent connection errors in ssl tests on macOS CI

2021-05-30 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > It could be, but the same thing happens on Windows Are you sure? All the reports are from macOS CI. Christian mentioned that it could be similar to another ssl test failure that also happen on Windows, but those tracebacks do not match the ones in this

[issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__

2021-05-30 Thread Raymond Hettinger
Change by Raymond Hettinger : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing