[issue47161] pathlib method relative_to doesnt work with // in paths

2022-03-30 Thread Oleg Iarygin
Oleg Iarygin added the comment: As I found out, any path starting with two double slashes is treated as an UNC (network) path: root \\machine\mountpoint\directory\etc\... directory ^ So "/Library/Video" and "/" are directories

[issue39622] Handle KeyboardInterrupt in asyncio

2022-03-30 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: KeyboardInterrupt is ignored when await asyncio.sleep(0) -> Handle KeyboardInterrupt in asyncio versions: +Python 3.11 -Python 3.7, Python 3.8, Python 3.9

[issue47162] Add call trampoline to work around bad fpcasts on Emscripten

2022-03-30 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +30267 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32189 ___ Python tracker

[issue39622] KeyboardInterrupt is ignored when await asyncio.sleep(0)

2022-03-30 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset f08a191882f75bb79d42a49039892105b2212fb9 by Andrew Svetlov in branch 'main': bpo-39622: Interrupt the main asyncio task on Ctrl+C (GH-32105) https://github.com/python/cpython/commit/f08a191882f75bb79d42a49039892105b2212fb9 --

[issue47158] logging.handlers.SysLogHandler doesn't get cleaned up properly on exit if it throws an exception

2022-03-30 Thread Grégory Starck
Grégory Starck added the comment: I guess it could be done relatively easily. but the question is more: should it be done ? -- ___ Python tracker ___

[issue47163] "unterminated subpattern" in valid regex if re.VERBOSE is used

2022-03-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue47163] "unterminated subpattern" in valid regex if re.VERBOSE is used

2022-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: "#" in VERBOSE mode starts a comment and skips to the end of the line. Escape it: "\#". -- nosy: +serhiy.storchaka resolution: not a bug -> stage: resolved -> status: closed -> open ___ Python tracker

[issue47161] pathlib method relative_to doesnt work with // in paths

2022-03-30 Thread Oleg Iarygin
Oleg Iarygin added the comment: I started to investigate and found that a double slash in the beginning cancels any parsing of a path: >>> Path("//Library/Video")._parts ['Library\\Video\\'] vs >>> Path("/Library/Video")._parts ['\\', 'Library', 'Video'] Investigating

[issue47126] Update to canonical PEP URLs

2022-03-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- stage: resolved -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue47163] "unterminated subpattern" in valid regex if re.VERBOSE is used

2022-03-30 Thread Ned Batchelder
Ned Batchelder added the comment: I realized my mistake... never mind! -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue47126] Update to canonical PEP URLs

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

[issue39114] Python 3.9.0a2 changed how finally/return is traced

2022-03-30 Thread Irit Katriel
Change by Irit Katriel : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue47163] "unterminated subpattern" in valid regex if re.VERBOSE is used

2022-03-30 Thread Ned Batchelder
New submission from Ned Batchelder : In this code, the same regex is compiled with and without re.VERBOSE. Without, it compiles fine. With, it fails with an "unterminated subpattern" error. list_num_rx1 = r"""(?P\()?(\d+|#|[a-z])(?(paren)\)|\.)""" list_num_rx2 =

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

2022-03-30 Thread Christian Heimes
Change by Christian Heimes : -- dependencies: +Add call trampoline to work around bad fpcasts on Emscripten ___ Python tracker ___

[issue47162] Add call trampoline to work around bad fpcasts on Emscripten

2022-03-30 Thread Christian Heimes
New submission from Christian Heimes : WASM cannot handle function calls with bad function pointer casts yet. Hood Chatham explained the issue in Pyodide patch https://github.com/pyodide/pyodide/blob/0.19.1/cpython/patches/0001-call-trampolines-to-handle-fpcast-troubles.patch --- The wasm

[issue34861] Improve cProfile standard output

2022-03-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 75eee1d57eb28283a8682a660d9949afc89fd010 by Daniël van Noord in branch 'main': bpo-34861: Make cumtime the default sorting key for cProfile (GH-31929) https://github.com/python/cpython/commit/75eee1d57eb28283a8682a660d9949afc89fd010

[issue47160] round function is not working as expected

2022-03-30 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This is documented https://docs.python.org/3/library/functions.html#round > The behavior of round() for floats can be surprising: for example, > round(2.675, 2) gives 2.67 instead of the expected 2.68. This is not a bug: > it’s a result of the

[issue47161] pathlib method relative_to doesnt work with // in paths

2022-03-30 Thread Jan Bronicki
New submission from Jan Bronicki : The `//` path should be equivalent to `/`, and in some ways, it does behave like that in pathlib. But in the `relative_to` method on a `Path` object, it does not work This is causing our CI pipeline to fail. In the documentation here you can see `//` being

[issue47126] Update to canonical PEP URLs

2022-03-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 6881ea936e277b1733bee581c4e59e3a5d53bb29 by Hugo van Kemenade in branch 'main': bpo-47126: Update to canonical PEP URLs specified by PEP 676 (GH-32124) https://github.com/python/cpython/commit/6881ea936e277b1733bee581c4e59e3a5d53bb29

[issue46429] Merge all deepfrozen files into one

2022-03-30 Thread Kumar Aditya
Change by Kumar Aditya : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue47127] Specialize call for c functions with METH_FASTCALL|METH_KEYWORDS

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

[issue47151] subprocess fails when used as init, vfork() returns EINVAL if PID=1

2022-03-30 Thread STINNER Victor
STINNER Victor added the comment: > Any possibility that you can test the attached PR as pid 1? Python should be built as a static binary and can be used as the init process on the kernel command line, no? I'm not sure that "static binary" is a requirement, since I'm commonly using

[issue47160] round function is not working as expected

2022-03-30 Thread ATUL VISHAL
New submission from ATUL VISHAL : round function is not working as expected . my number is x= 0.967565*185000= 178999.525 round(x,2) answer is coming as 178999.52 expected value is 178999.53 -- components: Library (Lib) files: compiled_result.jpg messages: 416333 nosy: vishalatul09

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

2022-03-30 Thread Inada Naoki
Inada Naoki added the comment: > Please see https://bugs.python.org/issue47000#msg415769 for what Victor > suggested. Of course, I read it. > In particular, the locale module uses the "no underscore" convention. > Not sure whether it's good to start using snake case now, but I'm also > not

[issue47159] multiprocessing.pool.Pool.apply block infinitely when stressed while using maxtasksperchild

2022-03-30 Thread Harsh Patel
New submission from Harsh Patel : We have a long-running process, which uses thread pool to get tasks and these threads then schedule the tasks and send them to multiprocessing.Pool (with maxtasksperchild limit set) using apply function. The original codebase is large but I have extracted

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

2022-03-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Please see https://bugs.python.org/issue47000#msg415769 for what Victor suggested. In particular, the locale module uses the "no underscore" convention. Not sure whether it's good to start using snake case now, but I'm also not against it. I would like

[issue47152] Reorganize the re module sources

2022-03-30 Thread Ma Lin
Change by Ma Lin : -- pull_requests: +30266 pull_request: https://github.com/python/cpython/pull/32188 ___ Python tracker ___ ___

[issue23689] Memory leak in Modules/sre_lib.h

2022-03-30 Thread Ma Lin
Change by Ma Lin : -- pull_requests: +30265 pull_request: https://github.com/python/cpython/pull/32188 ___ Python tracker ___ ___

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

2022-03-30 Thread Inada Naoki
Inada Naoki added the comment: @vstiner Since UTF-8 mode affects `locale.getpreferredencoding(False)`, I need to decide alternative API in the PEP 686. If no objections, I will choose `locale.get_encoding()` for current locale encoding (ACP on Windows). See

[issue47152] Reorganize the re module sources

2022-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It turns out that pip uses sre_constants in its copy of pyparsing. The problem is already fixed in the upstream of pyparsing and soon should be fixed in pip. We still need to keep sre_constants and maybe other sre_* modules, but deprecate them. > Could

[issue47149] DatagramHandler doing DNS lookup on every log message

2022-03-30 Thread Bruce Merry
Bruce Merry added the comment: > But it's going to be non-trivial, I fear. Yeah. Maybe some documentation is achievable in the short term though, so that users who care more about latency than changing DNS are aware that they should do the lookup themselves? --

[issue44090] Add class binding to unbound super objects for allowing autosuper with class methods

2022-03-30 Thread Géry
Géry added the comment: By the way: > I don't think we need two ways to do it. So do you think we could drop the support for single-argument super? Michele said in his article: > There is a single use case for the single argument syntax of super that I am > aware of, but I think it gives

[issue46864] Deprecate ob_shash in BytesObject

2022-03-30 Thread Christian Heimes
Christian Heimes added the comment: New changeset d8f530fe329c6bd9ad6e1a9db9aa32b465c2d67f by Christian Heimes in branch 'main': bpo-46864: Suppress even more ob_shash deprecation warnings (GH-32176) https://github.com/python/cpython/commit/d8f530fe329c6bd9ad6e1a9db9aa32b465c2d67f

[issue47145] Improve graphlib.TopologicalSort by removing the prepare step

2022-03-30 Thread Larry Hastings
Larry Hastings added the comment: > Assuming we do want to be able to add() after a get_ready(), is there > a reason that "forgetting" already-produced nodes is the correct > behavior, as opposed to remembering all nodes ever added, and > raising iff the addition creates a cycle among all

[issue47145] Improve graphlib.TopologicalSort by removing the prepare step

2022-03-30 Thread Larry Hastings
Larry Hastings added the comment: I'm using my graph library to manage a list of tasks that need doing in some sort of proper order. One task may spawn other tasks at runtime, and we don't necessarily know what the tasks will be until runtime. It's way more convenient to simply add such

<    1   2