[issue43595] Can not add a metclass that inherits both ABCMeta & ABC to a Union

2021-06-28 Thread Andrei Kulakov
Andrei Kulakov added the comment: Works for me, too - no error (MacOS, 3.9.1) -- nosy: +andrei.avk ___ Python tracker ___ ___

[issue44521] str.removeprefix(): add strict: bool

2021-06-28 Thread Dennis Sweeney
Dennis Sweeney added the comment: I'm +-0 on this. I would write something like this instead: assert whatever.startswith(prefix) result = whatever.removeprefix(prefix) Note that if this were to change, the corresponding methods would also have to change on bytes, bytearray, and

[issue44492] Building a C extension on Big Sur and SDK v10.15 fails

2021-06-28 Thread Ned Deily
Change by Ned Deily : -- components: +macOS nosy: +ned.deily, ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing

[issue44440] logging does not work as documented (setLevel)

2021-06-28 Thread Ned Deily
Change by Ned Deily : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43625] CSV has_headers heuristic could be improved

2021-06-28 Thread Andrei Kulakov
Andrei Kulakov added the comment: Skip: If I understand right, in the patch the last two types -- float and int, will never have an effect because if float(x) and int(x) succeed, so will complex(x), and conversely, if complex(x) fails, float and int will also fail. So the effect of the

[issue44531] Add _PyType_AllocNoTrack() function: allocate without tracking in the GC

2021-06-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +25515 pull_request: https://github.com/python/cpython/pull/26948 ___ Python tracker ___

[issue40142] Modify _PyObject_GC_TRACK() to ensure that newly tracked object is valid

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: Attached gc_track.patch: my latest attempt to implement this idea. -- Added file: https://bugs.python.org/file50130/gc_track.patch ___ Python tracker

[issue40142] Modify _PyObject_GC_TRACK() to ensure that newly tracked object is valid

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-44531 "Add _PyType_AllocNoTrack() function: allocate without tracking in the GC". -- ___ Python tracker ___

[issue44531] Add _PyType_AllocNoTrack() function: allocate without tracking in the GC

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: In bpo-40142, I tried to modify _PyObject_GC_TRACK() to visit the object before tracking it, as done by PyObject_GC_Track(). Problem: PyType_GenericAlloc() cannot traverse the object since the object members are not initialized yet. For example,

[issue44531] Add _PyType_AllocNoTrack() function: allocate without tracking in the GC

2021-06-28 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +25514 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26947 ___ Python tracker ___

[issue44531] Add _PyType_AllocNoTrack() function: allocate without tracking in the GC

2021-06-28 Thread STINNER Victor
New submission from STINNER Victor : The PyType_GenericAlloc() function tracks the newly created object in the garbage collector (GC) as soon as memory is initialized, but before all object members are initialized. If a GC collection happens before the object is fully initialized, the

[issue44529] Using typing.Union in isinstance checks

2021-06-28 Thread Kaleb Barrett
Kaleb Barrett added the comment: Ah, this was implemented for 3.10 as a part of PEP 604. https://www.python.org/dev/peps/pep-0604/#isinstance-and-issubclass. Feel free to close. -- ___ Python tracker

[issue40142] Modify _PyObject_GC_TRACK() to ensure that newly tracked object is valid

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: PyType_GenericAlloc() cannot traverse the object since the object members are not initialized yet. For example, dict_traverse() can only be called when PyDict_New() completes. A different approach would be to: * (1) Add PyType_AllocNoTrack(), use it in

[issue44288] unittest: _is_relevant_tb_level() fails because tb.tb_frame.f_globals=None

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: I mark this issue as a duplicate of bpo-2. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Globals (and presumably builtins) are cleared premuturely in FrameObject ___

[issue44442] Globals (and presumably builtins) are cleared premuturely in FrameObject

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: I marked bpo-44288 as a duplicate of this issue. -- ___ Python tracker ___ ___ Python-bugs-list

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: > tp_traverse is optional, so we should not add this assertion. It is required by types implementing the GC protocol. This assumption is non-obvious and was not documented. The documentation was completed in bpo-44263 by commit

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: This issue was fixed differently in bpo-44263, by adding a test in PyType_Ready(): // bpo-44263: tp_traverse is required if Py_TPFLAGS_HAVE_GC is set. // Note: tp_clear is optional. if (type->tp_flags & Py_TPFLAGS_HAVE_GC &&

[issue43770] Rework C types initialization

2021-06-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +25513 pull_request: https://github.com/python/cpython/pull/26946 ___ Python tracker ___

[issue44394] [security] CVE-2013-0340 "Billion Laughs" fixed in Expat >=2.4.0: Update vendored copy to expat 2.4.1

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: Attached cpython_rebuild_expat_dir.sh script updates Modules/expat/ to our libexpat copy to 2.4.1. I used it to create attached PR 26945. -- Added file: https://bugs.python.org/file50129/cpython_rebuild_expat_dir.sh

[issue44394] [security] CVE-2013-0340 "Billion Laughs" fixed in Expat >=2.4.0: Update vendored copy to expat 2.4.1

2021-06-28 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +25512 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26945 ___ Python tracker ___

[issue44521] str.removeprefix(): add strict: bool

2021-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Start by presenting this idea on python-ideas list. -- nosy: +terry.reedy ___ Python tracker ___

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: PEP 597 was implemented successfully in Python 3.10 with this feature. This is no agreement yet on what is the "current locale encoding". For now, I prefer to close the issue. We can reconsider this feature once there will be more user requests for such

[issue44117] [C API] Remove deprecated PyEval_InitThreads()

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: The function is part of the stable ABI so I prefer to keep it for now. https://github.com/python/cpython/pull/26070#issuecomment-839871560 I close the issue. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: MultiLoopChildWatcher still has a race condition. I see different options: * Deprecate/Remove MultiLoopChildWatcher * Find a magic fix for MultiLoopChildWatcher. It sounds complicated since it's *designed* to not be related to any event loop. See my failed

[issue44434] _thread module: Remove redundant PyThread_exit_thread() call to avoid glibc fatal error: libgcc_s.so.1 must be installed for pthread_cancel to work

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: On Linux, there is a workaround for Python versions which don't include this fix: $ LD_PRELOAD=/usr/lib64/libgcc_s.so.1 python3 ... To preload the libgcc_s.so.1 library in the Python process when running Python. --

[issue44434] _thread module: Remove redundant PyThread_exit_thread() call to avoid glibc fatal error: libgcc_s.so.1 must be installed for pthread_cancel to work

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 48e3a1d95aee013974121fcafe19816c0e9a41da by Victor Stinner in branch 'main': bpo-44434: Remove useless calls to PyThread_exit_thread() (GH-26943) https://github.com/python/cpython/commit/48e3a1d95aee013974121fcafe19816c0e9a41da --

[issue6642] returning after forking a child thread doesn't call Py_Finalize

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: I add the "Subinterpreters" component even if the issue is about the main interpreter, this kind of issue impacts subinterpreters. -- components: +Subinterpreters nosy: +vstinner ___ Python tracker

[issue36479] [subinterpreters] Exit threads when interpreter is finalizing rather than runtime.

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: I close the issue. -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: See also a discussion about the usefulness of daemon threads: https://github.com/python-trio/trio/issues/2046 I'm more in favor of deprecating daemon threads (in any interpreter, not only in subinterpreters). The current implementation is too fragile. There

[issue44434] _thread module: Remove redundant PyThread_exit_thread() call to avoid glibc fatal error: libgcc_s.so.1 must be installed for pthread_cancel to work

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: I marked bpo-37395 "Core interpreter should be linked with libgcc_s.so on Linux" as a duplicate of this issue. -- ___ Python tracker ___

[issue37395] Core interpreter should be linked with libgcc_s.so on Linux

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: > This is arguably a bug in glibc, but Python can easily work around it by > linking the core interpreter (the `python` executable and/or `libpython.so`) > with libgcc_s at build time (`-lgcc_s`) on Linux. It will then be loaded > already if and when it's

[issue44434] _thread module: Remove redundant PyThread_exit_thread() call to avoid glibc fatal error: libgcc_s.so.1 must be installed for pthread_cancel to work

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: Se also bpo-35866 which looks like a duplicate. -- ___ Python tracker ___ ___ Python-bugs-list

[issue35866] concurrent.futures deadlock

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: > #6 0x77bc7712 in __pthread_unwind () from /lib64/libpthread.so.0 > #7 0x77bbf7e7 in pthread_exit () from /lib64/libpthread.so.0 > #8 0x0051b2fc in PyThread_exit_thread () at > Python/thread_pthread.h:238 > #9 0x0055ed16

[issue44526] Doc typo in "What’s New In Python 3.10" (x/y-axis)

2021-06-28 Thread Jack DeVries
Jack DeVries added the comment: @serif2 nice catch! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44526] Doc typo in "What’s New In Python 3.10" (x/y-axis)

2021-06-28 Thread Jack DeVries
Change by Jack DeVries : -- keywords: +patch nosy: +jack__d nosy_count: 2.0 -> 3.0 pull_requests: +25511 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26944 ___ Python tracker

[issue18748] io.IOBase destructor silence I/O error on close() by default

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: > Running the file couple of times will make the interpreter fail with: > libgcc_s.so.1 must be installed for pthread_cancel to work See also bpo-44434: "_thread module: Remove redundant PyThread_exit_thread() call to avoid glibc fatal error: libgcc_s.so.1

[issue44434] _thread module: Remove redundant PyThread_exit_thread() call to avoid glibc fatal error: libgcc_s.so.1 must be installed for pthread_cancel to work

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: I marked bpo-42888 as a duplicate of this issue. I created PR 26943 based on Alexey's PR 24241 to complete my fix (remove two calls in two tests). Copy of his interesting PR commit message: --- bpo-42888: Remove PyThread_exit_thread() calls from top-level

[issue44529] Using typing.Union in isinstance checks

2021-06-28 Thread Jack DeVries
Jack DeVries added the comment: I think this already works unless you are using TypeVars:: t = Union[str, int] isinstance(1, t)# True isinstance('1', t) # True If you are using TypeVars, though, it cannot work: T = TypeVar('my_type') thing = Union[T, str]

[issue42888] Not installed “libgcc_s.so.1” causes exit crash.

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: This issue is a duplicate of bpo-44434 which has been fixed. I created PR 26943 based on Alexey's PR 24241 to complete my fix. -- nosy: +vstinner resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> _thread

[issue44434] _thread module: Remove redundant PyThread_exit_thread() call to avoid glibc fatal error: libgcc_s.so.1 must be installed for pthread_cancel to work

2021-06-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +25510 pull_request: https://github.com/python/cpython/pull/26943 ___ Python tracker ___

[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-44434: "_thread module: Remove redundant PyThread_exit_thread() call to avoid glibc fatal error: libgcc_s.so.1 must be installed for pthread_cancel to work". New changeset 45a78f906d2d5fe5381d78466b11763fc56d57ba by Victor Stinner in branch

[issue39710] "will be returned as unicode" reminiscent from Python 2

2021-06-28 Thread Roundup Robot
Change by Roundup Robot : -- nosy: +python-dev nosy_count: 8.0 -> 9.0 pull_requests: +25509 pull_request: https://github.com/python/cpython/pull/26942 ___ Python tracker ___

[issue44521] str.removeprefix(): add strict: bool

2021-06-28 Thread Jack DeVries
Change by Jack DeVries : -- nosy: +lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44521] str.removeprefix(): add strict: bool

2021-06-28 Thread Jack DeVries
Jack DeVries added the comment: @lemburg, hopefully I'm asking the right person... you're down as the devguide expert on unicode and these changes would (I think) need to be applied here:: Objects/unicodeobject.c::12814 unicode_removeprefix_impl Anyway, do you think this would be a useful

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-06-28 Thread Gabriele N Tornetta
Change by Gabriele N Tornetta : -- keywords: +patch pull_requests: +25508 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26941 ___ Python tracker

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-06-28 Thread Gabriele N Tornetta
New submission from Gabriele N Tornetta : When dumping profiling data out of code objects using out-of-process tools like Austin (https://github.com/p403n1x87/austin) one has access only to file name, function name, and line number. Consider the flame graph generated by running the following

[issue44517] test__xxsubinterpreters: AMD64 Fedora Stable 3.x buildbot aborts at test_still_running

2021-06-28 Thread STINNER Victor
STINNER Victor added the comment: On my laptop with 4 physical CPUs (8 threads), I can reproduce test_still_running() random failure with: $ ./python -m test test__xxsubinterpreters -j50 -v -F (...) 0:00:37 load avg: 24.31 [ 19/1] test__xxsubinterpreters failed (36.2 sec) (...) (...)

[issue44523] weakref.proxy documentation might be outdated

2021-06-28 Thread Jack DeVries
Jack DeVries added the comment: I'm going to close my PR; it seems like documentation is not the direction we're going, so no need to keep it open. -- ___ Python tracker ___

[issue43476] Enabling access to showsyntaxerror for IDLE's shell

2021-06-28 Thread Andre Roberge
Andre Roberge added the comment: I made an error in my previous comment: the code I wrote is obviously incorrect as it contains a SyntaxError. -- ___ Python tracker ___

[issue43625] CSV has_headers heuristic could be improved

2021-06-28 Thread Andrei Kulakov
Andrei Kulakov added the comment: I've added the PR here, based on Skip's patch: https://github.com/python/cpython/pull/26939 -- ___ Python tracker ___

[issue43625] CSV has_headers heuristic could be improved

2021-06-28 Thread Andrei Kulakov
Change by Andrei Kulakov : -- nosy: +andrei.avk nosy_count: 3.0 -> 4.0 pull_requests: +25507 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26939 ___ Python tracker

[issue44523] weakref.proxy documentation might be outdated

2021-06-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Pablo, I'm having second thoughts on hash forwarding. It looks like its omission was an intentional design decision. I vote for restoring the previous behavior. That will likely save some headaches for some users. -- nosy: +rhettinger

[issue44520] In Lib/urllib/parse.py quote_from_bytes, exception is thrown if bs = None

2021-06-28 Thread Irit Katriel
Irit Katriel added the comment: I don’t know if it needs to change, but if anything I would map None to None and not to ‘’. -- ___ Python tracker ___

[issue44520] In Lib/urllib/parse.py quote_from_bytes, exception is thrown if bs = None

2021-06-28 Thread Олег Масло
Олег Масло added the comment: That is, all the libraries already created need to follow your advice? :) -- ___ Python tracker ___

[issue43346] subprocess.run() sometimes ignores timeout in Windows

2021-06-28 Thread Zachary Ware
Change by Zachary Ware : -- nosy: +bugale bugale, eric.smith versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-list

[issue44518] Finalization of non-exhausted asynchronous generators is deferred

2021-06-28 Thread Guido van Rossum
Guido van Rossum added the comment: Okay, that suggests that the extra reference is being held by asyncio, right? I suppose it's in the hands of the asyncio devs then. -- ___ Python tracker

[issue44527] On Windows, subprocess.run gets stuck indefinitely

2021-06-28 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> subprocess.run() sometimes ignores timeout in Windows ___ Python tracker

[issue44373] make Event an Awaitable

2021-06-28 Thread Kaleb Barrett
Change by Kaleb Barrett : -- title: make Event and Awaitable -> make Event an Awaitable ___ Python tracker ___ ___ Python-bugs-list

[issue44527] On Windows, subprocess.run gets stuck indefinitely

2021-06-28 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Windows nosy: +eric.smith, paul.moore, steve.dower, tim.golden, zach.ware title: subprocess.run gets stuck indefinitely -> On Windows, subprocess.run gets stuck indefinitely ___ Python tracker

[issue44529] Using typing.Union in isinstance checks

2021-06-28 Thread Kaleb Barrett
New submission from Kaleb Barrett : I have type aliases of Unions like so: Request = Union[WriteRequest, ReadRequest] I'd like to be able to use "Request" in an isinstance check rather than having to duplicate the information in a tuple to pass to the check. Currently I get: TypeError:

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-06-28 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37773] ValueError: I/O operation on closed file. in ZipFile destructor

2021-06-28 Thread Andrei Kulakov
Andrei Kulakov added the comment: I forgot to add, to fix the tests I also had to add `closed=False` attr to test_zipfile.Tellable. -- ___ Python tracker ___

[issue44521] str.removeprefix(): add strict: bool

2021-06-28 Thread Марк Коренберг
Марк Коренберг added the comment: Any kwarg is OK for me, so please do. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44528] Move IP version resolving to http.server's API

2021-06-28 Thread pavel-lexyr
New submission from pavel-lexyr : Python's native HTTP server (http.server module) has special code to allow it to detect and bind to IPv6 addresses when called as a CLI tool. As of right now, the code is in private functions. Those are not intended to be called by library users - only the

[issue29298] argparse fails with required subparsers, un-named dest, and empty argv

2021-06-28 Thread Paulie Pena
Paulie Pena added the comment: I'd like to second this idea, since it's very confusing without it: > while waiting for a fix, would it be possible to document in the argparse > documentation that the 'dest' parameter is required (at least temporarily) > for add_subparsers()? (somewhere near

[issue44527] subprocess.run gets stuck indefinitely

2021-06-28 Thread bugale bugale
New submission from bugale bugale : The implementation for subprocess.run on Windows has a bug that causes it to hang indefinitely in some scenarios. The issue can be easily reproduced by this code: import subprocess subprocess.run(['cmd.exe', '/c', 'ping 1.2.3.4 -n '],

[issue44521] str.removeprefix(): add strict: bool

2021-06-28 Thread Jack DeVries
Jack DeVries added the comment: @Jelle Zijlstra, they did think about this in the pep; see here https://www.python.org/dev/peps/pep-0616/#id26 The PEP authors suggested a kwarg of ``required`` which is certainly better. Maybe ``raise_exception`` would be even more explicit albeit verbose.

[issue44521] str.removeprefix(): add strict: bool

2021-06-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: ValueError would seem to be the right exception to use. If this parameter were to be added (I'm not convinced that it should be), I'd prefer to call it something more specific than "strict", since "strict" can mean lots of things. -- nosy: +Jelle

[issue44518] Finalization of non-exhausted asynchronous generators is deferred

2021-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Inlined asyncio.run(func()) is roughly equivalent to the following code: loop = asyncio.new_event_loop() loop.run_until_complete(func()) loop.run_until_complete(loop.shutdown_asyncgens()) loop.close() If comment out

[issue44498] add deprecation warnings for asynchat, asyncore and smtpd

2021-06-28 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 ___ Python tracker ___

[issue37773] ValueError: I/O operation on closed file. in ZipFile destructor

2021-06-28 Thread Andrei Kulakov
Andrei Kulakov added the comment: In my testing on 3.9.1 and the current `main` branch, I found: - I can reproduce this issue if a function or a lambda or class with a method are defined. - There is no error if a class is defined with no methods. (I'm not sure why). The test code runs

[issue44523] weakref.proxy documentation might be outdated

2021-06-28 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Antoine, Neil, what do you think about this? -- nosy: +nascheme, pitrou ___ Python tracker ___

[issue44523] weakref.proxy documentation might be outdated

2021-06-28 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I assume that the original comment is referring to the case when a proxy is a key and the original dies, but this just makes the thing inoperable, as expected: >>> class A: ... ... ... >>> a = A() >>> p = weakref.proxy(a) >>> d = {p: 42} >>> a in d

[issue44461] 'Pdb' object has no attribute 'botframe'

2021-06-28 Thread Irit Katriel
Irit Katriel added the comment: The cleanup issue was in the except: clause of the main loop: if the user does quit() during the pdb.interaction() call upon an unhandled exception ("the post mortem debugger"), then this quit request is ignored and the program just restarts. The attached

[issue44523] weakref.proxy documentation might be outdated

2021-06-28 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: In my view, proxies should behave almost exactly as the underliying object, so using them is as ergonomic as possible. For instance, when using them as a way to avoid cycles, is quite annoying if you have a hashable object in a dictionary and they

[issue44461] 'Pdb' object has no attribute 'botframe'

2021-06-28 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +25506 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26937 ___ Python tracker ___

[issue44523] weakref.proxy documentation might be outdated

2021-06-28 Thread Jack DeVries
Change by Jack DeVries : -- keywords: +patch nosy: +jack__d nosy_count: 3.0 -> 4.0 pull_requests: +25505 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26936 ___ Python tracker

[issue23041] csv needs more quoting rules

2021-06-28 Thread Skip Montanaro
Skip Montanaro added the comment: Ugh... s/QUOTE_NONNULL/QUOTE_NOTNULL/ Not, Non, None... Perl would treat them all the same, right? -- ___ Python tracker ___

[issue44518] Finalization of non-exhausted asynchronous generators is deferred

2021-06-28 Thread Guido van Rossum
Guido van Rossum added the comment: I am wondering whether the issue is in asyncio.run, or in the basic async generator implementation. If the latter, you should be able to demonstrate this with a manual "driver" (trampoline?) instead of asyncio.run. --

[issue23041] csv needs more quoting rules

2021-06-28 Thread Skip Montanaro
Skip Montanaro added the comment: Missed tweaking a couple settings. -- resolution: rejected -> stage: resolved -> needs patch versions: +Python 3.11 -Python 3.8 ___ Python tracker

[issue23041] csv needs more quoting rules

2021-06-28 Thread Skip Montanaro
Skip Montanaro added the comment: Okay, I'll reopen this, at least for the discussion of QUOTE_NONNULL. @erdnaxeli please given an example of how PostgreSQL distinguishes between the empty string and None cases. Is it a quoted empty string vs an empty field? If so, modifying @samwyse's

[issue38062] Clarify that atexit.unregister matches by equality, not identity

2021-06-28 Thread Jack DeVries
Change by Jack DeVries : -- keywords: +patch nosy: +jack__d nosy_count: 2.0 -> 3.0 pull_requests: +25504 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26935 ___ Python tracker

[issue44523] weakref.proxy documentation might be outdated

2021-06-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> pablogsal nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list

[issue44524] __name__ attribute in typing module

2021-06-28 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra, kj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-06-28 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +25503 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26934 ___ Python tracker ___

[issue44526] Doc typo in "What’s New In Python 3.10" (x/y-axis)

2021-06-28 Thread serif
New submission from serif : Page: What’s New In Python 3.10 https://docs.python.org/3.10/whatsnew/3.10.html Section: PEP 634: Structural Pattern Matching Patterns and classes In the example code, x and y in the printed messages are swapped. case Point(x=0, y=y):

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-06-28 Thread Ken Jin
New submission from Ken Jin : CALL_FUNCTION can be specialized. Copying from Mark's comments https://github.com/faster-cpython/ideas/issues/54#issue-898013125 ``` There are a number of specializations of CALL_FUNCTION that make sense: 1. Calls to a Python function where the arguments and

[issue44524] __name__ attribute in typing module

2021-06-28 Thread Lars
New submission from Lars : I noticed some (perhaps intentional) oddities with the __name__ attribute: - typing classes like Any (subclass of _SpecialForm) do not have a __name__ attribute, - abstract base classes in typing, like MutableSet do not have a __name__ attribute, - 'ChainMap',

[issue44523] weakref.proxy documentation might be outdated

2021-06-28 Thread Alexander Neumann
New submission from Alexander Neumann : The documentation currently states: > Proxy objects are not hashable regardless of the referent; this avoids a > number of problems related to their fundamentally mutable nature, and prevent > their use as dictionary keys. callback is the same as the

[issue44520] In Lib/urllib/parse.py quote_from_bytes, exception is thrown if bs = None

2021-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you want to interpret None as an empty string, you can just write quote_from_bytes(data or b''). -- nosy: +serhiy.storchaka ___ Python tracker

[issue44461] 'Pdb' object has no attribute 'botframe'

2021-06-28 Thread Irit Katriel
Irit Katriel added the comment: However, if we just try to initialize self.botframe to None in __init__, then 'quit' doesn't work anymore, so something else needs to be done about cleanup when import fails at that stage. -- versions: +Python 3.11

[issue44461] 'Pdb' object has no attribute 'botframe'

2021-06-28 Thread Irit Katriel
Irit Katriel added the comment: The difference between Jason's two test cases is which stage of Pdb._runmodule() fails. In the case of `python -m pdb -m importlib` runpy._get_module_details(module_name) raises an exception because importlib is a package and it looks for its __main__, so

[issue30511] shutil.make_archive should not need to chdir (alternatively: make shutil.make_archive thread-safe)

2021-06-28 Thread Andrei Kulakov
Andrei Kulakov added the comment: PR is added here: https://github.com/python/cpython/pull/26933 -- ___ Python tracker ___ ___

[issue30511] shutil.make_archive should not need to chdir (alternatively: make shutil.make_archive thread-safe)

2021-06-28 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch nosy: +andrei.avk nosy_count: 5.0 -> 6.0 pull_requests: +25502 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26933 ___ Python tracker

[issue44522] [doc] open() function errors='surrogateescape' has inaccurate information

2021-06-28 Thread Bupjae Lee
New submission from Bupjae Lee : https://docs.python.org/3/library/functions.html#open error parameter of open() function says this: 'surrogateescape' will represent any incorrect bytes as code points in the Unicode Private Use Area ranging from U+DC80 to U+DCFF. However, U+DC80 to U+DCFF

[issue44520] In Lib/urllib/parse.py quote_from_bytes, exception is thrown if bs = None

2021-06-28 Thread Eric V. Smith
Eric V. Smith added the comment: Clarifying the title. -- nosy: +eric.smith title: exception is thrown if bs = None -> In Lib/urllib/parse.py quote_from_bytes, exception is thrown if bs = None ___ Python tracker

[issue44464] Remove flake8 exception for deprecation warning (importlib.metadata)

2021-06-28 Thread Jason R. Coombs
Change by Jason R. Coombs : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43718] HTTP CONNECT response not subject to debug level

2021-06-28 Thread Andrei Kulakov
Andrei Kulakov added the comment: The PR is here: https://github.com/python/cpython/pull/26932 -- ___ Python tracker ___ ___

[issue43718] HTTP CONNECT response not subject to debug level

2021-06-28 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch pull_requests: +25501 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26932 ___ Python tracker ___

[issue20779] Add pathlib.chown method

2021-06-28 Thread Tom Cook
Tom Cook added the comment: +1 this. I have a program that opens a UNIX socket as root for other processes to communicate with it. I need to set the permissions to 0o775 and set the owner gid to a specific group so that members of that group can communicate with the process. It's

  1   2   >