Alex Waygood added the comment:
Another option for code using Python <3.11, that will work without the `from
__future__ import annotations` import, is to do something like this:
```
from graphlib import TopologicalSorter
x: 'TopologicalSorter[str]' = TopologicalSorter({&quo
Alex Waygood added the comment:
My opinion is that supporting `GenericAlias` here would be a bad idea.
Associating an implementation of the function with the argument type
`list[str]` is ambiguous. Would this implementation be called if any argument
of type `list` was supplied, or would it
Alex Waygood added the comment:
It would be well worth it to improve the error message, however:
```
>>> from functools import singledispatch
>>> @singledispatch
... def func(arg):
... raise NotImplementedError
...
>>> @func.register
... def _(arg: list[str])
Alex Waygood added the comment:
The above traceback is because the `isinstance(list[str], type)` check at
Lib/functools.py:848 evaluates to `True`. Related: #45665.
--
___
Python tracker
<https://bugs.python.org/issue46
Alex Waygood added the comment:
#46032 is related to this issue.
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue45665>
___
___
Python-bug
Alex Waygood added the comment:
This is awesome! Should a note be added to the functools documentation
mentioning the new feature? (Genuine question — I'm not sure whether it's
necessary myself.)
--
___
Python tracker
<https://bu
Change by Alex Waygood :
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue46013>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alex Waygood added the comment:
The PR looks good to me. I think it's also important that we document that
these types aren't supported, as it's not mentioned anywhere at the moment.
Related: Issue34498.
--
nosy: +uriyyo
___
Change by Alex Waygood :
--
components: +Documentation
type: enhancement -> behavior
___
Python tracker
<https://bugs.python.org/issue46032>
___
___
Python-
Alex Waygood added the comment:
Closing this, as I don't think the use case I presented is strong enough, and
there are ultimately more important things to worry about.
--
resolution: -> not a bug
stage: patch review -> resolved
status: ope
Change by Alex Waygood :
--
pull_requests: +28298
stage: backport needed -> patch review
pull_request: https://github.com/python/cpython/pull/30077
___
Python tracker
<https://bugs.python.org/issu
Change by Alex Waygood :
--
nosy: -AlexWaygood
___
Python tracker
<https://bugs.python.org/issue45729>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
versions: -Python 3.6, Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue45985>
___
___
Python-bugs-list mailin
Change by Alex Waygood :
--
keywords: +patch
nosy: +AlexWaygood
nosy_count: 2.0 -> 3.0
pull_requests: +28300
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30079
___
Python tracker
<https://bugs.python.org/i
Change by Alex Waygood :
--
pull_requests: +28302
pull_request: https://github.com/python/cpython/pull/30081
___
Python tracker
<https://bugs.python.org/issue45
Alex Waygood added the comment:
Thanks, Serhiy!
--
___
Python tracker
<https://bugs.python.org/issue45840>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alex Waygood added the comment:
I can't reproduce this -- the permalink to __debug__ that I get is the same as
the one you have posted here, and works fine for me on my laptop, phone and
iPad.
--
nosy: +AlexWaygood
___
Python tracker
&
Change by Alex Waygood :
--
type: -> behavior
versions: +Python 3.11
___
Python tracker
<https://bugs.python.org/issue46059>
___
___
Python-bugs-list mai
Change by Alex Waygood :
--
nosy: +gvanrossum, kj
___
Python tracker
<https://bugs.python.org/issue46066>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alex Waygood added the comment:
Thanks for the bug report, Vivek! It should be fixed now -- it might take a day
or two for the online docs to update.
--
___
Python tracker
<https://bugs.python.org/issue46
Alex Waygood added the comment:
The proposed patch appears to have been implemented in
https://github.com/python/cpython/commit/97c1adf3935234da716d3289b85f72dcd67e90c2,
and there has been no discussion for five years. I think this can now be
closed.
--
nosy: +AlexWaygood
New submission from Alex Waygood :
The ability to add docstrings for individual attributes, by using a dictionary
for __slots__ was added in Issue36326. This is a fantastic feature, and
deserves better documentation. It appears to currently only be documented in
the "What's New&
Change by Alex Waygood :
--
keywords: +patch
pull_requests: +28332
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30109
___
Python tracker
<https://bugs.python.org/issu
Change by Alex Waygood :
--
title: Broken URL in tutorial -> [doc] Broken URL in "Brief Tour of the
Standard Library"
type: -> behavior
versions: +Python 3.11, Python 3.9
___
Python tracker
<https://bugs.py
Change by Alex Waygood :
--
versions: -Python 3.6, Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue46081>
___
___
Python-bugs-list mailin
Alex Waygood added the comment:
Hi! Your message here is a little unclear. Are you proposing a new feature (an
enhancement), or filing a bug report?
In either case, I'm afraid this behavior is very unlikely to change. In
general, strings in Python are always considered truthy unless
Change by Alex Waygood :
--
nosy: +rhettinger
versions: -Python 3.8
___
Python tracker
<https://bugs.python.org/issue46085>
___
___
Python-bugs-list mailin
Alex Waygood added the comment:
I am removing 3.10 from the "versions" field, since additions to the standard
library are only considered for unreleased versions of Python.
--
nosy: +AlexWaygood, tim.peters
versions: -Python 3.10
Change by Alex Waygood :
--
nosy: -AlexWaygood
___
Python tracker
<https://bugs.python.org/issue46086>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
nosy: +AlexWaygood
versions: +Python 3.11, Python 3.9
___
Python tracker
<https://bugs.python.org/issue46092>
___
___
Python-bug
Alex Waygood added the comment:
It concerns me that help() gives very different results for some of these
functions than the signature you'll find in the documentation. I think a
beginner would find that highly confusing. If the view is that the slash
notation should not be added to
New submission from Alex Waygood :
There are a few places in the typing docs where old-style (pre-PEP 526) syntax
is used in examples. It doesn't look like these examples have been updated
since 2016; it would be good to change them so that they use the newer syntax
introduced in PE
Change by Alex Waygood :
--
keywords: +patch
pull_requests: +28368
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30148
___
Python tracker
<https://bugs.python.org/issu
Change by Alex Waygood :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Alex Waygood :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11 -Python 3.9
___
Python tracker
<https://bugs.python.or
Change by Alex Waygood :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> behavior
___
Python tracker
<https://bugs.python
Alex Waygood added the comment:
This appears to have been fixed in PR 26560 in the main branch, but it might be
nice to backport it to 3.10 and 3.9
--
nosy: +AlexWaygood, mdk
stage: -> backport needed
type: enhancement -> behavior
versions: +Python 3.10, Python 3.9 -Pyth
Alex Waygood added the comment:
Given that there has been no activity on this issue for over three years, I am
closing this as "rejected".
--
nosy: +AlexWaygood
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Alex Waygood added the comment:
PR 30191 and PR 30192 are backports
--
___
Python tracker
<https://bugs.python.org/issue31914>
___
___
Python-bugs-list mailin
Change by Alex Waygood :
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
stage: -> needs patch
type: -> enhancement
versions: +Python 3.10, Python 3.11, Python 3.9
___
Python tracker
<https://bugs.python.or
Change by Alex Waygood :
--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.7, Python
3.8
___
Python tracker
<https://bugs.python.org/issue33
Change by Alex Waygood :
--
nosy: +mdk
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue46130>
___
___
Python-bugs-list mailing list
Un
New submission from Alex Waygood :
Attempting to create an enum with __slots__ silently fails. No error is raised
if __slots__ are specified, but the usual behaviour of __slots__ does not work
as expected. Attributes that are not specified in __slots__ can be freely set:
>>>
Change by Alex Waygood :
--
pull_requests: +28424
pull_request: https://github.com/python/cpython/pull/30203
___
Python tracker
<https://bugs.python.org/issue46
Change by Alex Waygood :
--
resolution: fixed ->
stage: resolved -> patch review
status: closed -> open
___
Python tracker
<https://bugs.python.or
Change by Alex Waygood :
--
stage: -> needs patch
versions: +Python 3.11 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue29971>
___
___
Python-
Alex Waygood added the comment:
I am closing this issue. The original topic of discussion (Lock.acquire
documentation) has been resolved, and there were other issues opened to discuss
the more general issue. There has also been no real activity in this issue
thread for a decade
Alex Waygood added the comment:
I am closing this issue as "rejected", given the consensus that writing a patch
could be a major undertaking, the lack of such a patch, and the fact that there
has been no activity on the issue thread (or the python-ideas mailing list) for
near
Alex Waygood added the comment:
Thanks for the bug report, Landon! I think I can reproduce this with a slightly
shorter code snippet, but I don't think this is a bug:
```
>>> from dataclasses import dataclass, field
>>> @dataclass
... class Character:
... sort_
Alex Waygood added the comment:
Thanks for taking the time to review and merge :)
--
___
Python tracker
<https://bugs.python.org/issue46076>
___
___
Python-bug
Alex Waygood added the comment:
Ah, of course, I'm an idiot — I forgot that a class could not prevent the
creation of __dict__ unless the parent class also had __slots__. Thanks,
Christian.
In which case: consider this a feature request to consider adding __slots__ to
enum.Enum: for f
Change by Alex Waygood :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Alex Waygood :
--
type: security -> enhancement
versions: +Python 3.11 -Python 3.10
___
Python tracker
<https://bugs.python.org/issue43424>
___
_
Change by Alex Waygood :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue46172>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Alex Waygood :
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue46162>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
title: urllib.requst.Request 'timeout' attribute needs to have a default ->
urllib.request.Request 'timeout' attribute needs to have a default
___
Python tracker
<https:/
Change by Alex Waygood :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Alex Waygood :
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue46170>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alex Waygood added the comment:
Given that this issue has seen no activity for eight years, I am closing it as
"rejected".
--
nosy: +AlexWaygood
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Pyt
Alex Waygood added the comment:
The modern docs for these functions seem to:
* Document the cwd argument for these functions, following PR 1685 & PR 2253.
* Include an **other_popen_kwargs parameter for all these functions.
Nick, is there anything left to do here, or can this issue be cl
Alex Waygood added the comment:
Guido: Serhiy fixed this very recently in Issue46032.
The documentation should probably be improved, however, in my opinion; there's
currently nothing officially stating that GenericAlias/NewType/typing aliases
are unsupported.
Suppor
Change by Alex Waygood :
--
nosy: +AlexWaygood, lukasz.langa
___
Python tracker
<https://bugs.python.org/issue46191>
___
___
Python-bugs-list mailing list
Unsub
Change by Alex Waygood :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Alex Waygood :
--
title: Clarify kwarg handing for subprocess convenience APIs -> [doc]
subprocess module: Clarify kwarg handing for convenience APIs
___
Python tracker
<https://bugs.python.org/issu
Alex Waygood added the comment:
I am closing this, as I believe it was fixed by the addition of **kwds to
EnumMeta. Feel free to reopen this if you disagree, @retnikt.
--
nosy: +AlexWaygood
resolution: -> fixed
stage: -> resolved
status: open -&g
Alex Waygood added the comment:
I like Serhiy's idea from a type-checking perspective. It would mean we could
continue to have sophisticated type inference from mypy/pyright/etc. inside
singledispatch function definitions. It would also mean people could use type
annotatio
Alex Waygood added the comment:
Yeah, I think I agree with Guido. Mypy only has partial support for
singledispatch anyway, and only achieves that through a plugin, so
special-casing by type-checkers is inevitable.
--
___
Python tracker
<ht
Alex Waygood added the comment:
```
>>> from typing import Optional, get_origin
>>> get_origin(Optional[int])
typing.Union
```
^Because of that, it will work with typing.Optional as well as typing.Union and
types.UnionType, yes.
I am planning on submitting a docs PR at
Change by Alex Waygood :
--
keywords: +patch
stage: -> patch review
versions: -Python 3.6, Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issu
Change by Alex Waygood :
--
nosy: +gvanrossum, kj
___
Python tracker
<https://bugs.python.org/issue46244>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
title: Improve error message when creating an enum with `__call__` -> Improve
error message when attempting to extend an enum with `__call__`
___
Python tracker
<https://bugs.python.org/issu
Change by Alex Waygood :
--
nosy: +jaraco
___
Python tracker
<https://bugs.python.org/issue46246>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
nosy: +gvanrossum, kj
___
Python tracker
<https://bugs.python.org/issue43224>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Alex Waygood added the comment:
`isinstance(list[int], type)` returns `True` in 3.9 as well, so the behaviour
has been around for a while. (Not a comment on whether the change is worth
making, just a note.)
--
___
Python tracker
<ht
Alex Waygood added the comment:
Yes, there are a few exceptions to that :(
```
>>> from typing import Annotated
>>> x = Annotated[int, "idk some int"]
>>> x()
0
>>> isinstance(x, type)
False
>>>
>>> from re import Pattern
>&g
Alex Waygood added the comment:
I agree with Serhiy.
--
___
Python tracker
<https://bugs.python.org/issue45665>
___
___
Python-bugs-list mailing list
Unsub
Change by Alex Waygood :
--
title: Error path in `_missing_()` is not covered for `enum.Flag` and
`enum.IntFlag` -> Enum tests: Error path in `_missing_()` is not covered for
`Flag` and `IntFlag`
___
Python tracker
<https://bugs.pyth
Alex Waygood added the comment:
Thanks, Nikita! My bad for not adding tests for __new__ in PR 29316.
To confirm: yes, my idea in PR 29316 was that "__new__" (along with most enum
dunders) should not show up in the output of dir(Enum), but should show up in
dir(EnumSubclass) if a
Change by Alex Waygood :
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue46244>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alex Waygood added the comment:
> We will still allow instantiating e.g. list[int], right?
I certainly hope so! That would be a much more breaking change if we were to
change that, and I can't personally see any benefit to doing so.
--
__
Change by Alex Waygood :
--
nosy: +eric.smith
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue46290>
___
___
Python-bugs-list mai
Change by Alex Waygood :
--
nosy: +ethan.furman
title: One branch is not covered in `Enum._convert_` -> Enum tests: One branch
is not covered in `Enum._convert_`
___
Python tracker
<https://bugs.python.org/issu
Change by Alex Waygood :
--
assignee: -> ethan.furman
___
Python tracker
<https://bugs.python.org/issue46242>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Alex Waygood :
--
title: Suspicios operation in `doctest.py`: `None - 1` -> Suspicious operation
in `doctest.py`: `None - 1`
___
Python tracker
<https://bugs.python.org/issu
Change by Alex Waygood :
--
nosy: +belopolsky, p-ganssle
versions: -Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue46319>
___
___
Pytho
Change by Alex Waygood :
--
stage: -> patch review
type: compile error -> behavior
___
Python tracker
<https://bugs.python.org/issue43698>
___
___
Pyth
Change by Alex Waygood :
--
assignee: -> ethan.furman
___
Python tracker
<https://bugs.python.org/issue46327>
___
___
Python-bugs-list mailing list
Unsubscrib
Alex Waygood added the comment:
Reproduced on safari on my iPad, as well.
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue46334>
___
___
Change by Alex Waygood :
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue46333>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue46330>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue46328>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: performance -> behavior
___
Python tracker
<https://bugs.python
Change by Alex Waygood :
--
nosy: +AlexWaygood, lukasz.langa
___
Python tracker
<https://bugs.python.org/issue41987>
___
___
Python-bugs-list mailing list
Unsub
Change by Alex Waygood :
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue46342>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alex Waygood added the comment:
I'm removing 3.7 and 3.8 from the "versions" field, since those branches are
old enough that they're now only accepting security-related patches.
--
nosy: +AlexWaygood
versions: -Python 3.7, Python 3.8
__
Change by Alex Waygood :
--
nosy: -AlexWaygood
___
Python tracker
<https://bugs.python.org/issue46309>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
nosy: +AlexWaygood, gvanrossum, kj
title: Morernize `test_typing` -> Modernize `test_typing`
type: -> behavior
___
Python tracker
<https://bugs.python.org/i
Alex Waygood added the comment:
Heh, no worries!
--
___
Python tracker
<https://bugs.python.org/issue46348>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Alex Waygood :
Hi -- thanks for the report! You haven't given us many details here, but I
think this is intentional behaviour, not a bug -- this was changed in
Issue37324. Importing `Mapping` (along with many other names) directly from
`collections`, instead of
1 - 100 of 420 matches
Mail list logo