[issue46921] Vectorcall support for super()

2022-03-05 Thread Ken Jin
Change by Ken Jin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37609] support "UNC" device paths in ntpath.splitdrive

2022-03-05 Thread Barney Gale
Change by Barney Gale : -- pull_requests: +29822 pull_request: https://github.com/python/cpython/pull/31702 ___ Python tracker ___

[issue46921] Vectorcall support for super()

2022-03-05 Thread Ken Jin
Ken Jin added the comment: New changeset 602024e6e12c69d836aa191d63db75862aec2493 by Ken Jin in branch 'main': bpo-46921: Vectorcall support for `super()` (GH-31687) https://github.com/python/cpython/commit/602024e6e12c69d836aa191d63db75862aec2493 --

[issue40512] [subinterpreters] Meta issue: per-interpreter GIL

2022-03-05 Thread Jon Parise
Change by Jon Parise : -- nosy: +jon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46864] Deprecate ob_shash in BytesObject

2022-03-05 Thread Inada Naoki
Inada Naoki added the comment: New changeset 2d8b764210c8de10893665aaeec8277b687975cd by Inada Naoki in branch 'main': bpo-46864: Deprecate PyBytesObject.ob_shash. (GH-31598) https://github.com/python/cpython/commit/2d8b764210c8de10893665aaeec8277b687975cd --

[issue46864] Deprecate ob_shash in BytesObject

2022-03-05 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37609] support "UNC" device paths in ntpath.splitdrive

2022-03-05 Thread Barney Gale
Barney Gale added the comment: I'd like to pick this up, as it would allow us to remove a duplicate implementation in pathlib with its own shortcomings. If using native functionality if difficult to get right, could I put @eryksun's splitdrive.py implementation up for review? --

[issue46935] import of submodule polutes global namespace

2022-03-05 Thread Dennis Sweeney
Dennis Sweeney added the comment: This might be something that rapidfuzz can fix, rather than CPython. In whatever import process rapidfuzz uses, it populates sys.modules with a module named `Levenshtein` in addition to 'rapidfuzz.distance.Levenshtein'. You might be able to request that

[issue46911] Early tracing has lineno=None for modules

2022-03-05 Thread Ned Batchelder
Ned Batchelder added the comment: Maybe I'm missing something during normal execution, but I'm only seeing this effect now during this super-early encodings.py trick. I don't mind just special-casing the Nones in this case. -- ___ Python tracker

[issue40172] ZipInfo corrupts file names in some old zip archives

2022-03-05 Thread Yudi Levi
Yudi Levi added the comment: The main issue is that when extracting older zip files, files are actually written to disk with corrupted (altered) names. Unfortunately it's been a while since I saw this issue and I can't tell if it was fixed or if I simply can't reproduce it. I do see that

[issue46934] Started multiprocessing.Process instances are unserialisable

2022-03-05 Thread Géry
Change by Géry : -- title: A started multiprocessing.Process instance cannot be serialised -> Started multiprocessing.Process instances are unserialisable ___ Python tracker

[issue46934] A started multiprocessing.Process instance cannot be serialised

2022-03-05 Thread Géry
Change by Géry : -- keywords: +patch pull_requests: +29821 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31701 ___ Python tracker ___

[issue46935] import of submodule polutes global namespace

2022-03-05 Thread Max Bachmann
Max Bachmann added the comment: It appears this only occurs when a C Extension is involved. When the so is imported first it is preferred over the .py file that the user would like to import. I could not find any documentation on this behavior, so I assume that this is not the intended. My

[issue38364] inspect.iscoroutinefunction / isgeneratorfunction / isasyncgenfunction can't handle partialmethod objects

2022-03-05 Thread Jameel A.
Change by Jameel A. : -- versions: +Python 3.10, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46935] import of submodule polutes global namespace

2022-03-05 Thread Max Bachmann
New submission from Max Bachmann : In my environment I installed the following two libraries: ``` pip install rapidfuzz pip install python-Levenshtein ``` Those two libraries have the following structures: rapidfuzz |-distance |- __init__.py (from . import Levenshtein) |- Levenshtein.*.so

[issue38364] inspect.iscoroutinefunction / isgeneratorfunction / isasyncgenfunction can't handle partialmethod objects

2022-03-05 Thread Jameel Al-Aziz
Jameel Al-Aziz added the comment: I've recently ran into this via unittest.mock.patch.object. Mocking an asynchronous partial method returns MagicMock and not AsyncMagicMock, causing some pretty hard to debug failures. -- nosy: +me3 ___ Python

[issue46934] A started multiprocessing.Process instance cannot be serialised

2022-03-05 Thread Géry
New submission from Géry : The Python program: ``` import multiprocessing import time class Application: def __init__(self): self._event = multiprocessing.Event() self._processes = [ multiprocessing.Process(target=self._worker) for _ in

[issue46920] Remove code made dead long ago with #if 0

2022-03-05 Thread Oleg Iarygin
Oleg Iarygin added the comment: I reverted my changes in Modules/_ctypes/libffi_osx/x86/x86-ffi64.c and Modules/_decimal/libmpdec/*step.c to not disturb third-party vendored libraries. As a result, macOS component is no longer affected along with the corresponding experts in a nosy list.

[issue46933] Make pwd module optional for wasm32-emscripten and wasi

2022-03-05 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +29820 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31700 ___ Python tracker

[issue46933] Make pwd module optional for wasm32-emscripten and wasi

2022-03-05 Thread Christian Heimes
New submission from Christian Heimes : WebAssembly platforms like wasm32-emscripten and wasm32-wasi don't have a typical user and group database. WASI platform does not provide necessary API functions at all. Emscripten provides dummy stubs. On Emscripten the pwd module compiles, but is

[issue45582] Rewrite getpath.c in Python

2022-03-05 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +29819 pull_request: https://github.com/python/cpython/pull/31699 ___ Python tracker ___

[issue46928] type.__qualname__ ignores module name in tp_name for static types

2022-03-05 Thread Ronald Oussoren
Ronald Oussoren added the comment: You're right. I was sure that __qualname__ included the module name, but PEP 3155 is clear about actual semantics. Sorry about the noise. -- resolution: -> not a bug stage: test needed -> resolved status: open -> closed

[issue43923] Can't create generic NamedTuple as of py3.9

2022-03-05 Thread Thomas Grainger
Thomas Grainger added the comment: The main advantage for my usecase is support for heterogeneous unpacking On Sat, Mar 5, 2022, 6:04 PM Alex Waygood wrote: > > Alex Waygood added the comment: > > I sense we'll have to agree to disagree on the usefulness of NamedTuples > in the age of

[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-03-05 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +29818 pull_request: https://github.com/python/cpython/pull/31698 ___ Python tracker ___

[issue43923] Can't create generic NamedTuple as of py3.9

2022-03-05 Thread Alex Waygood
Alex Waygood added the comment: I sense we'll have to agree to disagree on the usefulness of NamedTuples in the age of dataclasses :) For me, I find the simplicity of the underlying idea behind namedtuples — "tuples with some properties bolted on" — very attractive. Yes, standard tuples are

[issue46932] Please update bundled libexpat to 2.4.7 with an important fix

2022-03-05 Thread sping
New submission from sping : Hi! I believe the fix documented at https://github.com/libexpat/libexpat/blob/27d5b8ba1771f916d9cfea2aac6bdac72071dc66/expat/Changes#L7-L11 is important to users of CPython. Please update bundled libexpat to 2.4.7. Thank you! Best, Sebastian --

[issue46414] Add typing.reveal_type

2022-03-05 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46931] zipfile library will raise uncaught oserror when reading length incorrect zip file

2022-03-05 Thread Vertu Joe
New submission from Vertu Joe : I intentionally made some corrupted zip archive files for testing. If some contents were removed from the archive instead of changing the bits. when trying to read such files, the zipfile will raise an uncaught OSError, instead of a badzipfile error as

[issue43923] Can't create generic NamedTuple as of py3.9

2022-03-05 Thread Guido van Rossum
Guido van Rossum added the comment: Okay, that's a sensible use case. I do doubt your intuition of preferring named tuples over dataclasses a bit. This seems to encourage premature optimization. I'd say for simple cases use plain tuples (most performant), for complex cases use dataclasses

[issue46928] type.__qualname__ ignores module name in tp_name for static types

2022-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What do you expect? The full qualified name of the object is __module__ + '.' + __qualname__. -- nosy: +serhiy.storchaka ___ Python tracker

[issue46794] Please update bundled libexpat to 2.4.6 with security fixes (5 CVEs)

2022-03-05 Thread mattip
mattip added the comment: > [T]he test has been removed in CPython pull request > https://github.com/python/cpython/pull/31453/files Thanks, I missed that. Makes sense. -- ___ Python tracker

[issue9305] Don't use east/west of UTC in date/time documentation

2022-03-05 Thread Stanley
Change by Stanley : -- nosy: +slateny nosy_count: 14.0 -> 15.0 pull_requests: +29817 pull_request: https://github.com/python/cpython/pull/31697 ___ Python tracker ___

[issue43923] Can't create generic NamedTuple as of py3.9

2022-03-05 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +graingert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46925] Document dict behavior when setting equal but not identical key

2022-03-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: The weakref docs in particular should point out the OP's example and highlight the workaround. -- ___ Python tracker ___

[issue43923] Can't create generic NamedTuple as of py3.9

2022-03-05 Thread Alex Waygood
Alex Waygood added the comment: Consider the typeshed stub for `concurrent.futures.DoneAndNotDoneFutures`. At runtime this is a `collections.namedtuple`, but in the stub, we need it to be generic to allow precise type inference. But we can't have a generic NamedTuple, so the stub is

[issue46920] Remove code made dead long ago with #if 0

2022-03-05 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43923] Can't create generic NamedTuple as of py3.9

2022-03-05 Thread Guido van Rossum
Guido van Rossum added the comment: Can you be more specific about your use cases? -- ___ Python tracker ___ ___ Python-bugs-list

[issue46930] Iterating over cls.__dict__ in classmethod causes RuntimeError when printing __annotations__

2022-03-05 Thread Alex Waygood
Change by Alex Waygood : -- type: crash -> behavior versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46930] Iterating over cls.__dict__ in classmethod causes RuntimeError when printing __annotations__

2022-03-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Can reproduce this: >>> ExampleCls.__dict__ mappingproxy({'__module__': '__main__', 'iter_cls': )>, '__dict__': , '__weakref__': , '__doc__': None}) >>> ExampleCls.iter_cls() {} Traceback (most recent call last): File "", line 1, in File "", line 4, in

[issue46930] Iterating over cls.__dict__ in classmethod causes RuntimeError when printing __annotations__

2022-03-05 Thread Fabian Zills
New submission from Fabian Zills : When iterating over __dict__ inside a classmethod, accessing __annotations causses RuntimeError: dictionary changed size during iteration. This only seems to affect Python 3.10.x on a Ubuntu system. The following can be used to reproduce this issue: class

[issue43292] xml.ElementTree iterparse filehandle left open

2022-03-05 Thread Jacob Walls
Change by Jacob Walls : -- keywords: +patch nosy: +jacobtylerwalls nosy_count: 4.0 -> 5.0 pull_requests: +29815 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31696 ___ Python tracker

[issue25707] Add the close method for ElementTree.iterparse() object

2022-03-05 Thread Jacob Walls
Change by Jacob Walls : -- keywords: +patch nosy: +jacobtylerwalls nosy_count: 4.0 -> 5.0 pull_requests: +29816 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31696 ___ Python tracker

[issue46925] Document dict behavior when setting equal but not identical key

2022-03-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Agree, I couldn't find a place where this behavior is documented. The second paragraph in https://docs.python.org/3.10/library/stdtypes.html#mapping-types-dict comes close. Reopening as a documentation issue. -- assignee: -> docs@python

[issue46929] __rrshift__ for same class obj will raise TypeError

2022-03-05 Thread Mark Dickinson
Mark Dickinson added the comment: This is the intended behaviour. See the docs here: https://docs.python.org/3/reference/datamodel.html#object.__ror__ > These functions are only called if the left operand does not support the > corresponding operation and the operands are of different types.

[issue46929] __rrshift__ for same class obj will raise TypeError

2022-03-05 Thread ZhengYu, Xu
ZhengYu, Xu added the comment: But with different classed will be right ``` class C: def __rrshift__(self, v): return 1 class D: def __rrshift__(self, v): return 2 C() >> D() # 2 ``` -- ___ Python tracker

[issue46929] __rrshift__ for same class obj will raise TypeError

2022-03-05 Thread ZhengYu, Xu
New submission from ZhengYu, Xu : ``` class C: def __rrshift__(self, v): return 1 C() >> C() # raise TypeError: unsupported operand types(s) for >>: 'C' and 'C' ``` -- messages: 414578 nosy: zen-xu priority: normal severity: normal status: open title: __rrshift__ for

[issue46921] Vectorcall support for super()

2022-03-05 Thread Dong-hee Na
Dong-hee Na added the comment: Mean +- std dev: [base] 254 ns +- 6 ns -> [vectorcall] 225 ns +- 1 ns: 1.13x faster -- Added file: https://bugs.python.org/file50657/bench_super.py ___ Python tracker

[issue46927] Improve error message for subscripting non-generic types

2022-03-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46927] Improve error message for subscripting non-generic types

2022-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ab9301a28fa431d7a32163126fc96de3b2ce6107 by Serhiy Storchaka in branch 'main': bpo-46927: Include the type's name in the error message for subscripting non-generic types (GH-31694)

[issue46798] xml.etree.ElementTree: get() doesn't return default value, always ATTLIST value

2022-03-05 Thread Stefan Behnel
Change by Stefan Behnel : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46917] Require IEEE 754 floating point to build Python 3.11

2022-03-05 Thread Mark Dickinson
Mark Dickinson added the comment: > * Mention the new build requirement in What's New in Python 3.11. > * Modify configure script to make it fail if the IEEE 754 support is missing. > * Remove code handling missing NAN and infinity: float("nan"), float("inf"), > math.nan and math.inf are

[issue46928] type.__qualname__ ignores module name in tp_name for static types

2022-03-05 Thread Ronald Oussoren
New submission from Ronald Oussoren : In a static type when the "tp_name" is set to a fully qualified name (such as "my.package.TypeName") the "__qualname__" returns the unqualified name ("TypeName") instead of the fully qualified name. The type's ``__name__`` and ``__module__`` have the

[issue46927] Improve error message for subscripting non-generic types

2022-03-05 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +Jelle Zijlstra ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46927] Improve error message for subscripting non-generic types

2022-03-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +29814 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31694 ___ Python tracker

[issue46927] Improve error message for subscripting non-generic types

2022-03-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +gvanrossum, kj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46927] Improve error message for subscripting non-generic types

2022-03-05 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently, if you try to subscript a non-generic type you will get an error: >>> int[str] Traceback (most recent call last): File "", line 1, in TypeError: 'type' object is not subscriptable Yes, 'type' objects are usually not subscriptable, but

[issue44863] Allow TypedDict to inherit from Generics

2022-03-05 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +Jelle Zijlstra, sobolevn ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44863] Allow TypedDict to inherit from Generics

2022-03-05 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46925] Replace key if not identical to old key in dict

2022-03-05 Thread Jarek Potiuk
Jarek Potiuk added the comment: How about if we make PR instead to the documentation about this behaviour? I think this behaviour is a little surprising (you need to know the internals of how WeakKeyDict keys are constructed and checked) and while I understand you do not want breaking

[issue39298] add BLAKE3 to hashlib

2022-03-05 Thread Larry Hastings
Larry Hastings added the comment: Right, and I did say "(or BDFL)". Apparently you didn't bother to consult with the BDFL in advance, or at least not in the usual public venues--I haven't found a record of such a conversation on the bpo issue, nor in python-dev. BTW you simultaneously

[issue46921] Vectorcall support for super()

2022-03-05 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44863] Allow TypedDict to inherit from Generics

2022-03-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43923] Can't create generic NamedTuple as of py3.9

2022-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please don't revert all changes. It will not make it working right in any case. See issue44863 for more correct approach. -- ___ Python tracker

[issue11352] Update cgi module doc

2022-03-05 Thread Irit Katriel
Change by Irit Katriel : -- priority: high -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39298] add BLAKE3 to hashlib

2022-03-05 Thread Christian Heimes
Christian Heimes added the comment: I didn't consult the steering council in 2016, because I lost the keys to the time machine. The very first SC election was in 2019. :) -- ___ Python tracker

[issue43923] Can't create generic NamedTuple as of py3.9

2022-03-05 Thread Alex Waygood
Alex Waygood added the comment: > Is there an actual use case that broke? No, because this was never usable in the first place. But there are those who wish it were usable :) -- ___ Python tracker

[issue43923] Can't create generic NamedTuple as of py3.9

2022-03-05 Thread Alex Waygood
Alex Waygood added the comment: I actually have quite a few use cases for this feature. It's true that type checkers don't (yet) support it, but that doesn't mean that it should be disallowed at runtime. In fact, allowing it at runtime will surely give type checkers room to experiment with

[issue45100] Improve help() by making typing.overload() information accessible at runtime

2022-03-05 Thread Alex Waygood
Alex Waygood added the comment: The latest plan sounds good to me. I have some Thoughts on the proposed API, but it will be easier to express those as part of a PR review. Looking forward to seeing the PR! -- ___ Python tracker