[issue46573] Python modules such as pyglet or pygame crash Python when tkinter message boxes are opened on MacOS.

2022-02-02 Thread Ronald Oussoren
Ronald Oussoren added the comment: Categories make it possible to add methods to an existing class, but not new attributes. The latter shouldn't be a problem in principle for an NSApplication subclass because only a single instance of the application class will get created and you may as

[issue46622] Support decorating a coroutine with functools.cached_property

2022-02-02 Thread Tzu-ping Chung
New submission from Tzu-ping Chung : Currently, decorating a coroutine with cached_property would cache the coroutine itself. But this is not useful in any way since a coroutine cannot be awaited multiple times. Running this code: import asyncio import functools class A:

[issue45629] Tools/freeze needs tests in the test suite.

2022-02-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 8726067ace98a27557e9fdf1a8e1c509c37cfcfc by Gregory P. Smith in branch 'main': bpo-45629: Improve test.support.skip_if_buildbot (GH-31094) https://github.com/python/cpython/commit/8726067ace98a27557e9fdf1a8e1c509c37cfcfc --

[issue46621] Should map(function, iterable, ...) replace StopIteration with RuntimeError?

2022-02-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 for being a breaking change, for addressing a minor issue that rarely arises in real life, and for being a slippery slope. -- nosy: +rhettinger ___ Python tracker

[issue45629] Tools/freeze needs tests in the test suite.

2022-02-02 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith nosy_count: 2.0 -> 3.0 pull_requests: +29280 pull_request: https://github.com/python/cpython/pull/31094 ___ Python tracker

[issue46621] Should map(function, iterable, ...) replace StopIteration with RuntimeError?

2022-02-02 Thread Peiran Yao
New submission from Peiran Yao : Currently, StopIteration raised accidentally inside the `function` being applied is not caught by map(). This will cause the iteration of the map object to terminate silently. (Whereas, when some other exception is raised, a traceback is printed pinpointing

[issue46576] test_peg_generator is extremely slow

2022-02-02 Thread miss-islington
miss-islington added the comment: New changeset e8258608c28c65680253d0ca6167430e34c2fd87 by Miss Islington (bot) in branch '3.9': [3.9] [3.10] bpo-46576: bpo-46524: Disable compiler optimization within test_peg_generator. (GH-31015) (GH-31089) (GH-31093)

[issue46524] test_peg_generator takes 8 minutes on Windows

2022-02-02 Thread miss-islington
miss-islington added the comment: New changeset e8258608c28c65680253d0ca6167430e34c2fd87 by Miss Islington (bot) in branch '3.9': [3.9] [3.10] bpo-46576: bpo-46524: Disable compiler optimization within test_peg_generator. (GH-31015) (GH-31089) (GH-31093)

[issue46576] test_peg_generator is extremely slow

2022-02-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset f5ebec4d3e1199ec38b88920cfde8e460e5120dd by Gregory P. Smith in branch '3.10': [3.10] bpo-46576: bpo-46524: Disable compiler optimization within test_peg_generator. (GH-31015) (GH-31089)

[issue46524] test_peg_generator takes 8 minutes on Windows

2022-02-02 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 10.0 -> 11.0 pull_requests: +29279 pull_request: https://github.com/python/cpython/pull/31093 ___ Python tracker

[issue46524] test_peg_generator takes 8 minutes on Windows

2022-02-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset f5ebec4d3e1199ec38b88920cfde8e460e5120dd by Gregory P. Smith in branch '3.10': [3.10] bpo-46576: bpo-46524: Disable compiler optimization within test_peg_generator. (GH-31015) (GH-31089)

[issue46576] test_peg_generator is extremely slow

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

[issue46490] Add "follow_symlinks=False" support for "os.utime()" on Windows

2022-02-02 Thread Eryk Sun
Eryk Sun added the comment: In case you missed it, I implemented _Py_CreateFile2() in bpo-46506 and rewrote os.stat() based on it. Check it out in case you're interested in moving forward with a PR in bpo-46506. For this issue, follow_symlinks is fairly simple to support with

[issue45975] Simplify some while-loops with walrus operator

2022-02-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset fafd2dadf63973a04f5693e5be19f3e7521c10d4 by Terry Jan Reedy in branch '3.9': [3.9] bpo-45975: Use walrus operator for some idlelib while loops (GH-31083) https://github.com/python/cpython/commit/fafd2dadf63973a04f5693e5be19f3e7521c10d4

[issue46620] Documentation of ipaddress behavior for prefix length with leading zeros.

2022-02-02 Thread Kenta Tsuna
New submission from Kenta Tsuna : ipaddress library tolerate the prefix length with leading zeros. $ ./python.exe Python 3.11.0a4+ (heads/main:8fb3649450, Jan 31 2022, 16:39:46) [Clang 13.0.0 (clang-1300.0.29.3)] on darwin Type "help", "copyright", "credits" or "license" for more information.

[issue45975] Simplify some while-loops with walrus operator

2022-02-02 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +29277 pull_request: https://github.com/python/cpython/pull/31092 ___ Python tracker ___

[issue45975] Simplify some while-loops with walrus operator

2022-02-02 Thread miss-islington
miss-islington added the comment: New changeset 2ddc278875f789de622262ee8ff5a1c3788f031c by Miss Islington (bot) in branch '3.10': bpo-45975: Use walrus operator for some idlelib while loops (GH-31083) https://github.com/python/cpython/commit/2ddc278875f789de622262ee8ff5a1c3788f031c

[issue45975] Simplify some while-loops with walrus operator

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

[issue45975] Simplify some while-loops with walrus operator

2022-02-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 51a95be1d035a717ab29e98056b8831a98e61125 by Nick Drozd in branch 'main': bpo-45975: Use walrus operator for some idlelib while loops (GH-31083) https://github.com/python/cpython/commit/51a95be1d035a717ab29e98056b8831a98e61125 --

[issue46619] lazy module property not recognized by doctests

2022-02-02 Thread Jason R. Coombs
New submission from Jason R. Coombs : Attempting to define a lazy-loaded property for a module, I found [this guidance](https://stackoverflow.com/a/52018676/70170) referencing [module attribute access](https://docs.python.org/3/reference/datamodel.html#customizing-module-attribute-access)

[issue46197] ensurepip bootstrap breaks out of isolated environment

2022-02-02 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the report and PR. The workflow would be to merge a fix to the main branch for 3.11, then there’s a bot that makes backports for active branches (3.10 and 3.9). More info: https://devguide.python.org/ -- nosy: +eric.araujo

[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-02 Thread Inada Naoki
Inada Naoki added the comment: I didn't mean _Py_abspath is problem. I just used it to describe why -O0 and -Og is so different. We can reduce stack usage of it easily, but it is not a problem than _PyEval_EvalFrameDefault. It is difficult to reduce stack usage of _PyEval_EvalFrameDefault

[issue46617] CSV Creation occasional off by one error

2022-02-02 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43478] Disallow Mock spec arguments from being Mocks

2022-02-02 Thread Matthew Suozzo
Change by Matthew Suozzo : -- pull_requests: +29275 pull_request: https://github.com/python/cpython/pull/31090 ___ Python tracker ___

[issue46617] CSV Creation occasional off by one error

2022-02-02 Thread Matthew Stidham
Matthew Stidham added the comment: the problem was a file in our library screwing up the python configuration -- stage: -> resolved status: open -> closed ___ Python tracker

[issue45819] Avoid releasing the GIL in nonblocking socket operations

2022-02-02 Thread jakirkham
Change by jakirkham : -- nosy: +jakirkham ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46541] Replace _Py_IDENTIFIER() with statically initialized objects.

2022-02-02 Thread Eric Snow
Eric Snow added the comment: FYI, I've posted to python-dev for feedback before proceeding: https://mail.python.org/archives/list/python-...@python.org/thread/DNMZAMB4M6RVR76RDZMUK2WRLI6KAAYS/ -- ___ Python tracker

[issue46618] Exponent operator(**) interpreter issue

2022-02-02 Thread Tim Peters
Tim Peters added the comment: Exponentiation has higher precedence (binds more tightly) than unary minus, so the expression groups as -(2**2). Virtually all computer languages (those that _have_ an exponentiation operator) do the same. For example, here from wxMaxima: (%i1) -2**2; (%o1) -4

[issue42238] Deprecate suspicious.py?

2022-02-02 Thread STINNER Victor
STINNER Victor added the comment: > https://pypi.org/project/sphinx-lint/ Congrats :-) -- ___ Python tracker ___ ___

[issue46618] Exponent operator(**) interpreter issue

2022-02-02 Thread koala-lava
New submission from koala-lava : If I put -2 ** 2 in the interpreter it outputs -4. Expected is 4. If I create a variable and initialize it with -2 and then try the same then it's correct. -- components: Interpreter Core messages: 412402 nosy: koala-lava priority: normal severity:

[issue46617] CSV Creation occasional off by one error

2022-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: There's too much for us to look at here. Can you create a small example which demonstrates the problem? It should include the input, the code, the actual output, and the expected output. -- nosy: +eric.smith ___

[issue46617] CSV Creation occasional off by one error

2022-02-02 Thread Matthew Stidham
New submission from Matthew Stidham : The file which I found the error in is in https://github.com/greearb/lanforge-scripts -- components: C API files: debug from pandas failure.txt messages: 412400 nosy: matthewstidham priority: normal severity: normal status: open title: CSV

[issue46573] Python modules such as pyglet or pygame crash Python when tkinter message boxes are opened on MacOS.

2022-02-02 Thread Marc Culler
Marc Culler added the comment: The TKApplication class is a subclass of NSApplication which adds both attributes and methods. Those are used throughout the macOS port of Tk, and as Ronald says, the unique instance of NSApplication in Tk is actually a TKApplication. Every macOS Application

[issue46616] test_importlib leaves stray registry entries on Windows

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

[issue46616] test_importlib leaves stray registry entries on Windows

2022-02-02 Thread miss-islington
miss-islington added the comment: New changeset 5765eaa13654e5f812a286700da7d6b8e144da0e by Miss Islington (bot) in branch '3.10': bpo-46616: Ensures test_importlib.test_windows cleans up registry keys after completion (GH-31086)

[issue46616] test_importlib leaves stray registry entries on Windows

2022-02-02 Thread miss-islington
miss-islington added the comment: New changeset 3c6173ca67c019f3eb7a2fc34c5bfc426f99c5b2 by Miss Islington (bot) in branch '3.9': bpo-46616: Ensures test_importlib.test_windows cleans up registry keys after completion (GH-31086)

[issue46576] test_peg_generator is extremely slow

2022-02-02 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +29273 pull_request: https://github.com/python/cpython/pull/31089 ___ Python tracker ___

[issue46524] test_peg_generator takes 8 minutes on Windows

2022-02-02 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +29274 pull_request: https://github.com/python/cpython/pull/31089 ___ Python tracker ___

[issue46576] test_peg_generator is extremely slow

2022-02-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 164a017e13ee96bd1ea1ae79f5ac9e25fe83994e by Gregory P. Smith in branch 'main': bpo-46576: bpo-46524: Disable compiler optimization within test_peg_generator. (#31015)

[issue46524] test_peg_generator takes 8 minutes on Windows

2022-02-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 164a017e13ee96bd1ea1ae79f5ac9e25fe83994e by Gregory P. Smith in branch 'main': bpo-46576: bpo-46524: Disable compiler optimization within test_peg_generator. (#31015)

[issue46550] __slots__ updates despite being read-only

2022-02-02 Thread Ronald Oussoren
Ronald Oussoren added the comment: There's a use case for using a dict for __slots__, pydoc will use a dict value for the slots as a mapping from attribute name to attribute documentation. Because of that it is not really worthwhile to transform the value of __slots__ during class

[issue46616] test_importlib leaves stray registry entries on Windows

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

[issue46616] test_importlib leaves stray registry entries on Windows

2022-02-02 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +29271 pull_request: https://github.com/python/cpython/pull/31087 ___ Python tracker

[issue46616] test_importlib leaves stray registry entries on Windows

2022-02-02 Thread Steve Dower
Steve Dower added the comment: New changeset 89a0a90c2e0e685bc70206fc45e4413c4f4411ed by Steve Dower in branch 'main': bpo-46616: Ensures test_importlib.test_windows cleans up registry keys after completion (GH-31086)

[issue46573] Python modules such as pyglet or pygame crash Python when tkinter message boxes are opened on MacOS.

2022-02-02 Thread Ned Deily
Ned Deily added the comment: Thanks for looking into this, Ronald. Before we close this as a Python issue, perhaps Marc might have a suggestion on what should be done here from a Tk perspective. -- nosy: +culler status: pending -> open ___ Python

[issue46607] Add DeprecationWarning to configparser's LegacyInterpolation

2022-02-02 Thread Hugo van Kemenade
Hugo van Kemenade added the comment: > > Other configparser deprecations were added in 3.2, but with > > DeprecationWarnings. > Its deprecation was never documented anywhere in Doc/. Correct, only in the docstring: ``` class LegacyInterpolation(Interpolation): """Deprecated

[issue45173] Remove configparser deprecations

2022-02-02 Thread miss-islington
miss-islington added the comment: New changeset ba4d79af32b6bb8378cb7003f67d6c4d413fbe89 by Hugo van Kemenade in branch '3.10': [3.10] bpo-45173: Note configparser deprecations will be removed in 3.12 (GH-31084)

[issue46616] test_importlib leaves stray registry entries on Windows

2022-02-02 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +29270 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31086 ___ Python tracker

[issue46615] Use-after-free by mutating set during set operations

2022-02-02 Thread Dennis Sweeney
Dennis Sweeney added the comment: set1.isdisjoint(set2) also crashes -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46615] Use-after-free by mutating set during set operations

2022-02-02 Thread Dennis Sweeney
Change by Dennis Sweeney : -- title: Segfault in set intersection (&) and difference (-) -> Use-after-free by mutating set during set operations ___ Python tracker ___

[issue46616] test_importlib leaves stray registry entries on Windows

2022-02-02 Thread Steve Dower
New submission from Steve Dower : When running test_importlib.test_windows, it may create registry keys that previously didn't exist. These keys are not fully cleaned up. Detect if the full key is created and then delete it after the test. If it existed, only delete the specific test key.

[issue46615] Segfault in set intersection (&) and difference (-)

2022-02-02 Thread Dennis Sweeney
Dennis Sweeney added the comment: replacing `return True` with `return random() < 0.5` makes *all* of the operations crash, except for `|` and `|=`. -- ___ Python tracker

[issue46615] Segfault in set intersection (&) and difference (-)

2022-02-02 Thread Dennis Sweeney
New submission from Dennis Sweeney : Maybe related to https://bugs.python.org/issue8420 Somewhat obscure, but using only standard Python, and no frame- or gc-hacks, it looks like we can get a use-after-free: from random import random BADNESS = 0.0 class Bad: def __eq__(self, other):

[issue24132] Direct sub-classing of pathlib.Path

2022-02-02 Thread Barney Gale
Change by Barney Gale : -- pull_requests: +29269 pull_request: https://github.com/python/cpython/pull/31085 ___ Python tracker ___

[issue46612] Unclear behavior of += operator

2022-02-02 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

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

2022-02-02 Thread Paul Ganssle
Paul Ganssle added the comment: I don't think it's necessary to add a feature to `isoformat()` just for the purpose of being able to add the corresponding parser, particularly when the plan is to implement a much broader ISO 8601 parser for Python 3.11 (I've done most of the implementation

[issue46614] Add option to output UTC datetimes as "Z" in `.isoformat()`

2022-02-02 Thread Paul Ganssle
New submission from Paul Ganssle : As part of bpo-35829, it was suggested that we add the ability to output the "Z" suffix in `isoformat()`, so that `fromisoformat()` can both be the exact functional inverse of `isoformat()` and parse datetimes with "Z" outputs. I think that that's not a

[issue45173] Remove configparser deprecations

2022-02-02 Thread Hugo van Kemenade
Change by Hugo van Kemenade : -- pull_requests: +29268 pull_request: https://github.com/python/cpython/pull/31084 ___ Python tracker ___

[issue45975] Simplify some while-loops with walrus operator

2022-02-02 Thread Nick Drozd
Change by Nick Drozd : -- keywords: +patch pull_requests: +29267 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31083 ___ Python tracker ___

[issue31582] Add _pth breadcrumb to sys.path documentation

2022-02-02 Thread Russel Webber
Change by Russel Webber : -- keywords: +patch pull_requests: +29265 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31082 ___ Python tracker

[issue42238] Deprecate suspicious.py?

2022-02-02 Thread Georg Brandl
Georg Brandl added the comment: Looks good. I should have rights automatically for everything in that org. -- ___ Python tracker ___

[issue46612] Unclear behavior of += operator

2022-02-02 Thread Marek Scholle
Marek Scholle added the comment: > a += b means (is closest to) a = type(a).__iadd__(a, b) I exchanged several messages, and this is all I needed! I propose to resolve as "Not a bug" -- ___ Python tracker

[issue46613] Add PyType_GetModuleByDef to the public & limited API

2022-02-02 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +29264 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31081 ___ Python tracker ___

[issue46612] Unclear behavior of += operator

2022-02-02 Thread Vedran Čačić
Vedran Čačić added the comment: You've managed to write 3 messages already, without at any point mentioning what _really_ happens when you += something. a += b means (is closest to) a = type(a).__iadd__(a, b) You focus all the time on __iadd__ call, disregarding that its result it

[issue45173] Remove configparser deprecations

2022-02-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset e8659b47dece5a272111c0af5e340c364a9f807b by Hugo van Kemenade in branch 'main': bpo-45173: Keep configparser deprecations until Python 3.12 (GH-30952) https://github.com/python/cpython/commit/e8659b47dece5a272111c0af5e340c364a9f807b

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

2022-02-02 Thread paul j3
Change by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46101] argparse: using parents & subcommands, options can be ignored

2022-02-02 Thread paul j3
Change by paul j3 : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46613] Add PyType_GetModuleByDef to the public & limited API

2022-02-02 Thread Petr Viktorin
New submission from Petr Viktorin : _PyType_GetModuleByDef (added in bpo-42100)allows module state access from slot methods (like tp_init or nb_add), the main thing missing from PEP 573 (Module State Access from C Extension Methods). It's time to make it public. The function itself can be

[issue46080] argparse.BooleanOptionalAction with default=argparse.SUPPRESS and help specified raises exception

2022-02-02 Thread paul j3
Change by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42238] Deprecate suspicious.py?

2022-02-02 Thread Julien Palard
Julien Palard added the comment: Georg, I was able to move forward: - https://github.com/sphinx-contrib/sphinx-lint - https://pypi.org/project/sphinx-lint/ Does everything looks good to you? Next step would be to remove rstlint.py from Docs/tools and add a dependency to rstlint from the

[issue46440] ArgumentParser.parse_args exits on missing required argument with exit_on_error=False

2022-02-02 Thread paul j3
paul j3 added the comment: Duplicate of https://bugs.python.org/issue41255 Argparse.parse_args exits on unrecognized option with exit_on_error=False -- nosy: +paul.j3 resolution: -> duplicate stage: patch review -> resolved status: open -> closed

[issue46612] Unclear behavior of += operator

2022-02-02 Thread Marek Scholle
Marek Scholle added the comment: I don't understand the comment https://bugs.python.org/issue46612#msg412374 >>> def f(): x ... >>> f() is OK, so x is something which can be evaluated inside nested function, it is a good target to be used in `x.__iadd__(iterable)`. That >>>

[issue46608] Exclude marshalled-frozen data if deep-freezing to save 300 KB space

2022-02-02 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46612] Unclear behavior of += operator

2022-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: The "evaluate the target" part causes the UnboundLocalError, just as in: >>> x=1 >>> def f(): ... x ... x = x + 1 ... >>> f() Traceback (most recent call last): File "", line 1, in File "", line 2, in f UnboundLocalError: local variable 'x'

[issue37705] winerror_to_errno implementation

2022-02-02 Thread miss-islington
miss-islington added the comment: New changeset 38e0b9efdf164be656782db0f969fb536cfbcaf1 by Oleg Iarygin in branch 'main': bpo-37705: Remove orphaned PC/errmap.mak (GH-29724) https://github.com/python/cpython/commit/38e0b9efdf164be656782db0f969fb536cfbcaf1 --

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2022-02-02 Thread E:V:A
E:V:A added the comment: I would like to make the python community aware that there has recently been a renewed interest in updating and maintaining 'pyreadline', but in a new(ish) repository 'pyreadline3'. https://github.com/pyreadline3/pyreadline3 This apparently now works under Py3.10,

[issue46550] __slots__ updates despite being read-only

2022-02-02 Thread Ronald Oussoren
Ronald Oussoren added the comment: W.r.t. augmented assignments, this is a good blog post about how they work under the hood: https://snarky.ca/unravelling-augmented-arithmetic-assignment/ -- ___ Python tracker

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-02 Thread miss-islington
miss-islington added the comment: New changeset 0ef08530124c5ca13a9394f4ac18bee8e6c66409 by Petr Viktorin in branch 'main': bpo-46433: _PyType_GetModuleByDef: handle static types in MRO (GH-30696) https://github.com/python/cpython/commit/0ef08530124c5ca13a9394f4ac18bee8e6c66409 --

[issue45459] Limited API support for Py_buffer

2022-02-02 Thread Christian Heimes
Christian Heimes added the comment: Thanks for the review, Petr! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: I agree with Eric that this should not be changed. It is working as documented and intended. In its original incarenation, assertCountEqual was documented as being equivalent to ``assertEqual(sorted(expected), sorted(actual))``. Either way, the goal

[issue43012] Remove pathlib accessors

2022-02-02 Thread Éric Araujo
Change by Éric Araujo : -- nosy: +petr.viktorin resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46612] Unclear behavior of += operator

2022-02-02 Thread Marek Scholle
Marek Scholle added the comment: Thanks for pointing to reference https://docs.python.org/3/reference/simple_stmts.html#augmented-assignment-statements Although I can agree it tries to point to similarity with `x = x + 1`, it says about how `x += [1]` is processed: (1) evaluate the target

[issue46612] Unclear behavior of += operator

2022-02-02 Thread Steven D'Aprano
Steven D'Aprano added the comment: You say: "The documentation says ..." but don't tell us which documentation. This documentation: https://docs.python.org/3/reference/simple_stmts.html#augmented-assignment-statements tells us that augmented assignment is assignment: "An augmented

[issue46612] Unclear behavior of += operator

2022-02-02 Thread Marek Scholle
New submission from Marek Scholle : Hi, I ran into discussion about scoping in Python (visibility of outer variables in nested functions, global, nonlocal) which made me to create for other some showcases. I realized there is a space for ambiguity which I extracted to this REPL: >>> x

[issue45459] Limited API support for Py_buffer

2022-02-02 Thread miss-islington
miss-islington added the comment: New changeset f66c857572a308822c70fd25e0197b6e0dec6e34 by Christian Heimes in branch 'main': bpo-45459: Add Py_buffer to limited API (GH-29991) https://github.com/python/cpython/commit/f66c857572a308822c70fd25e0197b6e0dec6e34 -- nosy:

[issue46072] Unify handling of stats in the CPython VM

2022-02-02 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +29263 pull_request: https://github.com/python/cpython/pull/31079 ___ Python tracker ___

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-02 Thread Can
Can added the comment: @sobolevn I was expecting the following test case to be covered. self.assertRaises(self.failureException, self.assertCountEqual, {'a': 1}, {'a': 2}) what I understand from the doc of the assertion is that elements have to be the same without

[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache

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

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: The PR changes the meaning of assertCountEqual. https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertCountEqual says: Equivalent to: assertEqual(Counter(list(first)), Counter(list(second))) ... At the very least, the documentation would

[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

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

[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-02 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +AlexWaygood, gvanrossum, kj ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-02 Thread Nikita Sobolev
New submission from Nikita Sobolev : There are several problem reported by coverage: 1. This line is never reached in `_SpecialGenericAlias.__subclasscheck__`: https://github.com/python/cpython/blob/08f8301b21648d58d053e1a513db8ed32fbf37dd/Lib/typing.py#L1140 2. `__instancecheck__` and

[issue45995] string formatting: normalize negative zero

2022-02-02 Thread John Belmonte
John Belmonte added the comment: PEP at https://github.com/python/peps/pull/2295 -- ___ Python tracker ___ ___ Python-bugs-list

[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache

2022-02-02 Thread miss-islington
miss-islington added the comment: New changeset 8d239bfdcc98f4e4a592d9cda569380a9c15a5c0 by Petr Viktorin in branch '3.9': [3.9] bpo-45703: Invalidate _NamespacePath cache on importlib.invalidate_cache (GH-29384) (GH-30922) (GH-31076)

[issue46594] Windows "Edit with IDLE >" only has one selection

2022-02-02 Thread Steve Dower
Steve Dower added the comment: True. I guess we need to dig a little deeper to find a cause here. Any other ideas? -- ___ Python tracker ___

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

2022-02-02 Thread Tin Tvrtković
Tin Tvrtković added the comment: Eric is absolutely right, due to function calls being somewhat slow in Python the performance argument in practice falls in favor of f-strings. So if they're faster, more readable, and more convenient to write, no wonder people prefer them (including me).

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-02 Thread Can
Change by Can : -- keywords: +patch pull_requests: +29261 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31077 ___ Python tracker ___

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-02 Thread Nikita Sobolev
Change by Nikita Sobolev : -- components: +Library (Lib) versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker ___ ___

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-02 Thread Nikita Sobolev
New submission from Nikita Sobolev : @cansarigol, can you please specify what do you expect and how it works? -- nosy: +sobolevn ___ Python tracker ___

[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache

2022-02-02 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +29260 pull_request: https://github.com/python/cpython/pull/31076 ___ Python tracker ___

  1   2   >