Alex Waygood added the comment:
This issue is related, but distinct, to previous issue
https://bugs.python.org/issue42280.
--
___
Python tracker
<https://bugs.python.org/issue45
Change by Alex Waygood :
--
keywords: +patch
pull_requests: +27603
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29335
___
Python tracker
<https://bugs.python.org/issu
New submission from Alex Waygood :
The documentation on `GenericAlias` objects implies at multiple points that
only container classes can implement `__class_getitem__`, and goes into very
little detail about what it means for a non-container class to be parameterized.
--
assignee
Change by Alex Waygood :
--
components: +Tests -Library (Lib)
___
Python tracker
<https://bugs.python.org/issue45678>
___
___
Python-bugs-list mailing list
Unsub
Change by Alex Waygood :
--
keywords: +patch
pull_requests: +27597
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29328
___
Python tracker
<https://bugs.python.org/issu
New submission from Alex Waygood :
`test_functools` includes a test to check that `functools.singledispatch`
correctly wraps the attributes of the target function. However, there is no
equivalent test for `functools.singledispatchmethod`. There should be, as this
is done separately
Alex Waygood added the comment:
Bugfixes are only being applied for Python >=3.9, but I've reproduced this
output on 3.11
--
nosy: +AlexWaygood
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7
___
Python tracker
<
Alex Waygood added the comment:
I would argue it's quite important for `IntEnum` to have the dunder methods
inherited from `int` show up in `help()`. Dunder methods indicate that an
object has certain behaviours, so it's important for a user to be able to
verify that an `IntEnum` member has
Change by Alex Waygood :
--
keywords: +patch
pull_requests: +27585
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29316
___
Python tracker
<https://bugs.python.org/issu
Change by Alex Waygood :
--
nosy: +AlexWaygood
nosy_count: 5.0 -> 6.0
pull_requests: +27583
pull_request: https://github.com/python/cpython/pull/29308
___
Python tracker
<https://bugs.python.org/issu
Change by Alex Waygood :
--
pull_requests: +27579
pull_request: https://github.com/python/cpython/pull/29309
___
Python tracker
<https://bugs.python.org/issue45
Alex Waygood added the comment:
Thanks, Łukasz and Ken, for reviewing and merging!
--
___
Python tracker
<https://bugs.python.org/issue45655>
___
___
Python-bug
Change by Alex Waygood :
--
pull_requests: +27566, 27567, 27568
pull_request: https://github.com/python/cpython/pull/29302
___
Python tracker
<https://bugs.python.org/issue45
Change by Alex Waygood :
--
pull_requests: +27566, 27567
pull_request: https://github.com/python/cpython/pull/29302
___
Python tracker
<https://bugs.python.org/issue45
Change by Alex Waygood :
--
pull_requests: +27566
pull_request: https://github.com/python/cpython/pull/29302
___
Python tracker
<https://bugs.python.org/issue45
Change by Alex Waygood :
--
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue45655>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
pull_requests: +27561
pull_request: https://github.com/python/cpython/pull/29297
___
Python tracker
<https://bugs.python.org/issue45
Alex Waygood added the comment:
It would be difficult to define methods in Enum classes if functions in the
class namespace were automatically converted into members. You can get around
this by wrapping your functions in `functools.partial` objects; see
https://stackoverflow.com/questions
Change by Alex Waygood :
--
keywords: +patch
pull_requests: +27543
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29280
___
Python tracker
<https://bugs.python.org/issu
New submission from Alex Waygood :
The list of relevant PEPs at the top of the typing docs has become too long to
be readable or helpful. It would be good if this information could be presented
in a more structured way.
--
assignee: docs@python
components: Documentation
messages
New submission from Alex Wells :
The documentation for multiprocessing.log_to_stderr() specifies that the method
takes no parameters. However, intellisense in VSCode and debugging the method
both show that there is a single parameter, "level", whose default value is
None.
Document
Alex Waygood added the comment:
Are you aware of the previously reported problems with `cached_property`?
https://bugs.python.org/issue43468
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue45
Change by Alex Waygood :
--
type: -> enhancement
versions: +Python 3.11 -Python 3.10
___
Python tracker
<https://bugs.python.org/issue45586>
___
___
Python-
Alex Waygood added the comment:
@Sergei, I believe that's a much larger issue, and one that's quite difficult
to solve. It's one of the principal reasons why `from __future__ import
annotations` behaviour wasn't made the default in Python 3.10, as was
originally the plan. (This behaviour
Change by Alex Waygood :
--
nosy: +gvanrossum, kj
___
Python tracker
<https://bugs.python.org/issue45524>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alex Waygood added the comment:
If you try running my test script with the `from __future__ import annotations`
line at the top commented out, however, the error is the same. (`from
__future__ import annotations` is obviously still there in the module that's
being imported by the test
Alex Waygood added the comment:
@Nikita, I had a go at writing some more rigorous tests regarding this issue. I
found the same thing you did -- the issue seems:
* Isolated to dataclasses specifically (doesn't occur with TypedDicts, standard
classes or NamedTuples)
* Isolated to the __init__
Alex Waygood added the comment:
Would there be interest in me submitting a PR along these lines?
> why use mro() instead of __mro__?
Er, no reason, really. To be honest, I've never really understood why Python
has both.
--
___
Pyt
Change by Alex Waygood :
Added file: https://bugs.python.org/file50383/enum_dir_output_with_patch.txt
___
Python tracker
<https://bugs.python.org/issue45535>
___
___
Alex Waygood added the comment:
I had a go at writing a patch for `__dir__` that would include any methods an
enum class had acquired through `int`/`str`/etc. mixins, while continuing to
ignore enum dunders and sunders (as is currently the case). My patch also
allows user-defined methods
Alex Zaslavskis added the comment:
On my Win11 it returns me :
C:\Users\Win10Home>wmic os get Caption,Version /value
Caption=Microsoft Windows 11 Home Single Language
Version=10.0.22000
--
___
Python tracker
<https://bugs.python.org/issu
Change by Alex Waygood :
--
pull_requests: +27353
pull_request: https://github.com/python/cpython/pull/29087
___
Python tracker
<https://bugs.python.org/issue39
Change by Alex Waygood :
--
versions: +Python 3.10, Python 3.11 -Python 3.6
___
Python tracker
<https://bugs.python.org/issue45524>
___
___
Python-bugs-list m
Alex Waygood added the comment:
Thanks @Sergei. With that alteration, I have reproduced this on Python 3.9,
3.10 and 3.11.
--
___
Python tracker
<https://bugs.python.org/issue45
Alex Waygood added the comment:
I can't reproduce this on Python 3.8.3, 3.9.6, 3.10.0 or 3.11.0a1+. Which
versions of Python have you tried this on? (I'm able to reproduce the
`typing.TypedDict` bug on Python 3.8, since the fix was only backported to 3.9,
but not this.)
--
nosy
Change by Alex Waygood :
--
keywords: +patch
pull_requests: +27305
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29034
___
Python tracker
<https://bugs.python.org/issu
Alex Waygood added the comment:
Happily, this bug appears to have been resolved in Python 3.10 due to the fact
that a `classmethod` wrapping a function `F` will now have an `__annotations__`
dict equal to `F`.
In Python 3.9:
```
>>> x = lambda y: y
>>> x.__annotations__
Change by Alex Waygood :
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue38605>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alex Waygood added the comment:
Shall I add the change to the mac file to my PR, or would it be better to leave
it for a separate PR? (I'm not confident enough to make the changes to the
Windows files.)
--
___
Python tracker
<ht
Alex Waygood added the comment:
Have posted my PR. I've tested it manually and run the IDLE test suite on it
with the `-u all` setting; it seems fine. The new tests I've written are a bit
thin on the ground right now, though. I may need some guidance/help if more
extensive tests are needed
Change by Alex Waygood :
--
keywords: +patch
pull_requests: +27239
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/28950
___
Python tracker
<https://bugs.python.org/issu
Alex Waygood added the comment:
Oh — I've already nearly finished a PR. Do you mind if I submit mine? Happy to
make any changes you like, obviously.
--
___
Python tracker
<https://bugs.python.org/issue45
Alex Waygood added the comment:
It looks like support for .py files is hardcoded into IDLE's source code in the
following places:
* browser.ModuleBrowserTreeItem.OnDoubleClick
* browser.ModuleBrowserTreeItem.IsExpandable
* browser.ModuleBrowserTreeItem.listchildren
* editor.ispythonsource
New submission from Alex Waygood :
IDLE currently does not do any syntax highlighting if you use it to open a .pyi
stub file, even though everything in a .pyi file is a valid Python expression.
It would be great if syntax highlighting for .pyi files could be supported.
--
assignee
Change by Alex Waygood :
--
title: Support syntax highlighting for .pyi stub files -> IDLE: Support syntax
highlighting for .pyi stub files
___
Python tracker
<https://bugs.python.org/issu
Alex Waygood added the comment:
Some thoughts from me, as an unqualified but interested party:
Like Randolph, I very much like having class properties in the language, and
have used them in several projects since their introduction in 3.9. I find
they're especially useful with Enums
Change by Alex Waygood :
--
nosy: +gvanrossum, kj
___
Python tracker
<https://bugs.python.org/issue45380>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alex Waygood added the comment:
It actually appears as though there is no documented way to retrieve the
metadata from an annotated alias. Is this intentional?
The metadata is stored in a `__metadata__` attribute of a
`typing._AnnotatedAlias` instance. But the `__metadata__` attribute
Change by Alex Waygood :
--
nosy: +tim.peters
title: Erroneous behaviour for abstract class properties -> Classmethod
properties are erroneously "called" in multiple modules
___
Python tracker
<https://bugs.pytho
Change by Alex Waygood :
--
versions: +Python 3.10, Python 3.11
___
Python tracker
<https://bugs.python.org/issue44904>
___
___
Python-bugs-list mailin
Change by Alex Waygood :
--
keywords: +patch
pull_requests: +27153
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28838
___
Python tracker
<https://bugs.python.org/issu
Alex Zaslavskis added the comment:
Beter solution . Using match in python 3.10
--
Added file: https://bugs.python.org/file50331/main.py
___
Python tracker
<https://bugs.python.org/issue45
Alex Zaslavskis added the comment:
That nice idea . So the dist can contain the minimal build required to say that
is for example windows 11 . The simplest solution that came in mind is . Is far
from perfect but it works.
--
Added file: https://bugs.python.org/file50330/main.py
Alex Zaslavskis added the comment:
systeminfo can be option
--
Added file: https://bugs.python.org/file50329/import subprocess.py
___
Python tracker
<https://bugs.python.org/issue45
Alex Zaslavskis added the comment:
demo.py contains dirty hack that can be used as a fix for some time before
microsoft will not fix it.
--
Added file: https://bugs.python.org/file50327/demo.py
___
Python tracker
<https://bugs.python.
Alex Zaslavskis added the comment:
The bug comes from Microsoft terminal bug : If I type there : ver it will
return Microsoft Windows [Version 10.0.22000.194] only one patch is if that
will check the build .
so :
info = subprocess.check_output(cmd
Alex Zaslavskis added the comment:
The
platform.win32_ver() returns same answer
--
___
Python tracker
<https://bugs.python.org/issue45382>
___
___
Python-bug
New submission from Alex Zaslavskis :
I am updated to windows 11 . Now I am trying to write script that will detect
is user use windows 11 or windows 10 .
I was using the simplest way as possible:
import platform
print(platform.platform())
The result I got is : Windows-10-10.0.22000-SP0
New submission from Alex Waygood :
`help()` appears confused about the module of `typing.Annotated`. If you call
`help()` on a parameterised "instance" of `typing.Annotated`, it will claim
that `Annotated` belongs to whatever module the annotated type is from.
Additionally, `help(
Alex Waygood added the comment:
See also: https://bugs.python.org/issue44904
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue45
Alex Waygood added the comment:
Related: https://bugs.python.org/issue44904
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue45
Alex Waygood added the comment:
Thanks, Serhiy, that makes sense. I'll consider raising this elsewhere, as you
suggest.
--
___
Python tracker
<https://bugs.python.org/issue35
Alex Waygood added the comment:
Thanks, Vedran. I read https://bugs.python.org/issue35712#msg349303 before
adding my message, but am not quite clear why my snippet is the same situation.
`next(filter((2).__eq__, 'text'))` surely returns 't' because `(2).__eq__('t')`
returns `NotImplemented
Alex Waygood added the comment:
The following code now leads to a `DeprecationWarning`, but I am unclear why it
should.
```
>>> from enum import Enum
>>>
>>> class CardColour(Enum):
... """Enumeration of the two colours in a pack of cards.&q
New submission from Alex Grund :
After https://bugs.python.org/issue43219 was resolved the function now shows
faulty behavior when the source is a directory:
`copy_file('/path/to/dir', '/target')` throws a FileNotFoundError while
previously it was a IsADirectoryError which is clearly correct
Alex Grund added the comment:
The changelog wrongfully links to https://bugs.python.org/issue41928 instead of
this issue.
Also the fix introduced a regression: Trying to copy a directory now raises a
FileNotFoundError
--
nosy: +Alex Grund
New submission from Alex Hall :
In this script:
import inspect
import dis
def foo(**_):
frame = inspect.currentframe().f_back
print(frame.f_lasti)
dis.dis(frame.f_code)
d = {'a': 1, 'b': 2}
foo(**d)
dis shows these instructions for `foo
Alex Waygood added the comment:
There is a similar issue with `functools.singledispatch`
```
>>> from functools import singledispatch
>>> @singledispatch
... def flip(x: str) -> int:
... """Signature when given a string"""
... ret
Alex Zaslavskis added the comment:
What about adding alert message for beginners that can stuck with that in docs?
To warn others , is that good idea you think. Or it is redundant ?
--
___
Python tracker
<https://bugs.python.org/issue45
Alex Zaslavskis added the comment:
Thanks that really works.
So as I understand that b''.split() != ''.split()
--
resolution: -> not a bug
___
Python tracker
<https://bugs.python.org/issu
Alex Zaslavskis added the comment:
Moreover according Python docs : This exception may be raised by user code to
indicate that an attempted operation on an object is not supported. But also
the Python interpreter gives that a bytes-like object is required, not 'str'
that I am already
Alex Zaslavskis added the comment:
''.split(',') # works as it should be
b''.split(',') # gives strange error message.
TypeError: a bytes-like object is required, not 'str'
The problem here is that message is saying that for fix error you should use
bytes-like object that not a true
Alex Zaslavskis added the comment:
I am not really sure that it is working as it should be. Even with your example
it gives :
TypeError: a bytes-like object is required, not 'str'
The problem is why error message says that bytes-like is required , when the
string is required
Change by Alex Zaslavskis :
Removed file: https://bugs.python.org/file50257/bug_in_python.py
___
Python tracker
<https://bugs.python.org/issue45087>
___
___
Python-bug
Change by Alex Zaslavskis :
Added file: https://bugs.python.org/file50258/bug_in_python.py
___
Python tracker
<https://bugs.python.org/issue45087>
___
___
Python-bug
Change by Alex Zaslavskis :
--
type: compile error -> behavior
___
Python tracker
<https://bugs.python.org/issue45087>
___
___
Python-bugs-list mailing list
Un
New submission from Alex Zaslavskis :
If we will try to split bytes we will got quite strange error in console.
Traceback (most recent call last):
File "C:/Users/ProAdmin/Desktop/bug_in_python.py", line 6, in
byte_message.split(",")
TypeError: a bytes-like object i
Alex Waygood added the comment:
^And, that only works for class attributes, not instance attributes.
--
___
Python tracker
<https://bugs.python.org/issue44
Alex Waygood added the comment:
Tomasz -- as discussed in the original BPO issue for `abstractmethod`
implementations (https://bugs.python.org/issue1706989), this works as a
workaround:
```
>>> from abc import ABCMeta
>>> class AbstractAttribute:
... __isabstr
Alex Waygood added the comment:
This same bug (where classmethod properties are accidentally called by other
parts of Python) is also present for non-abstract class properties, and has the
side effect of causing doctest.py to crash with a fairly incomprehensible
`AttributeError`:
Script
Alex Waygood added the comment:
+1 to this suggestion. I had a use case for this the other day. It currently
feels like something of a discrepancy between ABCs and `typing.Property`, which
can be seen as analogous in some ways to "an ABC for the static type-checker".
`typin
Alex added the comment:
It looks this is already being tracked at:
https://github.com/python/pythondotorg/issues/1708
--
___
Python tracker
<https://bugs.python.org/issue44
New submission from Alex :
Now that the docs are mobile-friendly (nice!), I noticed that the code snippets
are not using a monospace font (at least on my Android 10 + Chrome 92 device).
This misaligns the carets of the improved errors messages, for example on the
"what's new&qu
Alex Waygood added the comment:
Thanks, Raymond -- that makes sense, and seems very fair. I still think a note
somewhere in the documentation stating this might be helpful -- as a user, it
wasn't what I was expecting. I would argue this is especially true for
UserDict, a class which
Change by Alex Waygood :
--
nosy: +rhettinger, stutzbach
___
Python tracker
<https://bugs.python.org/issue44750>
___
___
Python-bugs-list mailing list
Unsub
New submission from Alex Waygood :
In a Python dictionary, `.popitem()` returns (key, value) pairs from the
dictionary in a LIFO order. `collections.OrderedDict` and `collections.Counter`
both do the same. However, a class inheriting from
`collections.abc.MutableMapping` (which includes
Alex Hall added the comment:
(meant to say "so I'm pulling in @Mark.Shannon)
--
___
Python tracker
<https://bugs.python.org/issue44576>
___
___
Pytho
Alex Hall added the comment:
I believe this is the outcome of https://bugs.python.org/issue39316 which I
filed, so I'm pulling in . Naturally I think the new behaviour is not a bug but
a feature.
I think it's more important for the traceback to show the attribute access
(`two`) than
alex rakowski added the comment:
I just noticed this issue was raised and dismissed in PEP 519 -- Adding a file
system path protocol.
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/i
New submission from alex rakowski :
Hello,
I've noticed that when type hinting paths, it often becomes a bit verbose:
from typing import Union
import pathlib
custom_path = Union[str, pathlib.Path]
def foobar(x:custom_path):
...
Writing functions which handle paths are pretty routine
New submission from Alex Hall :
Found on:
Python 3.9.5
GCC 11.1 on Linux (x86_64)
Reproduced on:
Python 3.9.5
Clang 9.0.8 Linux (arm)
When setting the recursion limit to a high enough amount, trying to reach that
recursion limit ends in a segmentation fault (stack overflow?)
code:
```py
Change by Alex DeLorenzo :
--
components: +Library (Lib)
___
Python tracker
<https://bugs.python.org/issue44176>
___
___
Python-bugs-list mailing list
Unsub
Change by Alex DeLorenzo :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue44176>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Alex DeLorenzo :
According to the documentation, asyncio.as_completed() takes a positional
argument, aws, as an iterable of awaitables[1]:
asyncio.as_completed(aws, *, loop=None, timeout=None)
Run awaitable objects in the aws iterable concurrently.
As seen
Change by Alex Willmer :
--
nosy: -Alex.Willmer
___
Python tracker
<https://bugs.python.org/issue31904>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alex Hall added the comment:
Pablo, check out https://github.com/aroberge/friendly/discussions/197,
particularly the second bullet point which has a dataset of syntax errors.
--
nosy: +alexmojaki
___
Python tracker
<https://bugs.python.
Alex Vandiver added the comment:
It seems reasonable to fail on hostnames that are too long -- but it feels like
the weirdness is that it is categorized as a UnicodeError, and not as, say, a
ValueError.
Would a re-categorization as ValueError seem like a reasonable adjustment here
Alex Mijalis added the comment:
Agreed, it would be really nice to integrate these changes. These special
fields are found in gzipped .bam files, a common DNA sequence alignment format
used in the bioinformatics community. It would be nice to be able to read and
write them with the standard
Alex added the comment:
Is there anything else I should be doing, in order to get this merged in time
for 3.10? (the PR is "awaiting merge")
For the record, the equivalent PR for PyPy is now merged in the py3.7 branch:
https://foss.heptapod.net/pypy/pypy/-/merge_requests/807.
Alex Kanitz added the comment:
Given that people were asking for real-world use cases, here's one:
high-throughput sequencing, e.g., in RNA-Seq
(https://en.wikipedia.org/wiki/RNA-Seq), typically yields either one or two
output files, depending on the type of the sequencing library
401 - 500 of 1603 matches
Mail list logo