[issue27198] Adding an assertClose() method to unittest.TestCase

2022-03-19 Thread Vedran Čačić

Vedran Čačić  added the comment:

An important point nobody made, as far as I can see:

* the main usability improvement justifying math.isclose is that you don't know 
the order of magnitude of your correct value--it could be anything (even 
infinite), and the manner of comparison depends on it. That's why it uses a 
sensible rel_tol out of the box, but no abs_tol--obviously, since it doesn't 
want to give nonsense results for e.g. values close to zero.

* but when you write tests, you always know the exact value you should get, 
right? In almost all cases the second argument is a numeric literal. So the 
delta-approach is perfectly ok in that context, since you're in control of how 
much discrepancy you're going to tolerate, and in the moment that you're 
deciding on this, you have the exact value expected right in front of you.

--
nosy: +veky

___
Python tracker 

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



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

2022-03-19 Thread Inada Naoki


Change by Inada Naoki :


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

___
Python tracker 

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



[issue47040] Fix confusing versionchanged note in crc32 and adler32

2022-03-19 Thread Ma Lin


Ma Lin  added the comment:

PR 32002 is for 3.10/3.9 branches.

--

___
Python tracker 

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



[issue47040] Fix confusing versionchanged note in crc32 and adler32

2022-03-19 Thread Ma Lin


Change by Ma Lin :


--
pull_requests: +30090
pull_request: https://github.com/python/cpython/pull/32002

___
Python tracker 

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



[issue47064] thread QOS attribute on macOS

2022-03-19 Thread Dong-hee Na


Dong-hee Na  added the comment:

> but I would like to consider using a more seamless way 

For example, using a priority policy that actually uses QOS attribute :)

--

___
Python tracker 

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



[issue47064] thread QOS attribute on macOS

2022-03-19 Thread Dong-hee Na


Dong-hee Na  added the comment:

I am +1 on with supporting a way to select QOS attribute but I would like to 
consider using a more seamless way :)

--

___
Python tracker 

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



[issue47064] thread QOS attribute on macOS

2022-03-19 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue47067] Add vectorcall for generica alias object

2022-03-19 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue47067] Add vectorcall for generica alias object

2022-03-19 Thread Dong-hee Na


Dong-hee Na  added the comment:

We decided not to add it 
see bpo-40369

--
nosy: +corona10

___
Python tracker 

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



[issue40074] pickle module dump and load: add support for string file names

2022-03-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue40074] pickle module dump and load: add support for string file names

2022-03-19 Thread Grégory Starck

Grégory Starck  added the comment:

FWIW -1 as well, for same reasons.

--
nosy: +gstarck

___
Python tracker 

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



[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2022-03-19 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

The os module provides a pretty low level simple shim over platform APIs. It is 
better for logic like this to live in a higher level application library rather 
than make big assumptions on the part of the user.

```
try:
os.fdatasync(fd)
except Exception as err:
logging.debug("fdatasync(fd) failed %s, falling back to fsync(fd)", err)
os.fsync(fd)
```

--
nosy: +gregory.p.smith
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue27198] Adding an assertClose() method to unittest.TestCase

2022-03-19 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I agree with the decision, assertAlmostEqual is where the feature belongs.

>From a practical point of view I suspect a lot of people who want this in the 
>wider world today use just `assert math.isclose(...)` despite the less useful 
>error message.

--
nosy: +gregory.p.smith
status: pending -> open
versions: +Python 3.11 -Python 3.6

___
Python tracker 

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



[issue38256] binascii.crc32 is not 64-bit clean when USE_ZLIB_CRC32

2022-03-19 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

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



[issue37952] Add support for export_keying_material to SSL library

2022-03-19 Thread Christer Weinigel


Christer Weinigel  added the comment:

Sorry about the venting, but it is kind of frustrating to spend months
working on something with no feedback just to be told that it all was
for nothing.  But that's how it is.  I'll just keep updating my path
every now and then since I need it anyway and don't want my application
to fall too far behind compared to mainstream Python.

My point is mostly that that export_keying_material is starting to be
used in more IETF RFCs.  The most recent one was accepted just a few
weeks ago.  I think that is a bit of a shame that Python doesn't have
support for that functionality out of the box.  If enough people say
it's useful for them maybe that would influence your decision.

As for the rest of my mail.  Since I am trying to keep my patch sort of
up date, I might as well point to it and explain how to use it. 
Hopefully that will reduce your support burden since it will allow
those who need that functionality to build a Python interpreter on
their own.

--

___
Python tracker 

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



[issue47070] Improve performance of array_inplace_repeat

2022-03-19 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

I'd bet we could add a couple of utility functions that could be used in 
multiple places, to keep the "trick" all in one place. Something like

void
_PyBytes_RepeatInPlace(char **buffer, size_t start_len, size_t end_len)
{
// Repeatedly double.
size_t copied = start_len;
while (copied < end_len) {
size_t to_copy = Py_MIN(copied, end_len - copied);
memcpy(buffer + copied, buffer, to_copy);
copied += to_copy;
}
}

void
_PyBytes_Repeat(char *dest, size_t len_dest,
const char *src, size_t len_src)
{
// XXX maybe handle zero lengths
// XXX maybe use memset for len_src == 1
memcpy(dest, src, len_src);
_PyBytes_RepeatInPlace(dest, len_src, len_dest);
}

--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue47040] Fix confusing versionchanged note in crc32 and adler32

2022-03-19 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

If you want to backport the documentation updates, feel free to make PRs for 
that.

--
assignee: docs@python -> gregory.p.smith
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



[issue47040] Fix confusing versionchanged note in crc32 and adler32

2022-03-19 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

FYI - https://bugs.python.org/issue38256 covers the 32-bit bug.

--

___
Python tracker 

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



[issue38256] binascii.crc32 is not 64-bit clean when USE_ZLIB_CRC32

2022-03-19 Thread Gregory P. Smith


Change by Gregory P. Smith :


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

___
Python tracker 

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



[issue26019] collections.abc documentation incomplete

2022-03-19 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

This was fixed in commit 62fa613f6a6e872723505ee9d56242c31a654a9d

--
nosy: +rhettinger
resolution:  -> out of date
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



[issue40074] pickle module dump and load: add support for string file names

2022-03-19 Thread Irit Katriel


Irit Katriel  added the comment:

-1.

This is basically a request to add API to the stdlib to turn a two-liner into a 
one-liner.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue37952] Add support for export_keying_material to SSL library

2022-03-19 Thread Christian Heimes


Change by Christian Heimes :


--
nosy:  -christian.heimes

___
Python tracker 

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



[issue37952] Add support for export_keying_material to SSL library

2022-03-19 Thread Christian Heimes


Christian Heimes  added the comment:

Neither venting frustration at my expense nor emotional blackmail is going to 
increase the likeliness, that I will spend my limited personal time to review a 
patch for a new feature. Feel free to find another core dev who is willing to 
land and maintain your patch.

--
assignee: christian.heimes -> 

___
Python tracker 

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



[issue42884] array.index() missing start and end

2022-03-19 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Add start and stop parameters to the array.index()

___
Python tracker 

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



[issue38256] binascii.crc32 is not 64-bit clean when USE_ZLIB_CRC32

2022-03-19 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

it depends on the build.  USE_ZLIB_CRC32 causes it due to zlib's 32-bitness as 
noted my marko.

$ ./python 
Python 3.11.0a6+ (heads/main-dirty:b3f2d4c8ba, Mar 19 2022, 15:32:04) [GCC 
9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import binascii, zlib
>>> bigdata=memoryview(bytearray((1<<32) + 100))
>>> 
>>> print(binascii.crc32(bigdata))
2575877834
>>> crc = binascii.crc32(bigdata[:1000])
>>> crc = binascii.crc32(bigdata[1000:], crc)
>>> print(crc)
2838121701
>>> 
>>> print(zlib.crc32(bigdata))
2838121701
>>> crc = zlib.crc32(bigdata[:1000])
>>> crc = zlib.crc32(bigdata[1000:], crc)
>>> print(crc)
2838121701
>>>

--
resolution: works for me -> 
stage: resolved -> needs patch
status: closed -> open
title: binascii.crc32 is not 64-bit clean -> binascii.crc32 is not 64-bit clean 
when USE_ZLIB_CRC32
versions: +Python 3.10, Python 3.11, Python 3.8, Python 3.9

___
Python tracker 

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



[issue38256] binascii.crc32 is not 64-bit clean

2022-03-19 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

```
$ python3.8
Python 3.8.10 (default, Nov 26 2021, 20:14:08) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import binascii, zlib
>>> bigdata=memoryview(bytearray((1<<32) + 100))
>>> 
>>> print(binascii.crc32(bigdata))
2838121701
>>> crc = binascii.crc32(bigdata[:1000])
>>> crc = binascii.crc32(bigdata[1000:], crc)
>>> print(crc)
2838121701
>>> 
>>> print(zlib.crc32(bigdata))
2838121701
>>> crc = zlib.crc32(bigdata[:1000])
>>> crc = zlib.crc32(bigdata[1000:], crc)
>>> print(crc)
2838121701
```

--
nosy: +gregory.p.smith
resolution:  -> works for me
stage:  -> resolved
status: open -> closed
versions:  -Python 3.8, Python 3.9

___
Python tracker 

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



[issue27198] Adding an assertClose() method to unittest.TestCase

2022-03-19 Thread Irit Katriel


Irit Katriel  added the comment:

To summarize the discussion:

There were objections to adding assertClose, but more agreement for adding an 
option to assertAlomstEqual that does the equivalent.

Chris was to come back with an implementation (that was in 2016).

Are we still pursuing this or shall we close the issue?

--
nosy: +iritkatriel
status: open -> pending

___
Python tracker 

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



[issue47070] Improve performance of array_inplace_repeat

2022-03-19 Thread Pieter Eendebak


Change by Pieter Eendebak :


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

___
Python tracker 

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



[issue47040] Fix confusing versionchanged note in crc32 and adler32

2022-03-19 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
title: Remove invalid versionchanged in doc -> Fix confusing versionchanged 
note in crc32 and adler32

___
Python tracker 

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



[issue5888] mmap enhancement - resize with sequence notation

2022-03-19 Thread Irit Katriel


Irit Katriel  added the comment:

I am closing this because in the 13 years since it was opened there was only 
one (negative) response and I don't think this will be picked up now.

If you still want to pursue this idea, I would suggest raising it on 
python-ideas to get more feedback, and then possibly reopening this or creating 
a new issue.

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



[issue47040] Remove invalid versionchanged in doc

2022-03-19 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset b3f2d4c8bab52573605c96c809a1e2162eee9d7e by Ma Lin in branch 
'main':
bpo-47040: improve document of checksum functions (gh-31955)
https://github.com/python/cpython/commit/b3f2d4c8bab52573605c96c809a1e2162eee9d7e


--

___
Python tracker 

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



[issue47061] Deprecate modules listed in PEP 594

2022-03-19 Thread Hugo van Kemenade


Change by Hugo van Kemenade :


--
nosy: +hugovk

___
Python tracker 

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



[issue32547] csv.DictWriter emits strange errors if fieldnames is an iterator

2022-03-19 Thread Irit Katriel


Irit Katriel  added the comment:

Perhaps we could raise an exception with a clearer error message when 
fieldnames not a sequence?

--
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.7

___
Python tracker 

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



[issue47070] Improve performance of array_inplace_repeat

2022-03-19 Thread Pieter Eendebak


New submission from Pieter Eendebak :

The array_inplace_repeat is inefficient for small arrays and a high number of 
repeats. This can be improved by using the same approach as in 
https://bugs.python.org/issue47005

--
components: Interpreter Core
messages: 415572
nosy: pieter.eendebak
priority: normal
severity: normal
status: open
title: Improve performance of array_inplace_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



[issue47022] PEP 594: Document removal of asynchat, asyncore and smtpd

2022-03-19 Thread Hugo van Kemenade


Change by Hugo van Kemenade :


--
pull_requests: +30087
pull_request: https://github.com/python/cpython/pull/31998

___
Python tracker 

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



[issue46382] dataclass(slots=True) does not account for slots in base classes

2022-03-19 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks for all of your work, @ariebovenberg!

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



[issue46382] dataclass(slots=True) does not account for slots in base classes

2022-03-19 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset 82e9b0bb0ac44d4942b9e01b2cdd2ca85c17e563 by Arie Bovenberg in 
branch 'main':
bpo-46382 dataclass(slots=True) now takes inherited slots into account 
(GH-31980)
https://github.com/python/cpython/commit/82e9b0bb0ac44d4942b9e01b2cdd2ca85c17e563


--

___
Python tracker 

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



[issue37952] Add support for export_keying_material to SSL library

2022-03-19 Thread Christer Weinigel

Christer Weinigel  added the comment:

Hi,

unfortunately the maintainer of the openssl library in Python doesn't
want to take my patch.  He says that he doesn't want the burden of
supporting more functions in the API.  I'm a bit frustrated about the
whole situation, I've redone my patch over and over again for at least
six months just to receive no feedback at all and to finally be told
that it was all in vain.  If you add a comment to the merge request
saying that you also need that functionality it might help to change
his mind, but probably not.  But it would show that it's not only me
that would like to be able to use that function.

I have kept my patch up to date up to a few weeks ago so unless
something major has happened it ought to apply fairly cleanly to the
latest mainline branch of python.

https://github.com/wingel/cpython/tree/export_keying_material-master

Usually there will be conflict due to an automatically generated
checksum at the end of the file _ssl.c.h but to get around that, just
skip that part of the patch and rerun "clinic" to regenerate the
checksum.  Here's what I usually do to build and test my patch:

./configure --prefix=/opt/python-master

python3 Tools/clinic/clinic.py -f Modules/_ssl.c
Modules/clinic/_ssl.c.h
make -j24
make install

Regards,
  Christer

On Sat, 2022-03-19 at 14:32 +, Hans-Christoph Steiner wrote:
> 
> Hans-Christoph Steiner  added the comment:
> 
> We're working on the HTTP Transport Auth draft
> (https://www.ietf.org/archive/id/draft-schinazi-httpbis-transport-auth-05.html
> ) in the IETF that also needs this method.  I would really love to
> see this land, any advice?  If it is just a matter of updating the
> patch for the current Python, I can probably handle that.
> 
> --
> nosy: +eighthave
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue47022] PEP 594: Document removal of asynchat, asyncore and smtpd

2022-03-19 Thread Hugo van Kemenade


Change by Hugo van Kemenade :


--
pull_requests: +30086
stage: backport needed -> patch review
pull_request: https://github.com/python/cpython/pull/31997

___
Python tracker 

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



[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2022-03-19 Thread Cebtenzzre


Change by Cebtenzzre :


--
nosy: +cebtenzzre

___
Python tracker 

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



[issue47069] socket._GLOBAL_DEFAULT_TIMEOUT being an object() makes for ugly docstrings, can be better

2022-03-19 Thread FeRD (Frank Dana)


New submission from FeRD (Frank Dana) :

socket._GLOBAL_DEFAULT_TIMEOUT's status as a bare object() instance has been 
brought up before (bpo-12441). That was reported as a bug, but appeared to stem 
from developer confusion, so it was correctly closed as "not a bug". At the 
time @orsenthil defended _GLOBAL_DEFAULT_TIMEOUT's current status quo as:

> The _GLOBAL_DEFAULT_TIMEOUT usage is an established pattern with socket > 
> module. https://github.com/python/cpython/blob/main/Lib/socket.py#L805

I don't disagree with that, but I think it can be improved upon, which is why 
I'm opening this as an enhancement instead of a bug report.

If nothing else, the current implementation of _GLOBAL_DEFAULT_TIMEOUT makes 
for some really ugly method synopses, both in socket.py and in other classes 
that make use of it:

>>> import socket, urllib.request
>>> help(socket.create_connection)
Help on function create_connection in module socket:

create_connection(address, timeout=, 
source_address=None)
Connect to *address* and return the socket object.

>>> help(urllib.request.urlopen)
Help on function urlopen in module urllib.request:

urlopen(url, data=None, timeout=, *, 
cafile=None, capath=None, cadefault=False, context=None)
Open the URL url, which can be either a string or a Request object.

>>>


...Converting socket._GLOBAL_DEFAULT_TIMEOUT from an object() instance to a 
bare class definition, in the style of an Exception subclass, appears to be 
semantically equivalent in all cases, but has the advantage that the resulting 
docstrings become VASTLY more readable:

>>> import myedits; import myedits.socket as socket
>>> help(socket.create_connection)
Help on function create_connection in module myedits.socket:

create_connection(address, timeout=, source_address=None)
Connect to *address* and return the socket object.

>>> import sys; sys.modules['socket'] = myedits.socket
>>> import myedits.urllib.request
>>> help(myedits.urllib.request.urlopen)
urlopen(url, data=None, timeout=, *, cafile=None, capath=None, 
cadefault=False, context=None)
Open the URL url, which can be either a string or a Request object.

>>>


Unless someone objects, I'd like to open a PR changing the definition of  
socket._GLOBAL_DEFAULT_TIMEOUT from:

_GLOBAL_DEFAULT_TIMEOUT = object()

to:

class _GLOBAL_DEFAULT_TIMEOUT: pass

While leaving everything else the same. AFAICT from testing, that should have 
no impact on the functionality of socket or its consumers, but improve life for 
Python developers by making the module more readable and self-documenting.

--
components: Library (Lib)
messages: 415568
nosy: ferdnyc
priority: normal
severity: normal
status: open
title: socket._GLOBAL_DEFAULT_TIMEOUT being an object() makes for ugly 
docstrings, can be better
type: enhancement
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



[issue29906] Add callback parameter to concurrent.futures.Executor.map

2022-03-19 Thread Irit Katriel


Irit Katriel  added the comment:

Since nobody followed up on this for 5 years, I would suggest that (if you are 
still interested in this) you raise this on python-ideas and ideally also 
implement and submit a patch.

If this is abandoned I will close the issue in a couple of weeks.

--
nosy: +iritkatriel
status: open -> pending

___
Python tracker 

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



[issue23647] imaplib.py MAXLINE value is too low for gmail

2022-03-19 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> fixed
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



[issue42528] Improve the docs of most Py*_Check{,Exact} API calls

2022-03-19 Thread Irit Katriel


Change by Irit Katriel :


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



[issue19991] configparser instances cannot be pretty printed

2022-03-19 Thread Irit Katriel


Irit Katriel  added the comment:

It's not just that it can't be pretty printed - it doesn't even have __str__ or 
__repr__.

I think the only thing we have now it write, which can do this:

>>> config = configparser.ConfigParser()
>>> config['DEFAULT'] = {'ServerAliveInterval': '45','Compression': 
>>> 'yes','CompressionLevel': '9'}
>>> f = io.StringIO()
>>> config.write(f)
>>> f.getvalue()
'[DEFAULT]\nserveraliveinterval = 45\ncompression = yes\ncompressionlevel = 
9\n\n'
>>> pprint.pprint(f.getvalue())
('[DEFAULT]\n'
 'serveraliveinterval = 45\n'
 'compression = yes\n'
 'compressionlevel = 9\n'
 '\n')
>>>


Is this enough, or should something be added?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue18217] Deprecate and remove gettext.install

2022-03-19 Thread Irit Katriel


Irit Katriel  added the comment:

There were several votes in the discussion for rejecting this deprecation, so I 
am closing the issue.

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



[issue35577] side_effect mocked method lose reference to instance

2022-03-19 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> not a bug
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



[issue26019] collections.abc documentation incomplete

2022-03-19 Thread Irit Katriel


Irit Katriel  added the comment:

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

--
components: +Library (Lib)
keywords: +easy
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.6

___
Python tracker 

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



[issue43702] [Windows] correctly sort and remove duplicates in _winapi getenvironment()

2022-03-19 Thread Eryk Sun


Eryk Sun  added the comment:

> which name should be stored if they are duplicated with case insensitive?

Ideally os.environ would preserve the original case of the process environment, 
and os.environ.copy() would return a copy that's also case insensitive. That 
would prevent most problems with duplicates keys. See msg387676 in bpo-28824, 
and msg414319 in bpo-15373.

In msg390038 I suggested keeping the first key that's encountered. However, 
dicts preserve insertion order nowadays, so one could assume that the last one 
is the one that the caller wants to keep.

--

___
Python tracker 

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



[issue47068] Improve __repr__ of TypeVar

2022-03-19 Thread Kaleb Barrett


New submission from Kaleb Barrett :

Currently the __repr__ for TypeVar includes the variance information and the 
type name (for example ~T, +T_co, -T_contra), but it does not contain bound or 
constraint information. I'm not sure what value including variance but not 
bound information in the __repr__ is, both are important for the use of 
interfaces that use that variable.

I propose we add the bound and constraint information to the __repr__. The 
__repr__ is arbitrary as popular type checking tools, such as mypy, and 
documentation tools, such as Sphinx, do not use the standard __repr__. Nor is 
the __repr__ eval()-able like many builtin types. And for documentation tools 
that do use the standard __repr__, this improvement will be propagated to those 
tools. (I originally requested this improvement in pdoc which uses the standard 
__repr__; the maintainer agreed with this improvement.)

Bounds can be represented using an ASCII representation of the subset operator 
"<=" and then the bound. Constraints can be represented using "<=" with a tuple 
of the constraints. Perhaps spaces should be added around the "<=" operator? I 
have no opinion.

Some examples of the proposed __repr__:
>>> TypeVar("T")
~T
>>> IntT = TypeVar("IntT", bound=int)
>>> IntT
~IntT<=int
>>> TypeVar("AnyStr", str, bytes)
~AnyStr<=(str, bytes)
>>> List[IntT]
List[~IntT<=int]

--
messages: 415562
nosy: ktbarrett
priority: normal
severity: normal
status: open
title: Improve __repr__ of TypeVar
type: enhancement
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



[issue11160] ZipFile.comment expects bytes

2022-03-19 Thread Irit Katriel


Irit Katriel  added the comment:

The documentation has been updated by now [1]:

ZipFile.comment
The comment associated with the ZIP file as a bytes object. If assigning a 
comment to a ZipFile instance created with mode 'w', 'x' or 'a', it should be 
no longer than 65535 bytes. Comments longer than this will be truncated.


[1] https://docs.python.org/3/library/zipfile.html#zipfile.ZipFile.comment

--
nosy: +iritkatriel
resolution:  -> out of date
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



[issue43702] [Windows] correctly sort and remove duplicates in _winapi getenvironment()

2022-03-19 Thread AN Long


AN Long  added the comment:

I have a question, how to determine which name should be stored if they are 
duplicated with case insensitive?

--
nosy: +asaka

___
Python tracker 

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



[issue47065] test_curses fails if terminal defaults to bright white text (15)

2022-03-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I am surprised. I use Konsole too, and the TERM value and the infocmp output 
are the same for me.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue45214] implement LOAD_NONE opcode

2022-03-19 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> later
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



[issue41864] Compiler error in _zoneinfo.c:1227: error: #pragma GCC diagnostic not allowed inside functions

2022-03-19 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Compiler warnings in _zoneinfo.c on Windows build in 64-bit

___
Python tracker 

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



[issue44832] Compiler detection is not strict enough

2022-03-19 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> ICC compiler check is too permissive

___
Python tracker 

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



[issue28584] ICC compiler check is too permissive

2022-03-19 Thread Irit Katriel


Irit Katriel  added the comment:

Closed issue44832 as a duplicate of this.

--
nosy: +iritkatriel

___
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-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I am for consistent behavior. If return GenericAlias(GenericAlias(tuple, 
Unpack[Ts]), (int, str)) for tuple[*Ts][int, str], we should also return 
GenericAlias(GenericAlias(list, T), int) for list[T][int], etc. And it will 
cause multiple problems:

* A repr can be less readable.
* It will break equality comparison and hashing. Good bye caching.
* What about __origin__, __parameters__, __args__? How will they be calculated?
* It can break code which uses annotations for something. For example it can 
break dataclasses.

It may be that will need to use it as a fallback for cases like tuple[T, 
*Ts][*Ts2] (currently it is error). But I am not sure that such cases should be 
supported.

--

___
Python tracker 

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



[issue47067] Add vectorcall for generica alias object

2022-03-19 Thread penguin_wwy


Change by penguin_wwy <940375...@qq.com>:


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

___
Python tracker 

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



[issue47067] Add vectorcall for generica alias object

2022-03-19 Thread penguin_wwy


New submission from penguin_wwy <940375...@qq.com>:

Although `ga_call` determines whether `origin` has a vectorcall, it needs to be 
unpacked the parameters that are already packed.
  /-> origin.vectorcall(unpacked)
MakeTpCall(packed) -> ga_call -> PyObject_Call
   \-> origin.tp_call

We can advance the `vectorcall` judgment to the `setup` phase.

ga_vectorcall -> origin.vectorcall

or

ga_make_tp_call -> _PyObject_MakeTpCall(packed argument) -> origin.tp_call

This will have no effect on tp_call, which still only needs to be packed once, 
while vectorcall does not need packed/unpacked

--
components: Library (Lib)
messages: 415556
nosy: penguin_wwy
priority: normal
severity: normal
status: open
title: Add vectorcall for generica alias object
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



[issue46996] Drop support of Tcl/Tk older than 8.5.12

2022-03-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 383a3bec74f0bf0c1b1bef9e0048db389c618452 by Serhiy Storchaka in 
branch 'main':
bpo-46996: IDLE: Drop workarounds for old Tk versions (GH-31962)
https://github.com/python/cpython/commit/383a3bec74f0bf0c1b1bef9e0048db389c618452


--

___
Python tracker 

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



[issue40296] help(list[int]) fails

2022-03-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11

___
Python tracker 

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



[issue40296] help(list[int]) fails

2022-03-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset e207d721fcea01123f0e3edb83b6decdcb5e5e63 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-40296: Fix supporting generic aliases in pydoc (GH-30253). (GH-31976) 
(GH-31981)
https://github.com/python/cpython/commit/e207d721fcea01123f0e3edb83b6decdcb5e5e63


--

___
Python tracker 

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



[issue46073] ast.unparse produces: 'FunctionDef' object has no attribute 'lineno' for valid module

2022-03-19 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> AttributeError in ast.unparse

___
Python tracker 

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



[issue45979] Fix Tkinter tests with old Tk

2022-03-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue37952] Add support for export_keying_material to SSL library

2022-03-19 Thread Hans-Christoph Steiner


Hans-Christoph Steiner  added the comment:

We're working on the HTTP Transport Auth draft 
(https://www.ietf.org/archive/id/draft-schinazi-httpbis-transport-auth-05.html) 
in the IETF that also needs this method.  I would really love to see this land, 
any advice?  If it is just a matter of updating the patch for the current 
Python, I can probably handle that.

--
nosy: +eighthave

___
Python tracker 

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



[issue47066] Convert a warning about flags not at the start of the regular expression into error

2022-03-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue39394] re: DeprecationWarning for `flag not at the start of expression` is cutoff too early

2022-03-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue47066] Convert a warning about flags not at the start of the regular expression into error

2022-03-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 92a6abf72e7a8274f96edbb5297119d4ff055be7 by Serhiy Storchaka in 
branch 'main':
bpo-47066: Convert a warning about flags not at the start of the regular 
expression into error (GH-31994)
https://github.com/python/cpython/commit/92a6abf72e7a8274f96edbb5297119d4ff055be7


--

___
Python tracker 

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



[issue39394] re: DeprecationWarning for `flag not at the start of expression` is cutoff too early

2022-03-19 Thread miss-islington


miss-islington  added the comment:


New changeset cbcd2e36d6cbb1d8b6a2b30a2cf1484b7857e7d6 by Miss Islington (bot) 
in branch '3.9':
bpo-39394: Improve warning message in the re module (GH-31988)
https://github.com/python/cpython/commit/cbcd2e36d6cbb1d8b6a2b30a2cf1484b7857e7d6


--

___
Python tracker 

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



[issue39394] re: DeprecationWarning for `flag not at the start of expression` is cutoff too early

2022-03-19 Thread miss-islington


miss-islington  added the comment:


New changeset 906f1a4a95e9ca82171a40a28b16533a14fa339c by Miss Islington (bot) 
in branch '3.10':
bpo-39394: Improve warning message in the re module (GH-31988)
https://github.com/python/cpython/commit/906f1a4a95e9ca82171a40a28b16533a14fa339c


--

___
Python tracker 

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



[issue44439] stdlib wrongly uses len() for bytes-like object

2022-03-19 Thread Ma Lin


Ma Lin  added the comment:

`_Stream.write` method in tarfile.py also has this code:
https://github.com/python/cpython/blob/v3.11.0a6/Lib/tarfile.py#L434

But this bug will not be triggered. When calling this method, always pass bytes 
data.

`_ConnectionBase.send_bytes` method in multiprocessing\connection.py can be 
micro-optimized:
https://github.com/python/cpython/blob/v3.11.0a6/Lib/multiprocessing/connection.py#L193
This can be done in another issue.

So I think this issue can be closed.

--
stage: patch review -> resolved
status: pending -> closed

___
Python tracker 

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



[issue44544] Add full list of possible args to textwrap: wrap, fill, shorten

2022-03-19 Thread miss-islington


miss-islington  added the comment:


New changeset fcd57996899569ec6b8028bc5b75f973f7074e21 by Miss Islington (bot) 
in branch '3.9':
bpo-44544: add textwrap placeholder arg (GH-27671)
https://github.com/python/cpython/commit/fcd57996899569ec6b8028bc5b75f973f7074e21


--

___
Python tracker 

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



[issue44544] Add full list of possible args to textwrap: wrap, fill, shorten

2022-03-19 Thread miss-islington


miss-islington  added the comment:


New changeset c1f327f30db09388fc777196e233b7a6182c6efa by Miss Islington (bot) 
in branch '3.10':
bpo-44544: add textwrap placeholder arg (GH-27671)
https://github.com/python/cpython/commit/c1f327f30db09388fc777196e233b7a6182c6efa


--

___
Python tracker 

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



[issue47066] Convert a warning about flags not at the start of the regular expression into error

2022-03-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue47057] Use FASTCALL convention for FutureIter.throw()

2022-03-19 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



[issue44544] Add full list of possible args to textwrap: wrap, fill, shorten

2022-03-19 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset cb7874f49d3d55df73a3c529773af14e2e344fb7 by andrei kulakov in 
branch 'main':
bpo-44544: add textwrap placeholder arg (GH-27671)
https://github.com/python/cpython/commit/cb7874f49d3d55df73a3c529773af14e2e344fb7


--
nosy: +asvetlov

___
Python tracker 

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



[issue44544] Add full list of possible args to textwrap: wrap, fill, shorten

2022-03-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30083
pull_request: https://github.com/python/cpython/pull/31993

___
Python tracker 

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



[issue44544] Add full list of possible args to textwrap: wrap, fill, shorten

2022-03-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30082
pull_request: https://github.com/python/cpython/pull/31992

___
Python tracker 

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



[issue39394] re: DeprecationWarning for `flag not at the start of expression` is cutoff too early

2022-03-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30081
pull_request: https://github.com/python/cpython/pull/31990

___
Python tracker 

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



[issue39394] re: DeprecationWarning for `flag not at the start of expression` is cutoff too early

2022-03-19 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +30080
pull_request: https://github.com/python/cpython/pull/31989

___
Python tracker 

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



[issue39394] re: DeprecationWarning for `flag not at the start of expression` is cutoff too early

2022-03-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 4142961b9f5ad3bf93976a6a7162f8049e354018 by Serhiy Storchaka in 
branch 'main':
bpo-39394: Improve warning message in the re module (GH-31988)
https://github.com/python/cpython/commit/4142961b9f5ad3bf93976a6a7162f8049e354018


--

___
Python tracker 

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



[issue47066] Convert a warning about flags not at the start of the regular expression into error

2022-03-19 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

This warning was introduced in 3.6. The reason is that in most other regular 
expression implementations global inline flags in the middle of the expression 
have different semantic: they affect only the part of the expression after the 
flag. But in Python they affect the whole expression. It caused confusion and 
was a source of bugs.

After 5 releases it is a time to convert this warning into error. In future we 
can allow global inline flags in the middle of the expression with different 
semantic. It is safer if one or more intermediate versions will raise an error.

--
components: Library (Lib), Regular Expressions
messages: 415544
nosy: ezio.melotti, mrabarnett, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Convert a warning about flags not at the start of the regular expression 
into error
type: 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



[issue47057] Use FASTCALL convention for FutureIter.throw()

2022-03-19 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 0a8b8e0d262eae83ffbc6b414a1f5747cdbd1d88 by Andrew Svetlov in 
branch 'main':
bpo-47057: Use FASTCALL convention for FutureIter.throw() (GH-31973)
https://github.com/python/cpython/commit/0a8b8e0d262eae83ffbc6b414a1f5747cdbd1d88


--

___
Python tracker 

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



[issue44075] Add a PEP578 audit hook for Asyncio loop stalls

2022-03-19 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I am still not convinced that audit events should be used.

Maybe support of explicit callbacks pair (on_start() + on_finish()) with `None` 
for fast-and-cheap "do nothing flag" is a better alternative for catching stale 
coroutines?

--

___
Python tracker 

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



[issue39394] re: DeprecationWarning for `flag not at the start of expression` is cutoff too early

2022-03-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This warning was introduced in 3.6. It is a time to convert it into an error. 
RE error messages contain position.

But I understand that very few users will use 3.11 in nearest future, so I am 
going to add a position to warning message and backport this change. It is not 
a bugfix in strong meaning, but I think it is safe to backport it.

--
versions: +Python 3.10, Python 3.11 -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



[issue39394] re: DeprecationWarning for `flag not at the start of expression` is cutoff too early

2022-03-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue46410] TypeError when parsing regexp with unicode named character sequence escape

2022-03-19 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

>>> import unicodedata
>>> unicodedata.lookup('KEYCAP NUMBER SIGN')
'#️'
>>> print(ascii(unicodedata.lookup('KEYCAP NUMBER SIGN')))
'#\ufe0f\u20e3'

Support of Unicode Named Character Sequences in the unicodeescape codec and in 
the RE parser would be a new feature.

--
components: +Interpreter Core, Unicode
nosy: +serhiy.storchaka, vstinner
type: behavior -> enhancement
versions: +Python 3.11 -Python 3.10

___
Python tracker 

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



[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2022-03-19 Thread Nick Coghlan


Change by Nick Coghlan :


--
pull_requests: +30078
pull_request: https://github.com/python/cpython/pull/31987

___
Python tracker 

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



[issue47065] test_curses fails if terminal defaults to bright white text (15)

2022-03-19 Thread Nick Coghlan


New submission from Nick Coghlan :

test_curses fails for me by default (running on Fedora 35 in KDE's Konsole):

```
[ncoghlan@thechalk cpython]$ echo $TERM
xterm-256color
[ncoghlan@thechalk cpython]$ ./python -m test -u curses test_curses
0:00:00 load avg: 0.88 Run tests sequentially
0:00:00 load avg: 0.88 [1/1] test_curses
test test_curses failed -- Traceback (most recent call last):
  File "/home/ncoghlan/devel/cpython/Lib/test/test_curses.py", line 48, in 
wrapped
test(self, *args, **kwargs)
^^^
  File "/home/ncoghlan/devel/cpython/Lib/test/test_curses.py", line 993, in 
test_use_default_colors
self.assertIn(old, [(curses.COLOR_WHITE, curses.COLOR_BLACK), (-1, -1), (0, 
0)])


AssertionError: (15, 0) not found in [(7, 0), (-1, -1), (0, 0)]

test_curses failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
test_curses

Total duration: 466 ms
Tests result: FAILURE
```

The active terminal info indicates that the default text colour is indeed 
bright white (assuming I'm reading the infocmp output correctly), so it feels 
like (15, 0) is just missing from the set of permissible "old" colour pairs in 
the test case:

```
[ncoghlan@thechalk cpython]$ infocmp -L | grep initialize_color

initialize_color=\E]4;%p1%d;rgb\072%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\,
```

--
components: Tests
messages: 415539
nosy: ncoghlan, petr.viktorin, twouters
priority: normal
severity: normal
stage: needs patch
status: open
title: test_curses fails if terminal defaults to bright white text (15)
type: behavior

___
Python tracker 

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



[issue433030] SRE: Atomic Grouping (?>...) is not supported

2022-03-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +mrabarnett
priority: low -> normal

___
Python tracker 

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



[issue47064] thread QOS attribute on macOS

2022-03-19 Thread Ronald Oussoren


New submission from Ronald Oussoren :

Arm based Mac systems have several types of cores: performance cores and 
efficiency cores.  The system has no way to directly specify which core a 
particular proces or thread uses, but programs can use an API for setting the 
QOS class of a thread that will influence which type of core a proces is 
scheduled on.

The primary use case for this would be to select a lower QOS class for 
background tasks to ensure that those minimally impact interactive code.

It would be nice to expose this functionality in Python.


One way to do this is to expose two or three new APIs:

0. Expose an enum.IntEnum on macOS for the various QOS classes

1. An API for setting the QOS class of a particular thread (which could also be 
used to change that class for the main thread), for example a read/write 
property ``threading.Thread.qos_class``

2. A new keyword argument ``qos_class`` to ``threading.Thread.__init__()``

3. Optional: an API for setting changing the default value for that new keyword 
argument

The new API would only exist on macOS.

One consideration: This is a platform specific option, in my limited research I 
haven't found an easy way to accomplish similar results on Linux or Windows.

Background information: 
https://developer.apple.com/documentation/apple-silicon/tuning-your-code-s-performance-for-apple-silicon

--
components: Interpreter Core, macOS
messages: 415538
nosy: ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: thread QOS attribute on macOS
type: enhancement
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



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

2022-03-19 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +30077
pull_request: https://github.com/python/cpython/pull/31986

___
Python tracker 

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



[issue47031] math.nan should note that NANs do not compare equal to anything

2022-03-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

We cannot guarantee that NAN never equal to anything, because we can create an 
object equal to it. For example mock.ANY.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue433030] SRE: Atomic Grouping (?>...) is not supported

2022-03-19 Thread Alex Waygood


Change by Alex Waygood :


--
versions: +Python 3.11 -Python 3.5

___
Python tracker 

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



[issue31552] IDLE: Convert browsers to use ttk.Treeview

2022-03-19 Thread Alex Waygood


Change by Alex Waygood :


--
title: IDLE: Convert browswers to use ttk.Treeview -> IDLE: Convert browsers to 
use ttk.Treeview

___
Python tracker 

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



[issue38307] Add .end_lineno attribute to pyclbr _Objects

2022-03-19 Thread Irit Katriel


Change by Irit Katriel :


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



[issue47031] math.nan should note that NANs do not compare equal to anything

2022-03-19 Thread Vedran Čačić

Vedran Čačić  added the comment:

I'm not satisfied with "and" formulation. For all practical purposes, math.nan 
is the "same" object as float('nan'), they just represent two ways of referring 
to it (or constructing it). To me it sounds a bit like "2 and 1+1 are the only 
even prime numbers." I suggest the docs only speak of math.nan here, and 
elsewhere to say that they can also be constructed by float('nan').

--
nosy: +veky

___
Python tracker 

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