[issue37295] Possible optimizations for math.comb()

2022-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: All this should be tested with the C implementation because relative cost of operations is different in C and Python. I have tested Raymond's idea about using iterative algorithm for small k. $ ./python -m timeit -s 'from math import comb' "comb(3329023, 3

[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

2022-01-19 Thread Hai Shi
Hai Shi added the comment: > If not, I'd like to close this (with apologies for not doing my research and > letting Hai Shi do unmerged work). > If a use case is found, I suspect it'll need a different solution – perhaps > allowing PyType_Slot·s OK, I close this bpo. We can reopen or create a

[issue46422] Why do we need `dis.Positions`?

2022-01-19 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: The initial aim of the dis.Positions was to provide an interface like AST nodes. So you could do for instr in dis.Bytecode(source): print("located in: ", instr.positions.lineno) instead of for instr in dis.Bytecode(source): if instr.positions:

[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers

2022-01-19 Thread Alex Waygood
Alex Waygood added the comment: I agree with Inada that not every internal type should be exposed, but I would make an exception for the dict views classes due to the fact that dict subclasses are much more common than subclasses of other mappings, such as OrderedDict. I don't think it's *par

[issue37422] Documentation on the change of __path__ in Python 3

2022-01-19 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> not a bug stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Pytho

[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers

2022-01-19 Thread Inada Naoki
Inada Naoki added the comment: > I agree with Inada that not every internal type should be exposed, but I > would make an exception for the dict views classes due to the fact that dict > subclasses are much more common than subclasses of other mappings, such as > OrderedDict. I don't think i

[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers

2022-01-19 Thread Inada Naoki
Inada Naoki added the comment: In other words, a. If `.keys()` in all dict subclasses must return subclass of `dict_keys`: `dict.keys() -> dict_keys`. b. If `.keys().mapping` must be accessible for all dict subclasses: Add `.mapping` to `KeysView`. c. If `.keys().mapping` is optional for dic

[issue37295] Possible optimizations for math.comb()

2022-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: comb(n, k) can be computed as perm(n, k) // factorial(k). $ ./python -m timeit -r1 -n1 -s 'from math import comb' "comb(100, 50)" recursive: 1 loop, best of 1: 9.16 sec per loop iterative: 1 loop, best of 1: 164 sec per loop $ ./python -m timeit -r1

[issue38561] [doc] multiprocessing.Queue fails intermittently with "Broken pipe"

2022-01-19 Thread Irit Katriel
Irit Katriel added the comment: I don't think you're supposed to close the queue more than once. The documentation can be improved on that. Currently the documentation of close is: close() Indicate that no more data will be put on this queue by the current process. The background thread will

[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers

2022-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I share concerns of Inada-san. I also think that keeping a status quo (ignoring the mapping attribute in typing) is the lesser evil. I am not sure that exposing this attribute was a good idea. We do not expose attributes list and index for list iterators.

[issue43869] Fix documentation of epoch/time.time

2022-01-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset a847785b40ed8819bde2dac5849dc31d15e99a74 by Victor Stinner in branch 'main': bpo-43869: Time Epoch is the same on all platforms (GH-30664) https://github.com/python/cpython/commit/a847785b40ed8819bde2dac5849dc31d15e99a74 --

[issue43869] Fix documentation of epoch/time.time

2022-01-19 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue46425] Multiple test modules fail to run if invoked directly

2022-01-19 Thread Nikita Sobolev
Change by Nikita Sobolev : -- pull_requests: +28881 pull_request: https://github.com/python/cpython/pull/30682 ___ Python tracker ___ __

[issue46422] Why do we need `dis.Positions`?

2022-01-19 Thread Nikita Sobolev
Nikita Sobolev added the comment: Ok then, I will send my option `2` proposal to fix this later today. -- ___ Python tracker ___ __

[issue46430] intern strings in deepfrozen modules

2022-01-19 Thread Kumar Aditya
Change by Kumar Aditya : -- nosy: gvanrossum, kumaraditya303 priority: normal severity: normal status: open title: intern strings in deepfrozen modules versions: Python 3.11 ___ Python tracker ___

[issue46430] intern strings in deepfrozen modules

2022-01-19 Thread Kumar Aditya
Change by Kumar Aditya : -- keywords: +patch pull_requests: +28882 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30683 ___ Python tracker ___ ___

[issue46430] intern strings in deepfrozen modules

2022-01-19 Thread Kumar Aditya
New submission from Kumar Aditya : Interns strings in deep-frozen modules. See https://github.com/faster-cpython/ideas/issues/218 -- ___ Python tracker ___ ___

[issue22039] PyObject_SetAttr doesn't mention value = NULL

2022-01-19 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +28883 pull_request: https://github.com/python/cpython/pull/30684 ___ Python tracker _

[issue22039] PyObject_SetAttr doesn't mention value = NULL

2022-01-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +28884 pull_request: https://github.com/python/cpython/pull/30685 ___ Python tracker ___ __

[issue22039] PyObject_SetAttr doesn't mention value = NULL

2022-01-19 Thread Irit Katriel
Irit Katriel added the comment: New changeset 3bf6315c4cabf72d64e65e6f85bf72c65137255a by Irit Katriel in branch 'main': bpo-22039: [doc] clarify that there are no plans to disable deleting an attribute via PyObject_SetAttr (GH-30639) https://github.com/python/cpython/commit/3bf6315c4cabf72d

[issue22039] PyObject_SetAttr doesn't mention value = NULL

2022-01-19 Thread Irit Katriel
Change by Irit Katriel : -- resolution: duplicate -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue22039] PyObject_SetAttr doesn't mention value = NULL

2022-01-19 Thread miss-islington
miss-islington added the comment: New changeset 7b694b816f30c463ffcab0952d3319320d23e154 by Miss Islington (bot) in branch '3.9': [3.9] bpo-22039: [doc] clarify that there are no plans to disable deleting an attribute via PyObject_SetAttr (GH-30639) (GH-30685) https://github.com/python/cpyth

[issue22039] PyObject_SetAttr doesn't mention value = NULL

2022-01-19 Thread Irit Katriel
Irit Katriel added the comment: New changeset 0861a50bd434d1f3e12fe7122e37356f1fce93dc by Miss Islington (bot) in branch '3.10': bpo-22039: [doc] clarify that there are no plans to disable deleting an attribute via PyObject_SetAttr (GH-30639) (GH-30684) https://github.com/python/cpython/comm

[issue38912] test_asyncio altered the execution environment

2022-01-19 Thread Kumar Aditya
Kumar Aditya added the comment: See https://github.com/python/cpython/pull/30274 test_asyncio is always failing with env changed. -- nosy: +kumaraditya303 status: pending -> open ___ Python tracker

[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

2022-01-19 Thread Irit Katriel
Irit Katriel added the comment: Is there anything more to do here? -- nosy: +iritkatriel resolution: -> fixed status: open -> pending ___ Python tracker ___ _

[issue46431] Trouble subclassing ExceptionGroup

2022-01-19 Thread Petr Viktorin
New submission from Petr Viktorin : I want to test a web application by crawling every reachable page. If an error occurs, I need to keep track of the page the error occured at (and additional info like what links were followed to get to the page, so a `__note__` string isn't enough). This in

[issue46431] Trouble subclassing ExceptionGroup

2022-01-19 Thread Irit Katriel
Irit Katriel added the comment: We probably do need better documentation for subclassing ExceptionGroup. When you subclass an ExceptionGroup you want to make sure that split() and subgroup() (which are used by except*) will continue working, usually by defining a derive() method: https://do

[issue43079] wrong IP address range given for ipv4_mapped

2022-01-19 Thread jiahua wang
Change by jiahua wang : -- keywords: +patch nosy: +wangjiahua nosy_count: 2.0 -> 3.0 pull_requests: +28885 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30687 ___ Python tracker ___

[issue46376] PyMapping_Check returns 1 for list

2022-01-19 Thread Petr Viktorin
Petr Viktorin added the comment: Changing the existing functions is a no-go for backwards compatibility reasons. I think the best way forward would be to add a new function, and then possibly deprecate the old one if it's deemed dangerous. If you want to push this forward, could you summariz

[issue46431] Trouble subclassing ExceptionGroup

2022-01-19 Thread Irit Katriel
Irit Katriel added the comment: Re the exceptions attribute - I don't think there's a reason not to document it, I can add that (it is mentioned in the PEP). -- ___ Python tracker __

[issue46431] Trouble subclassing ExceptionGroup

2022-01-19 Thread Irit Katriel
Irit Katriel added the comment: For your use case - can you just assign the task to a field on the exception other than __note__? The only reason we needed __note__ as an official feature is because we want the interpreter's traceback code to use it. But I think you can assign any field to

[issue46431] Trouble subclassing ExceptionGroup

2022-01-19 Thread Petr Viktorin
Petr Viktorin added the comment: Thanks for looking into it! > If you don't define derive the superclass constructor is used, which means > you get something of type ExceptionGroup, not your subclass. That might be fine in my case (for a MVP at least). Is there any other danger in not overr

[issue46431] Trouble subclassing ExceptionGroup

2022-01-19 Thread Petr Viktorin
Petr Viktorin added the comment: > can you just assign the task to a field on the exception other than __note__? That might work, but I'm afraid of touching namespaces I don't own. If the subclass is feasible, I'd rather go with that. -- ___ Pytho

[issue46376] PyMapping_Check returns 1 for list

2022-01-19 Thread Aviram
Aviram added the comment: Sure, I will do so. The proposal should be written here, right? -- ___ Python tracker ___ ___ Python-bugs

[issue46416] Direct invocation of `Lib/test/test_typing.py` fails

2022-01-19 Thread Ken Jin
Ken Jin added the comment: New changeset 2792d6d18eab3efeb71e6397f88db86e610541f1 by Nikita Sobolev in branch 'main': bpo-46416: Allow direct invocation of `Lib/test/test_typing.py` (GH-30641) https://github.com/python/cpython/commit/2792d6d18eab3efeb71e6397f88db86e610541f1 -- nosy:

[issue46376] PyMapping_Check returns 1 for list

2022-01-19 Thread Petr Viktorin
Petr Viktorin added the comment: I'd post it to capi-sig, or to the existing thread on python-dev. But here's a good place too, especially if you want feedback from a smaller group of people first. -- ___ Python tracker

[issue46431] Trouble subclassing ExceptionGroup

2022-01-19 Thread Irit Katriel
Irit Katriel added the comment: > Is there any other danger in not overriding it? No issue as long as you don't use split()/subgroup() or except*. -- ___ Python tracker ___ _

[issue46431] Trouble subclassing ExceptionGroup

2022-01-19 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +gvanrossum, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue46231] grammar rule definition is missing: invalid_double_starred_kvpairs

2022-01-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 353674f289076eecf848d7a26871cce529b89a98 by Miss Islington (bot) in branch '3.9': bpo-46231: Remove invalid_* rules preceded by more tokens from the grammar docs (GH-30341) (GH-30392) https://github.com/python/cpython/commit/353674f28907

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

2022-01-19 Thread Ken Jin
Ken Jin added the comment: New changeset 0eae9a2a2db6cc5a72535f61bb988cc417011640 by Alex Waygood in branch 'main': bpo-45680: Clarify documentation on ``GenericAlias`` objects (GH-29335) https://github.com/python/cpython/commit/0eae9a2a2db6cc5a72535f61bb988cc417011640 -- _

[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers

2022-01-19 Thread Guido van Rossum
Guido van Rossum added the comment: Given all this discussion I defer to Serhiy and Inada-San. On Wed, Jan 19, 2022 at 02:23 Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > I share concerns of Inada-san. I also think that keeping a status quo > (ignoring the mapping attr

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

2022-01-19 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +28887 pull_request: https://github.com/python/cpython/pull/30689 ___ Python tracker ___ ___ P

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

2022-01-19 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +2 pull_request: https://github.com/python/cpython/pull/30690 ___ Python tracker ___ ___ P

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

2022-01-19 Thread miss-islington
miss-islington added the comment: New changeset 24d0b331e81b4e4af8dd4c1b66ea7159c1fdabc5 by Miss Islington (bot) in branch '3.10': [3.10] bpo-45680: Clarify documentation on ``GenericAlias`` objects (GH-29335) (GH-30688) https://github.com/python/cpython/commit/24d0b331e81b4e4af8dd4c1b66ea71

[issue46424] `typing.Annotated` one type argument usage is not covered in tests

2022-01-19 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +28889 pull_request: https://github.com/python/cpython/pull/30691 ___ Python tracker _

[issue46424] `typing.Annotated` one type argument usage is not covered in tests

2022-01-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +28890 pull_request: https://github.com/python/cpython/pull/30692 ___ Python tracker ___ __

[issue46413] `__or__` is not covered for `_GenericAlias` and `_SpecialGenericAlias` in `typing`

2022-01-19 Thread Ken Jin
Ken Jin added the comment: New changeset 0a49148e87cca11e3820cbff2abfd316986a68c6 by Nikita Sobolev in branch 'main': bpo-46413: properly test `__{r}or__` code paths in `_SpecialGenericAlias` (GH-30640) https://github.com/python/cpython/commit/0a49148e87cca11e3820cbff2abfd316986a68c6 -

[issue46413] `__or__` is not covered for `_GenericAlias` and `_SpecialGenericAlias` in `typing`

2022-01-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +28892 pull_request: https://github.com/python/cpython/pull/30694 ___ Python tracker ___ __

[issue46413] `__or__` is not covered for `_GenericAlias` and `_SpecialGenericAlias` in `typing`

2022-01-19 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +28891 pull_request: https://github.com/python/cpython/pull/30693 ___ Python tracker _

[issue46432] AMD64 FreeBSD Shared 3.x buildbot fails to build: error: error reading 'LASTCFLAGS'

2022-01-19 Thread STINNER Victor
New submission from STINNER Victor : The AMD64 FreeBSD Shared 3.x buildbot worker fails to build Python with the following error message: error reading 'LASTCFLAGS' The first failure was today (January 19, 2022) at build 1513: https://buildbot.python.org/all/#/builders/483/builds/1513 --

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

2022-01-19 Thread Ken Jin
Ken Jin added the comment: New changeset 1faf7c4effbe8b66f9b0347cab570fb3b5c91fb0 by Ken Jin in branch 'main': bpo-45680: Minor formatting fix in stdtypes.rst (GH-30690) https://github.com/python/cpython/commit/1faf7c4effbe8b66f9b0347cab570fb3b5c91fb0 -- ___

[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers

2022-01-19 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I see the concerns about exposing too many implementation details. But I'm also not sure how much this will really help static typing use cases. Alex's examples just call super().keys(), but if you do that, there's not much point in overriding keys() in the

[issue46098] Missing test for multi-line errors in traceback

2022-01-19 Thread Russel Webber
Russel Webber added the comment: I have added a test that I think covers this case. -- keywords: +patch message_count: 1.0 -> 2.0 nosy: +RusselWebber nosy_count: 3.0 -> 4.0 pull_requests: +28893 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30695 ___

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-01-19 Thread Petr Viktorin
New submission from Petr Viktorin : I'm looking at the _PyType_GetModuleByDef optimization in https://github.com/python/cpython/pull/25504/files -- previously I assumed it's OK since it passed review. But it doesn't look correct: - in the `_PyType_HasFeature` assert, we should be looking at `

[issue46424] `typing.Annotated` one type argument usage is not covered in tests

2022-01-19 Thread miss-islington
miss-islington added the comment: New changeset baf26d07a634b0ea3ff052716bdeaee985b3a3a9 by Miss Islington (bot) in branch '3.10': bpo-46424: [typing] cover `Annotation[arg]` invalid usage in tests (GH-30663) https://github.com/python/cpython/commit/baf26d07a634b0ea3ff052716bdeaee985b3a3a9

[issue27022] expose sendmmsg() syscall in sockets API

2022-01-19 Thread honglei jiang
honglei jiang added the comment: any plan for it? -- nosy: +honglei.jiang versions: +Python 3.11 -Python 3.6 ___ Python tracker ___ ___

[issue46424] `typing.Annotated` one type argument usage is not covered in tests

2022-01-19 Thread miss-islington
miss-islington added the comment: New changeset 331378dffc334c1f05ab3152c87f46cd9155e169 by Miss Islington (bot) in branch '3.9': [3.9] bpo-46424: [typing] cover `Annotation[arg]` invalid usage in tests (GH-30663) (GH-30692) https://github.com/python/cpython/commit/331378dffc334c1f05ab3152c8

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

2022-01-19 Thread Ken Jin
Ken Jin added the comment: New changeset 00645166b64e68001a425a15281a1ccdcb78f818 by Ken Jin in branch '3.9': [3.9] bpo-45680: Clarify documentation on ``GenericAlias`` objects (GH-29335) (GH-30689) https://github.com/python/cpython/commit/00645166b64e68001a425a15281a1ccdcb78f818 -

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

2022-01-19 Thread Ken Jin
Ken Jin added the comment: Phew, we're finally done. Thanks Alex for the PRs, and Łukasz, Guido (and many others) for all the reviews! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-01-19 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +28894 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30696 ___ Python tracker ___ __

[issue46413] `__or__` is not covered for `_GenericAlias` and `_SpecialGenericAlias` in `typing`

2022-01-19 Thread miss-islington
miss-islington added the comment: New changeset 39374c44d98b470213256ceead0e2b4e44b14b92 by Miss Islington (bot) in branch '3.10': [3.10] bpo-46413: properly test `__{r}or__` code paths in `_SpecialGenericAlias` (GH-30640) (GH-30694) https://github.com/python/cpython/commit/39374c44d98b47021

[issue46413] `__or__` is not covered for `_GenericAlias` and `_SpecialGenericAlias` in `typing`

2022-01-19 Thread Ken Jin
Change by Ken Jin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 ___ Python tracker ___ __

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

2022-01-19 Thread Alex Waygood
Alex Waygood added the comment: Wait... there's still PR 29479 open! But that can wait a little while -- getting PR 29335 over the line is definitely worth celebrating!! -- ___ Python tracker _

[issue46434] pdb help fails with AttributeError when using Windows embeddable package

2022-01-19 Thread sparrowt
New submission from sparrowt : When running python from an embeddable windows zip file such as: https://www.python.org/ftp/python/3.9.10/python-3.9.10-embed-amd64.zip the `help` command within `pdb` is broken due to missing docstrings, as demonstrated below. Python 3.9.10 (tags/v3.9.10:f2f3f5

[issue46434] pdb help fails with AttributeError when using Windows embeddable package

2022-01-19 Thread sparrowt
sparrowt added the comment: Perhaps we should have a more generic check for `command.__doc__` as it appears this is a case not handled by the existing `sys.flags.optimize >= 2` check? https://github.com/python/cpython/blob/v3.9.10/Lib/pdb.py#L1492-L1496 -- __

[issue46416] Direct invocation of `Lib/test/test_typing.py` fails

2022-01-19 Thread Nikita Sobolev
Change by Nikita Sobolev : -- pull_requests: +28895 pull_request: https://github.com/python/cpython/pull/30697 ___ Python tracker ___ __

[issue46416] Direct invocation of `Lib/test/test_typing.py` fails

2022-01-19 Thread Nikita Sobolev
Change by Nikita Sobolev : -- pull_requests: +28896 pull_request: https://github.com/python/cpython/pull/30698 ___ Python tracker ___ __

[issue27318] Add support for symlinks to zipfile

2022-01-19 Thread Henry Schreiner
Change by Henry Schreiner : -- nosy: +Henry Schreiner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue46435] MessageID parser can crash with IndexError: string index out of range

2022-01-19 Thread bpoaugust
New submission from bpoaugust : The Message-ID parser can crash on truncated input. For example: import email.policy message=email.message_from_string("Message-id: message['Message-id'] File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/email/message.py", line 391

[issue46425] Multiple test modules fail to run if invoked directly

2022-01-19 Thread Nikita Sobolev
Change by Nikita Sobolev : -- pull_requests: +28897 pull_request: https://github.com/python/cpython/pull/30699 ___ Python tracker ___ __

[issue46425] Multiple test modules fail to run if invoked directly

2022-01-19 Thread Nikita Sobolev
Change by Nikita Sobolev : -- pull_requests: +28898 pull_request: https://github.com/python/cpython/pull/30700 ___ Python tracker ___ __

[issue46436] Pass the -d/--directory command-line option to http.server.CGIHTTPRequestHandler

2022-01-19 Thread Géry
New submission from Géry : The API of [`http.server`](https://docs.python.org/3/library/http.server.html) supports the `directory` optional parameter for `CGIHTTPRequestHandler` (which is inherited from `SimpleHTTPRequestHandler`). The CLI of `http.server` supports the corresponding `-d/--dire

[issue46437] Non-required `hasattr` checks in `test_typing`

2022-01-19 Thread Nikita Sobolev
New submission from Nikita Sobolev : There are several legacy `hasattr` checks that are always `True` in newer Python versions: 1. https://github.com/python/cpython/blob/d45cd2d20770f72a000ba6dfa9ac88dd49423c27/Lib/test/test_typing.py#L3516 2. https://github.com/python/cpython/blob/d45cd2d20

[issue46437] Non-required `hasattr` checks in `test_typing`

2022-01-19 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +kj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue46437] Non-required `hasattr` checks in `test_typing`

2022-01-19 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28900 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30704 ___ Python tracker ___ _

[issue46434] pdb help fails with AttributeError when using Windows embeddable package

2022-01-19 Thread sparrowt
Change by sparrowt : -- keywords: +patch pull_requests: +28901 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30705 ___ Python tracker ___ ___

[issue44408] imaplib fails when server sends extra blank line after literal value

2022-01-19 Thread John L
John L added the comment: It causes an exception and traceback, don't remember which exception six months later. I'll see if I can add a suitable test case to the unit test. -- ___ Python tracker _

[issue46434] pdb help fails with AttributeError when using Windows embeddable package

2022-01-19 Thread Steve Dower
Steve Dower added the comment: The PR looks good. I assume you've started the CLA process, so once that clears we'll be fine to merge. -- versions: -Python 3.7, Python 3.8 ___ Python tracker __

[issue46416] Direct invocation of `Lib/test/test_typing.py` fails

2022-01-19 Thread Nikita Sobolev
Change by Nikita Sobolev : -- pull_requests: +28903 pull_request: https://github.com/python/cpython/pull/30707 ___ Python tracker ___ __

[issue46436] Pass the -d/--directory command-line option to http.server.CGIHTTPRequestHandler

2022-01-19 Thread Géry
Change by Géry : -- nosy: -docs@python ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue38938] Possible performance improvement for heapq.merge()

2022-01-19 Thread Bar Harel
Change by Bar Harel : -- nosy: +bar.harel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue46438] Static linking _decimal module breaks test_freeze

2022-01-19 Thread Steve Dower
New submission from Steve Dower : After applying this patch on Linux, test_freeze_simple_script (test.test_tools.test_freeze.TestFreeze) fails. diff --git a/Modules/Setup b/Modules/Setup index d3647ecb99..c41bcac453 100644 --- a/Modules/Setup +++ b/Modules/Setup @@ -135,7 +135,7 @@ PYTHONPATH=

[issue41906] logging.config.dictConfig does not work with callable filters

2022-01-19 Thread Petr
Petr added the comment: I would definitely vote for implementing this enhancement. I have just ran into the very same issue and my search ended here. Using dictConfig e.g. with lambdas seems very natural to me and I understood the docs incorrectly exactly as had been reported. -- no

[issue44667] tokenize.py emits spurious NEWLINE if file ends on a comment without a newline

2022-01-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: This appears to have been a duplicate of #35107, where the failing example was '#' and it was NL, NEWLINE pair was noted. So this either predates 3.9 or was re-introduced. In any case, thanks for the fix. -- nosy: +terry.reedy

[issue35107] untokenize() fails on tokenize output when a newline is missing

2022-01-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: pending -> closed superseder: -> tokenize.py emits spurious NEWLINE if file ends on a comment without a newline ___ Python tracker

[issue44667] tokenize.py emits spurious NEWLINE if file ends on a comment without a newline

2022-01-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: #44667 -- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8 ___ Python tracker ___ ___

[issue35107] untokenize() fails on tokenize output when a newline is missing

2022-01-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: #44667 tokenize.py emits spurious NEWLINE if file ends on a comment without a newline Fixed on 3.11, 3.10, 3.9 Aug 2021. -- ___ Python tracker _

[issue44667] tokenize.py emits spurious NEWLINE if file ends on a comment without a newline

2022-01-19 Thread Terry J. Reedy
Change by Terry J. Reedy : -- Removed message: https://bugs.python.org/msg410981 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue46439] Clarify urllib.request.add_header documentation

2022-01-19 Thread Ashwin Ramaswami
New submission from Ashwin Ramaswami : We should add a note that headers added via urllib.request.add_header are added to redirected requests. It isn't immediately clear upon reading the documentation that this is the case. -- assignee: docs@python components: Documentation messages:

[issue46440] ArgumentParser.parse_args exits on missing required argument with exit_on_error=False

2022-01-19 Thread Daniel Schulte
New submission from Daniel Schulte : When calling ArgumentParser.parse_args(list_of_things_to_parse) sys.exit gets called even though the parser was constructed with exit_on_error=False. It doesn't matter if the parser has any subparsers added or not. The docs say > Normally, when you pass an

[issue46439] Clarify urllib.request.add_header documentation

2022-01-19 Thread Ashwin Ramaswami
Change by Ashwin Ramaswami : -- keywords: +patch pull_requests: +28904 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30708 ___ Python tracker ___

[issue46437] Non-required `hasattr` checks in `test_typing`

2022-01-19 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28905 pull_request: https://github.com/python/cpython/pull/30713 ___ Python tracker _

[issue46437] Non-required `hasattr` checks in `test_typing`

2022-01-19 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 263c0dd16017613c5ea2fbfc270be4de2b41b5ad by Nikita Sobolev in branch 'main': bpo-46437: remove useless `hasattr` from `test_typing` (#30704) https://github.com/python/cpython/commit/263c0dd16017613c5ea2fbfc270be4de2b41b5ad -- nosy: +

[issue46437] Non-required `hasattr` checks in `test_typing`

2022-01-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +28906 pull_request: https://github.com/python/cpython/pull/30714 ___ Python tracker ___ __

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-01-19 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue46437] Non-required `hasattr` checks in `test_typing`

2022-01-19 Thread miss-islington
miss-islington added the comment: New changeset 3b51926ee9838e746a5cdb08c7eb985646bd133c by Miss Islington (bot) in branch '3.9': bpo-46437: remove useless `hasattr` from `test_typing` (GH-30704) https://github.com/python/cpython/commit/3b51926ee9838e746a5cdb08c7eb985646bd133c -- _

[issue46437] Non-required `hasattr` checks in `test_typing`

2022-01-19 Thread miss-islington
miss-islington added the comment: New changeset 07b12fdf5545a20e0fb7be9d6ad35344337e00ae by Miss Islington (bot) in branch '3.10': bpo-46437: remove useless `hasattr` from `test_typing` (GH-30704) https://github.com/python/cpython/commit/07b12fdf5545a20e0fb7be9d6ad35344337e00ae --

[issue34526] Path.relative_to() taking multiple arguments could be better documented

2022-01-19 Thread Barney Gale
Change by Barney Gale : -- nosy: +barneygale ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue46441] Caret points to wrong line on 'return yield 42' in REPL

2022-01-19 Thread Guido van Rossum
New submission from Guido van Rossum : This seems to happen in 3.11 in the REPL only. >>> def f(): ... print(0) ... return yield 42 File "", line 3 def f(): ^ SyntaxError: invalid syntax Note that running it from a file gives the expected output: PS C:\Users\gvanrossum\c

[issue28970] ctypes.from_buffer counterpart to actively remove the mapping

2022-01-19 Thread Irit Katriel
Irit Katriel added the comment: Have you tried Mark Tolonen's suggestion on the stack overflow question, to set the instance variables to None in __exit__? -- nosy: +iritkatriel resolution: -> not a bug status: open -> pending ___ Python tracker

  1   2   >