[issue38858] new_interpreter() should reuse more Py_InitializeFromConfig() code

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset e0c9ab8e26d1648b870b80c296b2490a5e9553e5 by Victor Stinner in branch 'master': bpo-38858: Add init_set_builtins_open() subfunction (GH-17346) https://github.com/python/cpython/commit/e0c9ab8e26d1648b870b80c296b2490a5e9553e5 --

[issue38748] 32 bit ctypes stdcall callback fails to restore stack pointer

2019-11-22 Thread Eryk Sun
Change by Eryk Sun : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-22 Thread Jukka Väisänen
Jukka Väisänen added the comment: > Are you aware of what currently supported platforms have SO_REUSEPORT defined > where the *reuse_port* parameter doesn't actually work? This would be quite > helpful to know. This was reported by a partner that was working porting our code to Android but

[issue38858] new_interpreter() should reuse more Py_InitializeFromConfig() code

2019-11-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16830 pull_request: https://github.com/python/cpython/pull/17346 ___ Python tracker ___

[issue38804] Regular Expression Denial of Service in http.cookiejar

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: I'm now tracking this vulnerability at: https://python-security.readthedocs.io/vuln/cookiejar-redos.html -- ___ Python tracker ___

[issue38804] Regular Expression Denial of Service in http.cookiejar

2019-11-22 Thread miss-islington
miss-islington added the comment: New changeset a1e1be4c4969c7c20c8c958e5ab5279ae6a66a16 by Miss Islington (bot) in branch '3.8': bpo-38804: Fix REDoS in http.cookiejar (GH-17157) https://github.com/python/cpython/commit/a1e1be4c4969c7c20c8c958e5ab5279ae6a66a16 -- nosy:

[issue38804] Regular Expression Denial of Service in http.cookiejar

2019-11-22 Thread miss-islington
miss-islington added the comment: New changeset cb6085138a845f8324adc011b65754acc2086cc0 by Miss Islington (bot) in branch '3.7': bpo-38804: Fix REDoS in http.cookiejar (GH-17157) https://github.com/python/cpython/commit/cb6085138a845f8324adc011b65754acc2086cc0 --

[issue38804] Regular Expression Denial of Service in http.cookiejar

2019-11-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16829 pull_request: https://github.com/python/cpython/pull/17345 ___ Python tracker ___

[issue38804] Regular Expression Denial of Service in http.cookiejar

2019-11-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16828 pull_request: https://github.com/python/cpython/pull/17344 ___ Python tracker ___

[issue38882] IDLE should not make the about dialog be a transient of the withdrawn root window

2019-11-22 Thread Marc Culler
Marc Culler added the comment: I should have mentioned that I did not see the IDLE hang with Python 3, only with Python 2.7. So I changed the Version in the ticket. -- versions: +Python 3.7 -Python 3.8 ___ Python tracker

[issue38804] Regular Expression Denial of Service in http.cookiejar

2019-11-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +16827 pull_request: https://github.com/python/cpython/pull/17343 ___ Python tracker ___

[issue38804] Regular Expression Denial of Service in http.cookiejar

2019-11-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +16826 pull_request: https://github.com/python/cpython/pull/17342 ___ Python tracker ___

[issue38804] Regular Expression Denial of Service in http.cookiejar

2019-11-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +16825 pull_request: https://github.com/python/cpython/pull/17341 ___ Python tracker ___

[issue38804] Regular Expression Denial of Service in http.cookiejar

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1b779bfb8593739b11cbb988ef82a883ec9d077e by Victor Stinner (bcaller) in branch 'master': bpo-38804: Fix REDoS in http.cookiejar (GH-17157) https://github.com/python/cpython/commit/1b779bfb8593739b11cbb988ef82a883ec9d077e --

[issue38882] IDLE should not make the about dialog be a transient of the withdrawn root window

2019-11-22 Thread Marc Culler
Marc Culler added the comment: It definitely makes sense for an on-screen window to have a transient dialog. With a little care (see "messages boxes" in the widget demo) on the mac the transient can be a "sheet" that opens from the top of the master window. It even makes sense for an

[issue38894] Path.glob() sometimes misses files that match

2019-11-22 Thread Thierry Parmentelat
Thierry Parmentelat added the comment: to clarify, when I said 'lambda user' I mean regular, non-root user that has no permission to read in /root -- ___ Python tracker ___

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset d4d79209e69d52ea4c047545c6c60c3ba75f15f4 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-22367: Update test_fcntl.py for spawn process mode (GH-17154) (GH-17253)

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset c3cd0de9ec7ab54186cebef5b2edfd098f7ae387 by Victor Stinner (Miss Islington (bot)) in branch '3.8': bpo-22367: Update test_fcntl.py for spawn process mode (GH-17154) (GH-17252)

[issue17639] symlinking .py files creates unexpected sys.path

2019-11-22 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: So you have already stated, and this issue is six years old now. While I no longer have a stake in this, I'd just like to reiterate that IMHO it breaks several good practices of architecture, particularly that of separation of roles. The abstraction

[issue38894] Path.glob() sometimes misses files that match

2019-11-22 Thread Thierry Parmentelat
New submission from Thierry Parmentelat : I have observed this on a linux box running fedora29 $ python3 --version Python 3.7.5 $ uname -a Linux faraday.inria.fr 5.3.11-100.fc29.x86_64 #1 SMP Tue Nov 12 20:41:25 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/fedora-release Fedora release

[issue37334] Add a cancel method to asyncio Queues

2019-11-22 Thread Caleb Hattingh
Caleb Hattingh added the comment: Ok, I see now. The improvement with only a single producer/consumer might be marginal, but the proposition that `queue.cancel()` might simplify the situation with multiple producers and/or consumers is more compelling. Usually, assuming M producers and N

[issue17639] symlinking .py files creates unexpected sys.path

2019-11-22 Thread Guido van Rossum
Guido van Rossum added the comment: It is quite intentional that symlinks are followed for the purpose of computing sys. argv[0] and sys.path. -- --Guido (mobile) -- ___ Python tracker

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: New question: if we add a public API to Python 3.8.1, would it make sense to directly change eval_frame type to add a new "tstate" parameter? See bpo-38818 for the rationale. I already proposed a change for the master branch:

[issue36732] Windows: test_asyncio: test_huge_content_recvinto() fails randomly with ProactorEventLoop

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: AMD64 Windows7 SP1 3.x: https://buildbot.python.org/all/#/builders/40/builds/3470 ERROR: test_huge_content_recvinto (test.test_asyncio.test_sock_lowlevel.SelectEventLoopTests) ... ERROR: test_huge_content

[issue33387] Simplify bytecodes for try-finally, try-except and with blocks.

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: Can this issue be closed now? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38858] new_interpreter() should reuse more Py_InitializeFromConfig() code

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: I introduced a workaround to a reference leak in bpo-36854 because _PyImport_Cleanup() doesn't clear modules dictionary in some cases: https://bugs.python.org/issue36854#msg357160 Maybe _PyImport_Cleanup() should be enhanced to ensure that the dictionary of

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: I wrote PR 17340 to add Add PyInterpreterState_GetEvalFrameFunc() and PyInterpreterState_SetEvalFrameFunc() functions. Since the PEP 523 has been approved, for me, these functions must be public, not private. My implementation adds these functions to

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16824 pull_request: https://github.com/python/cpython/pull/17340 ___ Python tracker ___

[issue36854] GC operates out of global runtime state.

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: I close again the issue ;-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36854] GC operates out of global runtime state.

2019-11-22 Thread miss-islington
miss-islington added the comment: New changeset bff525566469021949910deec84e837306b79886 by Miss Islington (bot) in branch '3.7': bpo-36854: Fix reference counter in PyInit__testcapi() (GH-17338) https://github.com/python/cpython/commit/bff525566469021949910deec84e837306b79886 --

[issue38866] test_pyclbr replace asyncore

2019-11-22 Thread Inada Naoki
Inada Naoki added the comment: New changeset 138e7bbb0a5ed44bdd54605e8c58c8f3d3865321 by Inada Naoki (jacksonriley) in branch 'master': bpo-38866: Remove asyncore from test_pyclbr.py (GH-17316) https://github.com/python/cpython/commit/138e7bbb0a5ed44bdd54605e8c58c8f3d3865321 --

[issue36854] GC operates out of global runtime state.

2019-11-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +16823 pull_request: https://github.com/python/cpython/pull/17339 ___ Python tracker ___

[issue36854] GC operates out of global runtime state.

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 84c36c152a2bdf98f9cc7ce0e1db98e1f442a05e by Victor Stinner in branch '3.8': bpo-36854: Fix reference counter in PyInit__testcapi() (GH-17338) https://github.com/python/cpython/commit/84c36c152a2bdf98f9cc7ce0e1db98e1f442a05e --

[issue38692] add a pidfd child process watcher

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: > I can confirm it makes test_posix pass inside a systemd-nspawn container on > Arch Linux. Great! -- ___ Python tracker ___

[issue24084] pstats: sub-millisecond display

2019-11-22 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38692] add a pidfd child process watcher

2019-11-22 Thread Chih-Hsuan Yen
Chih-Hsuan Yen added the comment: Thank you very much for the commit "Skip test_posix.test_pidfd_open() on EPERM"! I can confirm it makes test_posix pass inside a systemd-nspawn container on Arch Linux. On the other hand, I found that tests were broken as both systemd libseccomp on Arch

[issue37334] Add a cancel method to asyncio Queues

2019-11-22 Thread Martin Teichmann
Martin Teichmann added the comment: Hi Andrew, I still don't get your point. First, this is an extension to the asyncio library, so concurrency is not an issue. And sure, if you call random methods of an object without any reason the outcome won't be anything useful, why, in your example,

[issue36854] GC operates out of global runtime state.

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 310e2d25170a88ef03f6fd31efcc899fe062da2c by Victor Stinner in > branch 'master': > bpo-36854: Fix refleak in subinterpreter (GH-17331) I'm not fully happy with this solution, but at least, it allows me to move on to the next tasks to

[issue36854] GC operates out of global runtime state.

2019-11-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16822 pull_request: https://github.com/python/cpython/pull/17338 ___ Python tracker ___

[issue38858] new_interpreter() should reuse more Py_InitializeFromConfig() code

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3d4833488a173c16446c3f94f58f05e2d13c5dee by Victor Stinner in branch 'master': bpo-38858: Call _PyUnicode_Fini() in Py_EndInterpreter() (GH-17330) https://github.com/python/cpython/commit/3d4833488a173c16446c3f94f58f05e2d13c5dee --

[issue38881] unexpected behaviour of random.choices with zero weights

2019-11-22 Thread Iza Romanowska
Iza Romanowska added the comment: Hi, Many thanks for engaging with this. I agree that we should very clearly separate negative weights from zero weights. A negative number is illegal and that's the end of it. However, a zero weight is not illegal, e.g., [0, 0, 0, 0.1] is a legal sequence

[issue17639] symlinking .py files creates unexpected sys.path

2019-11-22 Thread Socob
Change by Socob <206a8...@opayq.com>: -- nosy: +Socob ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38852] test_recursion_limit in test_threading crashes with SIGSEGV on android

2019-11-22 Thread Xavier de Gaye
Xavier de Gaye added the comment: Using test and try with _thread.stack_size(new_size), the pthread stack sizes must be set to the following minimums to prevent stack overflow and get a RecursionError: * debug builds:7 Mb * no-debug builds: 1 Mb The default stack size for the main

[issue38881] unexpected behaviour of random.choices with zero weights

2019-11-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: xtreak, the other discussion isn't similar at all. The OP is proposing that weights all equal to zero be a well-defined way to specify an equiprobable selection. That is a completely new proposal which is easy to implement, but doesn't make much sense

[issue38852] test_recursion_limit in test_threading crashes with SIGSEGV on android

2019-11-22 Thread Xavier de Gaye
Change by Xavier de Gaye : -- keywords: +patch pull_requests: +16821 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17337 ___ Python tracker

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-22 Thread Michael Felt
Michael Felt added the comment: And the other AIX bot has been repaired, and is running green as well! :) -- ___ Python tracker ___

[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-11-22 Thread Bar Harel
Change by Bar Harel : -- keywords: +patch pull_requests: +16820 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/17336 ___ Python tracker

[issue38876] pickle is raising KeyError insteat of pickle.UnpicklingError under certain conditions

2019-11-22 Thread PCManticore
Change by PCManticore : -- keywords: +patch pull_requests: +16819 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17335 ___ Python tracker ___

[issue36854] GC operates out of global runtime state.

2019-11-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 310e2d25170a88ef03f6fd31efcc899fe062da2c by Victor Stinner in branch 'master': bpo-36854: Fix refleak in subinterpreter (GH-17331) https://github.com/python/cpython/commit/310e2d25170a88ef03f6fd31efcc899fe062da2c --

[issue38891] ShareableList read and write access is O(N), should be O(1)

2019-11-22 Thread Dong-hee Na
Dong-hee Na added the comment: IMHO, 1. replace self._allocated_bytes to self._sum_allocated_bytes 2. initialize self._sum_allocated_bytes at the __init__ time. 2. if self._allocated_bytes is needed, calculate from _sum_allocated_bytes it will take O(1) If the suggestion is accepted, I'd

[issue38021] pep425 tag for AIX is inadequate

2019-11-22 Thread Paul Moore
Paul Moore added the comment: PyPA member here - if this PR is defining new compatibility tags, I would have expected it to need discussion as a revision to PEP 425, much like the manylinux efforts did. (It may actually be a closer parallel with MacOS, which didn't have a tagging PEP - I'm

[issue24995] better exception message when an unsupported object is passed to `async for` (pep 492)

2019-11-22 Thread Guido van Rossum
Guido van Rossum added the comment: Do what you think is best. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue24995] better exception message when an unsupported object is passed to `async for` (pep 492)

2019-11-22 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38881] unexpected behaviour of random.choices with zero weights

2019-11-22 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: IIUC, there was a similar discussion on negative weights and all weights being zero to raise ValueError at https://bugs.python.org/issue18844#msg196252 -- nosy: +xtreak ___ Python tracker

[issue38870] Expose ast.unparse in the ast module

2019-11-22 Thread Guido van Rossum
Guido van Rossum added the comment: > @gvanrossum are you OK with adding type comments support? Current version > loses type comment information so if typed_ast parses this, they wont be the > same in AST representation. Good catch, definitely do that! --

[issue38881] unexpected behaviour of random.choices with zero weights

2019-11-22 Thread Iza Romanowska
Iza Romanowska added the comment: Dear Raymond, I understand that passing all zero weights may look nonsensical but random.choices is an implementation of the roulette wheel which is widely used across different scientific disciplines and the situation of passing all zeros is completely

[issue38863] Improve is_cgi() in http.server

2019-11-22 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7, Python 3.8 ___ Python tracker ___

[issue38863] Improve is_cgi() in http.server

2019-11-22 Thread miss-islington
miss-islington added the comment: New changeset 91daa9d7224626dad4bb820924c01b3438ca6e3f by Miss Islington (bot) (Siwon Kang) in branch 'master': bpo-38863: Improve is_cgi() in http.server (GH-17312) https://github.com/python/cpython/commit/91daa9d7224626dad4bb820924c01b3438ca6e3f

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-22 Thread Dong-hee Na
Dong-hee Na added the comment: > p.s. the new PR also needs to be backported for the 3.8 bots. PR 17252 and PR 17253 are backporting patches. And they are ready to be merged :) Thank you for the following up on this issue. -- ___ Python tracker

[issue38877] Python 3.9 build fails under Debian 9.11

2019-11-22 Thread Florian Dahlitz
Florian Dahlitz added the comment: My commands were as follows: $ ./configure $ make &> output_without.txt $ ./configure --enable-optimizations $ make &> output.txt Doing a make clean before each make resolved the issue. Thanks Ned! I searched through the README.md on GitHub and found a note

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-22 Thread Michael Felt
Michael Felt added the comment: p.s. the new PR also needs to be backported for the 3.8 bots. -- ___ Python tracker ___ ___

[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-22 Thread Michael Felt
Michael Felt added the comment: Thanks for the update to the PR FYI One AIX bot seems to be having support issues atm (and stays red), but the other one turned green again. :smile: -- ___ Python tracker

<    1   2