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

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

[issue46444] Wrong value of pi for larger values using math.cos() function

2022-01-19 Thread Darshan Kanade
Darshan Kanade added the comment: The issue is that pi = k*math.cos(math.radians((90 - 180/k))) is giving wrong answer(289.384326...) for larger values of k, say k=2**62, but for smaller values say, k=100 it is giving correct answer(3.14) pi = k*math.sin(math.radians(180/k)) on the

[issue46444] Wrong value of pi for larger values using math.cos() function

2022-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, math.radians() just multiplies its argument by pi/180. And what is your issue? -- ___ Python tracker ___

[issue46444] Wrong value of pi for larger values using math.cos() function

2022-01-19 Thread Darshan Kanade
Change by Darshan Kanade : -- resolution: not a bug -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46444] Wrong value of pi for larger values using math.cos() function

2022-01-19 Thread Darshan Kanade
Change by Darshan Kanade : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46444] Wrong value of pi for larger values using math.cos() function

2022-01-19 Thread Darshan Kanade
Darshan Kanade added the comment: In the program, I did convert degrees to radians So, this was what I used- 1)pi = k*math.cos(math.radians((90 - 180/k))) 2)pi = k*math.sin(math.radians(180/k)) where k=2**62 -- ___ Python tracker

[issue46443] Deepfreeze use preallocated small ints

2022-01-19 Thread Kumar Aditya
Change by Kumar Aditya : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46444] Wrong value of pi for larger values using math.cos() function

2022-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Arguments of cos() and sin() should be in radians, not in degrees. So the correct formulas are k*cos(pi/2-pi/k) and k*sin(pi/k). They are useless because to find the pi approximation you need to know pi. -- nosy: +serhiy.storchaka resolution: ->

[issue46444] Wrong value of pi for larger values using math.cos() function

2022-01-19 Thread Darshan Kanade
New submission from Darshan Kanade : I was solving this problem to find the approximate value of pi using the Archimedes method using two different logics - 1) The first one used the formula pi = k*cos(90-180/k) but when I gave very large input, say k=2**62 sides of polygon, then it gives

[issue46443] Deepfreeze use preallocated small ints

2022-01-19 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 194ecc6d44adc1fb39a56ca696418368b69432ce by Kumar Aditya in branch 'main': bpo-46443: deepfreeze: use small ints and singleton zero bytes (GH-30715) https://github.com/python/cpython/commit/194ecc6d44adc1fb39a56ca696418368b69432ce

[issue46430] intern strings in deepfrozen modules

2022-01-19 Thread Kumar Aditya
Kumar Aditya added the comment: This speeds up comparison of strings by just comparing their pointers so it is much faster. -- ___ Python tracker ___

[issue46443] Deepfreeze use preallocated small ints

2022-01-19 Thread Kumar Aditya
New submission from Kumar Aditya : It saves space in the codeobjects created by deepfreeze and reuses already cached ints so no allocation overhead. -- ___ Python tracker ___

[issue46443] Deepfreeze use preallocated small ints

2022-01-19 Thread Kumar Aditya
Change by Kumar Aditya : -- nosy: gvanrossum, kumaraditya303 priority: normal pull_requests: 28907 severity: normal status: open title: Deepfreeze use preallocated small ints versions: Python 3.11 ___ Python tracker

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

2022-01-19 Thread Kubilay Kocak
Kubilay Kocak added the comment: I modified the systems /etc/make.conf for unrelated purposes today (adding in LASTCFLAGS among other variables). Why and how Pythons build is inheriting that is the bigger question. I wonder if its buildbot environment related. In the short term I've

[issue46255] Remove unnecessary check in _IOBase._check*() methods

2022-01-19 Thread Ma Lin
Change by Ma Lin : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

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

2022-01-19 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset a6a088548063226233c08b8d35dde130746fdd10 by Nikita Sobolev in branch '3.10': [3.10] bpo-46425: Fix direct invocation of multiple test modules (GH-30666) (GH-30699) https://github.com/python/cpython/commit/a6a088548063226233c08b8d35dde130746fdd10

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

2022-01-19 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 8105dd24112509fab2eabfce5352afc41e3a34b6 by Nikita Sobolev in branch '3.9': [3.9] bpo-46425: Fix direct invocation of multiple test modules (GH-30666) (GH-30700) https://github.com/python/cpython/commit/8105dd24112509fab2eabfce5352afc41e3a34b6

[issue38633] shutil.copystat fails with PermissionError in WSL

2022-01-19 Thread Sam Park
Sam Park added the comment: FWIW I just ran into this today on Ubuntu 18.04 container on GKE 1.21.5-gke.1302 and on a Ubuntu-with-Docker underlying node (if that's relevant). Applying the monkeypatch solves the issue as well. -- nosy: +sam.park

[issue46442] testExceptionCleanupNames doesn't test anything?

2022-01-19 Thread Yellow Dusk
New submission from Yellow Dusk : testExceptionCleanupNames() is supposed to test that the local variable bound to the exception instance is only visible inside the except block, and tests that by checking whether the name is in locals(), but it actually deletes the name before that, so it

[issue31582] Add _pth breadcrumb to sys.path documentation

2022-01-19 Thread Steve Dower
Steve Dower added the comment: Need to make this happen, and it probably needs to be me (though I'm happy to review a contribution). We now handle ._pth files on all platforms as part of the Modules/getpath.py changes (which I hinted to in my previous comment from 5 years ago ;) ).

[issue39573] [C API] Avoid accessing PyObject and PyVarObject members directly: add Py_SET_TYPE() and Py_IS_TYPE(), disallow Py_TYPE(obj)=type

2022-01-19 Thread STINNER Victor
STINNER Victor added the comment: > @victor, git bisect tells me the change > f3fa63ec75fdbb4a08a10957a5c631bf0c4a5970 caused > test_exceptions.ExceptionTests.test_recursion_in_except_handler to stack > overflow only on windows debug builds. FYI this regression was handled last year in

[issue44673] Embedded Python - local directories in pythonXX._pth

2022-01-19 Thread Steve Dower
Steve Dower added the comment: I'm afraid not. The ._pth file is intended for embedding applications that have a static set of search paths. You may want to try adding a startup file (search for PYTHONSTARTUP) that modifies sys.path directly. Or alternatively if you rename the ._pth file to

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

2022-01-19 Thread Vinay Sajip
Vinay Sajip added the comment: > Vinay would you consider a patch for logging where dictConfig allows taking > objects directly in addition to the reference id? Sorry I didn't respond to this; it dropped off my radar. Certainly, I would consider such a patch. --

[issue41711] Socker send method throws a timeout exception

2022-01-19 Thread Irit Katriel
Irit Katriel added the comment: The timeout is mentioned in the documentation of create_connection, and of its getter and setter. It applies to many operations on the socket, but not mentioned for each method. Since it's pretty standard to have a timeout for network operations, I think the

[issue39147] using zipfile with root privilege shows FileNotFoundError

2022-01-19 Thread Irit Katriel
Irit Katriel added the comment: 3.7 is no longer maintained. Please create a new issue if you are having this problem on a current version (>= 3.9). -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___

[issue39065] OSError in TarFile.getmembers()

2022-01-19 Thread Irit Katriel
Irit Katriel added the comment: Following Issue6584 it raises BadGzipFile. -- nosy: +iritkatriel ___ Python tracker ___ ___

[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

[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

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

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

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

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

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

[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 : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28905 pull_request: https://github.com/python/cpython/pull/30713 ___ Python tracker

[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

[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

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

[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

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

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

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

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

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

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

[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

[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 sparrowt
Change by sparrowt : -- keywords: +patch pull_requests: +28901 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30705 ___ Python tracker ___

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

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

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

[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

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

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

[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

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

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

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

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

[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

[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

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

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

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

[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

[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

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

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

[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

[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

[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

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

[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

[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

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

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

[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

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

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

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

[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

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

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

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

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

[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

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

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

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

[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

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

[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

[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

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

  1   2   >