[issue35823] Use vfork() in subprocess on Linux

2020-10-15 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: I've updated my PR. * After a discussion with Alexander Monakov (a GCC developer), moved vfork() into a small function to isolate it from both subprocess_fork_exec() and child_exec(). This appears to be the best strategy to avoid -Wclobbered false

[issue42049] Add image/webp to list of media types in mimetypes.py

2020-10-15 Thread waicalibre
Change by waicalibre : -- keywords: +patch pull_requests: +21686 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22718 ___ Python tracker ___

[issue42049] Add image/webp to list of media types in mimetypes.py

2020-10-15 Thread waicalibre
New submission from waicalibre : WebP is an open image format that's existed for 10 years and is supported by most modern web browsers: https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types#WebP. It should be in the list of media types. -- messages: 378702 nosy:

[issue42033] Seemingly unnecessary complexification of foo(**kw)

2020-10-15 Thread Josh Rosenberg
Change by Josh Rosenberg : -- nosy: +josh.r ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42030] Drop support for dynload_aix

2020-10-15 Thread Kevin
Kevin added the comment: I've opened a PR to disable support in 3.10 with removal in 3.11 according to the guidelines outline in PEP 11. Given the unlikeliness that anyone is actually still using this feature (and are possibly already broken by a bunch of other things), would it make more

[issue42030] Drop support for dynload_aix

2020-10-15 Thread Kevin
Change by Kevin : -- keywords: +patch pull_requests: +21685 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22717 ___ Python tracker ___

[issue42030] Drop support for dynload_aix

2020-10-15 Thread David Edelsohn
David Edelsohn added the comment: If Python has been defaulting to dlopen() on AIX systems that support it, there is no reason to maintain the historical, AIX-specific load() support in dynload_aix.c I believe that dlopen() was introduced on AIX in release 4.3. The official end of support

[issue42043] zipfile.Path should support inheritance

2020-10-15 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +21684 pull_request: https://github.com/python/cpython/pull/22716 ___ Python tracker ___

[issue41855] FastPath.zip_children can give duplicate results on Python 3.8

2020-10-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset 967fddae2fe48f297563c358bdbdde1e2cfed4ee by Jason R. Coombs in branch '3.8': [3.8] bpo-41855: Fix duplicate results in FastPath.zip_children() (#22404) https://github.com/python/cpython/commit/967fddae2fe48f297563c358bdbdde1e2cfed4ee

[issue42041] venv subprocess call to python resolves to wrong interpreter

2020-10-15 Thread Paul Moore
Paul Moore added the comment: Eryk - I suggest that we modify (or remove) the note in venv that my PR adds as part of such a change, rather than try to qualify the text now (which would probably only make it harder for people to understand the issue). --

[issue42041] venv subprocess call to python resolves to wrong interpreter

2020-10-15 Thread Mark Keller
Mark Keller added the comment: This sounds good to me Paul, thank you again! -- ___ Python tracker ___ ___ Python-bugs-list

[issue42048] Document Argument Clinic's defining_class converter

2020-10-15 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : The 'defining_class' AC converter is not documented. https://www.python.org/dev/peps/pep-0573/#argument-clinic https://docs.python.org/3.10/howto/clinic.html -- components: Argument Clinic messages: 378696 nosy: erlendaasland, larry,

[issue42043] zipfile.Path should support inheritance

2020-10-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: This issue was addressed incidentally in [jaraco/zipp#56](https://github.com/jaraco/zipp/issues/56) released as zipp 3.2.0. I'd like to incorporate the tests submitted in PR 22711 and then port those changes to Python. --

[issue42041] venv subprocess call to python resolves to wrong interpreter

2020-10-15 Thread Eryk Sun
Eryk Sun added the comment: PR 22715 is accurate for the current implementation of subprocess. There has been discussion in past issues about implementing a PATH search that's similar to what the CMD shell does -- as in calling os.system() or Popen() with shell=True -- instead of relying on

[issue42044] Running Python in unbuffered mode may not write all contents to the console

2020-10-15 Thread Eryk Sun
Eryk Sun added the comment: Text mode without a buffer isn't reliable. That said, Python 3.9 no longer supports Windows 7, so it can remove the 32 KiB limit on console I/O files. The size limit in Windows 7 and earlier is due to the LPC-based pseudo-files that it uses for I/O. Under the

[issue42041] venv subprocess call to python resolves to wrong interpreter

2020-10-15 Thread Paul Moore
Paul Moore added the comment: I've created https://github.com/python/cpython/pull/22715 as a suggested documentation fix. Mark, does this cover what you would have needed to know? Steve, is what I've written technically accurate? -- stage: patch review ->

[issue42041] venv subprocess call to python resolves to wrong interpreter

2020-10-15 Thread Paul Moore
Change by Paul Moore : -- keywords: +patch pull_requests: +21683 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22715 ___ Python tracker ___

[issue16525] wave file module does not support 32bit float format

2020-10-15 Thread Josh Lee
Change by Josh Lee : -- nosy: +jleedev ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42047] DragonFlyBSD thread native id support missing

2020-10-15 Thread David CARLIER
Change by David CARLIER : -- keywords: +patch pull_requests: +21681 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22714 ___ Python tracker ___

[issue42047] DragonFlyBSD thread native id support missing

2020-10-15 Thread David CARLIER
Change by David CARLIER : -- components: Extension Modules nosy: devnexen priority: normal severity: normal status: open title: DragonFlyBSD thread native id support missing type: enhancement versions: Python 3.10 ___ Python tracker

[issue42046] Unable to write to file without elevated privileges

2020-10-15 Thread Eryk Sun
Eryk Sun added the comment: > Desktop rwx, > Username-directory rwx, POSIX permissions are not meaningful in Windows. Please run the following two commands in a Python script in order to show the current user and the access-control list on the directory: import subprocess

[issue42046] Unable to write to file without elevated privileges

2020-10-15 Thread john_miller
New submission from john_miller : Trying to write into a file fails with a PermissionError (PermissionError: [Errno 13] Permission denied:). Typing in a non-elevated shell (User is Administrator) C:\Users\Username\Desktop>C:\Python38-32\python.exe open("some_file.txt","w") fails on the

[issue42041] venv subprocess call to python resolves to wrong interpreter

2020-10-15 Thread Mark Keller
Mark Keller added the comment: Thank you so much for the prompt responses. I would say that this should be documented on the venv page (https://docs.python.org/3/library/venv.html) as I find the subprocess page too dense of information already, but I do agree that venv page is most likely

[issue41973] Docs: TypedDict is now of type function instead of class

2020-10-15 Thread Sorin Sbarnea
Change by Sorin Sbarnea : -- nosy: +ssbarnea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-15 Thread Brandt Bucher
Brandt Bucher added the comment: New changeset aeb66c1abbf4ec214e2e80eb972546996d1a1571 by Miss Skeleton (bot) in branch '3.8': bpo-41984: GC track all user classes (GH-22701/GH-22707) https://github.com/python/cpython/commit/aeb66c1abbf4ec214e2e80eb972546996d1a1571 --

[issue42045] Add support to async code to pdb

2020-10-15 Thread Augusto Hack
New submission from Augusto Hack : Currently it seems that `pdb` does not support executing `async` functions. This makes debugging `async` code a bit harder if one needs to call an `async` function from the REPL. Here is an example: ```python import asyncio async def f() -> int:

[issue42033] Seemingly unnecessary complexification of foo(**kw)

2020-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: $ python3.8 -m timeit -s "a = {'a': 1}" "dict(**a)" 200 loops, best of 5: 113 nsec per loop $ python3.9 -m timeit -s "a = {'a': 1}" "dict(**a)" 200 loops, best of 5: 181 nsec per loop -- nosy: +serhiy.storchaka

[issue42033] Seemingly unnecessary complexification of foo(**kw)

2020-10-15 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-10-15 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +21680 pull_request: https://github.com/python/cpython/pull/22713 ___ Python tracker ___

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-10-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset e6b8c5263a7fcf5b95d0fd4c900e5949eeb6630d by Victor Stinner in branch 'master': bpo-1635741: Add a global module state to unicodedata (GH-22712) https://github.com/python/cpython/commit/e6b8c5263a7fcf5b95d0fd4c900e5949eeb6630d --

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-10-15 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +21679 pull_request: https://github.com/python/cpython/pull/22712 ___ Python tracker ___

[issue42043] zipfile.Path should support inheritance

2020-10-15 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +jaraco ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40325] Random.seed does not affect string hash randomization leading to non-intuitive results

2020-10-15 Thread Xavier Morel
Xavier Morel added the comment: @rhettinger checking software against 3.9 there's a little issue with the way the check is done: if passed something which is *both* a sequence and a set (e.g. an ordered set), `random.sample` will trigger a warning, which I don't think is correct. Should I

[issue42044] Running Python in unbuffered mode may not write all contents to the console

2020-10-15 Thread Fabio Zadrozny
New submission from Fabio Zadrozny : When running Python in unbuffered mode it may fail to write all the contents to the actual console (on Windows). The code below can reproduce the issue: ``` import sys s = '' for i in range(1,301): s += f"{str(i*100).zfill(10)}{'x' * 89}\n"

[issue42041] venv subprocess call to python resolves to wrong interpreter

2020-10-15 Thread Bernat Gabor
Bernat Gabor added the comment: Taking a look at the existing documentation this should probably be mentioned under the args part of https://docs.python.org/3/library/subprocess.html#popen-constructor, not? (that's where other similar gotchas are explained too) --

[issue42041] venv subprocess call to python resolves to wrong interpreter

2020-10-15 Thread Paul Moore
Paul Moore added the comment: Agreed, this is just "normal Windows behaviour". It's definitely surprising and non-obvious (I saw this issue and it never even occurred to me that this was what was happening) so I'd support documenting it somewhere. My instinct is that the subprocess

[issue42021] Fix possible ref. leaks in _sqlite3 module initialisation

2020-10-15 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42021] Fix possible ref. leaks in _sqlite3 module initialisation

2020-10-15 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 644e94272a89196801825cb69a56377bf62d256a by Erlend Egeberg Aasland in branch 'master': bpo-42021: Fix possible ref leaks during _sqlite3 module init (GH-22673) https://github.com/python/cpython/commit/644e94272a89196801825cb69a56377bf62d256a

[issue42019] Override MagicMock special methods

2020-10-15 Thread Aristotelis Mikropoulos
Aristotelis Mikropoulos added the comment: Yep, I had figured out myself that those stub methods are being set during MagicMock's __init__, thanks for answering anyway :) -- ___ Python tracker

[issue42043] zipfile.Path should support inheritance

2020-10-15 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +21678 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22711 ___ Python tracker

[issue42043] zipfile.Path should support inheritance

2020-10-15 Thread Étienne Pot
New submission from Étienne Pot : Currently, zipfile.Path inheritance behavior is inconsistent with pathlib.Path: ``` class MyPath(zipfile.Path): pass path = MyPath(zf) path = path.joinpath('other') assert isinstance(path, MyPath) # Oups, type(path) is zipfile.Path ``` Calling parent,

[issue42042] docs.python.org for 3.10 missing the new refererence record.

2020-10-15 Thread Dong-hee Na
New submission from Dong-hee Na : For example https://docs.python.org/3.10/c-api/bool.html?highlight=pydict_new#c.PyDict_New should display `Return value: New reference.` but not, this looks like a regression bug. other version display `Return value: New reference.` very well. --

[issue42041] venv subprocess call to python resolves to wrong interpreter

2020-10-15 Thread Steve Dower
Steve Dower added the comment: This is due to how Windows resolves relative paths when creating a new process. It *always* looks in the current application directory first, which with this setup will be the original Python executable rather than the venv redirector. The best fix is to pass

[issue32244] Multiprocessing: multiprocessing.connection.Listener.accept() should accept a timeout

2020-10-15 Thread Carlo Dri
Change by Carlo Dri : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32244] Multiprocessing: multiprocessing.connection.Listener.accept() should accept a timeout

2020-10-15 Thread Carlo Dri
Carlo Dri added the comment: In agree with this proposal! I was looking for the exact same possibility of specifying a timeout to the accept() method, both in AF_INET and AF_PIPE sockets. If there is any better way to implement this I would love to hear it. -- nosy: +carlodri

[issue42033] Seemingly unnecessary complexification of foo(**kw)

2020-10-15 Thread Xavier Morel
Xavier Morel added the comment: I have not noticed anything, I was just looking at the bytecode changes and stumbled upon this oddity. Though I would expect a small slowdown as every fn(**kw) would now incur an extra dict copy, unless there’s something in call_function_ex which copies the

[issue42039] Add gc.track and gc.untrack

2020-10-15 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > The guard doesn't help much. _PyObject_GC_UNTRACK() is called from many > object tp_dealloc(). After user call `gc.untrack(obj)`, when the obj is deallocated, assertion error happens. Oh, actually that is a very good point. Although we could argue

[issue42039] Add gc.track and gc.untrack

2020-10-15 Thread Inada Naoki
Inada Naoki added the comment: > In my implementation, there is guards that do early return in those cases and > there are tests that check that indeed we don't crash of that happens when > calling the exposed functions The guard doesn't help much. _PyObject_GC_UNTRACK() is called from many

[issue42039] Add gc.track and gc.untrack

2020-10-15 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: In my implementation, there is guards that do early return in those cases and there are tests that check that indeed we don't crash of that happens when calling the exposed functions -- ___ Python tracker

[issue42039] Add gc.track and gc.untrack

2020-10-15 Thread Inada Naoki
Inada Naoki added the comment: and this: https://github.com/python/cpython/blob/b67cbbda3a022cec5e2ad929f0531162166e7c8d/Include/internal/pycore_object.h#L111-L113 -- ___ Python tracker

[issue42039] Add gc.track and gc.untrack

2020-10-15 Thread Inada Naoki
Inada Naoki added the comment: I meant this: https://github.com/python/cpython/blob/b67cbbda3a022cec5e2ad929f0531162166e7c8d/Include/internal/pycore_object.h#L75-L78 -- ___ Python tracker

[issue42039] Add gc.track and gc.untrack

2020-10-15 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: You mean because we need to modify _gc_prev and they may be in an inconsistent state? I may be missing something, but the only tricky moment is if someone calls this from a finalizer and in that case we have already constructed the reachable and

[issue42033] Seemingly unnecessary complexification of foo(**kw)

2020-10-15 Thread Mark Shannon
Mark Shannon added the comment: Have you observed any slowdown or incorrect behaviour? The 3.8 bytecode looks incorrect to me. The C-API documentation doesn't prohibit callables from mutating the dictionary they receive. Unless a copy is made, then a callee could mutate `var`.

[issue42033] Seemingly unnecessary complexification of foo(**kw)

2020-10-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> Mark.Shannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42041] venv subprocess call to python resolves to wrong interpreter

2020-10-15 Thread Bernat Gabor
Bernat Gabor added the comment: I wonder if this is an interaction issue with the builtin Windows provided python executable? -- nosy: +eryksun, gaborjbernat ___ Python tracker