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

2022-03-11 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 870b22b9c442d035190d2b8fb82256cd9a03da48 by Gregory Beauregard in branch 'main': bpo-46644: Remove callable() requirement from typing._type_check (GH-31151) https://github.com/python/cpython/commit/870b22b9c442d035190d2b8fb82256cd9a03da48

[issue46677] TypedDict docs are incomplete

2022-03-11 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 28f20a6613b9d9287848bb78369b881a72941a39 by Charlie Zhao in branch '3.10': [3.10] bpo-46677: Add examples of inheritance and attributes to `TypedDict` docs (GH-31349) (GH-31815) https://github.com/python/cpython/commit

[issue46990] Surprising list overallocation from .split()

2022-03-11 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: The value 12 is hardcoded here: https://github.com/python/cpython/blob/a89c29fbcc7e7e85848499443d819c3fab68c78a/Objects/stringlib/split.h#L14 The comment there says that this is because most .split() calls are on lines of human-readable text, which has

[issue46981] Empty typing.Tuple

2022-03-11 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +JelleZijlstra ___ Python tracker <https://bugs.python.org/issue46981> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46982] Error in the experts list

2022-03-11 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Oops, sorry for that! I just edited my username, hopefully that fixes things. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46980] ast.FunctionDef cannot find functions under if statement

2022-03-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This is the right place to file an issue. Your code is incorrect; it will find only top-level functions. Functions within an `if` statement will be nested inside an `ast.If` node. To find all functions in a file, you'll need to recurse into nested nodes

[issue46881] Statically allocate and initialize the latin1 characters.

2022-03-10 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra nosy_count: 5.0 -> 6.0 pull_requests: +29906 pull_request: https://github.com/python/cpython/pull/31805 ___ Python tracker <https://bugs.python.org/issu

[issue46198] Duplicate and unused code in tests

2022-03-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 4199b7ffbbaa5fe52a4c85c8672ac6773a75ba8f by Jelle Zijlstra in branch '3.10': [3.10] bpo-46198: rename duplicate tests and remove unused code (GH-30297) (GH-31796) https://github.com/python/cpython/commit

[issue46198] Duplicate and unused code in tests

2022-03-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 4052dd2296da2ff304b1fa787b100befffa1c9ca by Alex Waygood in branch 'main': bpo-46198: Fix `test_asyncio.test_sslproto` (GH-31801) https://github.com/python/cpython/commit/4052dd2296da2ff304b1fa787b100befffa1c9ca

[issue46198] Duplicate and unused code in tests

2022-03-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset f7f7838b41d45efa129a61f104136f8e12f3488a by Jelle Zijlstra in branch '3.9': [3.9] bpo-46198: rename duplicate tests and remove unused code (GH-30297) (GH-31797) https://github.com/python/cpython/commit/f7f7838b41d45efa129a61f104136f8e12f3488a

[issue46677] TypedDict docs are incomplete

2022-03-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: (assigning to myself to remind myself to see the backports through) -- assignee: docs@python -> Jelle Zijlstra ___ Python tracker <https://bugs.python.org/issu

[issue46677] TypedDict docs are incomplete

2022-03-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 8a207e0321db75f3342692905e342f1d5e1add54 by Charlie Zhao in branch 'main': bpo-46677: Add examples of inheritance and attributes to `TypedDict` docs (GH-31349) https://github.com/python/cpython/commit/8a207e0321db75f3342692905e342f1d5e1add54

[issue46198] Duplicate and unused code in tests

2022-03-10 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +29900 pull_request: https://github.com/python/cpython/pull/31797 ___ Python tracker <https://bugs.python.org/issue46

[issue46198] Duplicate and unused code in tests

2022-03-10 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +29899 pull_request: https://github.com/python/cpython/pull/31796 ___ Python tracker <https://bugs.python.org/issue46

[issue46198] Duplicate and unused code in tests

2022-03-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 6c83c8e6b56b57a8a794e7b6c07837be4ce3bb97 by Nikita Sobolev in branch 'main': bpo-46198: rename duplicate tests and remove unused code (GH-30297) https://github.com/python/cpython/commit/6c83c8e6b56b57a8a794e7b6c07837be4ce3bb97 -- nosy

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

2022-03-09 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: A NamedTuple that is also a Protocol doesn't make sense to me, since a NamedTuple is a concrete (nominal) type and a Protocol cannot inherit from a concrete type. If you want something like that to happen, it's better to open an issue on https://github.com

[issue46967] Type union for except

2022-03-09 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This would be nice but I'm not sure it's worth the hassle in terms of documentation, tooling support, etc. There is an existing issue (that I can't find right now) that makes the `except` machinery use `__instancecheck__`, instead of looking only at real

[issue45138] [sqlite3] expand bound values in traced statements when possible

2022-03-08 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks for the contribution! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45138] [sqlite3] expand bound values in traced statements when possible

2022-03-08 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset d1777515f9f53b452a4231d68196a7c0e5deb879 by Erlend Egeberg Aasland in branch 'main': bpo-45138: Expand traced SQL statements in `sqlite3` trace callback (GH-28240) https://github.com/python/cpython/commit

[issue46878] [sqlite3] remove "non-standard" from docstrings

2022-03-07 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 4d95fa1ac5d31ff450fb2f31b55ce1eb99d6efcb by Erlend Egeberg Aasland in branch 'main': bpo-46878: Purge 'non-standard' from sqlite3 docstrings (GH-31612) https://github.com/python/cpython/commit/4d95fa1ac5d31ff450fb2f31b55ce1eb99d6efcb

[issue46494] Mention typing_extensions in the typing documentation

2022-03-07 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks for the patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46494] Mention typing_extensions in the typing documentation

2022-03-07 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 8debeed3075bf4d7e568e65da16bec63cf276f4f by Meer Suri in branch 'main': bpo-46494: Mention the typing_extensions pkg in typing docs (GH-31260) https://github.com/python/cpython/commit/8debeed3075bf4d7e568e65da16bec63cf276f4f

[issue43224] Add support for PEP 646

2022-03-07 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : New changeset 7a793a388b017be635ea41ef75b0fd8bcf75a309 by Matthew Rahtz in branch 'main': bpo-43224: Implement PEP 646 changes to typing.py (GH-31021) https://github.com/python/cpython/commit/7a793a388b017be635ea41ef75b0fd8bcf75a309

[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2022-03-07 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: And now I think we're really done! Thanks for all your work here @AlexWaygood. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46170] Improving the error message when subclassing NewType

2022-03-07 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46170] Improving the error message when subclassing NewType

2022-03-07 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset f391f9bf28f0bba7939d9f9e5a7a6396d2b0df62 by James Hilton-Balfe in branch 'main': bpo-46170: Improve the error message when subclassing NewType (GH-30268) https://github.com/python/cpython/commit/f391f9bf28f0bba7939d9f9e5a7a6396d2b0df62

[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2022-03-07 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 50731297a9b6d57eec3b3f89522785b23f7b3e71 by Alex Waygood in branch 'main': bpo-45680: Improve docs on subscriptions w.r.t. `GenericAlias` objects (GH-29479) https://github.com/python/cpython/commit/50731297a9b6d57eec3b3f89522785b23f7b3e71

[issue46949] Print an indication if traceback exceeds sys.tracebacklimit

2022-03-07 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: It skips the least recent frames: >>> def error(): 1 / 0 ... >>> def g(): error() ... >>> def f(): g() ... >>> sys.tracebacklimit = 2 >>> f() Traceback (most recent call last): File "", line 1, in g

[issue46949] Print an indication if traceback exceeds sys.tracebacklimit

2022-03-07 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : If the number of frames in a traceback exceeds sys.tracebacklimit (which defaults to 1000), any remaining frames are silently dropped. See https://docs.python.org/3.10/library/sys.html#sys.tracebacklimit. This is confusing to users. We should print some

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

2022-03-06 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- keywords: +patch pull_requests: +29832 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31716 ___ Python tracker <https://bugs.python.org/issu

[issue46941] Bug or plug not removed (The operator "is")

2022-03-06 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I don't understand what you are referring to. What do you think is wrong? -- nosy: +Jelle Zijlstra ___ Python tracker <https://bugs.python.org/issue46

[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 <https://bugs.python.or

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

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

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

2022-03-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: We could make my proposed overload registry more reusable by putting it in a different module, probably functools. (Another candidate is inspect, but inspect.py imports functools.py, so that would make it difficult to use the registry

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

2022-03-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: As @methane also said on the PR, this is a backward compatibility break and we can't just change the behavior. I'd be opposed to a change here: the proposed behavior isn't clearly better than the existing behavior (sometimes you want one behavior, sometimes

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

2022-03-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: It doesn't really. If you do `x = New([1], (2, 3))` you get: main.py:11: error: List item 0 has incompatible type "int"; expected "T" main.py:11: error: Argument 2 to "New" has incompatible type "Tuple[int, int]"

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

2022-03-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Was this ever documented to work? We have now disallowed this behavior in 3.9 and 3.10 with few complaints, so it doesn't seem that important to restore it. Also, static type checkers generally disallow generic NamedTuples

[issue46831] Outdated comment for __build_class__ in compile.c

2022-03-02 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46831] Outdated comment for __build_class__ in compile.c

2022-03-02 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 81d968b7c30d5b41f3f28b297b7ee5345d569509 by Shantanu in branch 'main': bpo-46831: Update __build_class__ comment (#31522) https://github.com/python/cpython/commit/81d968b7c30d5b41f3f28b297b7ee5345d569509 -- nosy: +Jelle Zijlstra

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-03-02 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 59e1ce95f1e6ea8a556212b8b10cbc122f1a1711 by Jelle Zijlstra in branch 'main': bpo-46643: fix NEWS entry (GH-31651) https://github.com/python/cpython/commit/59e1ce95f1e6ea8a556212b8b10cbc122f1a1711

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-03-02 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +29770 pull_request: https://github.com/python/cpython/pull/31651 ___ Python tracker <https://bugs.python.org/issue46

[issue21910] [doc] File protocol should document if writelines must handle generators sensibly

2022-03-02 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-03-02 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue21910] [doc] File protocol should document if writelines must handle generators sensibly

2022-03-02 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset a8c87a239ee1414d6dd0b062fe9ec3e5b0c50cb8 by slateny in branch 'main': bpo-21910: Clarify docs for codecs writelines method (GH-31245) https://github.com/python/cpython/commit/a8c87a239ee1414d6dd0b062fe9ec3e5b0c50cb8 -- nosy: +Jelle

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-03-02 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 75d2d945b4e28ca34506b2d4902367b61a8dff82 by Gregory Beauregard in branch 'main': bpo-46643: Fix stringized P.args/P.kwargs with get_type_hints (GH-31238) https://github.com/python/cpython/commit/75d2d945b4e28ca34506b2d4902367b61a8dff82

[issue46195] Annotated and Optional get_type_hints buggy interaction

2022-03-01 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This is now fixed in 3.11, but we'll leave 3.10 and 3.9 alone. Thanks for your bug report! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracke

[issue46195] Annotated and Optional get_type_hints buggy interaction

2022-03-01 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 20a1c8ee4bcb1c421b7cca1f3f5d6ad7ce30a9c9 by Nikita Sobolev in branch 'main': bpo-46195: Do not add `Optional` in `get_type_hints` (GH-30304) https://github.com/python/cpython/commit/20a1c8ee4bcb1c421b7cca1f3f5d6ad7ce30a9c9 -- nosy

[issue44807] typing.Protocol silently overrides __init__ method of delivered class

2022-02-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: It doesn't make logical sense to instantiate any Protocol, whether it has __init__ or not, because a Protocol is inherently an abstract class. But we can just leave enforcement of that rule to static type checkers, so Adrian's proposed change makes sense

[issue44807] typing.Protocol silently overrides __init__ method of delivered class

2022-02-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Regardless of mypy's behavior (which isn't impacted by what typing.py does), there's a legitimate complaint here about the runtime behavior: any `__init__` method defined in a Protocol gets silently replaced. >>> from typing import Protocol &g

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-02-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: That sounds good. Feel free to request review from me if you make a PR. -- nosy: +Jelle Zijlstra ___ Python tracker <https://bugs.python.org/issue28

[issue17505] [doc] email.header.Header.__unicode__ does not decode header

2022-02-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: The messages above are very old and seem to be discussing Python 2. There is no `__unicode__` method any more, for example, though there is a `__str__` method which presumably does what `__unicode__` used to do. It is documented now at https

[issue46878] [sqlite3] remove "non-standard" from docstrings

2022-02-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: As one of the people confused by this wording, I agree with dropping it. There is no documentation that I can find that explains what "non-standard" means. I'll leave the PR for some time though in case others have

[issue44807] typing.Protocol silently overrides __init__ method of delivered class

2022-02-27 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra ___ Python tracker <https://bugs.python.org/issue44807> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46859] NameError: free variable 'outer' referenced before assignment in enclosing scope

2022-02-25 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: 3.8 is only receiving security fixes now. Please upgrade. If you cannot upgrade, I suggest manually applying the patch from https://github.com/python/cpython/pull/31441/files to your installation of Python. -- nosy: +Jelle Zijlstra resolution

[issue26897] [doc] Clarify Popen stdin, stdout, stderr

2022-02-25 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue26897] [doc] Clarify Popen stdin, stdout, stderr

2022-02-25 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset dd69f734218ac5d3a551227069ac53ee09b0cd3e by Kumar Aditya in branch 'main': bpo-26897: Clarify Popen stdin, stdout, stderr file object docs (GH-30231) https://github.com/python/cpython/commit/dd69f734218ac5d3a551227069ac53ee09b0cd3e

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

2022-02-23 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Some specific points from the document: "While the PLR explicitly states that “x < y calls x.__lt__(y)” [20, 3.3.1.] this is actually false." They had to read the implementation to actually figure out how this works. "If no expression is

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

2022-02-21 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I'm OK with not fully supporting overloads created in nested functions; that's a pretty marginal use case. But it's true that my proposed implementation would create a memory leak if someone does do that. I don't immediately see a way to fix

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

2022-02-21 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I made a similar suggestion in issue46821 (thanks Alex for pointing me to this older issue): Currently, the implementation of @overload (https://github.com/python/cpython/blob/59585d6b2ea50d7bc3a9b336da5bde61367f527c/Lib/typing.py#L2211) simply returns

[issue46821] Introspection support for typing.overload

2022-02-21 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks! Closing this as a duplicate. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Improve help() by making typing.overload() information accessible at runtime __

[issue46821] Introspection support for typing.overload

2022-02-21 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : Currently, the implementation of @overload (https://github.com/python/cpython/blob/59585d6b2ea50d7bc3a9b336da5bde61367f527c/Lib/typing.py#L2211) simply returns a dummy function and throws away the decorated function. This makes it virtually impossible

[issue46732] Builtin __bool__ docstrings are wrong

2022-02-21 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

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

2022-02-20 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset ba457fe6f8e50ad3ef3ceffb75dee96629a42ad7 by Erlend Egeberg Aasland in branch '3.10': [3.10] bpo-43853: Expand test suite for SQLite UDF's (GH-27642) (GH-31030) https://github.com/python/cpython/commit/ba457fe6f8e50ad3ef3ceffb75dee96629a42ad7

[issue46066] Deprecate keyword args syntax for TypedDict definition

2022-02-19 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 0a8a8e7454c6565cf1554d5f23314e4c70960bcd by Jelle Zijlstra in branch 'main': bpo-46066: Check DeprecationWarning in test_typing (GH-31428) https://github.com/python/cpython/commit/0a8a8e7454c6565cf1554d5f23314e4c70960bcd

[issue46066] Deprecate keyword args syntax for TypedDict definition

2022-02-18 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +29563 pull_request: https://github.com/python/cpython/pull/31428 ___ Python tracker <https://bugs.python.org/issue46

[issue46066] Deprecate keyword args syntax for TypedDict definition

2022-02-18 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks, I'll send a PR. -- ___ Python tracker <https://bugs.python.org/issue46066> ___ ___ Python-bugs-list mailing list Unsub

[issue44791] Substitution of ParamSpec in Concatenate

2022-02-18 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I'm looking at https://github.com/python/cpython/pull/30969 and I'm not sure what the motivation for the change is. PEP 612 is quite precise here (https://www.python.org/dev/peps/pep-0612/#id1) and allows only a ParamSpec as the last argument to Concatenate

[issue46685] Add additional tests for new features in `typing.py`

2022-02-18 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46685] Add additional tests for new features in `typing.py`

2022-02-18 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 32e3e0bea613711a8f19003445eebcb05fb75acc by Nikita Sobolev in branch 'main': bpo-46685: improve test coverage of `Self` and `Never` in `typing` (GH-31222) https://github.com/python/cpython/commit/32e3e0bea613711a8f19003445eebcb05fb75acc

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

2022-02-18 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks for the fix Nikita! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46603] `typing._strip_annotations` is not fully covered

2022-02-18 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46603] `typing._strip_annotations` is not fully covered

2022-02-18 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 25c0b9d243b64ccd2eeab483089eaf7e4b4d5834 by Nikita Sobolev in branch 'main': bpo-46603: improve coverage of `typing._strip_annotations` (GH-31063) https://github.com/python/cpython/commit/25c0b9d243b64ccd2eeab483089eaf7e4b4d5834

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

2022-02-18 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 395029b0bd343648b4da8044c7509672ea768775 by Nikita Sobolev in branch 'main': bpo-46571: improve `typing.no_type_check` to skip foreign objects (GH-31042) https://github.com/python/cpython/commit/395029b0bd343648b4da8044c7509672ea768775

[issue46745] Typo in new PositionsIterator

2022-02-16 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 482a4b6c3f8ef60056e85647a1d84af2e6dfd3ef by Robert-André Mauchin in branch 'main': bpo-46745: Fix typo in PositionsIterator (#31322) https://github.com/python/cpython/commit/482a4b6c3f8ef60056e85647a1d84af2e6dfd3ef -- nosy: +Jelle

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-02-16 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-02-16 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 6e7b813195f9bd6a2a15c1f00ef2c0180f6c751a by aha79 in branch 'main': bpo-46333: Honor `module` parameter in ForwardRef (GH-30536) https://github.com/python/cpython/commit/6e7b813195f9bd6a2a15c1f00ef2c0180f6c751a

[issue46066] Deprecate keyword args syntax for TypedDict definition

2022-02-16 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46066] Deprecate keyword args syntax for TypedDict definition

2022-02-16 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset de6043e596492201cc1a1eb28038970bb69f3107 by 97littleleaf11 in branch 'main': bpo-46066: Deprecate kwargs syntax for TypedDict definitions (GH-31126) https://github.com/python/cpython/commit/de6043e596492201cc1a1eb28038970bb69f3107

[issue46738] Allow http.server to emit HTML 5

2022-02-15 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Looks like this is a duplicate of issue46736. Seems like a good idea though! -- nosy: +Jelle Zijlstra resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracke

[issue46760] test_dis should test the dis module, not everything else

2022-02-15 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra ___ Python tracker <https://bugs.python.org/issue46760> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46740] Improve Telnetlib's throughput

2022-02-13 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Note that telnetlib is being proposed for deprecation in PEP 594. You may be better off using a third-party telnet implementation; the PEP lists https://pypi.org/project/telnetlib3/ and https://pypi.org/project/Exscript/. -- nosy: +Jelle Zijlstra

[issue46743] Enable usage of object.__orig_class__ in __init__

2022-02-13 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra ___ Python tracker <https://bugs.python.org/issue46743> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46732] object.__bool__ docstring is wrong

2022-02-12 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- keywords: +patch pull_requests: +29460 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31301 ___ Python tracker <https://bugs.python.org/issu

[issue46732] object.__bool__ docstring is wrong

2022-02-12 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : >>> None.__bool__.__doc__ 'self != 0' This isn't true, since None does not equal 0. I suggest rewording it to "True if self else False". ------ assignee: Jelle Zijlstra components: Interpreter Core messages: 413141 nosy: Jell

[issue46727] Should shutil functions support bytes paths?

2022-02-11 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : The shutil documentation doesn't say anything about bytes paths, and the CPython unit tests don't test them. But some functions do work with bytes paths in practice, and on typeshed we've received some requests to add support for them in the type stubs

[issue46724] Odd Bytecode Generation in 3.10

2022-02-11 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra ___ Python tracker <https://bugs.python.org/issue46724> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46725] Unpacking without parentheses is allowed since 3.9

2022-02-11 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I'd lean towards keeping this syntax: - It's already been out for two releases, so there's user code out there relying on it. (In fact we found out about this because somebody complained that Black's parser couldn't handle this code.) - The syntax isn't

[issue46677] TypedDict docs are incomplete

2022-02-11 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Please do submit a PR! Agree that more examples of inheritance and attributes would be useful. Note that we're about to deprecate the keyword argument syntax (issue46066). -- ___ Python tracker <ht

[issue46586] In documentation contents enum.property erroneously links to built-in property

2022-02-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: > How do I find other instances of this problem? Is there a systematic way to > look for such references? You could write a script that goes something like this, iterating over all the docs RST files: - Find all definitions in the file (e.g. `.. dec

[issue46494] Mention typing_extensions in the typing documentation

2022-02-09 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Welcome to this project, Meer! That looks pretty good, feel free to submit a PR. We can then perhaps get feedback from more people to improve the wording. -- ___ Python tracker <https://bugs.python.

[issue46685] Add additional tests for new features in `typing.py`

2022-02-08 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks for catching these details! Please send a PR. -- ___ Python tracker <https://bugs.python.org/issue46685> ___ ___ Pytho

[issue46475] typing.Never and typing.assert_never

2022-02-08 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46669] Add types.Self

2022-02-07 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: The conventional way is to write def __exit__( self, __typ: type[BaseException] | None, __exc: BaseException | None, __tb: types.TracebackType | None, ) -> None: ... But there are two invariants about how __exit__ works in pract

[issue46677] TypedDict docs are incomplete

2022-02-07 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : https://docs.python.org/3.10/library/typing.html#typing.TypedDict It says: > To allow using this feature with older versions of Python that do not support > PEP 526, TypedDict supports two additional equivalent syntactic forms But there is another

[issue46669] Add types.Self

2022-02-06 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: PEP 673 (which was accepted) adds typing.Self already. bpo-46534 tracks implementing it. -- ___ Python tracker <https://bugs.python.org/issue46

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

2022-02-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I agree with removing this check. I suspect it's a holdover from very early typing when static types were supposed to be runtime types. Now the check is a bug magnet and doesn't serve a useful purpose. I think we can just remove the tests that check

[issue46479] Implement typing.reveal_locals

2022-02-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Withdrawn as there's insufficient demand for this function. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44796] Add __parameters__ and __getitem__ in TypeVar and ParamSpec

2022-02-03 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I'd also be wary about making changes that introduce additional runtime checks. As we've seen with the PEP 612 and 646 implementations, those can impede future iteration on typing. -- ___ Python tracker <ht

[issue45325] Allow "p" in Py_BuildValue

2022-01-31 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I stumbled upon the PR and tend to agree with Serhiy that this could be a source of nasty bugs. Passing the wrong type to a va_arg() argument is undefined behavior (e.g. https://wiki.sei.cmu.edu/confluence/display/c/EXP47-C.+Do+not+call+va_arg

<    1   2   3   4   5   6   >