[issue46232] Client certificates with UniqueIdentifier in the subject break ssl.peer_certificate()

2022-01-02 Thread Christian Heimes
Change by Christian Heimes : -- assignee: christian.heimes -> versions: -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___

[issue46237] Incorrect line reported in syntax error

2022-01-02 Thread arian-f
New submission from arian-f : parsing this code results in a syntax error with an incorrect line number - it's always 1 f''' { 1_a }''' resulting in: File "", line 1 ( 1_a ) ^ SyntaxError: invalid decimal literal an analogue error occurs when parsing a file instead

[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-01-02 Thread Yassir Karroum
Yassir Karroum added the comment: I started looking at this issue. I may need to propagate the change (adding dir_fd as a keyword argument) to multiple functions in posixpath module: Functions like abspath, join, isdir, etc. The alternative will be to have the logic in tempfile module which

[issue42657] Python 3.9.1 building process could not use local standard library

2022-01-02 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. Alas, there haven't been any other reports of similar behavior that I am aware of and, without more information, I am unable to reproduce it with the current 3.9 branch. So I am going to close this issue. Feel free to re-open it and

[issue43122] Python Launcher doesn't open a terminal window

2022-01-02 Thread Ned Deily
Change by Ned Deily : -- Removed message: https://bugs.python.org/msg409563 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue43122] Python Launcher doesn't open a terminal window

2022-01-02 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. The problem here has finally been resolved in the fixes for Issue40477 which will be released in Python 3.9.10, 3.10.2, and 3.11.0a4. (Unfortunately, Python 3.8 is now in the "security-fix" phase of its release cycle; this issue doesn't

[issue43122] Python Launcher doesn't open a terminal window

2022-01-02 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. The problem here has finally been resolved in the fixes for Issue40477 which will be released in Python 3.9.9, 3.10.2, and 3.11.0a4. (Unfortunately, Python 3.8 is now in the "security-fix" phase of its release cycle; this issue doesn't

[issue40477] Python Launcher app on macOS 10.15+ fails to run scripts

2022-01-02 Thread Ned Deily
Ned Deily added the comment: Thanks, Ronald, for tracking down the NSAppleEventsUsageDescription requirement! The PR here solves two problems encountered by users of the macOS Python Launcher app on recent macOS releases (10.14+): 1. The launcher app was no longer able to launch the macOS

[issue40477] Python Launcher app on macOS 10.15+ fails to run scripts

2022-01-02 Thread miss-islington
miss-islington added the comment: New changeset 50da397be4f71e5c12759281446b06ce14b6a5c4 by Miss Islington (bot) in branch '3.9': bpo-40477: macOS Python Launcher app fixes for recent macOS releases (GH-30348) https://github.com/python/cpython/commit/50da397be4f71e5c12759281446b06ce14b6a5c4

[issue40477] Python Launcher app on macOS 10.15+ fails to run scripts

2022-01-02 Thread Ned Deily
Ned Deily added the comment: New changeset b312794de0f78da15593d059f09b4071d95c0d0e by Miss Islington (bot) in branch '3.10': bpo-40477: macOS Python Launcher app fixes for recent macOS releases (GH-30348) (GH-30349)

[issue40477] Python Launcher app on macOS 10.15+ fails to run scripts

2022-01-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +28563 pull_request: https://github.com/python/cpython/pull/30350 ___ Python tracker ___

[issue40477] Python Launcher app on macOS 10.15+ fails to run scripts

2022-01-02 Thread Ned Deily
Ned Deily added the comment: New changeset 549e62827262264cda30455e10e315602129da72 by Ned Deily in branch 'main': bpo-40477: macOS Python Launcher app fixes for recent macOS releases (GH-30348) https://github.com/python/cpython/commit/549e62827262264cda30455e10e315602129da72 --

[issue40477] Python Launcher app on macOS 10.15+ fails to run scripts

2022-01-02 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +28562 pull_request: https://github.com/python/cpython/pull/30349 ___ Python tracker

[issue40477] Python Launcher app on macOS 10.15+ fails to run scripts

2022-01-02 Thread Ned Deily
Change by Ned Deily : -- keywords: +patch pull_requests: +28561 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30348 ___ Python tracker

[issue46224] doc: Fix bisect example using mutable function default

2022-01-02 Thread Sardorbek Imomaliev
Sardorbek Imomaliev added the comment: Understood, thanks for clarification. -- ___ Python tracker ___ ___ Python-bugs-list

[issue42202] Optimize function annotation

2022-01-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: -pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46236] PyFunction_GetAnnotations returning Tuple vs Dict

2022-01-02 Thread Dennis Sweeney
Change by Dennis Sweeney : -- nosy: +methane ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42202] Optimize function annotation

2022-01-02 Thread Dennis Sweeney
Dennis Sweeney added the comment: I believe this change accidentally affected the API of PyFunction_GetAnnotations: previously it would only return dict or NULL, now it can also return a tuple. See bpo-46236 -- nosy: +Dennis Sweeney ___ Python

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Maybe something unrelated changed on the benchmark machines? Very unlikely, it happened on two separate machines with different distributions and nothing was updated in the machines that I can see. Both use a configuration file for pyperformance

[issue46236] PyFunction_GetAnnotations returning Tuple vs Dict

2022-01-02 Thread Daniel McCarney
New submission from Daniel McCarney : Hi there, This is my first Python bug, hope I haven't missed anything important. I noticed that the PyFunction_GetAnnotations function from the C API is returning a PyTuple when I link Python 3.10 where historically it returned a PyDict. The

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe something unrelated changed on the benchmark machines? (Like installing a new version of pyperformance???) Though it happened across both benchmark machines. What configuration and flags are being used to run the benchmark suite on that machine?

[issue46148] Optimize pathlib

2022-01-02 Thread Dennis Sweeney
Change by Dennis Sweeney : -- pull_requests: +28560 pull_request: https://github.com/python/cpython/pull/27828 ___ Python tracker ___

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Ran pyperformance with PGO/LTO CPU-isol on my Linux box and I cannot reproduce either: ❯ pyperf compare_to json/* --table --table-format=md -G | Benchmark | 2021-12-20_10-23-master-6ca78affc802 | 2021-12-20_15-43-master-e9898bf153d2 |

[issue40059] Provide a toml module in the standard library

2022-01-02 Thread Shantanu
Shantanu added the comment: We've started a PEP draft. https://github.com/hauntsaninja/peps/blob/toml-pep/pep-.rst shows a rendered version. https://github.com/hauntsaninja/peps/pull/1 is a PR from the toml-pep branch to main, to help ease of review / discussion. If you're following

[issue44669] TypeError: 'type' object is not subscriptable

2022-01-02 Thread Irit Katriel
Irit Katriel added the comment: I'm closing this because there is not enough information here to understand the issue and there was no reply to follow-up questions. Please reopen or create a new issue if you are still having a problem with this. -- nosy: +iritkatriel resolution:

[issue39181] Add `os.makedirs()` as `Path.mkdir()` equivalent in correspondence table

2022-01-02 Thread jack1142
jack1142 added the comment: Looks like this has been reported again in https://bugs.python.org/issue39470 and a fix for it has already been merged. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker

[issue46182] `super` and descriptor clarification

2022-01-02 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue34931] os.path.splitext with more dots

2022-01-02 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch nosy: +iritkatriel nosy_count: 5.0 -> 6.0 pull_requests: +28559 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30347 ___ Python tracker

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Does python_startup benchmark start with all modules parsed and __pycache__d, > or with no cache, so it includes the normally one-time parse time? I don't know what pyperf does with the cache (adding Victor as maybe he knowns). -- nosy:

[issue46235] Do all ref-counting at once for sequence multiplication

2022-01-02 Thread Dennis Sweeney
Dennis Sweeney added the comment: # benchmarking script from pyperf import Runner runner = Runner() for n in [2, 10, 100, 10_000]: for A in [ '[None]', '["Python", "Perl"]', 'list(range(10))', 'list(range(100))', 'list(range(1000))',

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Does python_startup benchmark start with all modules parsed and __pycache__d, or with no cache, so it includes the normally one-time parse time? -- ___ Python tracker

[issue46235] Do all ref-counting at once for sequence multiplication

2022-01-02 Thread Dennis Sweeney
Change by Dennis Sweeney : -- keywords: +patch pull_requests: +28558 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30346 ___ Python tracker ___

[issue46235] Do all ref-counting at once for sequence multiplication

2022-01-02 Thread Dennis Sweeney
New submission from Dennis Sweeney : Some benchmarks for this change are below. The case with the largest speedup, `[None] * 1`, is the case that I would consider the most important: initializing counters of the form `[0] * N` is very common in my experience. The following were taken

[issue46229] CODE_OF_CONDUCT shadowing org default

2022-01-02 Thread Mariatta
Mariatta added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I am not able to reproduce on Linux either, with pyperformance or manual testing in the CLI. Interestingle, this shows up in both machines: https://speed.python.org/timeline/#/?exe=12=python_startup=1=50=off=on=on

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This are my results running directly the pyperformance run script (https://github.com/python/pyperformance/blob/main/pyperformance/data-files/benchmarks/bm_python_startup/run_benchmark.py) with and without the fix (both PGO/LTO):

[issue46229] CODE_OF_CONDUCT shadowing org default

2022-01-02 Thread miss-islington
miss-islington added the comment: New changeset fedefa67350c72dde121f68cbe7aa70face6805e by Nikita Sobolev in branch 'main': bpo-46229: remove `CODE_OF_CONDUCT.md` to use org default (GH-30342) https://github.com/python/cpython/commit/fedefa67350c72dde121f68cbe7aa70face6805e --

[issue46221] Simplify except* implementation and move helpers to exceptions.c

2022-01-02 Thread Irit Katriel
Irit Katriel added the comment: Fixed in https://github.com/python/cpython/pull/30289. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue46219] except* assumes that an exception group is truthy

2022-01-02 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker ___

[issue46219] except* assumes that an exception group is truthy

2022-01-02 Thread Irit Katriel
Irit Katriel added the comment: New changeset 65e7c1f90e9136fc61f4af029b065d9f6c5664c3 by Irit Katriel in branch 'main': bpo-46219, 46221: simplify except* implementation following exc_info changes. Move helpers to exceptions.c. Do not assume that exception groups are truthy. (GH-30289)

[issue46234] 3.11: Tracing of decorators now visits the decorator line before the decorator function

2022-01-02 Thread Ned Batchelder
New submission from Ned Batchelder : Sometime after 3.11.0a3, tracing of decorators changed so that each decorator line is revisited as the decorator is invoked. Is this intentional? ---< dectrace.py >--- import linecache, sys def trace(frame, event, arg):

[issue41028] Move docs.python.org language and version switcher out of cpython

2022-01-02 Thread Ned Deily
Ned Deily added the comment: I went ahead and auto-backported the full PR to 3.9 and 3.8 since it applies cleanly there and did a manual backport of just the sidebar changes to 3.7 and 3.6 (added in the final merge before EOL). Now just awaiting @ambv approval for 3.8. For reference,

[issue41028] Move docs.python.org language and version switcher out of cpython

2022-01-02 Thread Ned Deily
Ned Deily added the comment: New changeset b28b0222e360669463ffe31d27c1fd374361cb23 by Miss Islington (bot) in branch '3.9': bpo-41028: Doc: Move switchers to docsbuild-scripts. (GH-20969) (GH-30343) https://github.com/python/cpython/commit/b28b0222e360669463ffe31d27c1fd374361cb23

[issue41028] Move docs.python.org language and version switcher out of cpython

2022-01-02 Thread Ned Deily
Ned Deily added the comment: New changeset 811f65ba263140b6ba28151246b52efe149a6382 by Ned Deily in branch '3.7': bpo-41028: use generic version links in Docs index. https://github.com/python/cpython/commit/811f65ba263140b6ba28151246b52efe149a6382 --

[issue46233] Minor speedup for bigint squaring

2022-01-02 Thread Tim Peters
Change by Tim Peters : -- keywords: +patch pull_requests: +28557 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30345 ___ Python tracker

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe it's Linux specific? I managed to run pyperformance and got this: ### python_startup ### Mean +- std dev: 23.2 ms +- 0.8 ms -> 23.4 ms +- 1.2 ms: 1.01x slower Not significant Note, I am not dismissing the report -- in fact it looks quite bad. But I

[issue46233] Minor speedup for bigint squaring

2022-01-02 Thread Tim Peters
New submission from Tim Peters : longobject.c's x_mul()'s special code for squaring gets kind of sloppy at the end of a digit pass, doing a useless add of 0 and an "extra" test for carry. Easily cleaned up. I think the underlying cause is that the HAC algorithm description it was modeled on

[issue41028] Move docs.python.org language and version switcher out of cpython

2022-01-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +28556 pull_request: https://github.com/python/cpython/pull/30344 ___ Python tracker ___

[issue41028] Move docs.python.org language and version switcher out of cpython

2022-01-02 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +28555 pull_request: https://github.com/python/cpython/pull/30343 ___ Python tracker

[issue46229] CODE_OF_CONDUCT shadowing org default

2022-01-02 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28554 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30342 ___ Python tracker ___

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Guido van Rossum
Guido van Rossum added the comment: So if I understand the speed.python.org results correctly, the time to run `python -c pass` went way up, but the time for `python -S -c pass` did not go up significantly. Unfortunately the only machine I have access to is a Mac, and I cannot repro this

[issue46232] Client certificates with UniqueIdentifier in the subject break ssl.peer_certificate()

2022-01-02 Thread Kacper
New submission from Kacper : Currently all subject sets of a client certificate are treated as UTF8 strings using the ASN1_STRING_to_UTF8 function (https://github.com/python/cpython/blob/8d999cbf4adea053be6dbb612b9844635c4dfb8e/Modules/_ssl.c#L912), however RFC 5280 states that the

[issue37836] Support .as_integer_ratio() in fractions.Fraction

2022-01-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think this is a door we should open: >>> Fraction(3.5, 2.5) Fraction(7, 5) This currently raises a useful exception: TypeError: both arguments should be Rational instances That is especially helpful in avoiding cases like this: >>>

[issue46231] grammar rule definition is missing: invalid_double_starred_kvpairs

2022-01-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +28553 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30341 ___ Python tracker

[issue46229] CODE_OF_CONDUCT shadowing org default

2022-01-02 Thread Mariatta
Mariatta added the comment: Sounds good to me to use the org-level CoC file and removing the local CPython copy. Having a single source of truth will be valuable and reduce our maintenance burden. -- ___ Python tracker

[issue46231] grammar rule definition is missing: invalid_double_starred_kvpairs

2022-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: invalid_* rules are not part of the official grammar as they are only used for error reporting. We need to update the peg grammar highlighter to exclude it -- ___ Python tracker

[issue46230] NEWLINE* is missing in 'file' rule in PEG grammar

2022-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I don't know what you mean with "it's missing". That is the actual rule used in the grammar: https://github.com/python/cpython/blob/8e75c6b49b7cb8515b917f01b32ece8c8ea2c0a0/Grammar/python.gram#L88 -- resolution: -> not a bug stage: ->

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Let me have a look. May take a day, okay?-- Absolutely! There is no rush as the only close release IIRC is another alpha of 3.11. -- ___ Python tracker

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Guido van Rossum
Guido van Rossum added the comment: Let me have a look. May take a day, okay?-- --Guido (mobile) -- ___ Python tracker ___ ___

[issue46227] add pathlib.Path.walk method

2022-01-02 Thread Stanislav Zmiev
Change by Stanislav Zmiev : -- keywords: +patch pull_requests: +28552 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30340 ___ Python tracker ___

[issue46231] grammar rule definition is missing: invalid_double_starred_kvpairs

2022-01-02 Thread Robert Einhorn
New submission from Robert Einhorn : Definition of invalid_double_starred_kvpairs PEG grammar rule is not found: https://docs.python.org/3.10/reference/grammar.html # PEG grammar rule: dict: | '{' [double_starred_kvpairs] '}' | '{' invalid_double_starred_kvpairs '}' --

[issue46230] NEWLINE* is missing in 'file' rule in PEG grammar

2022-01-02 Thread Robert Einhorn
New submission from Robert Einhorn : https://docs.python.org/3.10/reference/grammar.html # original grammar rule: file: [statements] ENDMARKER # suggested grammar rule: file: NEWLINE* [statements] ENDMARKER -- components: Parser messages: 409524 nosy: RobEin, lys.nikolaou,

[issue46229] CODE_OF_CONDUCT shadowing org default

2022-01-02 Thread Ned Deily
Change by Ned Deily : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46226] User specific paths added to System PATH environment variable

2022-01-02 Thread Ned Deily
Change by Ned Deily : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___

[issue23952] cgi: Document the 'maxlen' member of the cgi module

2022-01-02 Thread Ethan Furman
Change by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46187] Optionally support rounding for math.isqrt()

2022-01-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: > divmod() allows easy emulation of any division rounding mode It could be used that way, but generally isn't. Please consider my original request. Adding a keyword argument is easy, clear, and has almost no mental overhead. It reads very well in

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Guido, Eric, what are your thoughts here? The fix that I merged works by limiting the maximum recursion but seems that incrementing the recursion counter on every parser call makes quite a lot of impact on startup. Unfortunately if we revert the

[issue4849] instantiating and populating xml.dom.minidom.Element is cumbersome

2022-01-02 Thread Hugo van Kemenade
Hugo van Kemenade added the comment: Hi Mike, "patch review" means: "A patch or pull request exists, but it needs review. Any triager or core developer may do the review." https://devguide.python.org/triaging/#stage So we were waiting for someone to review patches listed above under the

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +lukasz.langa versions: +Python 3.11, Python 3.9 ___ Python tracker ___ ___

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: >It seems that the PR was merged without discussion about 85% regression in >python_startup benchmark Ugh, that's quite bad. We measured performance impact in general and that was quite acceptable but seems that for startup this is quite sensitive

[issue46229] CODE_OF_CONDUCT shadowing org default

2022-01-02 Thread Nikita Sobolev
New submission from Nikita Sobolev : Problem: we have two CODE_OF_CONDUCT files. 1. In CPython: https://github.com/python/cpython/blob/main/CODE_OF_CONDUCT.md (last updated 3 years ago) 2. In Python org, default for all repos: https://github.com/python/.github/blob/master/CODE_OF_CONDUCT.md

[issue46228] argparse docs: default for prog= in ArgumentParser() should be basename of argv[0], not argv[0], to match behaviour

2022-01-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you for the PR. -- nosy: +rhettinger resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue46228] argparse docs: default for prog= in ArgumentParser() should be basename of argv[0], not argv[0], to match behaviour

2022-01-02 Thread miss-islington
Change by miss-islington : -- keywords: +patch nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +28551 pull_request: https://github.com/python/cpython/pull/30339 ___ Python tracker

[issue46196] documentation for cmd library should include columnize() function

2022-01-02 Thread sharewell
sharewell added the comment: Thank you! Jawed > On Jan 2, 2022, at 10:34 AM, Éric Araujo wrote: > > > Éric Araujo added the comment: > > Done, cheers! > > -- > resolution: -> fixed > stage: patch review -> resolved > status: open -> closed > >

[issue23952] cgi: Document the 'maxlen' member of the cgi module

2022-01-02 Thread Hugo van Kemenade
Change by Hugo van Kemenade : -- keywords: +patch nosy: +hugovk nosy_count: 4.0 -> 5.0 pull_requests: +28550 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30338 ___ Python tracker

[issue46228] argparse docs: default for prog= in ArgumentParser() should be basename of argv[0], not argv[0], to match behaviour

2022-01-02 Thread Éric Araujo
Change by Éric Araujo : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: -> patch review type: enhancement -> behavior versions: -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker

[issue46227] add pathlib.Path.walk method

2022-01-02 Thread Jacob Nilsson
Change by Jacob Nilsson : -- nosy: +ajoino ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46224] doc: Fix bisect example using mutable function default

2022-01-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm going to decline this one. It seems that you're applying a stylistic guideline to a case where it isn't needed and where it doesn't improve the example. In this case, the example doesn't mutate the input, so the code is correct. It has some

[issue46228] argparse docs: default for prog= in ArgumentParser() should be basename of argv[0], not argv[0], to match behaviour

2022-01-02 Thread Jade Lovelace
New submission from Jade Lovelace : Currently the documentation for argparse.ArgumentParser states that the default value of the prog[ram] argument is argv[0], however, this does not match the actual behaviour of the constructor. In reality, the constructor uses the basename of argv[0], as

[issue46224] doc: Fix bisect example using mutable function default

2022-01-02 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46227] add pathlib.Path.walk method

2022-01-02 Thread Stanislav Zmiev
Stanislav Zmiev added the comment: Some people could suggest using Path.glob instead but I found it to be less convenient for some use cases and generally slower (~2.7 times slower). >>> timeit("list(Path('Lib').walk())", number=100, globals=globals()) 1.9074640140170231 >>>

[issue46218] Change long_pow() to sliding window algorithm

2022-01-02 Thread Tim Peters
Change by Tim Peters : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46218] Change long_pow() to sliding window algorithm

2022-01-02 Thread Tim Peters
Tim Peters added the comment: New changeset 863729e9c6f599286f98ec37c8716e982c4ca9dd by Tim Peters in branch 'main': bpo-46218: Change long_pow() to sliding window algorithm (GH-30319) https://github.com/python/cpython/commit/863729e9c6f599286f98ec37c8716e982c4ca9dd --

[issue46227] add pathlib.Path.walk method

2022-01-02 Thread Barney Gale
Change by Barney Gale : -- nosy: +barneygale ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46005] [doc] replace 'distutils' examples with 'setuptools'

2022-01-02 Thread Éric Araujo
Éric Araujo added the comment: Distutils is deprecated, and core Python docs are not the place to show how to use a specific build system (thanks to a lot of work, we now have multiple viable build systems!). -- nosy: +eric.araujo ___ Python

[issue46227] add pathlib.Path.walk method

2022-01-02 Thread Stanislav Zmiev
New submission from Stanislav Zmiev : Pathlib is great, yet every time I have to parse a bunch of files, I have to use os.walk and join paths by hand. That's not a lot of code but I feel like pathlib should have higher-level abstractions for all path-related functionality of os. I propose we

[issue46196] documentation for cmd library should include columnize() function

2022-01-02 Thread Éric Araujo
Éric Araujo added the comment: Done, cheers! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46196] documentation for cmd library should include columnize() function

2022-01-02 Thread Éric Araujo
Éric Araujo added the comment: New changeset ce4d25f3cd0a1c6e65b64015140fb5e1397c8ac5 by Nikita Sobolev in branch 'main': bpo-46196: document method cmd.Cmd.columnize (#30303) https://github.com/python/cpython/commit/ce4d25f3cd0a1c6e65b64015140fb5e1397c8ac5 --

[issue46178] Remove `.travis.yml`?

2022-01-02 Thread Nikita Sobolev
Nikita Sobolev added the comment: Thanks everyone! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46184] Remove `netlify.toml`?

2022-01-02 Thread Nikita Sobolev
Change by Nikita Sobolev : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46226] User specific paths added to System PATH environment variable

2022-01-02 Thread Aleksandr Krymskiy
New submission from Aleksandr Krymskiy : Installed Python 3.10.1 using Windows 64-bit installer from python.org. Upon examining the PATH environment variables I noticed that my local user paths (C:\Users\avk\AppData\...) have been added to the System-level PATH variable instead of User

[issue46208] os.path.normpath change between 3.11.0a2 and 3.11.0a3+

2022-01-02 Thread Hugo van Kemenade
Hugo van Kemenade added the comment: Here's a branch with a passing ntpath.normpath test and a failing posixpath.normpath test: https://github.com/hugovk/cpython/tree/issue-46208-tests https://github.com/hugovk/cpython/commit/d7e8da179adce51a8f63d2dbd062a272dda826bc --

[issue46200] Discourage logging f-strings due to security considerations

2022-01-02 Thread Arie Bovenberg
Arie Bovenberg added the comment: Indeed the `__format__` style offers a lot more options (see https://pyformat.info/). Regarding performance you make an interesting point. One possible solution is to allow f-strings _only_ if there are no args/kwargs. In that one case formatting would

[issue45903] What’s New In Python 3.11: wrong reference to Signature.from_callable

2022-01-02 Thread Mariatta
Mariatta added the comment: Thanks Jakub for reporting the issue, and thanks Hugo for the PR. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue45903] What’s New In Python 3.11: wrong reference to Signature.from_callable

2022-01-02 Thread Mariatta
Mariatta added the comment: New changeset 7a8796dc67d691e43eed69969e7706fefe0f16e9 by Hugo van Kemenade in branch 'main': bpo-45903: Fix typo in What's New: Signature.from_builtin is removed (GH-29813) https://github.com/python/cpython/commit/7a8796dc67d691e43eed69969e7706fefe0f16e9

[issue46020] Optimize long_pow for the common case

2022-01-02 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46224] doc: Fix bisect example using mutable function default

2022-01-02 Thread Dennis Sweeney
Change by Dennis Sweeney : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46224] doc: Fix bisect example using mutable function default

2022-01-02 Thread Sardorbek Imomaliev
Sardorbek Imomaliev added the comment: It was changed from that in 2010 https://github.com/python/cpython/commit/20933e08b12b4e66c6e1baf662a679b4008d9dce -- ___ Python tracker

[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2022-01-02 Thread Nikita Kniazev
Nikita Kniazev added the comment: > I made a draft PR here: > > https://github.com/python/cpython/pull/30177 > > to fix the issue. But we should benchmark and evaluate it before deciding > anything. It seems that the PR was merged without discussion about 85% regression in python_startup

[issue46224] doc: Fix bisect example using mutable function default

2022-01-02 Thread Dennis Sweeney
Dennis Sweeney added the comment: Another option would be to use globals: >>> BREAKPOINTS = [60, 70, 80, 90] >>> GRADES = "FDCBA" >>> def grade(score): ... i = bisect(BREAKPOINTS, score) ... return GRADES[i] ... >>> [grade(score) for score in [33, 99, 77, 70, 89, 90, 100]] ['F', 'A',

  1   2   >