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

2022-01-02 Thread Sardorbek Imomaliev
New submission from Sardorbek Imomaliev : Currently, in `bisect` examples `grade` function is declared with mutable default for `breakpoints` arugment. I suggest updating. https://github.com/sweeneyde commented > I would say that even though using mutable defaults is often undesirable, > ther

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

2022-01-02 Thread Alex Waygood
Change by Alex Waygood : -- keywords: +patch stage: -> patch review versions: -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___ _

[issue45615] Missing test for type of error when printing traceback for non-exception

2022-01-02 Thread Irit Katriel
Irit Katriel added the comment: New changeset a82baed0e9e61c0d8dc5c12fc08de7fc172c1a38 by Irit Katriel in branch 'main': bpo-45615: Add missing test for printing traceback for non-exception. Fix traceback.py (GH-30091) https://github.com/python/cpython/commit/a82baed0e9e61c0d8dc5c12fc08de7fc

[issue45615] Missing test for type of error when printing traceback for non-exception

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

[issue46057] argparse: embedded groups may prevent options from being in help output

2022-01-02 Thread László Attila Tóth
László Attila Tóth added the comment: I don't think I'm adventurous as I try to use its public API. If something is public in the pythonic terms (no underscore before it), but undocumented, that can obviously mean two things: either the documentation is outdated or the API published something

[issue45925] Upgrade macOS and Windows installers to use SQLite 3.37.1

2022-01-02 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: SQLite 3.37.1 appeared the day before New Years Eve. So let us wait until the end of January before upgrading the installers. https://www.sqlite.org/releaselog/3_37_1.html -- title: Upgrade macOS and Windows installers to use SQLite 3.37.0 -> Upgr

[issue24905] Allow incremental I/O to blobs in sqlite3

2022-01-02 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: FYI, I'm maintaining a rebased version on my fork: https://github.com/erlend-aasland/cpython/tree/sqlite-blob Here's the changes I've applied upon PR 271: - Use Argument Clinic - Convert to heap types - Adopt new CPython C APIs (Py_NewRef, Py_Is*, new sli

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

2022-01-02 Thread Arie Bovenberg
Arie Bovenberg added the comment: I've done some more digging, and have read the related issue bpo-30995. There are IMHO two challenges that are worth tackling: 1. A great number[1] of developers do their own string formatting. This is sub-optimal for performance and - in rare cases - l

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

2022-01-02 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue46225] f_lasti behaves differently for lambdas returned from loops

2022-01-02 Thread Ned Batchelder
New submission from Ned Batchelder : Python 3.11.0a3 changed how f_lasti behaves when calling a function in some situations. This example shows returning a lambda from a function. If the lambda is returned in a loop, then frame.f_lasti is 0 when it is called. If the lambda is not in a loop, t

[issue46225] f_lasti behaves differently for lambdas returned from loops

2022-01-02 Thread Ned Batchelder
Ned Batchelder added the comment: Also, this only happens with a Python trace function. With a C trace function, pPyFrameObject->f_frame->f_lasti is -1. -- ___ Python tracker __

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

2022-01-02 Thread Vedran Čačić
Vedran Čačić added the comment: A long time ago, Python documentation used true and false as adjectives (as opposed to True and False, which are proper names for canonical true/false objects). I think it was BDFL's preference back then. In the meantime, I suppose through JS's influence, Pytho

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

2022-01-02 Thread Eric V. Smith
Eric V. Smith added the comment: I think there's definitely room for improvement here, and at face value I like the debugf() functions. __format__ style formatting solves a big problem for me: being able to provide format strings for timestamps. One thing: I'd be careful about saying that de

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

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

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

[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: https://mail.

[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: https://mail.

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

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

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

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

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

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

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

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

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

[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

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

[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: https://mail.pyt

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

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

[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 >>> timeit("list(Path

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

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

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

[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: https://mail.pytho

[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

[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

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

[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

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

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

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

[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 ___ ___ Python-bugs-l

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

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

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

[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: https://mail.

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

[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: https://mail.pyt

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

[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 '}' -- compon

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

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

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

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

[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

[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
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +28553 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30341 ___ Python tracker __

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

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

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

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

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

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

[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

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

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

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

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

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

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

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

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

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

[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): pablogsal@Obsidian-W:

[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&ben=python_startup&env=1&revs=50&equid=off&quarts=on&extr=on http

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

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

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

[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
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))', '(None,

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

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

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

[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

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

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

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

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

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

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

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

[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: https://mail.pyt

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

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

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

  1   2   >