[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

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

[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

[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

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

[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

[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

[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

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

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

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

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

[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/75d2d945b4e28ca34506b2d4902367

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

[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
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 : -- pull_requests: +29770 pull_request: https://github.com/python/cpython/pull/31651 ___ Python tracker <https://bugs.python.org/issue46

[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/59e1ce95f1e6ea8a556212b8b10cbc

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

[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

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

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

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

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

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

[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() {

[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

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

[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

[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

[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

[issue13740] winsound.SND_NOWAIT ignored on modern Windows platforms

2012-01-08 Thread Jelle Geerts
New submission from Jelle Geerts : As the attached example Python script explains, the winsound.SND_NOWAIT flag doesn't do anything, at least not on modern Windows platforms. The updated MSDN documentation for PlaySound() states that SND_NOWAIT is not supported (it is ignored). Link:

[issue4630] IDLE no longer respects .Xdefaults insertOffTime

2012-01-09 Thread Jelle Geerts
Jelle Geerts added the comment: I, too, would like to see this as an option in IDLE, as I also find blinking cursors distracting. I can confirm that tkinter.Text's "insertofftime" option works on Windows as well, so the proposed patch should work on Windows. -- no

[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/50731297a9b6d57eec3b3f89522785

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

[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

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

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

[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/8debeed3075bf4d7e568e65da16bec

[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

[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/4d95fa1ac5d31ff450fb

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

[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

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

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

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

[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
Change by Jelle Zijlstra : -- pull_requests: +29900 pull_request: https://github.com/python/cpython/pull/31797 ___ Python tracker <https://bugs.python.org/issue46

[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/8a207e0321db75f3342692905e342f

[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

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

[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/4052dd2296da2ff304b1fa787b100b

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

[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

[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

[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

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

[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

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

[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/870b22b9c442d035190d2b8fb82256

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

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

[issue46677] TypedDict docs are incomplete

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

[issue46677] TypedDict docs are incomplete

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

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

2022-03-11 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Some tests are failing on main, probably due to a race. PR incoming. -- resolution: fixed -> status: closed -> open ___ Python tracker <https://bugs.python.org/i

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

2022-03-11 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +29930 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/31833 ___ Python tracker <https://bugs.python.org/issu

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

2022-03-11 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 75174371e6cac935b598a68c1113f6db1e0d6ed8 by Jelle Zijlstra in branch 'main': bpo-46644: Fix test_typing test broken by GH-31151 due to a merge race (GH-31833) https://github.com/python/cpython/commit/75174371e6cac935b598a68c1113f6

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

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

[issue44799] typing.get_type_hints() raises TypeError for a variable annotated by dataclasses.InitVar

2022-03-11 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This is now fixed in main thanks to bpo-46644: ``` >>> get_type_hints(Foo) {'attr': dataclasses.InitVar[int]} ``` We're not backporting that change to the bugfix branches. If we want to fix this issue in 3.10 and 3.9, we'll ha

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

2022-03-11 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This still behaves similarly after the bpo-46642 fix: >>> class V(TypeVar("T")): pass ... Traceback (most recent call last): File "", line 1, in File "/Users/jelle/py/cpython/Lib/typing.py", line 906, in __

[issue44799] typing.get_type_hints() raises TypeError for a variable annotated by dataclasses.InitVar

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

[issue46997] Invalid memory write in bytearray

2022-03-12 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : Inspired by Guido's comment in https://github.com/python/cpython/pull/31834/files#r825352900, I found that there are some places in bytearrayobject.c where we can write to free'd memory if we encounter an object with a sneaky __index__ meth

[issue46997] Invalid memory write in bytearray

2022-03-12 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- components: +Interpreter Core versions: +Python 3.10, Python 3.11 ___ Python tracker <https://bugs.python.org/issue46997> ___ ___

[issue46997] Invalid memory write in bytearray

2022-03-12 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: 3.9 segfaults. (gdb) bt #0 bytearray_ass_subscript (self=, index=0x77e118f0, values=0x76f918b0) at Objects/bytearrayobject.c:640 #1 0x00536302 in _PyEval_EvalFrameDefault (tstate=, f=0x999a80, throwflag=) at Python/ceval.c:1990 #2

[issue46998] Allow subclassing Any at runtime

2022-03-12 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +AlexWaygood, gvanrossum, kj ___ Python tracker <https://bugs.python.org/issue46998> ___ ___ Python-bugs-list mailin

[issue47006] PEP 646: Decide on substitution behavior

2022-03-13 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : We've had some disagreement about the behavior of TypeVarTuple substitution related to PEP 646, and the discussion has now spilled around multiple PRs. I'd like to use this issue to come to an agreement so we don't have to chase through so

[issue47006] PEP 646: Decide on substitution behavior

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

[issue47006] PEP 646: Decide on substitution behavior

2022-03-13 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks Matthew! Merged PRs can still be reverted, and we have some time before the feature freeze. I'd like to hear what Guido and Ken think too. If we go with the GenericAlias substitution, we need to make sure that such aliases still work as base

[issue47020] float('nan')==math.nan does NOT evaluate to True (as suggested by documentation).

2022-03-14 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I'm guessing you're referring to https://docs.python.org/3.8/library/math.html#math.nan. The text says explicitly that math.nan is "equivalent" to float("nan"), not that it is equal. This is correct. nan is not equal to itself

[issue46769] Improve documentation for `typing.TypeVar`

2022-03-16 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 81b425d4dc43b60dd11a3e9abc5c84a4b8b384db by Alex Waygood in branch 'main': bpo-46769: Improve documentation for `typing.TypeVar` (GH-31712) https://github.com/python/cpython/commit/81b425d4dc43b60dd11a3e9abc5c84

[issue22859] unittest.TestProgram.usageExit no longer invoked

2022-03-16 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 7c353b7594545fb9403b3123a17ad06cadc2f73d by Carlos Damazio in branch 'main': bpo-22859: deprecate unittest.main.TestProgram.usageExit (GH-30293) https://github.com/python/cpython/commit/7c353b7594545fb9403b3123a17ad0

[issue22859] unittest.TestProgram.usageExit no longer invoked

2022-03-16 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: It is now marked deprecated, to be removed in 3.13. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46480] Implement typing.assert_type

2022-03-16 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 96568e995d840c66edb25b6b9d85e4dcccf5a936 by Jelle Zijlstra in branch 'main': bpo-46480: add typing.assert_type (GH-30843) https://github.com/python/cpython/commit/96568e995d840c66edb25b6b9d85e4

[issue46480] Implement typing.assert_type

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

[issue43224] Add support for PEP 646

2022-03-16 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +30045 pull_request: https://github.com/python/cpython/pull/31954 ___ Python tracker <https://bugs.python.org/issue43

[issue44859] Improve some sqlite3 errors

2022-03-16 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 4674fd4e938eb4a29ccd5b12c15455bd2a41c335 by Erlend Egeberg Aasland in branch 'main': bpo-44859: Raise more accurate exceptions in `sqlite3` (GH-27695) https://github.com/python/cpython/commit/4674fd4e938eb4a29ccd5b12c15455

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

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

[issue46421] unittest ValueError when invoking as module

2022-03-17 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset a0db11b10fca0fee6bb2b8d6277e266bad8c0fdb by Bader Zaidan in branch 'main': bpo-46421: Fix unittest filename evaluation when called as a module (GH-30654) https://github.com/python/cpython/commit/a0db11b10fca0fee6bb2b8d6277e26

[issue40296] help(list[int]) fails

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

[issue42782] shutil.move creates a new directory even on failure

2022-03-17 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +JelleZijlstra nosy_count: 3.0 -> 4.0 pull_requests: +30061 pull_request: https://github.com/python/cpython/pull/31971 ___ Python tracker <https://bugs.python.org/issu

[issue9736] doctest.DocTestSuite doesn't handle test globs correctly

2022-03-17 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Yes. -- nosy: +JelleZijlstra resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> doctest.DocTestCase fails when run repeatedly ___ Python tra

[issue46421] unittest ValueError when invoking as module

2022-03-17 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 1cab44d8650ae3eece90b04fca373908205e7ee0 by Miss Islington (bot) in branch '3.9': [3.9] bpo-46421: Fix unittest filename evaluation when called as a module (GH-30654) (GH-31970) https://github.com/python/cpyt

[issue46421] unittest ValueError when invoking as module

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

[issue43224] Add support for PEP 646

2022-03-18 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 3a2b89580ded72262fbea0f7ad24096a90c42b9c by Jelle Zijlstra in branch 'main': bpo-43224: Add TypeVarTuple.__name__ (GH-31954) https://github.com/python/cpython/commit/3a2b89580ded72262fbea0f7ad2409

[issue47006] PEP 646: Decide on substitution behavior

2022-03-20 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: It's simple if you only look at simple examples. Here are some examples current main (with Serhiy's patch for the Python version of typing) gets wrong: >>> from typing import * >>> Ts = TypeVarTuple("Ts") >&

[issue47087] Implement PEP 655 (Required/NotRequired)

2022-03-21 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : PEP 655 was just accepted, so we should implement it in typing.py! We should be able to largely reuse the typing-extensions implementation. (I can't find David Foster on BPO but I'll point him to this issue.) -- messages: 415704 nosy: A

[issue47088] Implement PEP 675 (LiteralString)

2022-03-21 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : This one should be quite simple at runtime. I'll send a PR this week. -- assignee: JelleZijlstra messages: 415706 nosy: AlexWaygood, JelleZijlstra, gvanrossum, kj priority: normal severity: normal stage: needs patch status: open title: Implemen

[issue47088] Implement PEP 675 (LiteralString)

2022-03-21 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- components: +Library (Lib) ___ Python tracker <https://bugs.python.org/issue47088> ___ ___ Python-bugs-list mailing list Unsub

[issue47087] Implement PEP 655 (Required/NotRequired)

2022-03-21 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- components: +Library (Lib) stage: -> needs patch type: -> enhancement versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/i

[issue2604] doctest.DocTestCase fails when run repeatedly

2022-03-22 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 7ba7eae50803b11766421cb8aae1780058a57e2b by Daniël van Noord in branch 'main': bpo-2604: Make doctest.DocTestCase reset globs in teardown (GH-31932) https://github.com/python/cpython/commit/7ba7eae50803b11766421cb8aae178

[issue2604] doctest.DocTestCase fails when run repeatedly

2022-03-22 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: After 14 years this bug is finally fixed. Thanks everyone for the patches and discussion. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracke

<    1   2   3   4   5   6   >