[issue45680] Documentation on `GenericAlias` objects could be improved

2021-10-30 Thread Alex Waygood
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

[issue45680] Documentation on `GenericAlias` objects could be improved

2021-10-30 Thread Alex Waygood
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

[issue45680] Documentation on `GenericAlias` objects could be improved

2021-10-30 Thread Alex Waygood
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

[issue45678] `functools.singledispatchmethod` is missing tests

2021-10-30 Thread Alex Waygood
Change by Alex Waygood : -- components: +Tests -Library (Lib) ___ Python tracker <https://bugs.python.org/issue45678> ___ ___ Python-bugs-list mailing list Unsub

[issue45678] `functools.singledispatchmethod` is missing tests

2021-10-30 Thread Alex Waygood
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

[issue45678] `functools.singledispatchmethod` is missing tests

2021-10-30 Thread Alex Waygood
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

[issue45674] From Python 3.7, sre_parse.parse() do not create SubPattern instances that can be used to back reproduce original expression if containing non-capturing groups

2021-10-29 Thread Alex Waygood
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 <

[issue45535] Enum's dir() does not contain inherited members

2021-10-29 Thread Alex Waygood
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

[issue45535] Enum's dir() does not contain inherited members

2021-10-29 Thread Alex Waygood
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

[issue42280] The list of standard generic collections is incomplete

2021-10-29 Thread Alex Waygood
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

[issue45655] List of PEPs at top of typing docs is too long to be readable

2021-10-29 Thread Alex Waygood
Change by Alex Waygood : -- pull_requests: +27579 pull_request: https://github.com/python/cpython/pull/29309 ___ Python tracker <https://bugs.python.org/issue45

[issue45655] List of PEPs at top of typing docs is too long to be readable

2021-10-29 Thread Alex Waygood
Alex Waygood added the comment: Thanks, Łukasz and Ken, for reviewing and merging! -- ___ Python tracker <https://bugs.python.org/issue45655> ___ ___ Python-bug

[issue45655] List of PEPs at top of typing docs is too long to be readable

2021-10-28 Thread Alex Waygood
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

[issue45655] List of PEPs at top of typing docs is too long to be readable

2021-10-28 Thread Alex Waygood
Change by Alex Waygood : -- pull_requests: +27566, 27567 pull_request: https://github.com/python/cpython/pull/29302 ___ Python tracker <https://bugs.python.org/issue45

[issue45655] List of PEPs at top of typing docs is too long to be readable

2021-10-28 Thread Alex Waygood
Change by Alex Waygood : -- pull_requests: +27566 pull_request: https://github.com/python/cpython/pull/29302 ___ Python tracker <https://bugs.python.org/issue45

[issue45655] List of PEPs at top of typing docs is too long to be readable

2021-10-28 Thread Alex Waygood
Change by Alex Waygood : -- versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue45655> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45655] List of PEPs at top of typing docs is too long to be readable

2021-10-28 Thread Alex Waygood
Change by Alex Waygood : -- pull_requests: +27561 pull_request: https://github.com/python/cpython/pull/29297 ___ Python tracker <https://bugs.python.org/issue45

[issue45657] Enum behavior when values are functions

2021-10-28 Thread Alex Waygood
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

[issue45655] List of PEPs at top of typing docs is too long to be readable

2021-10-28 Thread Alex Waygood
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

[issue45655] List of PEPs at top of typing docs is too long to be readable

2021-10-28 Thread Alex Waygood
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

[issue45604] multiprocessing.log_to_stderr missing documentation for parameter

2021-10-25 Thread Alex Wells
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

[issue45588] cached_method similar to cached_property to cache with classes

2021-10-23 Thread Alex Waygood
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

[issue45586] Use starred expressions in list indices

2021-10-23 Thread Alex Waygood
Change by Alex Waygood : -- type: -> enhancement versions: +Python 3.11 -Python 3.10 ___ Python tracker <https://bugs.python.org/issue45586> ___ ___ Python-

[issue45524] Cross-module dataclass inheritance breaks get_type_hints

2021-10-22 Thread Alex Waygood
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

[issue45524] Cross-module dataclass inheritance breaks get_type_hints

2021-10-22 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +gvanrossum, kj ___ Python tracker <https://bugs.python.org/issue45524> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45524] Cross-module dataclass inheritance breaks get_type_hints

2021-10-22 Thread Alex Waygood
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

[issue45524] Cross-module dataclass inheritance breaks get_type_hints

2021-10-22 Thread Alex Waygood
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__

[issue45535] Enum's dir() does not contain inherited members

2021-10-22 Thread Alex Waygood
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

[issue45535] Enum's dir() does not contain inherited members

2021-10-21 Thread Alex Waygood
Change by Alex Waygood : Added file: https://bugs.python.org/file50383/enum_dir_output_with_patch.txt ___ Python tracker <https://bugs.python.org/issue45535> ___ ___

[issue45535] Enum's dir() does not contain inherited members

2021-10-21 Thread Alex Waygood
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

[issue45382] platform() is not able to detect windows 11

2021-10-21 Thread Alex Zaslavskis
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

[issue39679] functools: singledispatchmethod doesn't work with classmethod

2021-10-20 Thread Alex Waygood
Change by Alex Waygood : -- pull_requests: +27353 pull_request: https://github.com/python/cpython/pull/29087 ___ Python tracker <https://bugs.python.org/issue39

[issue45524] Cross-module dataclass inheritance breaks get_type_hints

2021-10-19 Thread Alex Waygood
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

[issue45524] Cross-module dataclass inheritance breaks get_type_hints

2021-10-19 Thread Alex Waygood
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

[issue45524] Cross-module dataclass inheritance breaks get_type_hints

2021-10-19 Thread Alex Waygood
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

[issue39679] functools: singledispatchmethod doesn't work with classmethod

2021-10-18 Thread Alex Waygood
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

[issue39679] functools: singledispatchmethod doesn't work with classmethod

2021-10-17 Thread Alex Waygood
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__

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-10-17 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood ___ Python tracker <https://bugs.python.org/issue38605> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2021-10-16 Thread Alex Waygood
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

[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2021-10-14 Thread Alex Waygood
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

[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2021-10-14 Thread Alex Waygood
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

[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2021-10-14 Thread Alex Waygood
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

[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2021-10-12 Thread Alex Waygood
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

[issue45447] Support syntax highlighting for .pyi stub files

2021-10-12 Thread Alex Waygood
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

[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2021-10-12 Thread Alex Waygood
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

[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-11 Thread Alex Waygood
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

[issue45380] help() appears confused about the module of typing.Annotated

2021-10-10 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +gvanrossum, kj ___ Python tracker <https://bugs.python.org/issue45380> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45380] help() appears confused about the module of typing.Annotated

2021-10-10 Thread Alex Waygood
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

[issue44904] Classmethod properties are erroneously "called" in multiple modules

2021-10-09 Thread Alex Waygood
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

[issue44904] Erroneous behaviour for abstract class properties

2021-10-09 Thread Alex Waygood
Change by Alex Waygood : -- versions: +Python 3.10, Python 3.11 ___ Python tracker <https://bugs.python.org/issue44904> ___ ___ Python-bugs-list mailin

[issue44904] Erroneous behaviour for abstract class properties

2021-10-09 Thread Alex Waygood
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

[issue45382] platform() is not able to detect windows 11

2021-10-07 Thread Alex Zaslavskis
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

[issue45382] platform() is not able to detect windows 11

2021-10-07 Thread Alex Zaslavskis
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

[issue45382] platform() is not able to detect windows 11

2021-10-07 Thread Alex Zaslavskis
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

[issue45382] platform() is not able to detect windows 11

2021-10-05 Thread Alex Zaslavskis
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.

[issue45382] platform() is not able to detect windows 11

2021-10-05 Thread Alex Zaslavskis
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

[issue45382] platform() is not able to detect windows 11

2021-10-05 Thread Alex Zaslavskis
Alex Zaslavskis added the comment: The platform.win32_ver() returns same answer -- ___ Python tracker <https://bugs.python.org/issue45382> ___ ___ Python-bug

[issue45382] platform() is not able to detect windows 11

2021-10-05 Thread Alex Zaslavskis
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

[issue45380] help() appears confused about the module of typing.Annotated

2021-10-05 Thread Alex Waygood
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(

[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-03 Thread Alex Waygood
Alex Waygood added the comment: See also: https://bugs.python.org/issue44904 -- nosy: +AlexWaygood ___ Python tracker <https://bugs.python.org/issue45

[issue45282] isinstance(x, typing.Protocol-class) unexpectedly evaluates properties

2021-09-24 Thread Alex Waygood
Alex Waygood added the comment: Related: https://bugs.python.org/issue44904 -- nosy: +AlexWaygood ___ Python tracker <https://bugs.python.org/issue45

[issue35712] Make NotImplemented unusable in boolean context

2021-09-20 Thread Alex Waygood
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

[issue35712] Make NotImplemented unusable in boolean context

2021-09-20 Thread Alex Waygood
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

[issue35712] Make NotImplemented unusable in boolean context

2021-09-20 Thread Alex Waygood
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

[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-17 Thread Alex Grund
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

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-17 Thread Alex Grund
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

[issue45108] frame.f_lasti points at DICT_MERGE instead of CALL_FUNCTION_EX in Windows only

2021-09-05 Thread Alex Hall
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

[issue45100] Teach help about typing.overload()

2021-09-05 Thread Alex Waygood
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

[issue45087] Confusing error message when trying split bytes.

2021-09-02 Thread Alex Zaslavskis
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

[issue45087] Confusing error message when trying split bytes.

2021-09-02 Thread Alex Zaslavskis
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

[issue45087] Confusing error message when trying split bytes.

2021-09-02 Thread Alex Zaslavskis
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

[issue45087] Confusing error message when trying split bytes.

2021-09-02 Thread Alex Zaslavskis
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

[issue45087] Confusing error message when trying split bytes.

2021-09-02 Thread Alex Zaslavskis
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

[issue45087] Confusing error message when trying split bytes.

2021-09-02 Thread Alex Zaslavskis
Change by Alex Zaslavskis : Removed file: https://bugs.python.org/file50257/bug_in_python.py ___ Python tracker <https://bugs.python.org/issue45087> ___ ___ Python-bug

[issue45087] Confusing error message when trying split bytes.

2021-09-02 Thread Alex Zaslavskis
Change by Alex Zaslavskis : Added file: https://bugs.python.org/file50258/bug_in_python.py ___ Python tracker <https://bugs.python.org/issue45087> ___ ___ Python-bug

[issue45087] Confusing error message when trying split bytes.

2021-09-02 Thread Alex Zaslavskis
Change by Alex Zaslavskis : -- type: compile error -> behavior ___ Python tracker <https://bugs.python.org/issue45087> ___ ___ Python-bugs-list mailing list Un

[issue45087] Confusing error message when trying split bytes.

2021-09-02 Thread Alex Zaslavskis
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

[issue44905] Abstract instance and class attributes for abstract base classes

2021-08-16 Thread Alex Waygood
Alex Waygood added the comment: ^And, that only works for class attributes, not instance attributes. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44905] Abstract instance and class attributes for abstract base classes

2021-08-16 Thread Alex Waygood
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

[issue44904] Erroneous behaviour for abstract class properties

2021-08-15 Thread Alex Waygood
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

[issue44905] Abstract instance and class attributes for abstract base classes

2021-08-13 Thread Alex Waygood
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

[issue44776] Docs on mobile do not use monospace font for code snippets, misaligning carets of improved error messages

2021-07-30 Thread Alex
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

[issue44776] Docs on mobile do not use monospace font for code snippets, misaligning carets of improved error messages

2021-07-30 Thread Alex
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

[issue44750] .popitem() is inconsistent in collections and collections.abc

2021-07-27 Thread Alex Waygood
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

[issue44750] .popitem() is inconsistent in collections and collections.abc

2021-07-27 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +rhettinger, stutzbach ___ Python tracker <https://bugs.python.org/issue44750> ___ ___ Python-bugs-list mailing list Unsub

[issue44750] .popitem() is inconsistent in collections and collections.abc

2021-07-27 Thread Alex Waygood
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

[issue44576] AttributeError: incorrect line identified in Python 3.10

2021-07-07 Thread Alex Hall
Alex Hall added the comment: (meant to say "so I'm pulling in @Mark.Shannon) -- ___ Python tracker <https://bugs.python.org/issue44576> ___ ___ Pytho

[issue44576] AttributeError: incorrect line identified in Python 3.10

2021-07-07 Thread Alex Hall
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

[issue44509] Build in type alias for paths

2021-06-25 Thread alex rakowski
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

[issue44509] Build in type alias for paths

2021-06-25 Thread alex rakowski
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

[issue44393] segfault with sys.setrecursionlimit

2021-06-11 Thread Alex Hall
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

[issue44176] asyncio.as_completed() raises TypeError when the first supplied parameter is a generator that yields awaitables

2021-05-18 Thread Alex DeLorenzo
Change by Alex DeLorenzo : -- components: +Library (Lib) ___ Python tracker <https://bugs.python.org/issue44176> ___ ___ Python-bugs-list mailing list Unsub

[issue44176] asyncio.as_completed() raises TypeError when the first supplied parameter is a generator that yields awaitables

2021-05-18 Thread Alex DeLorenzo
Change by Alex DeLorenzo : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue44176> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue44176] asyncio.as_completed() raises TypeError when the first supplied parameter is a generator that yields awaitables

2021-05-18 Thread Alex DeLorenzo
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

[issue31904] Python should support VxWorks RTOS

2021-05-08 Thread Alex Willmer
Change by Alex Willmer : -- nosy: -Alex.Willmer ___ Python tracker <https://bugs.python.org/issue31904> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43121] Incorrect SyntaxError message for missing comma (3.10.a5)

2021-05-04 Thread Alex Hall
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.

[issue32958] socket module calls with long host names can fail with idna codec error

2021-04-26 Thread Alex Vandiver
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

[issue17681] Work with an extra field of gzip and zip files

2021-04-22 Thread Alex Mijalis
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

[issue43399] xml.etree.ElementTree.extend does not work with iterators when using the Python implementation

2021-03-30 Thread Alex
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.

[issue11354] argparse: nargs could accept range of options count

2021-03-20 Thread Alex Kanitz
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

<    1   2   3   4   5   6   7   8   9   10   >