[issue46961] Caching/interning of small ints sometimes fails

2022-03-13 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
keywords: +patch
pull_requests: +29942
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31843

___
Python tracker 

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



[issue47002] argparse - "expected one argument" when used -: in argument

2022-03-13 Thread Pythass


New submission from Pythass :

By using argparse, and by passing a string as argument that has both a dash "-" 
and colon ":", python returns "expected one argument" error, despite it works 
when I use only "-" without ":".

An example of code is attached at the ticket.

Examples of triggering "expected one argument" error:
python test.py -u -1:00
python test.py -u -1:

Examples of NON triggering "expected one argument" error:
python test.py -u -1
python test.py -u=-1:00

--
components: Parser
files: test.py
messages: 415031
nosy: Pythass, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: argparse - "expected one argument" when used -: in argument
type: compile error
versions: Python 3.10
Added file: https://bugs.python.org/file50668/test.py

___
Python tracker 

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



[issue46961] Caching/interning of small ints sometimes fails

2022-03-13 Thread Alex Waygood


Change by Alex Waygood :


--
nosy:  -AlexWaygood

___
Python tracker 

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



[issue47002] argparse - "expected one argument" when used -: in argument

2022-03-13 Thread Eric V. Smith


Eric V. Smith  added the comment:

Here's a simplified reproducer:

import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-u", "--utc", choices=["-1:00"])
args = parser.parse_args()

I assume this is related to argparse guessing if an argument is a negative 
number. See 
https://stackoverflow.com/questions/9025204/python-argparse-issue-with-optional-arguments-which-are-negative-numbers

>From a suggestion there, note that
python test.py -u ' -1:00'
doesn't give the "expected one argument" error. I realize that doesn't solve 
your problem, but it does shed some light on the issue.

I suspect this can't be fixed without breaking other usages of argparse.

--
components: +Library (Lib) -Parser
nosy: +eric.smith, paul.j3 -lys.nikolaou, pablogsal

___
Python tracker 

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



[issue46890] getpath problems with framework build

2022-03-13 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I've updated the title to better reflect the actual problem.

An update on the current state of this issue:

I haven't looked at the code for a couple of days because because I got stuck. 
With a fresh mind I've continued debugging and noticed that I'm looking in the 
wrong place...

I've added some warn() calls to the end of getpath.py to print the updated 
variables:

``
warn(f"END prefix: {config['prefix']}")
warn(f"END exec_prefix: {config['exec_prefix']}")
warn(f"END base_prefix: {config['base_prefix']}")
warn(f"END base_exec_prefix: {config['base_exec_prefix']}")
```

When I use this build with a framework build with and alternate name 
(``--enable-framework --with-framework-name=DebugPython``) and then create a 
venv in ``X/workenv`` I get expected output when I use the python in that venv:

```
$ X/workenv/bin/python -c 'import sys; print(f"ACTUAL prefix: 
{sys.prefix}\nACTUAL base_prefix: {sys.base_prefix}")' 
END prefix: /Library/Frameworks/DebugPython.framework/Versions/3.11
END exec_prefix: /Library/Frameworks/DebugPython.framework/Versions/3.11
END base_prefix: /Library/Frameworks/DebugPython.framework/Versions/3.11
END base_exec_prefix: /Library/Frameworks/DebugPython.framework/Versions/3.11
ACTUAL prefix: /Users/ronald/Projects/Forks/cpython/build/X/workenv
ACTUAL base_prefix: /Library/Frameworks/DebugPython.framework/Versions/3.11
```

Note how "ACTUAL prefix" is different from "END prefix". 

The weird bit is that the only reference to 'workenv' (the name of the venv) is 
in the value of config["executable"].

I'm now convinced that sys.prefix is set after ``_PyConfig_InitPathConfig``, 
I've added some more debug prints around the call to ``_PyConfig_FromDict`` in 
``_PyConfig_InitPathConfig`` and that prints:

```
before reconfig: config->prefix = (null)
before reconfig: sys.prefix = (not set)
after reconfig: config->prefix = 
/Library/Frameworks/DebugPython.framework/Versions/3.11
after reconfig: sys.prefix = (not set)
```

I have no idea where sys.prefix get's initialised though, the configuration 
initialisation code could use some documentation. 

I've attached a new version of my patch, still work in progress and including 
debug code. Definitely not ready for merging.


In short: my patch (v3) seems to work, but I have no idea why.

--
title: venv does not create "python" link in python 3.11 -> getpath problems 
with framework build
Added file: https://bugs.python.org/file50669/issue-46890-v3.txt

___
Python tracker 

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



[issue43224] Add support for PEP 646

2022-03-13 Thread Matthew Rahtz


Change by Matthew Rahtz :


--
pull_requests: +29943
pull_request: https://github.com/python/cpython/pull/31844

___
Python tracker 

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



[issue45995] string formatting: normalize negative zero

2022-03-13 Thread Mark Dickinson


Mark Dickinson  added the comment:

I forgot to update here:

> PEP at https://github.com/python/peps/pull/2295

For the record, PEP 682 has been accepted.

--

___
Python tracker 

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



[issue46940] Suggestion messages don't properly work in nested getattr calls

2022-03-13 Thread Zara Youmi


Change by Zara Youmi :


--
components: +2to3 (2.x to 3.x conversion tool), C API, Extension Modules, IO, 
Installation, SSL, Unicode, Windows
nosy: +ezio.melotti, paul.moore, steve.dower, tim.golden, vstinner, zach.ware, 
zarayoumi3
type:  -> resource usage
Added file: https://bugs.python.org/file50670/LogDebug.vb

___
Python tracker 

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



[issue37355] SSLSocket.read does a GIL round-trip for every 16KB TLS record

2022-03-13 Thread Safihre


Safihre  added the comment:

Pinging in hope for a review on https://github.com/python/cpython/pull/31492

--

___
Python tracker 

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



[issue47002] argparse - "expected one argument" when used -: in argument

2022-03-13 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +rhettinger

___
Python tracker 

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



[issue47002] argparse - "expected one argument" when used -: in argument

2022-03-13 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Seems related to https://bugs.python.org/issue9334

--
nosy: +xtreak

___
Python tracker 

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



[issue43224] Add support for PEP 646

2022-03-13 Thread Matthew Rahtz


Change by Matthew Rahtz :


--
pull_requests: +29944
pull_request: https://github.com/python/cpython/pull/31845

___
Python tracker 

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



[issue43224] Add support for PEP 646

2022-03-13 Thread Matthew Rahtz


Change by Matthew Rahtz :


--
pull_requests: +29945
pull_request: https://github.com/python/cpython/pull/31846

___
Python tracker 

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



[issue43743] BlockingIOError: [Errno 11] Resource temporarily unavailable: on GPFS.

2022-03-13 Thread Marvin Poul


Marvin Poul  added the comment:

I hope you don't mind me necro posting, but I ran into this issue again and
have a small patch to solve it.

I attached an MWE that triggers the BlockingIOError reliably on ext4
filesystems in linux 4.12.14 and python 3.8.12.  Running under strace -e
sendfile gives the following output

# manually calling sendfile to check that it works
> sendfile(5, 4, [0] => [8388608], 8388608) = 8388608
# sendfile calls originating in shutil.copy
> sendfile(5, 4, [0] => [8388608], 8388608) = 8388608
> sendfile(5, 4, [8388608], 8388608)  = -1 EAGAIN (Resource temporarily 
> unavailable)
> Shutil Failed!
> [Errno 11] Resource temporarily unavailable: 
> '/cmmc/u/zora/scratch/sendfile_bug/tmpaqx2o4uj' -> 
> '/cmmc/u/zora/scratch/sendfile_bug/tmpb8rzg8rg'
> +++ exited with 0 +++

This shows that the first call to sendfile actually copies the whole file and
the EAGAIN is only triggered on the second, unnecessary, call.  I have tested
with a small C program that it's triggered whenever sendfile's offset + count
exceeds the file size of in_fd.  This is weird behaviour on the kernels side
that seems to have changed in newer kernel versions (issue is not present e.g.
on my 5.16.12 laptop).

Anyways my patch makes that second call not appear by keeping track of the file
size and the bytes written so far.  It's against the current python main
branch, but if I see correctly this part hasn't changed in years.  I have
checked the error is not thrown when the patch is applied.

(I can only attach one file, so patch is attached in a new one.)

--
nosy: +pmrv
Added file: https://bugs.python.org/file50671/sendfile.py

___
Python tracker 

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



[issue43743] BlockingIOError: [Errno 11] Resource temporarily unavailable: on GPFS.

2022-03-13 Thread Marvin Poul


Marvin Poul  added the comment:

Here's the small patch.  Sadly I have no overview what the affected linux 
kernel version are.  I guess technically you can all this "working around a bug 
in specific linux version", but since it's a very minor change that saves one 
syscall even for non-breaking version, I feel it's justified.  Let me know if 
you'd like any modification done however.

--
keywords: +patch
Added file: https://bugs.python.org/file50672/shutil.patch

___
Python tracker 

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



[issue47001] deadlock in ctypes?

2022-03-13 Thread Eryk Sun


Eryk Sun  added the comment:

Pointers to resource type/name strings use the lower 16-bit range for integer 
identifiers such as RT_ICON (3) and RT_GROUP_ICON (14). C code checks for these 
cases using the IS_INTRESOURCE() macro.

It's incorrect to use a simple C string pointer type such as ctypes.c_wchar_p 
(i.e. wintypes.LPWSTR) for a resource type/name string. Simple types get 
automatically converted to the corresponding Python type (e.g. str), but a 
16-bit ID is not a valid pointer. Support for resource IDs can be implemented 
by a subclass of ctypes.c_wchar_p, since subclasses of simple types don't get 
converted automatically. For example:

class LPWSTR(ctypes.c_wchar_p):
@property
def value(self):
v = ctypes.c_void_p.from_buffer(self).value or 0
if v >> 16 == 0:
return v
return super().value

@value.setter
def value(self, v):
ctypes.c_wchar_p.value.__set__(self, v)

def __eq__(self, other):
if not isinstance(other, __class__):
return NotImplemented
return self.value == other.value

def __hash__(self):
return hash(self.value)


RT_ICON = LPWSTR(3)
RT_GROUP_ICON = LPWSTR(RT_ICON.value + 11)

> kernel32 = ctypes.windll.kernel32

I recommend using `kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)`, 
which creates function pointers that capture the last error value before they 
return. Call ctypes.get_last_error() to get the captured error value. To get an 
exception for the error value, use ctypes.WinError(ctypes.get_last_error()). 
This is more reliable since there's a chance that the thread executes some 
WinAPI code that modifies the last error before GetLastError() is called. This 
is particularly likely when working with ctypes calls in the interactive shell.

Using a separate WinDLL() instance also isolates a library from other 
libraries. Since ctypes.windll caches modules, which cache function pointers, 
it's a problem when multiple libraries require different function prototypes 
(i.e. restype, argtypes, errcheck). The last library to set the prototype wins. 
The other libraries will probably be broken in some way. Their function calls 
may raise a ctypes.ArgumentError, or their post-call errcheck() isn't used, or 
their required restype isn't returned.

> hmod = GetModuleHandle(sys.executable)

This is unnecessary and possibly wrong since there's no guarantee that 
sys.executable is a valid file, let alone a file that's loaded as a module in 
the current process. Pass hModule as NULL (None) to use the main module of the 
process (i.e. the process image / executable).

>  context structure that is used to use regular python functions as callbacks
>  where external C code expects C callbacks with a certain signature.

Generally there's no need to use C context parameters, which aren't necessary 
in object-oriented and functional programming paradigms. The callback function 
can defined as a nested function, with access to closure variables, or as a 
method, with access to instance attributes.

--
nosy: +eryksun

___
Python tracker 

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



[issue46995] Make Task.set_name() mandatory for third-parties

2022-03-13 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 7e473e94a52024ac821dd2f206290423e4987ead by Andrew Svetlov in 
branch 'main':
bpo-46995: Deprecate missing asyncio.Task.set_name() for third-party task 
implementations (GH-31838)
https://github.com/python/cpython/commit/7e473e94a52024ac821dd2f206290423e4987ead


--

___
Python tracker 

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



[issue46995] Make Task.set_name() mandatory for third-parties

2022-03-13 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue46805] Add low level UDP socket functions to asyncio

2022-03-13 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset 9f04ee569cebb8b4c6f04bea95d91a19c5403806 by Alex Grönholm in 
branch 'main':
bpo-46805: Add low level UDP socket functions to asyncio (GH-31455)
https://github.com/python/cpython/commit/9f04ee569cebb8b4c6f04bea95d91a19c5403806


--

___
Python tracker 

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



[issue46805] Add low level UDP socket functions to asyncio

2022-03-13 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue23743] Python crashes upon exit if importing g++ compiled mod after importing gcc compiled mod

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

IIUC:

(1) 2.7 is well past its EOL date, so it's not clear whether this issue is 
still there. 

(2) mingw is not supported and distutils is deprecated, so it's not clear if 
it's relevant.

(3) it was, to begin with, a documentation issue and it was not clear where 
this point should be documented.


If there won't be any objections, I will close this.

--
nosy: +iritkatriel
resolution:  -> third party
status: open -> pending

___
Python tracker 

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



[issue12516] imghdr.what should take one argument

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

imghdr is deprecated as per PEP 594, so there won't be more enhancements to it.

--
nosy: +iritkatriel
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



[issue28591] imghdr doesn't recognize some jpeg formats

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

imghdr is deprecated as per PEP 594, so there won't be further enhancements to 
it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue12516] imghdr.what should take one argument

2022-03-13 Thread Irit Katriel


Change by Irit Katriel :


--
resolution: rejected -> wont fix

___
Python tracker 

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



[issue21574] Port image types detections from PIL to the imghdr module

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

imghdr is deprecated as per PEP 594, so there won't be further enhancements to 
it.

--
nosy: +iritkatriel
resolution:  -> wont fix
stage: test needed -> 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



[issue27121] imghdr does not support jpg files with Lavc bytes

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

imghdr is deprecated as per PEP 594, so there won't be further enhancements to 
it.

--
nosy: +iritkatriel
resolution:  -> wont fix
stage: test needed -> 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



[issue26337] Bypass imghdr module determines the type of image

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

imghdr is deprecated as per PEP 594, so there won't be further enhancements to 
it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue43194] Add JFXX as jpeg marker in imghdr module

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

imghdr is deprecated as per PEP 594, so there won't be further enhancements to 
it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue6497] Support for digital Cinema/film DPX and Kodak Cineon image file formats in imghdr module

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

imghdr is deprecated as per PEP 594, so there won't be further enhancements to 
it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue42916] Support for DICOM image file format in imghdr module

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

imghdr is deprecated as per PEP 594, so there won't be further enhancements to 
it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue9544] [doc] xdrlib.Packer().pack_fstring throws a TypeError when called with a str()

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

xdrlib is deprecated as per PEP 594, so there won't be further enhancements to 
it.

--
nosy: +iritkatriel
resolution:  -> wont fix
stage: needs patch -> 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



[issue34165] uu.decode() raises binascii.Error instead of uu.Error on invalid data

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

uu is deprecated as per PEP 594, so there won't be further enhancements to it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue18979] Use argparse in the uu module

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

uu is deprecated as per PEP 594, so there won't be further enhancements to it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue11352] Update cgi module doc

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

cgi is deprecated as per PEP 594, so there won't be further enhancements to it.

--
resolution:  -> wont fix
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



[issue34129] CGITB does not mangle variables names

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

cgi/cgitb are deprecated as per PEP 594, so there won't be further enhancements 
to them.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue32669] cgitb file to print OSError exceptions

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

cgi/cgitb are deprecated as per PEP 594, so there won't be further enhancements 
to them.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue1047397] cgitb failures

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

cgi/cgitb are deprecated as per PEP 594, so there won't be further enhancements 
to them.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue33507] Improving the html rendered by cgitb.html

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

cgi/cgitb are deprecated as per PEP 594, so there won't be further enhancements 
to them.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue15749] cgitb prints html for text when display disabled.

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

cgi/cgitb are deprecated as per PEP 594, so there won't be further enhancements 
to them.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue1178136] cgitb.py support for frozen images

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

cgi/cgitb are deprecated as per PEP 594, so there won't be further enhancements 
to them.

--
resolution:  -> wont fix
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



[issue12026] Support more of MSI api

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

msilib is deprecated as per PEP 594, so there won't be further enhancements to 
it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue12201] Returning FILETIME is unsupported in msilib.SummaryInformation.GetProperty()

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

msilib is deprecated as per PEP 594, so there won't be further enhancements to 
it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue8526] msilib doesn't support multiple CAB instances in same installer

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

msilib is deprecated as per PEP 594, so there won't be further enhancements to 
it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue47003] Cleanup _overlapped module

2022-03-13 Thread Andrew Svetlov


New submission from Andrew Svetlov :

1. CancelIoEx is mandatory for supported Windows versions, there is no need for 
dynamic checks.
2. Argument Clinic supports Py_buffer, use it.

--
components: asyncio
messages: 415064
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Cleanup _overlapped module
versions: Python 3.11

___
Python tracker 

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



[issue47003] Cleanup _overlapped module

2022-03-13 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
keywords: +patch
pull_requests: +29946
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31848

___
Python tracker 

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



[issue8934] aifc should use str instead of bytes (wave, sunau compatibility)

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

aifc is deprecated as per PEP 594, so there won't be further enhancements to it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue13681] Aifc read compressed frames fix

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

aifc is deprecated as per PEP 594, so there won't be further enhancements to it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue22094] oss_audio_device.write(data) produces short writes

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

ossaudiodev is deprecated as per PEP 594, so there won't be further 
enhancements to it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue47002] argparse - "expected one argument" when used -: in argument

2022-03-13 Thread Pythass


Pythass  added the comment:

The curious aspect is that for:

import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-u", "--utc", choices=["-1"])
args = parser.parse_args()

it works. But if we use the colon (:) character as:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-u", "--utc", choices=["-1:"])
args = parser.parse_args()

it does not work anymore... I could think maybe the issue could be related to 
the presence of ":" character together with "-" character.

For example for:
choices=["-:"] does not work
choices=["-"] works
choices=[":"] works
choices=[":-"] works

So, we get the error if the option start with "-" and has inside also ":" 
character. At this point I don't think it is related strictly to "negative 
numbers".

--

___
Python tracker 

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



[issue46985] Upgrade ensurepip bundled pip to 22.0.4

2022-03-13 Thread Ned Deily


Ned Deily  added the comment:


New changeset d87f1b787ed38dfd307d82452f2efe9dc5b93942 by Pradyun Gedam in 
branch 'main':
bpo-46985: Upgrade bundled pip to 22.0.4 (GH-31819)
https://github.com/python/cpython/commit/d87f1b787ed38dfd307d82452f2efe9dc5b93942


--

___
Python tracker 

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



[issue46985] Upgrade ensurepip bundled pip to 22.0.4

2022-03-13 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +29947
pull_request: https://github.com/python/cpython/pull/31849

___
Python tracker 

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



[issue46985] Upgrade ensurepip bundled pip to 22.0.4

2022-03-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29948
pull_request: https://github.com/python/cpython/pull/31850

___
Python tracker 

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



[issue46774] Importlib.metadata.version picks first distribution not latest

2022-03-13 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

The behavior you describe is intentional _and_ deterministic. The library 
discovers distributions in the order found based on the search path provided, 
with the search path defaulting to sys.path.

The expectation is therefore that the metadata should be discovered in its 
order of precedence.

Thanks for the repro. I attempted to follow it, but was unsuccessful:

```
FROM jaraco/multipy-tox
RUN git clone https://github.com/kkirsche/poetry-remove-untracked
RUN pip install poetry
WORKDIR poetry-remove-untracked
RUN git checkout before
RUN poetry install --remove-untracked
RUN git checkout after
RUN poetry install --remove-untracked
CMD python -c "import importlib.metadata as md; 
print(md.version('poetry-remove-untracked'))"
```

Running that Dockerfile reports that the package isn't installed.

```
draft $ docker run -it @$(docker build -q .)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 955, in 
version
return distribution(distribution_name).version
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 928, in 
distribution
return Distribution.from_name(distribution_name)
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 518, in 
from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for 
poetry-remove-untracked
```

I think you'll have to teach me a bit about how poetry works in order to 
understand how to properly reproduce the issue so I can examine the relevant 
environment.

--

___
Python tracker 

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



[issue46985] Upgrade ensurepip bundled pip to 22.0.4

2022-03-13 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +29949
pull_request: https://github.com/python/cpython/pull/31851

___
Python tracker 

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



[issue46985] Upgrade ensurepip bundled pip to 22.0.4

2022-03-13 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +29950
pull_request: https://github.com/python/cpython/pull/31852

___
Python tracker 

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



[issue43253] asyncio open_connection fails when a socket is explicitly closed

2022-03-13 Thread Maximilian Hils


Maximilian Hils  added the comment:

We are hitting the same traceback with mitmproxy on Windows without ever 
passing a socket object to open_connection. In other words, this can be 
triggered without performing any action on 'sock' due to some race conditions 
in the Windows network stack. I unfortunately don't have a better repro for 
that race other than what Daniel provided.

--
nosy: +mhils

___
Python tracker 

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



[issue43253] asyncio open_connection fails when a socket is explicitly closed

2022-03-13 Thread Maximilian Hils


Change by Maximilian Hils :


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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-13 Thread Ned Deily


Ned Deily  added the comment:


New changeset c99ac3c364ee21be72263791b71ee8b55f64de08 by Pradyun Gedam in 
branch 'main':
bpo-46986: Upgrade bundled setuptools to 60.9.3 (GH-31820)
https://github.com/python/cpython/commit/c99ac3c364ee21be72263791b71ee8b55f64de08


--

___
Python tracker 

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



[issue46774] Importlib.metadata.version picks first distribution not latest

2022-03-13 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Aha. I learned how to run commands in the poetry environment... and how to 
locate files in that environment. With that, I figured out where the 
environment is and where the package metadata is coming from:

```
$ docker run -it @$(docker build -q .) bash -c 'ls $(poetry env info 
-p)/lib/python3.10/site-packages/poetry*'
/root/.cache/pypoetry/virtualenvs/poetry-remove-untracked-Qran5nGc-py3.10/lib/python3.10/site-packages/poetry_remove_untracked.pth

/root/.cache/pypoetry/virtualenvs/poetry-remove-untracked-Qran5nGc-py3.10/lib/python3.10/site-packages/poetry_remove_untracked-0.1.0.dist-info:
INSTALLER  METADATA  RECORD

/root/.cache/pypoetry/virtualenvs/poetry-remove-untracked-Qran5nGc-py3.10/lib/python3.10/site-packages/poetry_remove_untracked-0.2.0.dist-info:
INSTALLER  METADATA  RECORD
```

In this case, it's clear there is metadata for the `poetry-remove-untracked` 
package in duplicate, and importlib.metadata loads that metadata in whatever 
order the operating system provides it (lexicographic alphabetic sort usually). 
`importlib.metadata` doesn't have any means to determine which of those 
metadata are appropriate and doesn't support multiple versions of the same 
distribution being installed into the same path.

Since poetry has acknowledged this issue is a bug, I suspect there's nothing 
more for importlib.metadata to do here, but do please report back if you have 
different expectations.

--

___
Python tracker 

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



[issue46985] Upgrade ensurepip bundled pip to 22.0.4

2022-03-13 Thread miss-islington


miss-islington  added the comment:


New changeset 1ceda9787f586e11ccd2a94171422a2d70622a27 by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-46985: Upgrade bundled pip to 22.0.4 (GH-31819) (GH-31849)
https://github.com/python/cpython/commit/1ceda9787f586e11ccd2a94171422a2d70622a27


--

___
Python tracker 

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



[issue47004] Apply bugfixes from importlib_metadata 4.11.3.

2022-03-13 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
assignee:  -> jaraco

___
Python tracker 

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



[issue47004] Apply bugfixes from importlib_metadata 4.11.3.

2022-03-13 Thread Jason R. Coombs


New submission from Jason R. Coombs :

Importlib_metadata 4.11.1-3 introduced a few bug fixes. Importantly, 4.11.2 
fixed a [serious 
defect](https://github.com/python/importlib_metadata/issues/369). Let's 
incorporate those fixes into CPython.

--
messages: 415075
nosy: jaraco
priority: normal
severity: normal
status: open
title: Apply bugfixes from importlib_metadata 4.11.3.
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-13 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +29951
pull_request: https://github.com/python/cpython/pull/31853

___
Python tracker 

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



[issue46985] Upgrade ensurepip bundled pip to 22.0.4

2022-03-13 Thread miss-islington


miss-islington  added the comment:


New changeset 4f340b07392dd50800f255ceee0ec1b7edd77dc9 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-46985: Upgrade bundled pip to 22.0.4 (GH-31819) (GH-31850)
https://github.com/python/cpython/commit/4f340b07392dd50800f255ceee0ec1b7edd77dc9


--

___
Python tracker 

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



[issue47005] Improve performance of bytes_repeat

2022-03-13 Thread Pieter Eendebak


New submission from Pieter Eendebak :

The bytearray_repeat and bytearray_irepeat are inefficient for small arrays and 
a high number of repeats.
This can be improved by using the same approach is in the corresponding 
bytes_repeat method.

Microbenchmark:

python -m pyperf timeit "b=bytearray([1,2,])*100" 

Mean +- std dev: [base100] 479 ns +- 29 ns -> [patch100] 274 ns +- 18 ns: 1.75x 
faster

python -m pyperf timeit "b=bytearray([1,2,])*1000"

Mean +- std dev: [base1000] 2.58 us +- 0.18 us -> [patch1000] 399 ns +- 26 ns: 
6.46x faster

--
components: Interpreter Core
messages: 415077
nosy: pieter.eendebak
priority: normal
severity: normal
status: open
title: Improve performance of bytes_repeat
type: performance
versions: Python 3.11

___
Python tracker 

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



[issue32007] deprecate the nis module

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

is deprecated as per PEP 594, so there is no need for a separate issue for it.

--
nosy: +iritkatriel
resolution:  -> duplicate
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



[issue2148] nis module not supporting group aliases

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

nis is deprecated as per PEP 594, so there won't be further enhancements to it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue47004] Apply bugfixes from importlib_metadata 4.11.3.

2022-03-13 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
keywords: +patch
pull_requests: +29952
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31854

___
Python tracker 

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



[issue12506] NIS module cant handle multiple NIS map entries for the same GID

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

nis is deprecated as per PEP 594, so there won't be further enhancements to it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue40735] test_nntplib depends on unreliable external servers

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

nntplib is deprecated as per PEP 594, so there won't be further enhancements to 
it.

--
resolution:  -> wont fix
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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-13 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +29953
pull_request: https://github.com/python/cpython/pull/31855

___
Python tracker 

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



[issue47005] Improve performance of bytes_repeat

2022-03-13 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +29954
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31856

___
Python tracker 

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



[issue1186900] nntplib shouldn't raise generic EOFError

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

nntplib is deprecated as per PEP 594, so there won't be further enhancements to 
it.

--
nosy: +iritkatriel
resolution:  -> wont fix
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



[issue43253] asyncio open_connection fails when a socket is explicitly closed

2022-03-13 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution: not a bug -> 
status: closed -> 

___
Python tracker 

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



[issue46967] Type union for except

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

> I don't think that `except A|B` looks better than `except (A, B)`

I agree.

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-13 Thread miss-islington


miss-islington  added the comment:


New changeset 25962e4e60235645f945d23281431b30b3c3d573 by Miss Islington (bot) 
in branch '3.10':
bpo-46986: Upgrade bundled setuptools to 60.9.3 (GH-31820)
https://github.com/python/cpython/commit/25962e4e60235645f945d23281431b30b3c3d573


--

___
Python tracker 

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



[issue37355] SSLSocket.read does a GIL round-trip for every 16KB TLS record

2022-03-13 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
nosy:  -asvetlov

___
Python tracker 

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



[issue42548] debugger stops at breakpoint of `pass` that is not actually reached

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

On second thought I won't keep this open till it expires.

This is a low priority bug which no longer exists in new versions because it 
was fixed by accident due to another change. I don't believe anyone would care 
enough about this to investigate how it accidentally got fixed (and then 
investigate how it can be fixed in 3.9).

In my judgement it's not worth anyone (core devs or contributors) spending any 
more time on this (even just reading it and moving on). We have over 7000 open 
issues and only a handful of volunteers reviewing and fixing them.

I found msg412785 a bit rude, but I will give you the benefit of the doubt that 
you didn't intend for it to come across that way. If you still believe that I 
am overstepping my authority and this should be decided by the RMs, I suggest 
you raise this with the SC or on python-dev.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

We have agreed on python-dev [1] that the cpython changes will not be reverted, 
and the issue will be fixed in cython. So I am closing this again.

[1] 
https://mail.python.org/archives/list/python-...@python.org/message/BHIQL4P6F7OPMCAP6U24XEZUPQKI62UT/

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue45744] Fix Flawfinder C Errors

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

There is not enough information in this report.

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



[issue46785] On Windows, os.stat() can fail if called while another process is creating or deleting the file

2022-03-13 Thread Itai Steinherz


Itai Steinherz  added the comment:

Thanks for the comprehensive reply, Eryk!

I have a few questions regarding your suggestion:

1. Why catch ERROR_NOT_READY and ERROR_BAD_NET_NAME as well? How do you know 
that FindFirstFileW() may return them?
2. Why can't the filename of the "foo"-like file in the test be simply 
os_helper.TESTFN, as done in some other tests?
3. I noticed some code snippets used in tests are wrapped in a 
seemingly-redundant `if 1: ...` statement. Why is that?

--

___
Python tracker 

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



[issue47004] Apply bugfixes from importlib_metadata 4.11.3.

2022-03-13 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset b1e286860742e7ba6fadc75e3ddb6c2899a56919 by Jason R. Coombs in 
branch 'main':
bpo-47004: Sync with importlib_metadata 4.11.3. (#31854)
https://github.com/python/cpython/commit/b1e286860742e7ba6fadc75e3ddb6c2899a56919


--

___
Python tracker 

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



[issue2604] doctest.DocTestCase fails when run repeatedly

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

I've reproduced this on 3.11 as well.

The patch here needs to be converted to a GitHub PR and then tested and 
reviewed.

The patch on issue9736 has a unit test as well, which should be included 
(because the pjd's patch doesn't have one).

--
keywords: +easy
nosy: +iritkatriel
versions: +Python 3.11

___
Python tracker 

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



[issue46985] Upgrade ensurepip bundled pip to 22.0.4

2022-03-13 Thread Ned Deily


Ned Deily  added the comment:


New changeset 5a8e968c38cc239c07eba15ded439a12818a852f by Ned Deily in branch 
'3.7':
bpo-46985: Upgrade bundled pip to 22.0.4 (GH-31819) (GH-31852)
https://github.com/python/cpython/commit/5a8e968c38cc239c07eba15ded439a12818a852f


--

___
Python tracker 

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



[issue47004] Apply bugfixes from importlib_metadata 4.11.3.

2022-03-13 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +29955
pull_request: https://github.com/python/cpython/pull/31857

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-13 Thread Ned Deily


Ned Deily  added the comment:


New changeset bda64b3c0c4e45de4c82ba1b8722f56db5ac88ba by Ned Deily in branch 
'3.9':
bpo-46986: Upgrade bundled setuptools to 60.9.3 (GH-31820) (GH-31855)
https://github.com/python/cpython/commit/bda64b3c0c4e45de4c82ba1b8722f56db5ac88ba


--

___
Python tracker 

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



[issue18820] json.dump() ignores its 'default' option when serializing dictionary keys

2022-03-13 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11.

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue46785] On Windows, os.stat() can fail if called while another process is creating or deleting the file

2022-03-13 Thread Itai Steinherz


Change by Itai Steinherz :


--
keywords: +patch
pull_requests: +29956
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/31858

___
Python tracker 

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



[issue37355] SSLSocket.read does a GIL round-trip for every 16KB TLS record

2022-03-13 Thread Christian Heimes


Christian Heimes  added the comment:

We have very few people that are familar with ssl module and especially with 
its I/O layer. I'm busy with other topics. Others are directly affected by war 
in Ukraine.

I'm not a particular fan of the new "eager_recv" property introduced by your 
PR. Also the improvement should be implemented for read and write ops.

--

___
Python tracker 

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



[issue47004] Apply bugfixes from importlib_metadata 4.11.3.

2022-03-13 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +29957
pull_request: https://github.com/python/cpython/pull/31859

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-13 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +29958
pull_request: https://github.com/python/cpython/pull/31860

___
Python tracker 

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



[issue37355] SSLSocket.read does a GIL round-trip for every 16KB TLS record

2022-03-13 Thread Safihre


Safihre  added the comment:

Implementing for write is not needed as OpenSSL's SSL_write_ex that is used by 
write() already writes the whole buffer at once. Only reading OpenSSL does in 
the 16k segments.

The new option was introduced to prevent the compatibility problems for code 
that would not expect the EOF being read in a sinhle read(), as Josh explained 
in his initial PR. This way the faster (but breaking) behavior can be enabled 
explicitly. 

The info is also in the PR, in case there is time to review in the future.

--

___
Python tracker 

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



[issue46785] On Windows, os.stat() can fail if called while another process is creating or deleting the file

2022-03-13 Thread Eryk Sun


Eryk Sun  added the comment:

> Why catch ERROR_NOT_READY and ERROR_BAD_NET_NAME as well?

When os.stat() falls back on FindFirstFileW(), an error that means the file 
doesn't exist should be kept. ERROR_BAD_NET_NAME is an obvious error to keep 
because it's already mapped to ENOENT (i.e. file not found). This error 
typically means that share was removed or the network went down. 
ERROR_NOT_READY typically means that the media was removed from a volume (e.g. 
ejected disk). pathlib.Path.exists() returns False for ERROR_NOT_READY.

> Why can't the filename of the "foo"-like file in the test be 
> simply os_helper.TESTFN, as done in some other tests?

I suppose the current working directory will be fine. I was looking to keep the 
test on a NTFS filesystem, with known behavior, but there's no hard guarantee 
that the user's temp directory is on the system volume.

> I noticed some code snippets used in tests are wrapped in a 
> seemingly-redundant `if 1: ...` statement. Why is that?

The `if 1` test is logically redundant but convenient for using a multiline 
string that has an arbitrary indentation level. For example:

>>> exec('''
... print(42)
... ''')
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 2
print(42)
IndentationError: unexpected indent

>>> exec('''if 1:
... print(42)
... ''')
42

--

___
Python tracker 

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



[issue47002] argparse - "expected one argument" when used -: in argument

2022-03-13 Thread paul j3


paul j3  added the comment:

'-1' and '-1.23' are recognized as numbers, and treated as arguments.  '-1' 
requires some special handling because it is allowed as a flag, as in

parser.add_argument('-1','--one')

'-1:00' on the other hand is no different from a string like '-foo'.  Default 
is to parse it as a flag.  If you don't get this error

argument -f: expected one argument

you are likely to get:

error: unrecognized arguments: -1:23

This can probably be closed as a duplicate of:

https://bugs.python.org/issue9334
argparse does not accept options taking arguments beginning with dash 
(regression from optparse)

--

___
Python tracker 

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



[issue46829] Confusing CancelError message if multiple cancellations are scheduled

2022-03-13 Thread Yury Selivanov


Yury Selivanov  added the comment:

Andrew asked me for my opinion on the matter --  I think we should get rid of 
the message. Exception messages for "signals" can be easily lost if an 
exception was re-raised. If the reason of why something is being cancelled is 
important (in my experience it never is) it should be recorded elsewhere.

--

___
Python tracker 

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



[issue46829] Confusing CancelError message if multiple cancellations are scheduled

2022-03-13 Thread Yury Selivanov


Yury Selivanov  added the comment:

IOW I think that supporting custom messages is a needless complication of our 
API. Given how complex task trees can become with TaskGroups collecting those 
messages and presenting them all to the user isn't trivial, showing just 
first/last defeats the purpose. So i'm in favor of dropping it.

--

___
Python tracker 

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



[issue47006] PEP 646: Decide on substitution behavior

2022-03-13 Thread Jelle Zijlstra


New submission from Jelle Zijlstra :

We've had some disagreement about the behavior of TypeVarTuple substitution 
related to PEP 646, and the discussion has now spilled around multiple PRs. I'd 
like to use this issue to come to an agreement so we don't have to chase 
through so many different places.

Links:
- GH-31021 (merged) implements PEP 646 in typing.py. Matthew initially 
implemented full TypeVar substitution support, but took it out after I 
suggested an alternative solution in 
https://github.com/python/cpython/pull/31021#pullrequestreview-890627941.
- GH-31800 (merged without review) implements TypeVarTuple substitution in 
Python.
- GH-31828 implements TypeVarTuple substitution in C.
- GH-31844 and GH-31846 add additional test cases.
- GH-31804 (closed) implements my proposed solution.

I'd like to ask that until we come to an agreement we hold off on making any 
more changes, so we don't have to go back and forth and we ensure that the 
eventual solution covers all edge cases.

The disagreement is about what to do with TypeVarTuple substitution: the 
behavior when a generic type is subscripted, like `tuple[*Ts][int, str]`.

There are two possible extreme approaches:
- Implement full substitution support, just as we have it for existing 
TypeVars. This is complicated because TypeVarTuple makes it much harder to 
match up the types correctly. However, it is consistent with the behavior for 
other TypeVar-like objects. My example would turn into GenericAlias(tuple, 
(int, str)).
- Give up on substitution and just return a new GenericAlias object: 
GenericAlias(GenericAlias(tuple, Unpack[Ts]), (int, str). This avoids 
implementing any complex runtime behavior, but it inconsistent with existing 
behavior and less pretty when you print out the type. I prefer this approach 
because there's less risk that future enhancements to typing will break it. I 
also want to explore extending this approach to ParamSpec substitution.

--
assignee: JelleZijlstra
messages: 415100
nosy: JelleZijlstra, gvanrossum, kj, serhiy.storchaka
priority: normal
severity: normal
status: open
title: PEP 646: Decide on substitution behavior
versions: Python 3.11

___
Python tracker 

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



[issue47006] PEP 646: Decide on substitution behavior

2022-03-13 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


--
nosy: +mrahtz

___
Python tracker 

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



[issue46994] Accept explicit contextvars.Context in asyncio create_task() API

2022-03-13 Thread Yury Selivanov


Yury Selivanov  added the comment:

Yeah, +1 to add a parameter. Fwiw it was on my idea list when i was working on 
the pep

--

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-13 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +29959
pull_request: https://github.com/python/cpython/pull/31861

___
Python tracker 

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



  1   2   >