[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

[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 ___

[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

[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)

[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)

[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 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)

[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 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

[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 ___

[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
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

[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 ___

[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 ___

[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 ___

[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 --

[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.

[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

[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

[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

[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

[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 ___ ___

[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

[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:

[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

[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,

<    1   2