[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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`.

https://docs.python.org/3/c-api/call.html

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 unreachable sets. Or are you referring to other possible crashes?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 object 
tp_dealloc().
After user call `gc.untrack(obj)`, when the obj is deallocated, assertion error 
happens.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 if the check is 
super useful or not, I agree that as things are currently is not a good idea to 
expose these functions. I will close the issue.

Thanks a lot for pointing that out, Inada-san.

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 input dict iff its ref count is not one?

For whatever that’s worth, the 3.8 bytecode has been there since 
call_function_ex was added in 3.6 and before that call_function_kw looks 
identical (load_global foo, load_local var, call_function_kw)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 sys.executable instead of "python", which is more 
reliable on every OS and under every configuration. I've heard multiple people 
say that they prefer to launch venvs directly rather than modifying their 
environment in order to put it first on PATH.

If you are deliberately trying to use PATH to resolve the user's default 
"python" (which may not be in any way related to the one that's currently 
running), then use shutil.which() first and pass the full path to subprocess.

There's no bug to fix here, but if someone wants to add a section to the docs 
(and ideally, Mark or someone who has hit this problem can tell us which docs 
they read where they might have seen it) explaining that passing "python" to 
subprocess is a bad idea, feel free.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
versions: +Python 3.10, Python 3.9 -Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
assignee: docs@python
components: Documentation
messages: 378677
nosy: corona10, docs@python, vstinner
priority: normal
severity: normal
status: open
title: docs.python.org for 3.10 missing the new refererence record.
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, /,... should keep the class, as for pathlib.Path

Use case: I'm writing a wrapper around `zipfile.Path` which adds `os.fspath` 
compatibility (the file is extracted in a tmp dir when os.path.join, open,...).

--
components: Library (Lib)
messages: 378678
nosy: Étienne Pot
priority: normal
severity: normal
status: open
title: zipfile.Path should support inheritance
type: enhancement
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--
nosy: +corona10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 documentation is the right place, but I suspect that in 
practice, people hitting this issue with a virtual environment won't spot 
anything we write there, so it'll end up just being a "well, we told you so" 
measure rather than helping users in a practical sense.

So I'd agree with Steve's comment - Mark, if you can suggest anywhere we could 
document this which you *would* have spotted when you encountered this issue, 
that would be great.

Hmm, maybe we could document in venv that the Python executable in a venv 
redirects to the base Python, so that the "application directory" for a script 
run from a venv is the base executable's directory, not the venv - with a link 
to the MS documentation that explains how this affects path searches? (IIRC, 
we've been hesitant to document the redirection as it's an "implementation 
detail", but this is clearly a case where it affects user-visible behaviour, so 
we can't really use that argument any more...)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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"

sys.stdout.write(s)
```

When calling it with `python -u code.py` it'll write only up to line 15000 and 
when calling it with `python code.py` it'll write up to line 3.

This fails because in `_textiowrapper_writeflush` it doesn't verify if all the 
contents have been indeed written and thus fails in a partial write. In 
buffered mode it works because `_io_BufferedWriter_write_impl` does the job 
properly.

I'm a bit uncertain on why doesn't `_io__WindowsConsoleIO_write_impl` itself do 
the loop to write everything instead of leaving it up to callers to do that 
work (apparently due to issue11395 it says that it only writes partially, but 
maybe the fix could've been to loop inside of 
`_io__WindowsConsoleIO_write_impl` to write everything instead of expecting 
callers to handle partial writes...

--
components: IO
messages: 378684
nosy: fabioz
priority: normal
severity: normal
status: open
title: Running Python in unbuffered mode may not write all contents to the 
console
type: behavior
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 open a new issue for that? Fix seems simple: just move the check for 
_Set inside the check for _Sequence, and raise if that doesn't pass either.

--
nosy: +xmorel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:
return 1

async def main():
breakpoint()

asyncio.run(main())
```

The goal would be to call `f()`. In a real world application this could be 
additional HTTP requests, database queries, etc.

--
components: asyncio
messages: 378687
nosy: asvetlov, hack.augusto, yselivanov
priority: normal
severity: normal
status: open
title: Add support to async code to pdb
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 not 
where developers would look first.

I'm a little embarrassed to say this, but I didn't even know that 
sys.executable existed.

So maybe the better way to document this would be to mention sys.executable on 
the subprocess page, just as a sure way find where the current interpreter 
lives and then go into detail why this behavior difference is on the venv page. 
Maybe have them linked to each other?

What do you think about this?

--
components:  -Documentation
versions: +Python 3.7, Python 3.8 -Python 3.10, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 Desktop, in the user directory and in 
directories where Administrators are permitted to write (while normal users can 
only read and execute).

(Permissions for the user in those directories: 
Desktop rwx, 
Username-directory rwx, 
third-location r-x for users/rwx for Administrator-user-group (with 
non-elevated applications))

I can write to all these places without elevation using the shell or standard 
applications like notepad.exe. 

Why do I have to elevate the Python-process to access such functionality? Is 
this related to the security-settings on python.exe or its 
installation-directory location?

Forcing a user to elevate the user-launched process for tasks that operate on 
normal user-writable files feels like a light security-risk. Because they get 
used to elevate Python-scripts even if the performed task by itself would not 
require it.

What changed compared to Python 2?

--
components: Windows
messages: 378690
nosy: john_miller, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Unable to write to file without elevated privileges
type: behavior
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
subprocess.call('whoami.exe')
subprocess.call(r'icacls.exe "C:\Users\Username\Desktop"')

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 hood, console pseudo-files use a 64 KiB heap 
that's shared between the console host process and client processes. 

In Windows 8+, console files are real files that use the ConDrv device instead 
of LPC, in which case there is practically no limit on the size of buffers that 
can be read and written.

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 the search that WinAPI CreateProcessW 
implements. The resolved path would be passed as the `executable` argument, 
which becomes the lpApplicationName argument of CreateProcessW.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, vstinner
priority: normal
severity: normal
status: open
title: Document Argument Clinic's defining_class converter
type: enhancement
versions: Python 3.10, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 for AIX 4.3 was 2003, so I doubt there are any customers on extended 
support, or at least those customers are unlikely to install Python 3.11.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 sense to do the removal in one go? I do 
see that systems without multithreading support were both unsupported and 
removed in 3.7, though I do not know the particulars of why that is the case 
since most other entries have a 1 version gap.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: waicalibre
priority: normal
severity: normal
status: open
title: Add image/webp to list of media types in mimetypes.py
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
positives as well as potential compiler bugs.

* Got rid of VFORK_USABLE checks in function parameter lists. Now 
`child_sigmask` parameter is always present, but is NULL if vfork() is not 
available or usable. The type is `void *` to avoid hard dependence on sigset_t, 
which other CPython source files appear to avoid.

* Disabled vfork() in case setuid()/setgid()/setgroups() needed.

* Added more comments explaining vfork()-related stuff.

* Added commit message and NEWS entry.

Potential improvements:

* To avoid repeating long parameter lists in several functions, we can move 
them to a struct. The downside is that we'd need to convert child_exec() to use 
that struct all over the place. I don't have a strong preference here.

* Are any documentation changes needed? We don't change any interfaces, so I'm 
not sure.

Potential future directions:

* If desired, a vfork() opt-out may be implemented. But it'd need to disable 
posix_spawn() on Linux as well, since it might be implemented via vfork(), and 
we have no good way to check that.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24828] Segfault when using store-context AST node in a load context

2020-10-15 Thread Xavier Morel


Xavier Morel  added the comment:

Should I close this since I believe 2.7 is not supported anymore?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33533] Provide an async iterator version of as_completed

2020-10-15 Thread Carlo Dri


Change by Carlo Dri :


--
nosy: +carlodri

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-10-15 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This seems to be a duplicate of https://bugs.python.org/issue38902

--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com