[issue46162] Make `builtins.property` generic

2022-01-11 Thread Nikita Sobolev
Nikita Sobolev added the comment: Looks like no one showed much interest in it :( So, yeah, closing it is probably the best idea. Thanks everyone! -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue46340] DeprecationWarning emitted when running asyncio tests

2022-01-11 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Providing some more background, based on the changes proposed by Kumar in GH-30486: asyncio.get_event_loop() was marked as deprecated in Python 3.10. Quoting from the asyncio documentation , https://docs.python.org/3/library/asyncio-eventloop.html (as

[issue46340] DeprecationWarning emitted when running asyncio tests

2022-01-11 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Kumar, did you consider using get_running_loop() to retrieve the event loop in the current thread, instead of creating a new one? -- ___ Python tracker _

[issue46340] DeprecationWarning emitted when running asyncio tests

2022-01-11 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: FTR, a rough grep for other users of get_event_loop in Lib/test (some false positives): ``` $ grep -rE "\" Lib/test Lib/test/test_contextlib_async.py:loop = asyncio.get_event_loop_policy().get_event_loop() Lib/test/test_asyncio/test_base_event

[issue46326] 'virtualenv --clear' should prompt user before nuking entire directory

2022-01-11 Thread Ali Mohammad Pur
Ali Mohammad Pur added the comment: > If similar behavior is also an issue with the Python standard library venv > module (which is a derivative of virtualenv), please update this issue > accordingly Yes, my bad, I should have mentioned that this applies to venv, I will update the issue tit

[issue46326] 'venv --clear' should prompt user before nuking entire directory

2022-01-11 Thread Ali Mohammad Pur
Change by Ali Mohammad Pur : -- title: 'virtualenv --clear' should prompt user before nuking entire directory -> 'venv --clear' should prompt user before nuking entire directory ___ Python tracker __

[issue46244] typing._TypeVarLike missing __slots__

2022-01-11 Thread Alex Waygood
Change by Alex Waygood : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: performance -> behavior ___ Python tracker ___ __

[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2022-01-11 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood, lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46338] libc_ver() runtime error when sys.executable is empty

2022-01-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 10.01.2022 23:01, Allie Hammond wrote: > > libc_ver() in platform.py (called from platform()) causes a runtime error if > sys.executable returns null. In my case, FreeRADIUS offers a module > rlm_python3 which allows you to run python code from the C

[issue45729] [doc] "history and license" link has wrong target

2022-01-11 Thread Julien Palard
Julien Palard added the comment: This should be fixed in python-docs-theme==2022.1. I'll close the issue when I actually see the fix applied on docs.python.org. -- nosy: +mdk ___ Python tracker

[issue45729] [doc] "history and license" link has wrong target

2022-01-11 Thread Julien Palard
Change by Julien Palard : -- keywords: +patch pull_requests: +28728 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30527 ___ Python tracker ___ __

[issue46335] asyncio.create_subprocess_exec throws RuntimeError yet still executes subprogram

2022-01-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: What do you mean by *process-limited environment*? It is very unusual configuration IMHO. -- ___ Python tracker ___

[issue46340] DeprecationWarning emitted when running asyncio tests

2022-01-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: get_event_loop() is deprecated when there is no running event loop. Otherwise, it is equal to get_running_loop() and IS NOT deprecated. I think there is no reason to replace all occurrences where get_event_loop() works fine. -- _

[issue46310] Simplify `for` loop in `.close()` method in `asyncio/windows_events`

2022-01-11 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue46310] Simplify `for` loop in `.close()` method in `asyncio/windows_events`

2022-01-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset fc75bfb8be8494e22123f2c14d1ab497c77cc22d by Nikita Sobolev in branch 'main': bpo-46310: simplify `for` loop in `asyncio/windows_events` (GH-30334) https://github.com/python/cpython/commit/fc75bfb8be8494e22123f2c14d1ab497c77cc22d -- __

[issue46303] _Py_stat and _Py_wstat using incorrect type for status argument

2022-01-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset ea1a54506b4ac38b712ba63ec884292025f16111 by Victor Stinner in branch 'main': bpo-46303: Move fileutils.h private functions to internal C API (GH-30484) https://github.com/python/cpython/commit/ea1a54506b4ac38b712ba63ec884292025f16111 -

[issue46340] DeprecationWarning emitted when running asyncio tests

2022-01-11 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > I think there is no reason to replace all occurrences where get_event_loop() > works fine. +1 I provided the grep for information only, hence FTR (for the record). -- ___ Python tracker

[issue46340] DeprecationWarning emitted when running asyncio tests

2022-01-11 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > get_event_loop() is deprecated when there is no running event loop. Yes, I see that now. So using asyncio.new_event_loop instead makes sense. -- ___ Python tracker ___

[issue46339] PEG parser segfault from ast.literal_eval

2022-01-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Seems that the regression is caused by this commit: 6fa8b2ceee38187b0ae96aee12fe4f0a5c8a2ce7 is the first bad commit commit 6fa8b2ceee38187b0ae96aee12fe4f0a5c8a2ce7 Author: Pablo Galindo Salgado Date: Sat Jan 8 00:23:40 2022 + bpo-46237: Fix

[issue46303] _Py_stat and _Py_wstat using incorrect type for status argument

2022-01-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28729 pull_request: https://github.com/python/cpython/pull/30528 ___ Python tracker ___ __

[issue46303] _Py_stat and _Py_wstat using incorrect type for status argument

2022-01-11 Thread STINNER Victor
STINNER Victor added the comment: > While attempting to embed the full cpython source in my application, I found > that during compilation on Windows, there was a compilation issue due to > struct stat not being defined. Do you get the error when building Python? Or on #include when using

[issue39298] add BLAKE3 to hashlib

2022-01-11 Thread Christian Heimes
Christian Heimes added the comment: You could upload the code to https://test.pypi.org/ -- ___ Python tracker ___ ___ Python-bugs-l

[issue46339] PEG parser segfault from ast.literal_eval

2022-01-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The reason is that the line numbers are now correctly identified, and that causes existing code to not work correctly :( -- ___ Python tracker __

[issue33125] Windows 10 ARM64 platform support

2022-01-11 Thread Tommy Vercetti
Tommy Vercetti added the comment: Hi everyone, I'm Tommy from OBS Projects, and I'm currently working on bring OBS Studio to Windows ARM64. I still prefer the regular executable installer on ARM64, because it's probably the least intrusive way of making Python scripting work with OBS Studi

[issue46331] 3.11: tracing revisits class line after class docstring

2022-01-11 Thread Mark Shannon
Mark Shannon added the comment: New changeset bd04fac7eb929cd11ab6985deb61d9780447fbff by Mark Shannon in branch 'main': bpo-46331: Do not set line number of instruction storing doc-string. (GH-30518) https://github.com/python/cpython/commit/bd04fac7eb929cd11ab6985deb61d9780447fbff

[issue46339] PEG parser segfault from ast.literal_eval

2022-01-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +28730 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30529 ___ Python tracker ___

[issue46331] 3.11: tracing revisits class line after class docstring

2022-01-11 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I recon this can be closed now? -- nosy: +erlendaasland status: open -> pending ___ Python tracker ___ ___

[issue46341] duplicate paragraphs - asyncio Coroutines and Tasks file

2022-01-11 Thread David
Change by David : -- assignee: docs@python components: Documentation nosy: davem, docs@python priority: normal pull_requests: 28731 severity: normal status: open title: duplicate paragraphs - asyncio Coroutines and Tasks file versions: Python 3.10 __

[issue46342] Make @final introspectable at runtime

2022-01-11 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : Currently, @typing.final is implemented as an identity function, which makes it impossible for type checkers that look at runtime objects to support it. I propose that we implement it as something like: def final(f): try: f.__final_

[issue46342] Make @final introspectable at runtime

2022-01-11 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- keywords: +patch pull_requests: +28732 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30530 ___ Python tracker __

[issue46342] Make @final introspectable at runtime

2022-01-11 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue46343] Add PyErr_GetActiveException and PyErr_SetActiveException

2022-01-11 Thread Irit Katriel
New submission from Irit Katriel : Following the removal of exc_type and exc_traceback from the interpreter's active exception in issue45711, we can now provide simplified get-set functions in the C Api: PyAPI_FUNC(void) PyErr_GetActiveException(PyObject **); PyAPI_FUNC(void) PyErr_SetActiveE

[issue46343] Add PyErr_GetActiveException and PyErr_SetActiveException

2022-01-11 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +28733 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30531 ___ Python tracker ___ ___

[issue46344] 3.11: except/else/if/raise traced incorrectly

2022-01-11 Thread Ned Batchelder
New submission from Ned Batchelder : This code shows a raise inside an except/else/if that isn't run, but incorrectly appears in the trace output (see the * line): $ cat arcs_1160.py def func(x): try: b = 6 except ZeroDivisionError: pass else: if x == "

[issue28159] Deprecate isdst argument in email.utils.localtime

2022-01-11 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy versions: +Python 3.11 -Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-li

[issue46331] 3.11: tracing revisits class line after class docstring

2022-01-11 Thread Mark Shannon
Mark Shannon added the comment: Ned, does this fix work for you? -- status: pending -> open ___ Python tracker ___ ___ Python-bugs-

[issue46344] 3.11: except/else/if/raise traced incorrectly

2022-01-11 Thread Mark Shannon
Change by Mark Shannon : -- nosy: +iritkatriel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue46253] C API documentation of Py_UNICODE_* character properties macros use Py_UNICODE instead of Py_UCS4

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

[issue46253] C API documentation of Py_UNICODE_* character properties macros use Py_UNICODE instead of Py_UCS4

2022-01-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 43c5c1369cb21f08a1dc1d63923c3586b883e3e8 by Julian Gilbey in branch 'main': closes bpo-46253: Change Py_UNICODE to Py_UCS4 in the C API docs to match the current source code (GH-30387) https://github.com/python/cpython/commit/43c5c1369cb21f0

[issue46253] C API documentation of Py_UNICODE_* character properties macros use Py_UNICODE instead of Py_UCS4

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

[issue46253] C API documentation of Py_UNICODE_* character properties macros use Py_UNICODE instead of Py_UCS4

2022-01-11 Thread miss-islington
miss-islington added the comment: New changeset 4cfb10979d74b8513ec751b81454709f38e3b51a by Miss Islington (bot) in branch '3.10': closes bpo-46253: Change Py_UNICODE to Py_UCS4 in the C API docs to match the current source code (GH-30387) https://github.com/python/cpython/commit/4cfb10979d7

[issue46253] C API documentation of Py_UNICODE_* character properties macros use Py_UNICODE instead of Py_UCS4

2022-01-11 Thread miss-islington
miss-islington added the comment: New changeset 238a36b753affd373a315b81a5024aed7ebf6479 by Miss Islington (bot) in branch '3.9': closes bpo-46253: Change Py_UNICODE to Py_UCS4 in the C API docs to match the current source code (GH-30387) https://github.com/python/cpython/commit/238a36b753af

[issue46249] [sqlite3] move set lastrowid out of the query loop and enable it for executemany()

2022-01-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 08.01.2022 21:56, Erlend E. Aasland wrote: > > Marc-André: since Python 3.6, the sqlite3.Cursor.lastrowid attribute does no > longer comply with the recommendations of PEP 249: > > Previously, lastrowid was set to None for operations other than INSERT

[issue46303] _Py_stat and _Py_wstat using incorrect type for status argument

2022-01-11 Thread Paul Campbell
Paul Campbell added the comment: I was trying to build python core (-DMS_WINDOWS -DPy_BUILD_CORE). I was using clang, which I think is unsupported looking at Windows doc. After looking at the issue though, it seemed that it was just some slight mistake which is why I filed the bug. clang ve

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-11 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now this corner case is not tested: ```python class Some: x: int = None import typing assert typing.get_type_hints(Some) == {'x': int} ``` Notice that we don't add implicit `Optional` type to `x`. This is different for function arguments that wi

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

2022-01-11 Thread Nikita Sobolev
Nikita Sobolev added the comment: I will send a PR today :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue46345] Add an explicit test for `get_type_hints` for a class field with `None` default

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

[issue30677] [doc] mention that os.mkdir() raises FileNotFound if path does not exist

2022-01-11 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy title: Enhance documentation of os.mkdir() -> [doc] mention that os.mkdir() raises FileNotFound if path does not exist versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _

[issue46333] ForwardRef.__eq__ does not respect module parameter

2022-01-11 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 5.0 -> 6.0 pull_requests: +28737 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30536 ___ Python tracker

[issue46309] Task created by StreamReaderProtocol gets garbage collected.

2022-01-11 Thread Simon Wrede
Change by Simon Wrede : -- versions: +Python 3.11, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list ma

[issue46303] _Py_stat and _Py_wstat using incorrect type for status argument

2022-01-11 Thread STINNER Victor
STINNER Victor added the comment: Python.h indirectly (via fileutils.h) defines _Py_wstat() and _Py_stat() functions which use the "struct stat*" type for 12 years: commit 4e31443c4d2c1fb211a6ea90fc6a8fbd9ff81c97 Author: Victor Stinner Date: Thu Oct 7 21:45:39 2010 + Create fileut

[issue46309] Task created by StreamReaderProtocol gets garbage collected.

2022-01-11 Thread Alex Waygood
Alex Waygood added the comment: I'm removing 3.7 and 3.8 from the "versions" field, since those branches are old enough that they're now only accepting security-related patches. -- nosy: +AlexWaygood versions: -Python 3.7, Python 3.8 ___ Python tr

[issue46309] Task created by StreamReaderProtocol gets garbage collected.

2022-01-11 Thread Alex Waygood
Change by Alex Waygood : -- nosy: -AlexWaygood ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue40280] Consider supporting emscripten/webassembly as a build target

2022-01-11 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +28738 pull_request: https://github.com/python/cpython/pull/30538 ___ Python tracker ___

[issue46303] _Py_stat and _Py_wstat using incorrect type for status argument

2022-01-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +28739 pull_request: https://github.com/python/cpython/pull/30539 ___ Python tracker ___ __

[issue46303] _Py_stat and _Py_wstat using incorrect type for status argument

2022-01-11 Thread STINNER Victor
STINNER Victor added the comment: It seems like _Py_stat() and _Py_wstat() are only needed on non-Windows platforms: only the _get_tcl_lib_path() function of Modules/_tkinter.c uses _Py_stat(). I wrote PR 30539 to not define _Py_stat() and _Py_wstat() on Windows. -- ___

[issue46343] Add PyErr_GetActiveException and PyErr_SetActiveException

2022-01-11 Thread Eric Snow
Eric Snow added the comment: Why not `PyAPI_FUNC(PyObject *) PyErr_GetActiveException(void);`? -- nosy: +eric.snow ___ Python tracker ___ _

[issue46339] PEG parser segfault from ast.literal_eval

2022-01-11 Thread miss-islington
miss-islington added the comment: New changeset cedec19be81e6bd153678bfb28c8e217af8bda58 by Pablo Galindo Salgado in branch 'main': bpo-46339: Fix crash in the parser when computing error text for multi-line f-strings (GH-30529) https://github.com/python/cpython/commit/cedec19be81e6bd153678b

[issue46237] Incorrect line reported in syntax error

2022-01-11 Thread miss-islington
miss-islington added the comment: New changeset 19a85501cee24a6e426a431243d0adcb5664c6fe by Miss Islington (bot) in branch '3.10': bpo-46237: Fix the line number of tokenizer errors inside f-strings (GH-30463) https://github.com/python/cpython/commit/19a85501cee24a6e426a431243d0adcb5664c6fe

[issue46339] PEG parser segfault from ast.literal_eval

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

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-11 Thread Eric Snow
Eric Snow added the comment: New changeset cf496d657a1a82eaf9ebfb47d721676fef6effa5 by Eric Snow in branch 'main': bpo-45953: Statically allocate and initialize global bytes objects. (gh-30096) https://github.com/python/cpython/commit/cf496d657a1a82eaf9ebfb47d721676fef6effa5 -- ___

[issue46237] Incorrect line reported in syntax error

2022-01-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +28741 pull_request: https://github.com/python/cpython/pull/30543 ___ Python tracker ___ ___

[issue46237] Incorrect line reported in syntax error

2022-01-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue33125] Windows 10 ARM64 platform support

2022-01-11 Thread Steve Dower
Steve Dower added the comment: Hi Tommy! Glad to have you join the discussion (I'm a huge fan of OBS Studio, and if the license wasn't incompatible with my employer, I'd be actively contributing :) ) Our challenge with the installer is the portability of Wix Toolset. I'm pretty sure our cur

[issue46344] 3.11: except/else/if/raise traced incorrectly

2022-01-11 Thread Irit Katriel
Irit Katriel added the comment: Thanks, I have a fix and will make a PR once I've written the test. -- ___ Python tracker ___ ___ P

[issue46343] Add PyErr_GetActiveException and PyErr_SetActiveException

2022-01-11 Thread Irit Katriel
Irit Katriel added the comment: Yes, you’re right of course ;) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue46237] Incorrect line reported in syntax error

2022-01-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Backporting this to 3.9 is a bit more challenging and more changes are required, so I am not backporting for 3.9 to avoid unintended side effects. -- ___ Python tracker

[issue46344] 3.11: except/else/if/raise traced incorrectly

2022-01-11 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +28742 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30544 ___ Python tracker ___ ___

[issue46346] New compilation warnings on Windows

2022-01-11 Thread Guido van Rossum
New submission from Guido van Rossum : I am getting these warnings: C:\Users\gvanrossum\cpython\PC\_testconsole.c(70,38): warning C4013: '_Py_get_osfhandle' undefined; assuming extern returnin g int [C:\Users\gvanrossum\cpython\PCbuild\_testconsole.vcxproj] C:\Users\gvanrossum\cpython\PC\_test

[issue46339] PEG parser segfault from ast.literal_eval

2022-01-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +28743 pull_request: https://github.com/python/cpython/pull/30545 ___ Python tracker ___ ___

[issue46335] asyncio.create_subprocess_exec throws RuntimeError yet still executes subprogram

2022-01-11 Thread Clint Olsen
Clint Olsen added the comment: In a multi-user environment, you should not expect to be able to spawn infinite processes. In some cases system administrators have reduced the thresholds to values that guarantee a machine is still responsive under heavy load. See limits.conf(5) as an example.

[issue46307] string.Template should allow inspection of identifiers

2022-01-11 Thread miss-islington
miss-islington added the comment: New changeset dce642f24418c58e67fa31a686575c980c31dd37 by Ben Kehoe in branch 'main': bpo-46307: Add string.Template.get_identifiers() method (GH-30493) https://github.com/python/cpython/commit/dce642f24418c58e67fa31a686575c980c31dd37 -- nosy: +miss

[issue46249] [sqlite3] move set lastrowid out of the query loop and enable it for executemany()

2022-01-11 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Is 0 a valid row ID in SQLite ? If not, then I guess this would be > an alternative to None as suggested by the DB-API. Yes. Any 64 bit signed integer value is a valid row id in SQLite. > If it is a valid row ID, I'd suggest to go back to resetting to Non

[issue46249] [sqlite3] move set lastrowid out of the query loop and enable it for executemany()

2022-01-11 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > OTOH, the SQLite API is tied to the _connection_ object, so it may not make > sense to align it with lastrowid which is a _cursor_ attribute. That came out weird; let's try again: The SQLite API is tied to the _connection_ object, so it may not make sen

[issue46346] New compilation warnings on Windows

2022-01-11 Thread Steve Dower
Steve Dower added the comment: Possibly related to Victor's change in issue46303? -- nosy: +vstinner ___ Python tracker ___ ___ Pyt

[issue45729] [doc] "history and license" link has wrong target

2022-01-11 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +28744 pull_request: https://github.com/python/cpython/pull/30540 ___ Python tracker _

[issue45729] [doc] "history and license" link has wrong target

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

[issue46249] [sqlite3] move set lastrowid out of the query loop and enable it for executemany()

2022-01-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 11.01.2022 20:46, Erlend E. Aasland wrote: > > If we are to revert to this behaviour, we'll have to start examining the SQL > we are given (search for INSERT and REPLACE keywords, determine if they are > valid (i.e. not a comment, not part of a column

[issue46249] [sqlite3] move set lastrowid out of the query loop and enable it for executemany()

2022-01-11 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > You don't know on which cursor the last row was inserted [...] SQLite has no concept of cursors :) > It also seems that the function really only works for INSERTs and > not for UPDATEs. Yes, hence it's name: sqlite3_last_insert_rowid() ! > I'd suggest

[issue46237] Incorrect line reported in syntax error

2022-01-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I understand. I think that for IDLE, I should check that the error .text is in the line indicated, and if not, recover somehow rather than blindly marking the the indicated column. For a shell statement entry, try to find the right line. Not sure for an e

[issue46346] New compilation warnings on Windows

2022-01-11 Thread Christian Heimes
Change by Christian Heimes : -- dependencies: +_Py_stat and _Py_wstat using incorrect type for status argument nosy: +christian.heimes, pablogsal priority: normal -> release blocker stage: -> needs patch type: -> behavior ___ Python tracker

[issue46347] memory leak in PyEval_EvalCodeEx

2022-01-11 Thread Yury Selivanov
New submission from Yury Selivanov : I'm investigating a memory leak in 3.10, and while looking at the offending commit I stumbled upon this: in ceval.c:PyEval_EvalCodeEx, there's this allocation: PyObject **kwargs = PyMem_Malloc(sizeof(PyObject *)*kwcount); The problem is that this isn'

[issue46347] memory leak in PyEval_EvalCodeEx

2022-01-11 Thread Yury Selivanov
Yury Selivanov added the comment: (this is the context of our current investigation btw: https://github.com/MagicStack/asyncpg/issues/874#issuecomment-1009383262) -- ___ Python tracker _

[issue46347] memory leak in PyEval_EvalCodeEx

2022-01-11 Thread Yury Selivanov
Yury Selivanov added the comment: This is the questionable place in the code: https://github.com/python/cpython/blob/dce642f24418c58e67fa31a686575c980c31dd37/Python/ceval.c#L6131-L6166 See that `kwargs` is allocated but never freed or used. -- ___

[issue46347] memory leak in PyEval_EvalCodeEx

2022-01-11 Thread Elvis Pranskevichus
Elvis Pranskevichus added the comment: I can confirm that removing the kwargs allocation prevents the leak described in the asyncpg issue from happening. -- ___ Python tracker __

[issue46347] memory leak in PyEval_EvalCodeEx

2022-01-11 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +28746 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30546 ___ Python tracker ___ _

[issue46348] Morernize `test_typing`

2022-01-11 Thread Nikita Sobolev
New submission from Nikita Sobolev : There are several very old details in `test_typing`. Some examples: 1. `@skipUnless(sys.version_info >= (3, 3), 'ChainMap was added in 3.3')` https://github.com/python/cpython/blame/dce642f24418c58e67fa31a686575c980c31dd37/Lib/test/test_typing.py#L3583 Pro

[issue46348] Morernize `test_typing`

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

[issue22833] The decode_header() function decodes raw part to bytes or str, depending on encoded part

2022-01-11 Thread Daniel Lenski
Change by Daniel Lenski : -- keywords: +patch pull_requests: +28748 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30548 ___ Python tracker ___ __

[issue46348] Modernize `test_typing`

2022-01-11 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood, gvanrossum, kj title: Morernize `test_typing` -> Modernize `test_typing` type: -> behavior ___ Python tracker ___ _

[issue46348] Modernize `test_typing`

2022-01-11 Thread Nikita Sobolev
Nikita Sobolev added the comment: Alex, thanks a lot for fixing so many of my titles! Highly appreciated! -- components: +Tests -Library (Lib) ___ Python tracker ___ _

[issue46349] inspect.getdoc() should append parent class method docs when encountering a local one line docstring

2022-01-11 Thread Gregory P. Smith
New submission from Gregory P. Smith : Today `inspect.getdoc()` is quite simple. If a method has any docstring, it returns it. There is one idiom where this is not very useful to our users. A """See base class.""" docstring on a method. Rather than having to repeat the canonical base class

[issue46348] Modernize `test_typing`

2022-01-11 Thread Alex Waygood
Alex Waygood added the comment: Heh, no worries! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue46349] inspect.getdoc() should append parent class method docs when encountering a local one line docstring

2022-01-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: Many docstrings are only 1 line without being "See base class." And many docstrings are multiple lines while also referring the reader to see the parent class for further details. So this DWIM heuristic to guess whether or not to display a parent class docs

[issue46350] re.sub, re.Match.expand, etc doesn't allow x, u, U, or N escapes in the template

2022-01-11 Thread Dan Snider
New submission from Dan Snider : The docs use the phrase "unknown escapes of ASCII letters are reserved for future use and treated as errors". That seems ambiguous enough to question why "\x", "\u", "\U", and "\N{}" escapes aren't expanded in the template parameter like they are in patterns.

[issue37295] Possible optimizations for math.comb()

2022-01-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: I've been experimenting with a modification of Serhiy's recurrence relation, using a different value of j rather than j=k//2. The current design splits-off three ways when it recurses, so the number of calls grows quickly. For C(200,100), C(225,112), a

[issue46350] re.sub, re.Match.expand, etc doesn't allow x, u, U, or N escapes in the template

2022-01-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: It is better to raise each issue in its own ticket. You seem to have three distinct issues here: - The issue listed in the title, which I don't understand. A demonstration of the issue would be helpful. - The unrelated(?) issue of bad \N{} escapes, which a

[issue46347] memory leak in PyEval_EvalCodeEx

2022-01-11 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +28750 pull_request: https://github.com/python/cpython/pull/30549 ___ Python tracker _

[issue46347] memory leak in PyEval_EvalCodeEx

2022-01-11 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 607d8a838f29ad3c4c4e85b39f338dade5f9cafe by Yury Selivanov in branch 'main': bpo-46347: Fix memory leak in PyEval_EvalCodeEx. (#30546) https://github.com/python/cpython/commit/607d8a838f29ad3c4c4e85b39f338dade5f9cafe -- __

[issue46347] memory leak in PyEval_EvalCodeEx

2022-01-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Turns out this leak affects CYthon quite a lot: https://github.com/cython/cython/blob/29ad96444b8b1a4f05a6ac2328fde01de4782691/Cython/Utility/ObjectHandling.c#L2139-L2155 This seems to imply that every function call using __Pyx_PyCFunction_FastCall is

  1   2   >