[issue32642] add support for path-like objects in sys.path

2022-03-12 Thread Chih-Hsuan Yen
Change by Chih-Hsuan Yen : -- nosy: -yan12125 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue46961] Caching/interning of small ints sometimes fails

2022-03-12 Thread Dennis Sweeney
Dennis Sweeney added the comment: I believe the issue is the usage of the x_divrem function. x_divrem always returns fresh ints, never cached small ints. This behavior is relied upon in the long_true_divide function, as it mutates the returned quotient at the line """x->ob_digit[0] = low & ~

[issue47001] deadlock in ctypes?

2022-03-12 Thread Rocco Matano
New submission from Rocco Matano : When using ctypes under Windows, I have observed a baffling behavior which I am not sure if it is the result of a bug in ctypes, or is simply due to false expectations on my part. Environment: - Windows 10 Pro, 21H1, 19043.1586, x64 - Python versions 3.6 u

[issue47000] Make encoding="locale" uses locale encoding even in UTF-8 mode is enabled.

2022-03-12 Thread Inada Naoki
New submission from Inada Naoki : Currently, `encoding="locale"` is just shortcut of `encoding=locale.getpreferredencoding(False)`. `encoding="locale"` means that "locale encoding should be used here, even if Python default encoding is changed to UTF-8". I am not sure that UTF-8 mode becomes

[issue46999] test_multiprocessing_fork running without any timeout

2022-03-12 Thread Matthias Klose
New submission from Matthias Klose : the test_multiprocessing_fork test is a bit unreliable, at least on both the Debian and Ubuntu test infrastructures, sometimes running for 100+ hours. When running locally, I cannot reproduce these issues. Note that the test and build infrastructure is u

[issue39829] __len__ called twice in the list() constructor

2022-03-12 Thread Jeremiah Pascual
Jeremiah Pascual added the comment: > Looks good to me. Would you create a pull request? Created a pull request (31816). -- ___ Python tracker ___ ___

[issue46846] functools.partial objects should set __signature__ and _annotations__

2022-03-12 Thread Graham Dumpleton
Change by Graham Dumpleton : -- nosy: +grahamd ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-03-12 Thread Larry Hastings
Larry Hastings added the comment: You make a good point. I filed a separate bug (#46846) suggesting that partial objects should set their own annotations and signature. I agree that objects performing such magic should take care of these details themselves, rather than requiring the inspec

[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-03-12 Thread Graham Dumpleton
Graham Dumpleton added the comment: I am still working through this and thinking about implications, but my first impression is that the functools.partial object should provide an attribute (property) __signature__ which yields the correct result. When you think about it, any user who wants

[issue46998] Allow subclassing Any at runtime

2022-03-12 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +AlexWaygood, gvanrossum, kj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46998] Allow subclassing Any at runtime

2022-03-12 Thread Shantanu
Change by Shantanu : -- keywords: +patch pull_requests: +29941 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31841 ___ Python tracker ___ ___

[issue46998] Allow subclassing Any at runtime

2022-03-12 Thread Shantanu
New submission from Shantanu : Discussed on typing-sig at https://mail.python.org/archives/list/typing-...@python.org/thread/GULRKYI7XOB3FLAEFC6OYSTBS5FIA5PU/ -- components: Library (Lib) messages: 415023 nosy: JelleZijlstra, hauntsaninja priority: normal severity: normal status: open

[issue46997] Invalid memory write in bytearray

2022-03-12 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: 3.9 segfaults. (gdb) bt #0 bytearray_ass_subscript (self=, index=0x77e118f0, values=0x76f918b0) at Objects/bytearrayobject.c:640 #1 0x00536302 in _PyEval_EvalFrameDefault (tstate=, f=0x999a80, throwflag=) at Python/ceval.c:1990 #2 0x00

[issue46997] Invalid memory write in bytearray

2022-03-12 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- components: +Interpreter Core versions: +Python 3.10, Python 3.11 ___ Python tracker ___ ___ Python-bu

[issue46997] Invalid memory write in bytearray

2022-03-12 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : Inspired by Guido's comment in https://github.com/python/cpython/pull/31834/files#r825352900, I found that there are some places in bytearrayobject.c where we can write to free'd memory if we encounter an object with a sneaky __index__ method: $ cat basne

[issue43215] Document Happy Eyeballs arguments of asyncio.open_connection

2022-03-12 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.10, Python 3.8, Python 3.9 ___ Python tracker __

[issue43215] Document Happy Eyeballs arguments of asyncio.open_connection

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 3543ddb4c4ebc26fb2d6c67a97e66f5267876f72 by Illia Volochii in branch 'main': bpo-43215: Document Happy Eyeballs args of asyncio.open_connection (GH-24525) https://github.com/python/cpython/commit/3543ddb4c4ebc26fb2d6c67a97e66f5267876f72 --

[issue44318] Asyncio classes missing __slots__

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: 1. Guido van Rossum explicitly designed asyncio to *don't* use slots. 2. Changing it produces potential backward incompatibility issues. Very many stdlib classes don't have slots, as already mentioned. The default is really the reverse: no slots. Closing. --

[issue45993] Main branch of CPython does not build anymore on macOS

2022-03-12 Thread Ned Deily
Ned Deily added the comment: @Andrei, see Issue46975. -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-12 Thread Ned Deily
Ned Deily added the comment: We should probably include this update in the next round of releases. -- nosy: +lukasz.langa, ned.deily, pablogsal priority: normal -> release blocker ___ Python tracker

[issue46985] Upgrade ensurepip bundled pip to 22.0.4

2022-03-12 Thread Ned Deily
Ned Deily added the comment: We should probably include this update in the next round of releases. -- nosy: +lukasz.langa, ned.deily, pablogsal priority: normal -> release blocker ___ Python tracker

[issue46918] The vulnerability is included in /lib/python3.9/ensurepip after python 3.9.2 is installed.

2022-03-12 Thread Ned Deily
Change by Ned Deily : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue46907] Update Windows and MacOS installer to SQLite 3.38.1

2022-03-12 Thread Ned Deily
Ned Deily added the comment: https://sqlite.org/releaselog/3_38_1.html -- title: Update Windows and MacOS installer to SQLite 3.38.0. -> Update Windows and MacOS installer to SQLite 3.38.1 ___ Python tracker __

[issue46829] Confusing CancelError message if multiple cancellations are scheduled

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: If the cancellation message should be kept it needs improvements anyway, the single message doesn't work well with multiple `.cancel()` calls. I can imagine a 'CancelledError(*msgs)' and 'raise exc.drop_msg(msg)' as a function equivalent of task cancellation

[issue46829] Confusing CancelError message if multiple cancellations are scheduled

2022-03-12 Thread Guido van Rossum
Guido van Rossum added the comment: Before we land GH-31840 we should have a somewhat more public discussion (e.g. on python-dev or maybe in Async-SIG, https://discuss.python.org/c/async-sig/20; or at least here) about deprecating the cancel message. I'm all for it but certainly Chris Jerdon

[issue32642] add support for path-like objects in sys.path

2022-03-12 Thread Jason R. Coombs
Jason R. Coombs added the comment: I'm in support of adding Path support for sys.path, but I also agree with Eric, there are innumerable consumers of sys.path beyond importlib. and since pathlib.Path isn't a str, it would likely introduce incompatibility. On the other hand, users introducing

[issue45279] avoid redundant _commit_removals pending_removals guard

2022-03-12 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue25292] [asyncio] ssl socket gets into broken state when client exits during handshake

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: asyncio ssl support was rewritten from scratch. If you still observe the problem, please open a new issue. -- nosy: +asvetlov resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Py

[issue41696] asyncio.run interacts surprisingly with debug mode

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

[issue40227] SSLError is not passed to the client during handshake

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: asyncio ssl support was rewritten from scratch. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue38955] Non indemnpotent behavior of asyncio.get_event_loop and asyncio.run sequence.

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: The usage of get_event_loop() outside of a loop is deprecated since Python 3.10 -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___

[issue40454] DEBUG kw to asyncio.run overrides DEBUG mode set elsewhere

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed by #41696 -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue40487] Unexpected exception handler behavior in Jupyter when returning task objects created with create_task

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: tasks are not awaited, this is the problem. The reproducer is not correct. Closing. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___

[issue40251] selectors.KqueueSelector hangs on EOF, unlike other selectors

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: Using selectors with blocked files looks weird at least. Should we care? -- ___ Python tracker ___ __

[issue40967] asyncio.Task.all_tasks() and asyncio.Task.current_task() must be removed in 3.9

2022-03-12 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___ _

[issue46829] Confusing CancelError message if multiple cancellations are scheduled

2022-03-12 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +29940 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31840 ___ Python tracker ___ _

[issue46644] typing: remove callable() check from typing._type_check

2022-03-12 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- nosy: +uriyyo nosy_count: 8.0 -> 9.0 pull_requests: +29939 pull_request: https://github.com/python/cpython/pull/27553 ___ Python tracker

[issue44799] typing.get_type_hints() raises TypeError for a variable annotated by dataclasses.InitVar

2022-03-12 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue42760] inspect.iscoroutine returns False for asynchronous generator methods

2022-03-12 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python

[issue37529] Mimetype module duplicates

2022-03-12 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker

[issue37529] Mimetype module duplicates

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset d9db07a3100105768ba83ffd67991e78452bb22e by andrei kulakov in branch 'main': bpo-37529: Add test for guessing extensions (GH-28243) https://github.com/python/cpython/commit/d9db07a3100105768ba83ffd67991e78452bb22e -- nosy: +asvetlov _

[issue35392] Create asyncio/sockutils.py

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: I support the idea but we have no PR yet. The request is not very strong. Anyway, if you still want such change -- please recreate an issue. -- resolution: -> postponed stage: -> resolved status: open -> closed __

[issue32396] Implement method to write/read to serials without blocking on windows with asyncio

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: No activity, closing. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ __

[issue28464] BaseEventLoop.close should shutdown executor before marking itself closed

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: loop.shutdown_default_executor() exists for it, asyncio.run() calls the method -- nosy: +asvetlov resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue25230] asyncio/Windows: Unix datagram sockets not supported

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: Implemented a long time ago, closing -- nosy: +asvetlov resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___

[issue22476] asyncio task chapter confusion about 'task', 'future', and 'schedule'

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: Docs were rewritten from scratch in Python 3.8, they are much better now. -- nosy: +asvetlov resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue46996] Drop support of Tcl/Tk older than 8.5.12

2022-03-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +29938 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31839 ___ Python tracker ___

[issue46996] Drop support of Tcl/Tk older than 8.5.12

2022-03-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : In issue45979 E. Paine suggested to drop support of Tcl/Tk older than 8.5.12 (8.5.12 was released on 2012-07-27 and 8.6.0 on 2012-12-20). Tkinter tests contain workarounds and special cases for older versions of Tcl/Tk, many of them can be removed. Also

[issue44604] [Enhancement] Asyncio task decorator to provide interface to define async DAGs (similar to dask's delayed interface)

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: TaskGroup has landed, aiodag is present on pypi. Closing. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker _

[issue44221] ImportError: sys.meta_path is None, Python is likely shutting down

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: Reproducer is missing -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue28534] Replace asynchat

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: Superseded by #28533 -- nosy: +asvetlov resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Remove asyncore, asynchat and smtpd modules ___ Python tracker

[issue32181] runaway Tasks with Task.cancel() ignored.

2022-03-12 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python

[issue41879] Outdated description of async iterables in documentation of async for statement

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

[issue44373] make Event an Awaitable

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: Please re-read the rejection reason: https://bugs.python.org/issue33544#msg316962 -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue44795] asyncio.run does not allow for graceful shutdown of main task

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: Please use TaskGroup from Python 3.11 for structural concurrency. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker __

[issue40977] asyncio.trsock.TransportSocket says some APIs will be prohibited in 3.9

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed in Python 3.10 -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39951] Ignore specific errors when closing ssl connections

2022-03-12 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: backport needed -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44796] Add __parameters__ and __getitem__ in TypeVar and ParamSpec

2022-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 31143 simplified some code without changing the common API: Objects/genericaliasobject.c | 46 ++ 1 file changed, 14 insertions(+), 32 deletions(-) Lib/_collections_abc.py | 63 +-

[issue43224] Add support for PEP 646

2022-03-12 Thread Ken Jin
Ken Jin added the comment: New changeset af2277e461aee4eb96affd06b4af25aad31c81ea by Matthew Rahtz in branch 'main': bpo-43224: Implement PEP 646 changes to genericaliasobject.c (GH-31019) https://github.com/python/cpython/commit/af2277e461aee4eb96affd06b4af25aad31c81ea --

[issue46995] Make Task.set_name() mandatory for third-parties

2022-03-12 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +29937 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31838 ___ Python tracker ___ _

[issue46995] Make Task.set_name() mandatory for third-parties

2022-03-12 Thread Andrew Svetlov
New submission from Andrew Svetlov : The method was introduced by Python 3.8 Let's raise DeprecationWarning if third-party task implementation doesn't support it. Convert the depreciation into a strict error in Python 3.13 -- components: asyncio messages: 414990 nosy: asvetlov, yseliv

[issue46987] Remove _PySys_GetObjectId / _PySys_GetObjectId

2022-03-12 Thread Oleg Iarygin
Oleg Iarygin added the comment: > ./top_5000/datatable-1.0.0.tar.gz: datatable-1.0.0/src/core/python/obj.cc: > _PySys_GetObjectId(&PyId_stdin) // borrowed ref All three occurences look like this [1] for two years (see git blame): #ifndef Py_LIMITED_API _PySys_GetObjectId(&PyId_std

[issue46994] Accept explicit contextvars.Context in asyncio create_task() API

2022-03-12 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +29936 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31837 ___ Python tracker ___ _

[issue46994] Accept explicit contextvars.Context in asyncio create_task() API

2022-03-12 Thread Andrew Svetlov
New submission from Andrew Svetlov : Now asyncio creates a new context copy on task creation. It is the perfect behavior *by default* and should stay as is. However, sometimes passing an explicit context into a task and using back the context modified by task code is desired. The most obviou

[issue46944] Use FASTCALL calling convention in generator.throw

2022-03-12 Thread Kumar Aditya
Change by Kumar Aditya : -- resolution: -> fixed stage: -> resolved status: open -> closed type: -> performance ___ Python tracker ___ __

[issue46953] use FASTCALL for __import__ builtin

2022-03-12 Thread Kumar Aditya
Change by Kumar Aditya : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-

[issue46993] Speed up bytearray creation from list and tuple

2022-03-12 Thread Kumar Aditya
New submission from Kumar Aditya : The attached PR speeds up bytearray creation from list and tuple. Benchmark (uses pyperf): - import pyperf runner = pyperf.Runner() runner.timeit(name="bench bytearray", stmt="bytearray([42]*10

[issue46981] Empty typing.Tuple

2022-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If for repr(Tuple[()]), it is no longer needed. -- ___ Python tracker ___ ___ Python-bugs-list

[issue46981] Empty typing.Tuple

2022-03-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +29934 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31836 ___ Python tracker ___

[issue46987] Remove _PySys_GetObjectId / _PySys_GetObjectId

2022-03-12 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +29933 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31835 ___ Python tracker ___

[issue46892] Async Call-Stack Reconstruction

2022-03-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: The idea looks interesting. The devil in the details I guess. I'm curious what is the memory and performance penalty. Waiting for the PR as the discussion starting point. -- ___ Python tracker

[issue42238] Deprecate suspicious.py?

2022-03-12 Thread Julien Palard
Julien Palard added the comment: News: Hitting 3 months without a true positive from `make suspicious`, looks like sphinxlint starting to take over properly, I hope to close this issue soon (like in a few months maybe). Also sphinxlint attracted some contributors [1] \o/ [1] https://githu

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2022-03-12 Thread Kevin Locke
Change by Kevin Locke : -- nosy: +kevinoid nosy_count: 10.0 -> 11.0 pull_requests: +29932 pull_request: https://github.com/python/cpython/pull/23172 ___ Python tracker ___