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
pri
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
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/d5ed8a8258eaf7a241978b1b0aeb97
Change by Jelle Zijlstra :
--
pull_requests: +30156
pull_request: https://github.com/python/cpython/pull/32067
___
Python tracker
<https://bugs.python.org/issue46
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
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
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/3354245daf89ca2c760c2c3e5b69a5
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
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 f
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/e8e737bcf6d22927caebc30c5d57ac
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/86384cf83f96fcaec03e2ad6516e2e
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/cpyt
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.py
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 2
Change by Jelle Zijlstra :
--
pull_requests: +30249
pull_request: https://github.com/python/cpython/pull/32171
___
Python tracker
<https://bugs.python.org/issue28
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/cpyt
Jelle Zijlstra added the comment:
Thanks for the patch!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
-
Jelle Zijlstra added the comment:
Thanks for the patch!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Jelle Zijlstra :
--
nosy: +AlexWaygood, GBeauregard, JelleZijlstra
___
Python tracker
<https://bugs.python.org/issue47166>
___
___
Python-bugs-list m
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 an
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
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
-
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
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
-
Change by Jelle Zijlstra :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
-
Jelle Zijlstra added the comment:
Thanks for the patch!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
__
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.
-
Change by Jelle Zijlstra :
--
nosy: +eric.snow
___
Python tracker
<https://bugs.python.org/issue47219>
___
___
Python-bugs-list mailing list
Unsubscribe:
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/38ae5b8c0c0b64ae6100b0dee8707d
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
-
Jelle Zijlstra added the comment:
Thanks for the patch!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
-
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/5a4973e29f2f5c4ee8c086f4032578
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
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/b275267aa7d44ec90fa435c9cb1610
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
Change by Jelle Zijlstra :
--
pull_requests: +30382
pull_request: https://github.com/python/cpython/pull/32321
___
Python tracker
<https://bugs.python.org/issue45
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
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
-
Jelle Zijlstra added the comment:
Thanks for the patch!
--
___
Python tracker
<https://bugs.python.org/issue32658>
___
___
Python-bugs-list mailing list
Unsub
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/cpyt
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/e06f920c5bc6e9fad29082ba0d8404
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
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/cpyt
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/a7551247e7cb7010fb4735281f1afa
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
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/cfb849a326e52a4edc577112ebf60e
Change by Jelle Zijlstra :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
&
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.
--
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 mo
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
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
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
>>&
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
Jelle Zijlstra added the comment:
Could you post code that fully reproduces the problem?
I suspect the root cause for the bug is in lxml (a third-party library), not in
CPython itself.
--
nosy: +Jelle Zijlstra
___
Python tracker
<ht
Jelle Zijlstra added the comment:
The threading documentation for 3.9 still claims "While they are not listed
below, the camelCase names used for some methods and functions in this module
in the Python 2.x series are still supported by this module." It would be
better to me
Jelle Zijlstra added the comment:
Sure, I can submit a PR. While we're at it, we should probably also deprecate
the setter/getter methods that you mention.
Here's what I propose doing:
- On 3.10 (or 3.11 if it's too late for 3.10), make getName and friends throw a
Dep
New submission from Jelle Zijlstra :
Followup from issue37804: deprecate the remaining camelCase aliases, such as
threading.currentThread. PR coming soon.
--
assignee: Jelle Zijlstra
components: Library (Lib)
messages: 390165
nosy: Jelle Zijlstra, pitrou
priority: normal
severity
Change by Jelle Zijlstra :
--
keywords: +patch
pull_requests: +23915
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25174
___
Python tracker
<https://bugs.python.org/issu
Change by Jelle Zijlstra :
--
pull_requests: +23916
pull_request: https://github.com/python/cpython/pull/25174
___
Python tracker
<https://bugs.python.org/issue37
New submission from Jelle Zijlstra :
Currently, typing.ParamSpec.args and ParamSpec.kwargs are just object()
instances, which makes them useless for runtime inspection of __annotations__.
This type was introduced by PEP 612.
Instead, I propose to make them return some special helper object
Change by Jelle Zijlstra :
--
assignee: -> Jelle Zijlstra
___
Python tracker
<https://bugs.python.org/issue43783>
___
___
Python-bugs-list mailing list
Un
Change by Jelle Zijlstra :
--
keywords: +patch
pull_requests: +24029
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25298
___
Python tracker
<https://bugs.python.org/issu
Jelle Zijlstra added the comment:
It's a bit worse: the actual name is "ptr", the function docstrings say "addr",
and the documentation
(https://docs.python.org/3.9/library/ctypes.html#ctypes.string_at) has
"address". I'd favor updating them all to
Change by Jelle Zijlstra :
--
keywords: +patch
nosy: +Jelle Zijlstra
nosy_count: 4.0 -> 5.0
pull_requests: +24074
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/25339
___
Python tracker
Change by Jelle Zijlstra :
--
nosy: +Jelle Zijlstra
___
Python tracker
<https://bugs.python.org/issue43817>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jelle Zijlstra added the comment:
I agree with Guido that it's better to design inspect.signature to not throw an
error for annotations that don't eval() cleanly.
I use inspect.signature for getting information about callables (third-party
and first-party) in my type check
Jelle Zijlstra added the comment:
Like Mark I'm opposed to this change. It requires little work in CPython
itself, but numbers.Integral has now been a part of the language for many years
and the name is used in numerous third-party projects. Forcing all of them to
change doesn
Jelle Zijlstra added the comment:
For what it's worth, I checked grep.app and found only one usage of del on
__annotations__, in a test suite:
https://github.com/go-python/gpython/blob/master/py/tests/function.py#L82.
Changing its behavior seems very low risk.
--
nosy: +
New submission from Jelle Zijlstra :
After the changes from bpo-42345, the Literal documentation claims that
"Literal objects will now raise a TypeError exception during equality
comparisons if one of their parameters are not immutable." But in fact it's
*unhashable* type
Jelle Zijlstra added the comment:
PEP 440 applies to Python packages, not to CPython itself. The "+" convention
has been used in CPython for a long time, and changing it without a strong
justification seems risky.
--
nosy: +Jelle Zijlstra -lukasz.langa, ned.deily,
Change by Jelle Zijlstra :
--
nosy: +lukasz.langa, ned.deily, pablogsal
___
Python tracker
<https://bugs.python.org/issue44000>
___
___
Python-bugs-list mailin
New submission from Jelle Zijlstra :
symbol is being removed in 3.10, but
https://docs.python.org/3.10/library/symbol.html still exists and claims it
will be removed in "future versions". It was removed in bpo-40939 / GH-21005.
--
assignee: docs@python
components: Doc
Jelle Zijlstra added the comment:
You're right, the file doesn't exist on master. I guess there must be some sort
of caching. For what it's worth, I found it by going to the module
documentation on an earlier version and using the dropdown to navigate to 3.10.
If you go to
Jelle Zijlstra added the comment:
We should not do this, because the wrapping function may have different
defaults, and updating __defaults__ would make it use the wrapped function's
defaults.
Example:
>>> def f(y=1):
... print(y)
...
>>> f()
1
>&g
Jelle Zijlstra added the comment:
That's because inspect.signature by default follows the `.__wrapped__`
attribute, so it gives you the signature for the *wrapped* function. That
behavior is occasionally problematic (I ran into it in the context of
https://github.com/quora/pyanalyze/i
Jelle Zijlstra added the comment:
We could add a new argument to `@functools.wraps()` to differentiate between a
wrapper with the same signature and one with a different signature.
Here's a possible design:
* functools.wraps adds a new keyword-only argument signature_changed. It
defaul
Jelle Zijlstra added the comment:
Looks like this is no longer relevant.
--
nosy: +Jelle Zijlstra
resolution: -> out of date
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jelle Zijlstra added the comment:
We have typing.get_args() as of 3.8.
--
nosy: +Jelle Zijlstra
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jelle Zijlstra added the comment:
As of Python 3.10, thanks to Larry Hastings inspect.signature will have a new
eval_str= parameter that lets you evaluate string annotations. This isn't quite
what you're asking for, though, because typing.get_type_hints does more work
than eva
Jelle Zijlstra added the comment:
Looks like there's nothing left to do here.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Jelle Zijlstra added the comment:
More recent versions of typing have added some helper functions that could be
useful here, like typing.get_origin and typing.get_args. I'm going to close
this issue because I don't think there's anything actionable.
------
nosy:
Jelle Zijlstra added the comment:
Closing as a duplicate of https://bugs.python.org/issue38291
--
nosy: +Jelle Zijlstra
resolution: -> duplicate
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jelle Zijlstra added the comment:
The documentation
(https://docs.python.org/3.10/library/typing.html#typing.BinaryIO) now mentions
the typing.io and typing.re namespaces.
I would prefer that they be deprecated and eventually completely removed. They
don't work with most static
Jelle Zijlstra added the comment:
It turns out that IO, TextIO, BinaryIO, Match, and Pattern aren't in
typing.__all__. As Walter points out above, there's no clear reason for this. I
am submitting a PR to add them to __all__.
--
nosy: +Jell
Change by Jelle Zijlstra :
--
keywords: +patch
pull_requests: +24508
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25821
___
Python tracker
<https://bugs.python.org/issu
Jelle Zijlstra added the comment:
Thanks Julien! I noticed two other libraries in the same situation:
https://docs.python.org/3.10/library/formatter.html and
https://docs.python.org/3.10/library/parser.html. The RST files for both are
also gone from master. Could you purge the cache for
Change by Jelle Zijlstra :
--
keywords: +patch
pull_requests: +24554
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25877
___
Python tracker
<https://bugs.python.org/issu
Jelle Zijlstra added the comment:
@Łukasz thanks for your merging spree!
I'm actually not sure this should go into 3.9. Seems potentially dangerous that
people upgrading from an earlier 3.9 patch release will now see new names
injected into their namespace if they do `from typing i
Jelle Zijlstra added the comment:
Python 3.10 will add an eval_str= argument to inspect.signature() that lets you
evaluate string annotations. I don't think it makes sense to change anything in
the bugfix branches, so I propose that this issue be closed.
--
nosy: +Jelle Zij
Change by Jelle Zijlstra :
--
pull_requests: +24569
pull_request: https://github.com/python/cpython/pull/25897
___
Python tracker
<https://bugs.python.org/issue44
Change by Jelle Zijlstra :
--
nosy: +Jelle Zijlstra
___
Python tracker
<https://bugs.python.org/issue44037>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jelle Zijlstra added the comment:
Looks like the same issue to me as the rejected issue that Karthikeyan
mentioned. Changing it to use the first value is a non-starter because it would
break compatibility. I'd suggest using a linter that warns about duplicate keys
in literal
Jelle Zijlstra added the comment:
Line 1030 of 3.9.4 is at
https://github.com/python/cpython/blob/1f2e3088f3c097b5bde69bbd63dfcd0852d31984/Lib/logging/__init__.py#L1030
and doesn't have a del statement or a syntax error. Most likely there's some
mismatch where you're ru
201 - 300 of 509 matches
Mail list logo