[issue47087] Implement PEP 655 (Required/NotRequired)

2022-04-08 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- keywords: +patch pull_requests: +30444 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32419 ___ Python tracker <https://bugs.python.org/issu

[issue46981] Empty typing.Tuple

2022-04-07 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I tried out 3.11 on my pyanalyze type checker and got some failures because of this change, because my previous trick for distinguishing between Tuple and Tuple[()] failed. 3.10: >>> from typing import get_args, Tuple >>&

[issue47255] Many broken :meth: roles in the docs

2022-04-07 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: There are a lot of places in the rest of the docs that have the same problem: Doc % git grep ':meth:`__' | grep -v whatsnew | wc -l 610 I wonder if we can make the :meth: role globally default to linking to object.__dunder__. Would that require

[issue47255] Many broken :meth: roles in the docs

2022-04-07 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- keywords: +patch pull_requests: +30435 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32409 ___ Python tracker <https://bugs.python.org/issu

[issue47255] Many broken :meth: roles in the docs

2022-04-07 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : The docs for the hash() builtin use :meth:`__hash__`, but this doesn't actually link to the datamodel documentation for __hash__: it needs :meth:`~object.__hash__` instead. I'm fixing this in the builtin functions docs, but there are probably more places

[issue47254] enhanced dir?

2022-04-07 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This would be nice, but backward compatibility alone means we can't change dir() to return a dictionary. What you propose would make more sense as a new function, perhaps in a package like pydoc or a third-party tool like IPython. -- nosy

[issue47237] Inheritance from base class with property in class makes them non-instantiatable

2022-04-06 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I think the behavior with regular classes is expected (that's just how inheritance works), but a case could be made that dataclasses should handle this case specially. -- ___ Python tracker <ht

[issue47234] PEP-484 "numeric tower" approach makes it hard/impossible to specify contracts in documentation

2022-04-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks for your report, but I would appreciate a more concise explanation. Let me try to rephrase the problem. Given this function: def mean(x: list[float]) -> float: return sum(x) / len(x) We want to provide a guarantee that if x is a nonempty l

[issue47088] Implement PEP 675 (LiteralString)

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

[issue47088] Implement PEP 675 (LiteralString)

2022-04-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset cfb849a326e52a4edc577112ebf60e1d9d0d7fdb by Jelle Zijlstra in branch 'main': bpo-47088: Add typing.LiteralString (PEP 675) (GH-32064) https://github.com/python/cpython/commit/cfb849a326e52a4edc577112ebf60e1d9d0d7fdb

[issue41930] Wrap sqlite3_serialize API in sqlite3 module

2022-04-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks, this will be in Python 3.11. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41930] Wrap sqlite3_serialize API in sqlite3 module

2022-04-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset a7551247e7cb7010fb4735281f1afa4abeb8a9cc by Erlend Egeberg Aasland in branch 'main': bpo-41930: Add support for SQLite serialise/deserialise API (GH-26728) https://github.com/python/cpython/commit/a7551247e7cb7010fb4735281f1afa4abeb8a9cc

[issue45790] Inaccurate phrasing in extending/newtypes_tutorial

2022-04-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset d1fb16ae286795abe3e9da86332c891b4b18826f by Jelle Zijlstra in branch '3.9': [3.9] bpo-45790: List macros in same order in which fields are described (GH-29529) (GH-32321) https://github.com/python/cpython/commit

[issue40982] copytree example in shutil

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

[issue40982] copytree example in shutil

2022-04-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset e06f920c5bc6e9fad29082ba0d84043722806e17 by Zackery Spytz in branch 'main': bpo-40982: shutil docs: Remove outdated copytree() example (GH-24778) https://github.com/python/cpython/commit/e06f920c5bc6e9fad29082ba0d84043722806e17

[issue43224] Add support for PEP 646

2022-04-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 772d8080c9fd635c3999673ca9fad8b674385c7f by Matthew Rahtz in branch 'main': bpo-43224: typing: Add tests for pickling and copying of unpacked native tuple (GH-32159) https://github.com/python/cpython/commit

[issue32658] Metacharacter (\) documentation suggestion

2022-04-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks for the patch! -- ___ Python tracker <https://bugs.python.org/issue32658> ___ ___ Python-bugs-list mailing list Unsub

[issue32658] Metacharacter (\) documentation suggestion

2022-04-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 43571a3eea8b5931769376daf4bdad1c9184ae0d by Mike cm in branch 'main': bpo-32658: Regex docs: Fix metacharacter reference (GH-32230) https://github.com/python/cpython/commit/43571a3eea8b5931769376daf4bdad1c9184ae0d -- nosy

[issue45790] Inaccurate phrasing in extending/newtypes_tutorial

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

[issue45790] Inaccurate phrasing in extending/newtypes_tutorial

2022-04-04 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +30382 pull_request: https://github.com/python/cpython/pull/32321 ___ Python tracker <https://bugs.python.org/issue45

[issue47007] [doc] str docs are inconsistent with special method lookup

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

[issue45790] Inaccurate phrasing in extending/newtypes_tutorial

2022-04-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset b275267aa7d44ec90fa435c9cb1610c549da745a by rtobar in branch 'main': bpo-45790: List macros in same order in which fields are described (GH-29529) https://github.com/python/cpython/commit/b275267aa7d44ec90fa435c9cb1610c549da745a

[issue46998] Allow subclassing Any at runtime

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

[issue46998] Allow subclassing Any at runtime

2022-04-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 5a4973e29f2f5c4ee8c086f40325786c62381540 by Shantanu in branch 'main': bpo-46998: Allow subclassing Any at runtime (GH-31841) https://github.com/python/cpython/commit/5a4973e29f2f5c4ee8c086f40325786c62381540

[issue47007] [doc] str docs are inconsistent with special method lookup

2022-04-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset bb86d1d9fbd1888524e04475383f4ea764277f67 by Vanshaj Singhania in branch 'main': bpo-47007: [doc] `str` special method lookup (GH-31863) https://github.com/python/cpython/commit/bb86d1d9fbd1888524e04475383f4ea764277f67 -- nosy

[issue41233] Missing links to errnos on Built-in Exceptions page

2022-04-04 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

[issue41233] Missing links to errnos on Built-in Exceptions page

2022-04-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset a74892cb2168d249d9a8c53fad605a5def9b41d4 by yyyan in branch 'main': bpo-41233: Add links to errnos referenced in exceptions docs (GH-21380) https://github.com/python/cpython/commit/a74892cb2168d249d9a8c53fad605a5def9b41d4 -- nosy

[issue47097] Document PEP 646

2022-04-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 38ae5b8c0c0b64ae6100b0dee8707d5ab769e381 by Matthew Rahtz in branch 'main': bpo-47097: Add documentation for TypeVarTuple (#32103) https://github.com/python/cpython/commit/38ae5b8c0c0b64ae6100b0dee8707d5ab769e381

[issue47219] asyncio with two interpreter instances

2022-04-04 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +eric.snow ___ Python tracker <https://bugs.python.org/issue47219> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42012] typing support in wsgiref

2022-04-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This seems useful to me but I don't have experience with wsgiref. pje is listed as the maintainer in the devguide but appears to be inactive. I'd suggest you open a PR and if anyone feels strongly against it, they can complain. -- nosy

[issue47206] pickle docs are wrong about nested classes

2022-04-03 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : https://docs.python.org/3.10/library/pickle.html#what-can-be-pickled-and-unpickled says that only "classes that are defined at the top level of a module" can be pickled. But in fact these work fine in current Python, probably since 3.3 when __

[issue47031] math.nan should note that NANs do not compare equal to anything

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

[issue45584] Clarifying truncating in documentation

2022-04-02 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

[issue45584] Clarifying truncating in documentation

2022-04-02 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset ebbdbbff5d6840807e46ec61b8a323e94ee88de2 by Arthur Milchior in branch 'main': bpo-45584: Clarify `math.trunc` documentation (GH-29183) https://github.com/python/cpython/commit/ebbdbbff5d6840807e46ec61b8a323e94ee88de2 -- nosy

[issue45114] bad example for os.stat

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

[issue45114] bad example for os.stat

2022-04-02 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset c93a0ac6972221787d8bea1c41a9feb667ed3d2c by 180909 in branch 'main': bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845) https://github.com/python/cpython/commit/c93a0ac6972221787d8bea1c41a9feb667ed3d2c -- nosy

[issue26792] docstrings of runpy.run_{module,path} are rather sparse

2022-04-02 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +JelleZijlstra nosy_count: 4.0 -> 5.0 pull_requests: +30330 pull_request: https://github.com/python/cpython/pull/32265 ___ Python tracker <https://bugs.python.org/issu

[issue47031] math.nan should note that NANs do not compare equal to anything

2022-04-02 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 182e93c3f57b0c72e765c9896066d32e461c0865 by Charlie Zhao in branch 'main': bpo-47031: Improve documentation for `math.nan` (GH-32170) https://github.com/python/cpython/commit/182e93c3f57b0c72e765c9896066d32e461c0865 -- nosy

[issue47202] Feature request: Throw an error when making impossible evaluation against an empty list

2022-04-02 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: This sort of thing would be better caught by a linter or type checker. For example, mypy with the `--warn-unreachable` option will flag the `while None:` example. Iterating over an empty list will not currently be caught by mypy, but it's common in real

[issue47166] Dataclass transform should ignore TypeAlias variables

2022-03-30 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: >From a typing perspective this is reasonable. See this thread about type >aliases in class scopes: >https://mail.python.org/archives/list/typing-...@python.org/thread/CGOO7GPPECGMLFDUDXSSXTRADI4BXYCS/ > However, it's a niche use case and we

[issue47166] Dataclass transform should ignore TypeAlias variables

2022-03-30 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +AlexWaygood, GBeauregard, JelleZijlstra ___ Python tracker <https://bugs.python.org/issue47166> ___ ___ Python-bugs-list m

[issue42340] KeyboardInterrupt should come with a warning

2022-03-29 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

[issue42340] KeyboardInterrupt should come with a warning

2022-03-29 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset d0906c90fcfbc4cfb9bb963eaa6bb152dd543b56 by benfogle in branch 'main': bpo-42340: Document issues around KeyboardInterrupt (GH-23255) https://github.com/python/cpython/commit/d0906c90fcfbc4cfb9bb963eaa6bb152dd543b56 -- nosy

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

2022-03-28 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

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

2022-03-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 604d003ab4d1084ef828ebca1b28f2bf1b93c744 by Jelle Zijlstra in branch '3.10': [3.10] bpo-28516: document contextlib.ExitStack.__enter__ behavior (GH-31636) (GH-32171) https://github.com/python/cpython/commit

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

2022-03-28 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +30249 pull_request: https://github.com/python/cpython/pull/32171 ___ Python tracker <https://bugs.python.org/issue28

[issue47143] Add types.copy_class() which updates closures

2022-03-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I mean that the code sample above from attrs doesn't properly update the closure for wrapped methods, such as those created by @functools.cache, or any other arbitrary decorator that creates a wrapper function. Example (with Python 3.9.4 and attrs 21.4.0

[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I believe the attrs code wouldn't work if a method is decorated with a decorator that wraps the original function, such as @functools.cache. -- nosy: +JelleZijlstra ___ Python tracker <https://bugs.python.

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

2022-03-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 1e3132b1c3ebff8d28a6dd353bf217cb97c41e81 by Miss Islington (bot) in branch '3.9': bpo-28516: document contextlib.ExitStack.__enter__ behavior (GH-31636) (GH-32145) https://github.com/python/cpython/commit

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

2022-03-27 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 86384cf83f96fcaec03e2ad6516e2e24f20d3b92 by vidhya in branch 'main': bpo-28516: document contextlib.ExitStack.__enter__ behavior (GH-31636) https://github.com/python/cpython/commit/86384cf83f96fcaec03e2ad6516e2e24f20d3b92

[issue43224] Add support for PEP 646

2022-03-26 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset e8e737bcf6d22927caebc30c5d57ac4634063219 by Matthew Rahtz in branch 'main': bpo-43224: Implement PEP 646 grammar changes (GH-31018) https://github.com/python/cpython/commit/e8e737bcf6d22927caebc30c5d57ac4634063219

[issue43224] Add support for PEP 646

2022-03-25 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: > 1. Finish writing docs (is updating library/typing.html sufficient? > https://github.com/python/cpython/pull/32103) We also need to add to the What's New for 3.11. I volunteered to do that for all the typing PEPs. > 2. Implement support for

[issue11339] annotation for class being defined

2022-03-25 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Agree. typing.Self from PEP 673 fixes this specific case, and PEP 563 or 649 will provide a general solution. No need to keep this issue open. -- nosy: +JelleZijlstra status: pending -> open ___ Python trac

[issue46480] Implement typing.assert_type

2022-03-23 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 3354245daf89ca2c760c2c3e5b69a571f25073ed by Shantanu in branch 'main': bpo-46480: rephrase typing.assert_type docs (GH-32069) https://github.com/python/cpython/commit/3354245daf89ca2c760c2c3e5b69a571f25073ed

[issue46769] Improve documentation for `typing.TypeVar`

2022-03-23 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks Alex for the PR and Łukasz for merging the last backport! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

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

2022-03-22 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I was close to merging the linked PR but there's some renewed concerns about the proposed behavior here: Do we really want to change this behavior and potentially force a lot of people to change their working code? In addition, the current code emits

[issue46769] Improve documentation for `typing.TypeVar`

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

[issue46769] Improve documentation for `typing.TypeVar`

2022-03-22 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset d5ed8a8258eaf7a241978b1b0aeb971108d0f7e0 by Alex Waygood in branch '3.10': [3.10] bpo-46769: Improve documentation for `typing.TypeVar` (GH-31712) (GH-31941) https://github.com/python/cpython/commit/d5ed8a8258eaf7a241978b1b0aeb971108d0f7e0

[issue47088] Implement PEP 675 (LiteralString)

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

[issue47097] Document PEP 646

2022-03-22 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : https://docs.python.org/3.11/library/typing.html doesn't say anything about TypeVarTuple yet. -- assignee: docs@python components: Documentation messages: 415850 nosy: AlexWaygood, JelleZijlstra, docs@python, gvanrossum, kj, mrahtz priority

[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

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

[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

[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

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

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

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

[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/3a2b89580ded72262fbea0f7ad24096a90c42b9c

[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

[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/cpython/commit

[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

[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

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

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

[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

[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/4674fd4e938eb4a29ccd5b12c15455bd2a41c335

[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

[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

[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/96568e995d840c66edb25b6b9d85e4dcccf5a936

[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

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

[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/81b425d4dc43b60dd11a3e9abc5c84a4b8b384db

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

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

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

[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

[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

[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
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__ method: $ cat

[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

[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-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 have to add a `__call_

[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

[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/75174371e6cac935b598a68c1113f6db1e0d6ed8

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

[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

[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/cpython/commit

[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

  1   2   3   4   5   6   >