[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers

2022-01-20 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue46399> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-20 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, the deep-frozen objects are statically initialized with a very large refcount that isn't accounted for (they are intended to be immortal). It seems that Py_Finalize() somehow decrefs those objects. I guess this means we need some kind of

[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: I was hoping @eric.snow could tell me. -- ___ Python tracker <https://bugs.python.org/issue46449> ___ ___ Python-bugs-list m

[issue44975] [typing] Runtime protocols with ClassVar data members should support issubclass

2022-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: IMO we shouldn't update PEP 544. PEPs reflect the historical proposal, they are not documentation for the current state of the interpreter. -- ___ Python tracker <https://bugs.python.org/is

[issue46419] Incomplete Comparison to C++ Methods

2022-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: Just because __init__ is extra weird doesn't mean that other methods aren't roughly like C++. But I can't find the text the OP refers to. Without a specific pointer (at least a URL and quoted text) this issue is non-actionable and shou

[issue43118] inspect.signature() raises RuntimeError on failed to resolve the default argument value

2022-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 881a763cfe07ef4a5806ec78f13a9bc99e8909dc by Weipeng Hong in branch 'main': bpo-43118: Fix bug in inspect.signature around 'base.__text_signature__' (GH-30285) https://github.com/python/cpython/commit/881a763cfe07ef4a5806

[issue46396] Typing: test invalid usages of `Concatenate`

2022-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: Arguably the runtime should not check for incorrect calls to Concatenate. That's the job of static type checkers. So maybe that code could just be removed? (We don't bother checking things like list

[issue46445] Multiple inheritance of TypedDict is not covered in `test_typing`

2022-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 65b88d5e01c845c0cfa3ff61bc8b2faec8f67a57 by Nikita Sobolev in branch 'main': bpo-46445: Cover multiple inheritance of `TypedDict` in `test_typing` (GH-30719) https://github.com/python/cpython/commit/65b88d5e01c845c0cfa3ff61bc8b2f

[issue46419] Incomplete Comparison to C++ Methods

2022-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: You appear more interested in a discussion of Python semantics than in improving the tutorial. I see nothing actionable here. -- resolution: -> wont fix stage: -> resolved status: open -> closed _

[issue43118] inspect.signature() raises RuntimeError on failed to resolve the default argument value

2022-01-22 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 83aef4d34022f293336f606dba8598cc7ac8f9f2 by Miss Islington (bot) in branch '3.10': bpo-43118: Fix bug in inspect.signature around 'base.__text_signature__' (GH-30285) (#30765) https://github.com/p

[issue46465] test_unittest: TestBreakSignalDefault.testInstallHandler() fails if run after TestBreak

2022-01-22 Thread Guido van Rossum
Guido van Rossum added the comment: @kj, are you looking into this? -- ___ Python tracker <https://bugs.python.org/issue46465> ___ ___ Python-bugs-list mailin

[issue46431] Trouble subclassing ExceptionGroup

2022-01-22 Thread Guido van Rossum
Guido van Rossum added the comment: Is this a matter of adding some documentation showing how it should be done? Even if we don't want to encourage such subclassing, we do have APIs to support it, and I think we ought to show how to do it, given that you have to coordinate a bunch of t

[issue46476] Not all memory allocated by _Py_Quicken() is released at Python exit

2022-01-22 Thread Guido van Rossum
Guido van Rossum added the comment: If any of the immortal, deep-frozen code objects is ever quickened, I suppose the quickening data is never freed. But when we finalize and reinitialize, the co_quickened flag should remain set, so this would be a one-time leak. The question is whether the

[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-22 Thread Guido van Rossum
Guido van Rossum added the comment: > Is there a way to disable deepfreeze when building Python? It looks like this isn't easy, sorry. :-( Adding Christian Heimes in case he has a suggestion. -- nosy: +christian.heimes ___ Python tracker

[issue46476] Not all memory allocated by _Py_Quicken() is released at Python exit

2022-01-22 Thread Guido van Rossum
Guido van Rossum added the comment: > Would it be possible to enhance deepfreeze be produce a list of all > (immortal) code objects? That should be simple. We could see if Kumar is interested. -- nosy: +kumaraditya303 ___ Python tracker

[issue44642] Union of a type and the typing module function

2022-01-22 Thread Guido van Rossum
Guido van Rossum added the comment: Do you recommend to just close this as "fixed"? -- ___ Python tracker <https://bugs.python.org/issue44642> ___ ___

[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2022-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: I'm wondering if the test is faulty. It seems to call EventLoop.sendfile() with a file that is 8K + 1 byte long, and the protocol is instructed to close after 1K bytes have been written, but it seems to try to send as much of the file as it can. Cou

[issue46471] use global singletons for single byte bytes objects in deepfreeze

2022-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset ca78130d7eb5265759697639e42487ec6d0a4caf by Kumar Aditya in branch 'main': bpo-46471: Use single byte singletons (GH-30781) https://github.com/python/cpython/commit/ca78130d7eb5265759697639e42487

[issue46491] typing: allow Annotated in outermost scope

2022-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: +1-- --Guido (mobile) -- ___ Python tracker <https://bugs.python.org/issue46491> ___ ___ Python-bugs-list mailing list Unsub

[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: @Kumar do you want to tackle this? -- nosy: +kumaraditya303 ___ Python tracker <https://bugs.python.org/issue46449> ___ ___

[issue46471] use global singletons for single byte bytes objects in deepfreeze

2022-01-23 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: pending -> closed ___ Python tracker <https://bugs.python.or

[issue46476] Not all memory allocated by _Py_Quicken() is released at Python exit

2022-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: > With the current design, it isn't possible though because the code objects > are modified in place so if co_quickened is freed the VM still tries to > execute the copied instructions. Or the cleanup code could also restore co_firstinstr an

[issue46494] Mention typing_extensions in the typing documentation

2022-01-24 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue46494> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46396] `Concatenate` should not raise any semantic errors

2022-01-24 Thread Guido van Rossum
Guido van Rossum added the comment: "When in doubt, the status quo wins." Maybe we should just close this and the PR without merging. -- ___ Python tracker <https://bugs.python.o

[issue46431] Trouble subclassing ExceptionGroup

2022-01-24 Thread Guido van Rossum
Guido van Rossum added the comment: So, a PR with that fix would be nice? -- ___ Python tracker <https://bugs.python.org/issue46431> ___ ___ Python-bugs-list m

[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-24 Thread Guido van Rossum
Guido van Rossum added the comment: I tried to make the 'FROZEN' variable in freeze_modules.py empty, but it has a bunch of places where this is unexpected. Maybe someone can fix that? -- ___ Python tracker <https://bugs.python.o

[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-01-24 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue46483> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46396] `Concatenate` should not raise any semantic errors

2022-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: No, that would make the behavior normative. Let sleeping dogs lie. -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46519] test_typing failing on branch 3.10

2022-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: Exactly what I just thought. A bit more research might find a buggy assumption in the test "framework". -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.o

[issue33125] Windows 10 ARM64 platform support

2022-01-25 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -Guido.van.Rossum ___ Python tracker <https://bugs.python.org/issue33125> ___ ___ Python-bugs-list mailing list Unsub

[issue41370] PEP 585 and ForwardRef

2022-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: I asked for a brief example that explains your issue to me. Instead you sent me links to production code and patches to it. Sorry, but that doesn't help me understand your problem. Is there really no way that you can write a little story that goes

[issue41370] PEP 585 and ForwardRef

2022-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: When PEP 585 was discussed and implemented we did not expect people to care as much about runtime types as they did. I already explained that making list['Node'] incorporate a ForwardRef instance is unrealistic (we'd have to reimplement

[issue41370] PEP 585 and ForwardRef

2022-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: Ah, I see the issue. I stepped through get_type_hints() using pdb, and it does have a special case for when it encounters a string: it wraps it in a ForwardRef and proceeds from there: https://github.com/python/cpython/blob

[issue41370] PEP 585 and ForwardRef

2022-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: Here's a patch that doesn't do it right but illustrates the point: diff --git a/Lib/typing.py b/Lib/typing.py index 972b8ba24b..4616db60c3 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -1807,6 +1807,12 @@ def get_type_hints(obj, globalns=Non

[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: But it *is* a bugfix. -- ___ Python tracker <https://bugs.python.org/issue46491> ___ ___ Python-bugs-list mailing list Unsub

[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: Well that's *always* a problem right? If you take that to the extreme we wouldn't need bugfix releases. :-) Apart from some examples in the 3.5-3.6 timeframe, what makes you think that *this* fix *specifically* is going to make more people unhap

[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, there are no perfect solutions. Please let it go. -- ___ Python tracker <https://bugs.python.org/issue46491> ___ ___

[issue43853] [sqlite3] Improve sqlite3_value_text() error handling

2022-01-26 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 3eb3b4f270757f66c7fb6dcf5afa416ee1582a4b by Erlend Egeberg Aasland in branch 'main': bpo-43853: Expand test suite for SQLite UDF's (GH-27642) https://github.com/python/cpython/commit/3eb3b4f270757f66c7fb6dcf5afa416ee1582a4b

[issue46539] typing: forward references don't understand special type forms

2022-01-26 Thread Guido van Rossum
Guido van Rossum added the comment: I wonder if this is at all similar to bpo-41370. -- ___ Python tracker <https://bugs.python.org/issue46539> ___ ___ Pytho

[issue46539] typing: forward references don't understand special type forms

2022-01-26 Thread Guido van Rossum
Guido van Rossum added the comment: Agree it's not the same issue, but there's similarity -- both are due to putting a stringized annotation (presumably a forward ref) somewhere inside another construct. whether it's list["N"] o

[issue46539] typing: forward references don't understand special type forms

2022-01-26 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset ced50051bb752a7c1e616f4b0c001f37f0354f32 by Gregory Beauregard in branch 'main': bpo-46539: Pass status of special typeforms to forward references (GH-30926) https://github.com/python/cpython/commit/ced50051bb752a7c1e616f4b0c001f

[issue46552] typing: get_type_hints can't handle stringified annotations with leading spaces

2022-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: We should not accept leading spaces.-- --Guido (mobile) -- ___ Python tracker <https://bugs.python.org/issue46552> ___ ___

[issue44791] Substitution of ParamSpec in Concatenate

2022-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: Before you start supporting things that contradict PEP 612 this should be discussed on typing-sig (or in the python/typing tracker). Honestly I'd feel more comfortable if there was agreement on typing-sig with your previous PRs in this issue as well

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: It seems acceptable to mypy. I'm not sure I like the agenda of "moving dataclasses to using typing.py introspection tools". -- ___ Python tracker <https://bugs.pyt

[issue46552] typing: get_type_hints can't handle stringified annotations with leading spaces

2022-01-27 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: Please just don't go there. I beg you. It's not worth it. -- ___ Python tracker <https://bugs.python.org/issue46553> ___ __

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: I To be clear: I am okay with this patch, just not with making dataclasses import typing. -- --Guido (mobile) -- ___ Python tracker <https://bugs.python.org/issue46

[issue46530] `'thread_time'` is missing from `test_get_clock_info`

2022-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset c27a33132be101e246ae2584f1826477357138d6 by Nikita Sobolev in branch 'main': bpo-46530: add `"thread_time"` to `test_time.test_get_clock_info` (#30913) https://github.com/python/cpython/commit/c27a33132be101e246ae

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 5445e173e76ec792358082caf660fbdc846c64b2 by Gregory Beauregard in branch 'main': bpo-46553: allow bare typing.ClassVar annotations (#30983) https://github.com/python/cpython/commit/5445e173e76ec792358082caf660fb

[issue26552] Failing ensure_future still creates a Task

2022-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: So I just realized that the OP's description is slightly misleading. (Their code is spot on though!) The code does not create an unwaited-for *task*, assuming that "task" refers to the asyncio.Task class. What is created is a *coroutine

[issue26552] Failing ensure_future still creates a Task

2022-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 24cc6411adbfeecd8901f1ea50caa414c908 by Kumar Aditya in branch 'main': bpo-26552: Fixed case where failing `asyncio.ensure_future` did not close the coroutine (#30288) https://github.com/python/cpyt

[issue26552] Failing ensure_future still creates a Task

2022-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks Kumar for the fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue26552] Failing ensure_future still creates a Task

2022-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset a5451c96a14ac0c3ee7cef7b5c52ab1d783ec613 by Kumar Aditya in branch '3.10': bpo-26552: Fixed case where failing `asyncio.ensure_future` did not close the coroutine (#30288) (#31003) https://github.com/python/cpyt

[issue46571] Strange `@typing.no_type_check` behavior for class variables

2022-01-29 Thread Guido van Rossum
Guido van Rossum added the comment: @no_type_check (introduced by PEP 484) is intended for static checkers, to signal to them that they shouldn't check the given function or class. I don't think PEP 484 specifies its runtime effect -- arguably get_type_hints() could just ignore it

[issue46571] Strange `@typing.no_type_check` behavior for class variables

2022-01-30 Thread Guido van Rossum
Guido van Rossum added the comment: I agree that Jelle's proposal (Nikita's #2) looks best *if* we can implement it. How do we ensure that class A: ... @no_type_check class B: AA = A class C: ... ... suppresses annotations in B and C bu

[issue46571] Strange `@typing.no_type_check` behavior for class variables

2022-01-30 Thread Guido van Rossum
Guido van Rossum added the comment: Okay, somebody can submit a PR! -- ___ Python tracker <https://bugs.python.org/issue46571> ___ ___ Python-bugs-list mailin

[issue46372] int/float specializations should mutate the LHS in-place when possible

2022-01-31 Thread Guido van Rossum
Guido van Rossum added the comment: Since we decided to wait on the int operations while longobject.c is being refactored (https://github.com/faster-cpython/ideas/issues/245), can you clarify whether the speedup reported is from code where it is implemented only for floats, or is it from a

[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2022-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: Time to insist on directly communicating with the Cython team (esp. @scoder) and broker some kind of compromise. -- ___ Python tracker <https://bugs.python.org/issue45

[issue44359] test_ftplib.test_makeport() fails as "env changes" if a socket operation times out in a thread: TimeoutError is not catched

2022-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe it's time to actually try to fix this test rather than just complaining about it? Surely *somebody* here has an idea? Else maybe we need to just disable it. -- nosy: +gvanrossum ___ Python tracker &

[issue46414] Add typing.reveal_type

2022-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset abcc3d75f6e570519cb37c62130a2295c6928bff by Jelle Zijlstra in branch 'main': bpo-46414: Add typing.reveal_type (#30646) https://github.com/python/cpython/commit/abcc3d75f6e570519cb37c62130a22

[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 <https://bugs.python.org/issue46608> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44796] Add __parameters__ and __getitem__ in TypeVar and ParamSpec

2022-02-03 Thread Guido van Rossum
Guido van Rossum added the comment: I don't think that changing list[None] to list[NoneType] in the output is an improvement. I do appreciate the reduction in C code though! -- ___ Python tracker <https://bugs.python.org/is

[issue45380] help() appears confused about the module of typing.Annotated

2022-02-03 Thread Guido van Rossum
Guido van Rossum added the comment: It looks like __metadata__ was *meant* to be a public attribute, but somehow overseen when the PEP and docs were written. :-( I don't know anything about this class, really. -- ___ Python tracker &

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

2022-02-05 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 9d4161a60ca8b470148ffd6c73e3110a0aa6d66f by Kumar Aditya in branch 'main': bpo-46608: Fix argument parsing in freeze_modules.py (GH-31131) https://github.com/python/cpython/commit/9d4161a60ca8b470148ffd6c73e311

[issue38941] xml.etree.ElementTree.Element inconsistent warning for bool

2022-02-05 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue38941> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46642] typing: tested TypeVar instance subclass TypeError is incidental

2022-02-05 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue46642> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46661] Duplicat deprecation warnings in docs for asyncio

2022-02-06 Thread Guido van Rossum
New submission from Guido van Rossum : I found that several asyncio function descriptions, e.g. gather, have a duplicate deprecation notice like this: .. deprecated-removed:: 3.8 3.10 The ``loop`` parameter. This function has been implicitly getting the current running loop

[issue46644] typing: remove callable() check from typing._type_check

2022-02-06 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue46644> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46661] Duplicat deprecation warnings in docs for asyncio

2022-02-06 Thread Guido van Rossum
Guido van Rossum added the comment: Kumar are you interested in fixing this? -- ___ Python tracker <https://bugs.python.org/issue46661> ___ ___ Python-bug

[issue46655] typing.TypeAlias is not in the list of allowed plain _SpecialForm typeforms

2022-02-06 Thread Guido van Rossum
Guido van Rossum added the comment: Looks like the more likely use case would be PEP 563: from __future__ import annotations from typing import TypeAlias, get_type_hints import typing class C: a: TypeAlias = int print(get_type_hints(C)) This prints Traceback (most recent call last

[issue46655] typing.TypeAlias is not in the list of allowed plain _SpecialForm typeforms

2022-02-06 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 77b025be4a4cd5a3bfc1b1af560cc57e8e956c98 by Gregory Beauregard in branch 'main': bpo-46655: allow stringized TypeAlias with get_type_hints (GH-31156) https://github.com/python/cpython/commit/77b025be4a4cd5a3bfc1b1af560cc5

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

2022-02-06 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 067c03bf40d13393209f0138fa9c4d5980c4ff8a by Nikita Sobolev in branch 'main': bpo-46611: add coverage to instance and class checks in `typing.py` (GH-31078) https://github.com/python/cpython/commit/067c03bf40d13393209f0138fa9c4d

[issue46589] Improve documentation for typing._GenericAlias

2022-02-06 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset a335d98f19b7fa66159d12932cc9a05eb2d8395f by Matthew Rahtz in branch 'main': bpo-46589: Improve documentation for typing._GenericAlias (GH-31026) https://github.com/python/cpython/commit/a335d98f19b7fa66159d12932cc9a0

[issue44796] Add __parameters__ and __getitem__ in TypeVar and ParamSpec

2022-02-06 Thread Guido van Rossum
Guido van Rossum added the comment: Super subtle stuff. Tonight I do not have time to really dive into this, but I think Serhiy is on to something. KJ or Jelle, do you have the guts to dive in here? -- ___ Python tracker <https://bugs.python.

[issue46655] typing.TypeAlias is not in the list of allowed plain _SpecialForm typeforms

2022-02-07 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset e2eeffefed32bb8c47c09bdd94e27a4e949894ef by Gregory Beauregard in branch '3.10': [3.10] bpo-46655: allow stringized TypeAlias with get_type_hints (GH-31156). (#31175) https://github.com/python/cpyt

[issue12029] Allow catching virtual subclasses in except clauses

2022-02-07 Thread Guido van Rossum
Guido van Rossum added the comment: Fixing the version field. Since it's a feature, this could not go into any version before 3.11. Maybe Irit can look through the discussion and patch and see if there's value to doing this? (Feel free to decline!) -- nosy: +iritkatrie

[issue46534] Implementing PEP 673 (Self type)

2022-02-07 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 7ba1cc8049fbcb94ac039ab02522f78177130588 by James Hilton-Balfe in branch 'main': bpo-46534: Implement PEP 673 Self in typing.py (GH-30924) https://github.com/python/cpython/commit/7ba1cc8049fbcb94ac039ab02522f7

[issue12029] Allow catching virtual subclasses in except clauses

2022-02-07 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks you. I think it's reasonable to reject the feature request and instead update the docs, so let's do that. -- ___ Python tracker <https://bugs.python.o

[issue46475] typing.Never and typing.assert_never

2022-02-08 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 243436f3779c1e7bed1fd4b23d5a8ec5eff40699 by Jelle Zijlstra in branch 'main': bpo-46475: Add typing.Never and typing.assert_never (GH-30842) https://github.com/python/cpython/commit/243436f3779c1e7bed1fd4b23d5a8e

[issue44289] tarfile.is_tarfile() and tarfile.open() when used with file object may cause tarfile operations to fail

2022-02-09 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 128ab092cad984b73a117f58fa0e9b4105051a04 by Andrzej Mateja in branch 'main': bpo-44289: Keep argument file object's current position in tarfile.is_tarfile (GH-26488) https://github.com/python

[issue46430] intern strings in deepfrozen modules

2022-02-09 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset c0a5ebeb1239020f2ecc199053bb1a70d78841a1 by Kumar Aditya in branch 'main': bpo-46430: Intern strings in deep-frozen modules (GH-30683) https://github.com/python/cpython/commit/c0a5ebeb1239020f2ecc199053bb1a

[issue46430] intern strings in deepfrozen modules

2022-02-09 Thread Guido van Rossum
Guido van Rossum added the comment: We discussed that and found that a lot of errors are ignored during interning anyway. But it's not too late to change if you want to (sending a PR would probably be quicker than arguing :-). -- ___ P

[issue46066] Deprecate keyword args syntax for TypedDict definition

2022-02-10 Thread Guido van Rossum
Guido van Rossum added the comment: Go ahead and send a or to deprecate it.-- --Guido (mobile) -- ___ Python tracker <https://bugs.python.org/issue46

[issue46066] Deprecate keyword args syntax for TypedDict definition

2022-02-10 Thread Guido van Rossum
Guido van Rossum added the comment: "PR" -- ___ Python tracker <https://bugs.python.org/issue46066> ___ ___ Python-bugs-list mailing list Uns

[issue46725] Unpacking without parentheses is allowed since 3.9

2022-02-11 Thread Guido van Rossum
Guido van Rossum added the comment: Let's just document it for 3.11. -- ___ Python tracker <https://bugs.python.org/issue46725> ___ ___ Python-bugs-list m

[issue46708] test_asyncio: test_sock_client_fail() changes asyncio.events._event_loop_policy

2022-02-11 Thread Guido van Rossum
Guido van Rossum added the comment: Heh, I just ran into this for test_taskgroups as well. (Alas, I had debugged and fixed it independently before I found this. :-) -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue46

[issue46661] Duplicate deprecation warnings in docs for asyncio

2022-02-11 Thread Guido van Rossum
Change by Guido van Rossum : -- title: Duplicat deprecation warnings in docs for asyncio -> Duplicate deprecation warnings in docs for asyncio ___ Python tracker <https://bugs.python.org/issu

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-02-12 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset b70690bb37cc4bac695051484734eede0c1f9ada by aha79 in branch 'main': bpo-46333: include `module` in `ForwardRef.__repr__` (#31283) https://github.com/python/cpython/commit/b70690bb37cc4bac695051484734ee

[issue46729] Better str() for BaseExceptionGroup

2022-02-12 Thread Guido van Rossum
Guido van Rossum added the comment: Should it show the number of immediate subexceptions (i.e., len(eg.exceptions)) or the number of leaf exceptions? I'd be happy with the former (since that's what EdgeDb's MultiError does), which would not require adding an extra fie

[issue46743] Enable usage of object.__orig_class__ in __init__

2022-02-13 Thread Guido van Rossum
Guido van Rossum added the comment: In the early days the design and implementation were changed so many times, your question (why was it changed) is unanswerable. I do not actually understand your description of your problem -- you mention so many dunders that it obscures your use case

[issue46743] Enable usage of object.__orig_class__ in __init__

2022-02-13 Thread Guido van Rossum
Guido van Rossum added the comment: I'm sorry, that's not a small example that I can follow, and I have no idea why you are doing all those things. I fear that if you cannot be more articulate this will remain unfixed. -- ___ Pyth

[issue46743] Enable usage of object.__orig_class__ in __init__

2022-02-13 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for the small example, I understand what you are trying to do now. I don't think it's possible in general, since you are blindly instantiating the type (self.__orig_class__.__args__[0]) without arguments. That doesn't work for all t

[issue46743] Enable usage of object.__orig_class__ in __init__

2022-02-14 Thread Guido van Rossum
Guido van Rossum added the comment: > On the general class instanciation point would there be anything wrong with > just adding a big red warning saying (on the non-existent) docs for these > classes that they don't follow normal class initization or is this too > insignif

[issue46743] Enable usage of object.__orig_class__ in __init__

2022-02-14 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, that should erase the type, not have special semantics. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-14 Thread Guido van Rossum
New submission from Guido van Rossum : After some conversations with Yury, and encouraged by the SC's approval of PEP 654, I am proposing to add a new class, asyncio.TaskGroup, which introduces structured concurrency similar to nurseries in Trio. I started with EdgeDb's

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-14 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch pull_requests: +29493 pull_request: https://github.com/python/cpython/pull/31270 ___ Python tracker <https://bugs.python.org/issue46

[issue46754] Improve Python Language Reference based on [Köhl 2020]

2022-02-14 Thread Guido van Rossum
New submission from Guido van Rossum : In https://arxiv.org/pdf/2109.03139.pdf ("M Köhl, An Executable Structural Operational Formal Semantics for Python, Master Thesis 2020 Saarland University) there are some observations on cases where the Language Reference (referred to as PL

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-15 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 602630ac1855e38ef06361c68f6e216375a06180 by Guido van Rossum in branch 'main': bpo-46752: Add TaskGroup; add Task..cancelled(),.uncancel() (GH-31270) https://github.com/python/cpython/commit/602630ac1855e38ef06361c68f6e21

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-15 Thread Guido van Rossum
Guido van Rossum added the comment: Remaining TODO list: - Add a test showing the need for the .uncancel() call in __aexit__() (currently on line 97). Dropping that line does not cause any tests to fail. - Ensure the taskgroup tests are run with the C and Python Task implementations

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-16 Thread Guido van Rossum
Guido van Rossum added the comment: @dhalbert, it's probably better to file a new issue if you want changes to gather(). Although I suppose that if we want to deemphasize it, we shouldn't be adding new features to it. My own new feature idea would be to have it wait for all task

<    1   2   3   4   5   6   7   8   9   10   >