[issue46820] SyntaxError on `1not in...`

2022-02-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +29624
pull_request: https://github.com/python/cpython/pull/31494

___
Python tracker 

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



[issue46622] Support decorating a coroutine with functools.cached_property

2022-02-22 Thread Tzu-ping Chung


Change by Tzu-ping Chung :


--
pull_requests: +29625
pull_request: https://github.com/python/cpython/pull/31495

___
Python tracker 

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



[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2022-02-22 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



[issue46820] SyntaxError on `1not in...`

2022-02-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset f20ac2ed076df63a77f65ff2660148af9f1a9b3c by Miss Islington (bot) 
in branch '3.10':
bpo-46820: Fix a SyntaxError in a numeric literal followed by "not in" 
(GH-31479) (GH-31493)
https://github.com/python/cpython/commit/f20ac2ed076df63a77f65ff2660148af9f1a9b3c


--

___
Python tracker 

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



[issue46725] Unpacking without parentheses is allowed since 3.9

2022-02-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What exactly was happened? What rule was changed? Can it cause other changes 
which allow ambiguous code or change semantic?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-02-22 Thread Thomas Grainger


New submission from Thomas Grainger :

now that the getaddrinfo lock has been removed on all platforms the numeric 
only host resolve in asyncio could be moved back into BaseEventLoop.getaddrinfo

--
components: asyncio
messages: 413699
nosy: asvetlov, graingert, yselivanov
priority: normal
severity: normal
status: open
title: use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio
type: enhancement

___
Python tracker 

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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-02-22 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +29626
pull_request: https://github.com/python/cpython/pull/31496

___
Python tracker 

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



[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-02-22 Thread Thomas Grainger


Change by Thomas Grainger :


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

___
Python tracker 

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



[issue46825] slow matching on regular expression

2022-02-22 Thread Heran Yang


New submission from Heran Yang :

I'm using `re.fullmatch` to match a string that only contains 0 and 1. The 
regular expression is: (0+|1(01*0)*1)+

It runs rather slow with Python 3.7, but when I try using regex in C++, with 
std::regex_constants::__polynomial, it works well.

Would someone take a look at it? Thx.

--
components: Regular Expressions
files: match.py
messages: 413700
nosy: HeRaNO, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: slow matching on regular expression
type: performance
versions: Python 3.7
Added file: https://bugs.python.org/file50636/match.py

___
Python tracker 

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



[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-02-22 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Could you provide more context for the proposed change?

--

___
Python tracker 

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



[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-02-22 Thread Thomas Grainger


Thomas Grainger  added the comment:

hello, it's actually a bit of a round about context, but it was brought up on a 
tornado issue where I was attempting to port the asyncio optimization to 
tornado: 
https://github.com/tornadoweb/tornado/issues/3113#issuecomment-1041019287

I think it would be better to use this AI_NUMERICHOST | AI_NUMERICSERV 
optimization from trio everywhere instead

--

___
Python tracker 

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



[issue46725] Unpacking without parentheses is allowed since 3.9

2022-02-22 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

What happened is that the new grammar using the PEG parser used the equivalent 
of starred_testlist instead of testlist for the iterable list of for statements.

The only extra thing allowed is starred elements, that are interpreted as if 
you are building a tuple without parentheses.

--

___
Python tracker 

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



[issue46818] Proper way to inherit from collections.abc.Coroutine

2022-02-22 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

> Are you suggesting that I need to just inherit from Awaitable? 

Yes. Awaitable is a very base protocol, Coroutine is an implementation.

`__await__` returns a generator that is used by Python internals as if `yield 
from awaitable.__await__()` was called.  asyncio never sends data back to the 
generator but other async frameworks can do it.

`send()`/`close()`/`throw()` coroutine methods are never used now IFAIK.  The 
current implementation calls these methods at the C level without using 
Python-exposed names. Performance matters.
These methods can be still used in very rare cases, e.g. when explicit Python 
`yield from custom_coro.__await__()` is used.

--
components: +Interpreter Core -asyncio

___
Python tracker 

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



[issue46826] prefixes argument to site.getsitepackages() missing documentation

2022-02-22 Thread Addison Snelling


New submission from Addison Snelling :

The documentation for site.getsitepackages() makes no mention of the "prefixes" 
argument, introduced in v3.3.

I'll put together a pull request in the next day or so to add this to the docs.

--
assignee: docs@python
components: Documentation
messages: 413705
nosy: asnell, docs@python
priority: normal
severity: normal
status: open
title: prefixes argument to site.getsitepackages() missing documentation
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.7, 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



[issue46622] Support decorating a coroutine with functools.lru_cache

2022-02-22 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
title: Support  decorating a coroutine with functools.cached_property -> 
Support  decorating a coroutine with functools.lru_cache

___
Python tracker 

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



[issue40059] Provide a toml module in the standard library

2022-02-22 Thread Taneli Hukkinen


Change by Taneli Hukkinen :


--
keywords: +patch
nosy: +hukkinj1
nosy_count: 15.0 -> 16.0
pull_requests: +29628
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31498

___
Python tracker 

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



[issue46798] xml.etree.ElementTree: get() doesn't return default value, always ATTLIST value

2022-02-22 Thread Stefan Behnel


Stefan Behnel  added the comment:

The question here is simply, which is considered more important: the default 
provided by the document, or the default provided by Python. I don't think it's 
a clear choice, but the way it is now does not seem unreasonable. Changing it 
would mean deliberate breakage of existing code that relies on the existing 
behaviour, and I do not see a reason to do that.

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



[issue46786] embed, source, track, wbr HTML elements not considered empty

2022-02-22 Thread Stefan Behnel


Stefan Behnel  added the comment:

Makes sense. That list hasn't been updated in 10 years.

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



[issue45100] Improve help() by making typing.overload() information accessible at runtime

2022-02-22 Thread Alex Waygood


Change by Alex Waygood :


--
nosy: +sobolevn

___
Python tracker 

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



[issue46825] slow matching on regular expression

2022-02-22 Thread Matthew Barnett


Matthew Barnett  added the comment:

The expression is a repeated alternative where the first alternative is a 
repeat. Repeated repeats can result in a lot of attempts and backtracking and 
should be avoided.

Try this instead:

(0|1(01*0)*1)+

--

___
Python tracker 

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



[issue46827] asyncio SelectorEventLoop.sock_connect fails with a UDP socket

2022-02-22 Thread Thomas Grainger


New submission from Thomas Grainger :

the following code:

import socket
import asyncio

async def amain():
with socket.socket(family=socket.AF_INET, proto=socket.IPPROTO_UDP, 
type=socket.SOCK_DGRAM) as sock:
sock.setblocking(False)
await asyncio.get_running_loop().sock_connect(sock, ("google.com", 
"443"))

asyncio.run(amain())


fails with:

Traceback (most recent call last):
  File "/home/graingert/projects/test_foo.py", line 9, in 
asyncio.run(amain())
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 641, in 
run_until_complete
return future.result()
  File "/home/graingert/projects/test_foo.py", line 7, in amain
await asyncio.get_running_loop().sock_connect(sock, ("google.com", "443"))
  File "/usr/lib/python3.10/asyncio/selector_events.py", line 496, in 
sock_connect
resolved = await self._ensure_resolved(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1395, in 
_ensure_resolved
return await loop.getaddrinfo(host, port, family=family, type=type,
  File "/usr/lib/python3.10/asyncio/base_events.py", line 855, in getaddrinfo
return await self.run_in_executor(
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -7] ai_socktype not supported

--
components: asyncio
messages: 413709
nosy: asvetlov, graingert, yselivanov
priority: normal
severity: normal
status: open
title: asyncio SelectorEventLoop.sock_connect fails with a UDP socket
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



[issue46827] asyncio SelectorEventLoop.sock_connect fails with a UDP socket

2022-02-22 Thread Thomas Grainger


Change by Thomas Grainger :


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

___
Python tracker 

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



[issue46757] dataclasses should define an empty __post_init__

2022-02-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'm going to close this issue. As Raymond says, it's a breaking change, and the 
workaround is easy enough.

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



[issue46822] test_create_server_ssl_over_ssl times out on some systems

2022-02-22 Thread Steve Dower


Steve Dower  added the comment:

Looks like my issue is actually related to the timeouts added in issue44011.

I'm guessing it's an SSL shutdown timeout, because those are notoriously weird 
on Windows/OpenSSL.

The timeout is now 30s, but the test aborts after 10s. If I increase the test 
timeout to 50s, it passes reliably.

However, if I pass ssl_shutdown_timeout to the protocol created in the test 
(which I think is the right place?), it fails with a timeout somewhere else.

So my guess is that my system (VM in a somewhat protected network) is 
legitimately taking that long to shut down the connection? And so the test 
timeout ought to be increased?

--
title: test_create_server_ssl_over_ssl attempts to listen on 0.0.0.0 -> 
test_create_server_ssl_over_ssl times out on some systems

___
Python tracker 

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



[issue46822] test_create_server_ssl_over_ssl times out on some systems

2022-02-22 Thread Steve Dower


Steve Dower  added the comment:

In fact, I only have to increase the test timeout to 15s to get it to pass 
reliably.

I don't see any reason the test should time out quicker than the operations 
it's testing though, right? So set it to 30s?

--

___
Python tracker 

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



[issue46822] test_create_server_ssl_over_ssl times out on some systems

2022-02-22 Thread Steve Dower


Change by Steve Dower :


--
keywords: +patch
pull_requests: +29630
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/31502

___
Python tracker 

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



[issue46806] Overlapping PYTHONPATH may cause import already imported module

2022-02-22 Thread Eric Snow


Eric Snow  added the comment:

When you run a Python script, the directory the script is in is automatically 
added to the beginning of sys.path.  This is the fundamental issue you've run 
into.

Basically, "src.common_object" is imported relative to the "src" that was 
imported relative to that automatically added sys.path entry.  However, 
"common_object" is a distinct module imported relative to the sys.path entry 
you explicitly added.

In general, adding a package's directory to sys.path is a bad idea.

--
nosy: +eric.snow

___
Python tracker 

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



[issue46806] Overlapping PYTHONPATH may cause import already imported module

2022-02-22 Thread Eric Snow


Eric Snow  added the comment:

Here is more detail on what happens when "from src import user_1, user_2, 
user_3" is executed in main.py:

1. the "src" module is imported
   a. not found in sys.modules
   b. file found on a sys.path entry (the directory main.py is in)
   c. the "src" module is created with __path__ set to the src directory
   d. the module is added to sys.modules
   e. src/__init__.py is executed
2. the "src.user_1" module is imported
   a. not found in sys.modules
   b. file found relative to src.__path__
   c. module created
   d. added to sys.modules
   e. executed
3. "from .common_object import OBJECT" is resolved to "from src.common_object 
import OBJECT"
4. "src.common_object" is imported (see 2)
5. src.common_object.OBJECT is created
6. "src.user_2" is imported (see 2)
7. "src.common_object" is already found in sys.modules and used
8. "src.user_3" is imported (see 2)
9. "common_object" is imported
   a. not found in sys.modules
   b. file found on a sys.path entry (the one you added in main.py)
   c. module created
   d. added to sys.modules
   e. executed
10. common_object.OBJECT is created

So the module created at (4) is different than the one at (9), even though they 
are imported from the same file.  Consequently, the OBJECT in each is likewise 
distinct.

--

___
Python tracker 

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



[issue46822] test_create_server_ssl_over_ssl times out on some systems

2022-02-22 Thread Steve Dower


Steve Dower  added the comment:


New changeset 77f31a91d55df2df79ac767690738081f27ad476 by Steve Dower in branch 
'main':
bpo-46822: Increase timeout for test_create_server_ssl_over_ssl to match 
underlying timeouts (GH-31502)
https://github.com/python/cpython/commit/77f31a91d55df2df79ac767690738081f27ad476


--

___
Python tracker 

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



[issue46806] Overlapping PYTHONPATH may cause import already imported module

2022-02-22 Thread Eric Snow


Eric Snow  added the comment:

I'm leaving this "pending" in case there may be some improvement we can make to 
the documentation to address this.

--
components: +Interpreter Core
nosy: +docs@python
status: open -> pending

___
Python tracker 

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



[issue40255] Fixing Copy on Writes from reference counting and immortal objects

2022-02-22 Thread Eric Snow


Eric Snow  added the comment:

Thanks for the updates, Eddie.

--

___
Python tracker 

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



[issue45100] Improve help() by making typing.overload() information accessible at runtime

2022-02-22 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue46725] Unpacking without parentheses is allowed since 3.9

2022-02-22 Thread miss-islington


miss-islington  added the comment:


New changeset 7fb94fd7a88f14096a5094d8a979a3912672 by Pablo Galindo Salgado 
in branch 'main':
bpo-46725: Document starred expressions in for statements (GH-31481)
https://github.com/python/cpython/commit/7fb94fd7a88f14096a5094d8a979a3912672


--
nosy: +miss-islington

___
Python tracker 

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



[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-22 Thread STINNER Victor


STINNER Victor  added the comment:

The gevent project is not compatible with Python 3.11: it gets and sets 
directly PyFrameObject.f_code member which has been removed in Python 3.11 
(moved to PyFrameObject.f_frame.f_code internal C API).

gevent issue: https://github.com/gevent/gevent/issues/1867

--

___
Python tracker 

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



[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-22 Thread STINNER Victor


STINNER Victor  added the comment:

The f_code member has been removed by in bpo-44032 by the commit 
b11a951f16f0603d98de24fee5c023df83ea552c.

The f_frame member has been added in bpo-44590 by the commit 
ae0a2b756255629140efcbe57fc2e714f0267aa3.

See also bpo-46355 [C API] Document PyFrameObject and PyThreadState changes and 
explain how to port code to Python 3.11.

--

___
Python tracker 

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



[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2022-02-22 Thread STINNER Victor


STINNER Victor  added the comment:

Removing the PyFrameObject.f_code member (commit 
b11a951f16f0603d98de24fee5c023df83ea552c) broke by gevent project:

* https://github.com/gevent/gevent/issues/1867
* https://bugs.python.org/issue40421#msg413719

--

___
Python tracker 

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



[issue36557] [doc] Clarify the meaning of /uninstall in windows cli

2022-02-22 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 9a0d941df4c3e1efb8b3017cd2c2de17e582fd5c by slateny in branch 
'main':
bpo-36557: Updated wording for using/windows (GH-31457)
https://github.com/python/cpython/commit/9a0d941df4c3e1efb8b3017cd2c2de17e582fd5c


--

___
Python tracker 

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



[issue36557] [doc] Clarify the meaning of /uninstall in windows cli

2022-02-22 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 8.0 -> 9.0
pull_requests: +29631
pull_request: https://github.com/python/cpython/pull/31504

___
Python tracker 

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



[issue36557] [doc] Clarify the meaning of /uninstall in windows cli

2022-02-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29632
pull_request: https://github.com/python/cpython/pull/31505

___
Python tracker 

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



[issue46822] test_create_server_ssl_over_ssl times out on some systems

2022-02-22 Thread Steve Dower


Change by Steve Dower :


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



[issue36557] [doc] Clarify the meaning of /uninstall in windows cli

2022-02-22 Thread miss-islington


miss-islington  added the comment:


New changeset d04fb9213a547def5604fbc60b0554c176d4c998 by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-36557: Updated wording for using/windows (GH-31457) (GH-31504)
https://github.com/python/cpython/commit/d04fb9213a547def5604fbc60b0554c176d4c998


--

___
Python tracker 

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



[issue46800] Support for pause(2)

2022-02-22 Thread Zachary Ware


Change by Zachary Ware :


--
resolution:  -> works for me
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



[issue46819] Add an Error / Exception / Warning when contextlib.suppress() is entered with no specified exception(s) to suppress

2022-02-22 Thread Zachary Ware


Zachary Ware  added the comment:

But `suppress` takes varargs; from `suppress`'s perspective, there is no 
difference between `suppress()` and `l=[];suppress(*l)`.  There would be a 
difference at the AST level, but trying to find it within `suppress` to issue a 
warning seems unfeasible.  Certainly possible for a linter, though :)

--

___
Python tracker 

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



[issue36557] [doc] Clarify the meaning of /uninstall in windows cli

2022-02-22 Thread miss-islington


miss-islington  added the comment:


New changeset aa9a5c4d72e083f8b4c635d79f7450dbe8319469 by Miss Islington (bot) 
in branch '3.9':
bpo-36557: Updated wording for using/windows (GH-31457)
https://github.com/python/cpython/commit/aa9a5c4d72e083f8b4c635d79f7450dbe8319469


--

___
Python tracker 

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



[issue36557] [doc] Clarify the meaning of /uninstall in windows cli

2022-02-22 Thread Irit Katriel


Irit Katriel  added the comment:

Thank you @slateny.

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



[issue20923] [doc] Explain ConfigParser 'valid section name' and .SECTCRE

2022-02-22 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset bba8008f99d615a02984422a3825082bb5621f5a by vidhya in branch 
'main':
bpo-20923 : [doc] Explain ConfigParser 'valid section name'  and .SECTCRE 
(GH-31413)
https://github.com/python/cpython/commit/bba8008f99d615a02984422a3825082bb5621f5a


--

___
Python tracker 

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



[issue20923] [doc] Explain ConfigParser 'valid section name' and .SECTCRE

2022-02-22 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 11.0 -> 12.0
pull_requests: +29633
pull_request: https://github.com/python/cpython/pull/31506

___
Python tracker 

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



[issue20923] [doc] Explain ConfigParser 'valid section name' and .SECTCRE

2022-02-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29634
pull_request: https://github.com/python/cpython/pull/31507

___
Python tracker 

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



[issue46819] Add an Error / Exception / Warning when contextlib.suppress() is entered with no specified exception(s) to suppress

2022-02-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I concur with Zachary.

Note that suppress without arguments corresponds to "except" and isinstance() 
with empty tuple.

--
nosy: +serhiy.storchaka
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



[issue46717] Raising exception multiple times leaks memory

2022-02-22 Thread Irit Katriel


Change by Irit Katriel :


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



[issue43545] Use LOAD_GLOBAL to set __module__ in class def

2022-02-22 Thread Irit Katriel


Irit Katriel  added the comment:

Please reopen or create and new issue if this is still relevant and you can 
provide more information.

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



[issue46825] slow matching on regular expression

2022-02-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The re module does not support features corresponding to 
std::regex_constants::__polynomial in C++. Rewrite your regular expression or 
try to use alternative regex implementations (for example wrappers around the 
re2 library or C++ regex library).

--
nosy: +serhiy.storchaka
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



[issue46819] Add an Error / Exception / Warning when contextlib.suppress() is entered with no specified exception(s) to suppress

2022-02-22 Thread Cooper Lees


Cooper Lees  added the comment:

Ok thanks. Looks like the warning in flake8-bugbear is the right place then, 
unfortunately.

And just to be sure:

> Note that suppress without arguments corresponds to "except" and isinstance() 
> with empty tuple.

Are you saying that `contextlib.suppress()` should effectively `except 
BaseException` (cause this is not the behavior from my tests) and suppress all 
or suppress nothing? I believe the empty tuple makes it except nothing?

```python
cooper@home1:~$ python3.11
Python 3.11.0a5+ (main, Feb 22 2022, 08:51:50) [GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import contextlib
>>> with contextlib.suppress():
...   raise ValueError("I raise ...")
...
Traceback (most recent call last):
  File "", line 2, in 
ValueError: I raise ...
>>>
```

--

___
Python tracker 

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



[issue46819] Add an Error / Exception / Warning when contextlib.suppress() is entered with no specified exception(s) to suppress

2022-02-22 Thread Zachary Ware


Zachary Ware  added the comment:

>>> try:
... raise ValueError("I raise...")
... except ():
... pass
... 
Traceback (most recent call last):
  File "", line 2, in 
ValueError: I raise...

--

___
Python tracker 

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



[issue46819] Add an Error / Exception / Warning when contextlib.suppress() is entered with no specified exception(s) to suppress

2022-02-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

No, I say that

with suppress():
...

is equivalent to

try:
...
except ():
pass

or

try:
...
except BaseException as err:
if not isinstance(err, ()):
raise

If you want to suppress all exceptions (it is not very clever idea), use 
suppress(BaseException).

--

___
Python tracker 

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



[issue20923] [doc] Explain ConfigParser 'valid section name' and .SECTCRE

2022-02-22 Thread miss-islington


miss-islington  added the comment:


New changeset a7af34d407b344de7f138c002854a3e16ecb9db5 by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-20923 : [doc] Explain ConfigParser 'valid section name'  and 
.SECTCRE (GH-31413) (GH-31506)
https://github.com/python/cpython/commit/a7af34d407b344de7f138c002854a3e16ecb9db5


--

___
Python tracker 

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



[issue46729] Better str() for BaseExceptionGroup

2022-02-22 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 38b5acf8673ce42a401263a2528202e44d6ae60a by Irit Katriel in 
branch 'main':
bpo-46729: add number of sub-exceptions in str() of BaseExceptionGroup 
(GH-31294)
https://github.com/python/cpython/commit/38b5acf8673ce42a401263a2528202e44d6ae60a


--

___
Python tracker 

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



[issue46819] Add an Error / Exception / Warning when contextlib.suppress() is entered with no specified exception(s) to suppress

2022-02-22 Thread Cooper Lees


Cooper Lees  added the comment:

I would never want to do that ... I understand it's bad. Just questioning 
things before adding lints so we put things in the right places and more 
importantly making sure I understand.

Thanks for the discussion all.

--

___
Python tracker 

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



[issue46819] Add an Error / Exception / Warning when contextlib.suppress() is entered with no specified exception(s) to suppress

2022-02-22 Thread Cooper Lees


Cooper Lees  added the comment:

FWIW - Will be looking to add to flake8-bugbear here: 
https://github.com/PyCQA/flake8-bugbear/issues/222

--

___
Python tracker 

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



[issue46729] Better str() for BaseExceptionGroup

2022-02-22 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



[issue46725] Unpacking without parentheses is allowed since 3.9

2022-02-22 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue20923] [doc] Explain ConfigParser 'valid section name' and .SECTCRE

2022-02-22 Thread miss-islington


miss-islington  added the comment:


New changeset 2387aeacc78bfd9d314428b79590b2b47511bf33 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-20923 : [doc] Explain ConfigParser 'valid section name'  and .SECTCRE 
(GH-31413) (GH-31507)
https://github.com/python/cpython/commit/2387aeacc78bfd9d314428b79590b2b47511bf33


--

___
Python tracker 

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



[issue20923] [doc] Explain ConfigParser 'valid section name' and .SECTCRE

2022-02-22 Thread Irit Katriel


Irit Katriel  added the comment:

Thank you @vidhya!

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



[issue46632] test_ssl: 2 tests fail on cstratak-CentOS9-fips-x86_64

2022-02-22 Thread STINNER Victor


STINNER Victor  added the comment:

Same on AMD64 CentOS9 FIPS Only Blake2 Builtin Hash 3.x:
https://buildbot.python.org/all/#/builders/828/builds/196

test.pythoninfo:

fips.linux_crypto_fips_enabled: 1
fips.openssl_fips_mode: 1
ssl.OPENSSL_VERSION: OpenSSL 3.0.1 14 Dec 2021
ssl.OPENSSL_VERSION_INFO: (3, 0, 0, 1, 0)

==
ERROR: test_load_verify_cadata (test.test_ssl.ContextTests)
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-CentOS9-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_ssl.py",
 line 1494, in test_load_verify_cadata
ctx.load_verify_locations(cadata=cacert_der)

ssl.SSLError: [EVP] unsupported (_ssl.c:4009)

==
ERROR: test_connect_cadata (test.test_ssl.SimpleBackgroundTests)
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-CentOS9-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_ssl.py",
 line 2138, in test_connect_cadata
ctx.load_verify_locations(cadata=der)
^
ssl.SSLError: [EVP] unsupported (_ssl.c:4009)

Stdout:
 server:  new connection from ('127.0.0.1', 38484)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)

--

___
Python tracker 

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



[issue46828] math.prod can return integers (contradicts doc)

2022-02-22 Thread Neil Webber


New submission from Neil Webber :

The math module documentation says:

   Except when explicitly noted otherwise, all return values are floats.

But this code returns an integer:

   from math import prod; prod((1,2,3))

Doc should "explicitly note otherwise" here, I imagine. The issue being wanting 
to know that the result on all-integer input will be an exact (integer) value 
not a floating value.

--
assignee: docs@python
components: Documentation
messages: 413741
nosy: docs@python, neilwebber
priority: normal
severity: normal
status: open
title: math.prod can return integers (contradicts doc)
type: behavior

___
Python tracker 

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



[issue46771] Add some form of cancel scopes

2022-02-22 Thread Tin Tvrtković

Change by Tin Tvrtković :


--
pull_requests: +29635
pull_request: https://github.com/python/cpython/pull/31508

___
Python tracker 

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



[issue46827] asyncio SelectorEventLoop.sock_connect fails with a UDP socket

2022-02-22 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +29636
pull_request: https://github.com/python/cpython/pull/31509

___
Python tracker 

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



[issue46827] asyncio SelectorEventLoop.sock_connect fails with a UDP socket

2022-02-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29637
pull_request: https://github.com/python/cpython/pull/31510

___
Python tracker 

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



[issue46827] asyncio SelectorEventLoop.sock_connect fails with a UDP socket

2022-02-22 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 8fb94893e4a870ed3533e80c4bc2f1ebf1cfa9e7 by Thomas Grainger in 
branch 'main':
bpo-46827: pass sock.type to getaddrinfo in sock_connect (GH-31499)
https://github.com/python/cpython/commit/8fb94893e4a870ed3533e80c4bc2f1ebf1cfa9e7


--

___
Python tracker 

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



[issue46811] Test suite needs adjustments for Expat >=2.4.5

2022-02-22 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset fdfd7a93540b0866ba42264ecb9b0a3c2286f654 by Łukasz Langa 
(Sebastian Pipping) in branch '3.8':
bpo-46811: Make test suite support Expat >=2.4.5 (GH-31453)
https://github.com/python/cpython/commit/fdfd7a93540b0866ba42264ecb9b0a3c2286f654


--

___
Python tracker 

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



[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-22 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ccbe8045faf6e63d36229ea4e1b9298572cda126 by Victor Stinner in 
branch 'main':
bpo-46659: Fix the MBCS codec alias on Windows (GH-31218)
https://github.com/python/cpython/commit/ccbe8045faf6e63d36229ea4e1b9298572cda126


--

___
Python tracker 

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



[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-22 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b899126094731bc49fecb61f2c1b7557d74ca839 by Victor Stinner in 
branch 'main':
bpo-46659: Deprecate locale.getdefaultlocale() (GH-31206)
https://github.com/python/cpython/commit/b899126094731bc49fecb61f2c1b7557d74ca839


--

___
Python tracker 

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



[issue46827] asyncio SelectorEventLoop.sock_connect fails with a UDP socket

2022-02-22 Thread miss-islington


miss-islington  added the comment:


New changeset d327517b54c148eba499c777b99760356102cbe0 by Miss Islington (bot) 
in branch '3.10':
bpo-46827: pass sock.type to getaddrinfo in sock_connect (GH-31499)
https://github.com/python/cpython/commit/d327517b54c148eba499c777b99760356102cbe0


--

___
Python tracker 

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



[issue46827] asyncio SelectorEventLoop.sock_connect fails with a UDP socket

2022-02-22 Thread miss-islington


miss-islington  added the comment:


New changeset 29e8c43b32d6f1ec2e8b4fd8c4903d30830f280f by Miss Islington (bot) 
in branch '3.9':
bpo-46827: pass sock.type to getaddrinfo in sock_connect (GH-31499)
https://github.com/python/cpython/commit/29e8c43b32d6f1ec2e8b4fd8c4903d30830f280f


--

___
Python tracker 

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



[issue46827] asyncio SelectorEventLoop.sock_connect fails with a UDP socket

2022-02-22 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



[issue44011] Borrow asyncio ssl implementation from uvloop

2022-02-22 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



[issue45146] Add a possibility for asyncio.Condition to determine the count of currently waiting consumers

2022-02-22 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Sorry, your use-case looks not convincing but overcomplicated.

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



[issue46829] Confusing CancelError message if multiple cancellations are scheduled

2022-02-22 Thread Andrew Svetlov


New submission from Andrew Svetlov :

Suppose multiple `task.cancel(msg)` with different messages are called on the 
same event loop iteration.

What message (`cancel_exc.args[0]`) should be sent on the next loop iteration?

As of Python 3.10 it is the message from the *last* `task.cancel(msg)` call. 
The main branch changed it to the *first* message (it is a subject for 
discussion still).
Both choices are equally bad. The order of tasks execution at the same loop 
iteration is weak and depends on very many circumstances. Effectively, 
first-cancelled-message and last-cancelled-message are equal to random-message.

This makes use of cancellation message not robust: a task can be cancelled by 
many sources, task-groups adds even more mess.

Guido van Rossum suggested that messages should be collected in a list and 
raised altogether. There is a possibility to do it in a backward-compatible 
way: construct the exception as `CancelledError(last_msg, tuple(msg_list))`. 
args[0] is args[1][-1]. Weird but works.

`.cancel()` should add `None` to the list of cancelled messages.
The message list should be cleared when a new CancelledError is constructed and 
thrown into cancelling task.

Working with exc.args[0] / exc.args[1] is tedious and error-prone. I propose 
adding `exc.msgs` property. Not sure if the last added message is worth a 
separate attribute, a robust code should not rely on messages order as I 
described above.

The single message is not very useful but a list of messages can be used in 
timeouts implementation as cancellation count alternative.

I don't have a strong preference now but want to carefully discuss possible 
opportunities before making the final decision.

--
components: asyncio
messages: 413749
nosy: ajoino, alex.gronholm, asvetlov, chris.jerdonek, dreamsorcerer, 
gvanrossum, iritkatriel, jab, njs, tinchester, yselivanov
priority: normal
severity: normal
status: open
title: Confusing CancelError message if multiple cancellations are scheduled
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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-02-22 Thread Brandt Bucher


Change by Brandt Bucher :


--
pull_requests: +29638
pull_request: https://github.com/python/cpython/pull/31511

___
Python tracker 

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



[issue45459] Limited API support for Py_buffer

2022-02-22 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 66b3cd7063322a9f5c922a97bbd06fdb9830 by Victor Stinner in 
branch 'main':
bpo-45459: Rename buffer.h to pybuffer.h (#31201)
https://github.com/python/cpython/commit/66b3cd7063322a9f5c922a97bbd06fdb9830


--

___
Python tracker 

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



[issue45100] Improve help() by making typing.overload() information accessible at runtime

2022-02-22 Thread Alex Waygood


Alex Waygood  added the comment:

I'd dearly like better introspection tools for functions decorated with 
@overload, but I'd rather have a solution where:

- inspect.signature doesn't have to import typing. That doesn't feel worth it 
for users who aren't using typing.overload, but inspect.signature would have to 
import typing whether or not @overload was being used, in order to *check* 
whether @overload was being used.
- The solution could be reused by, and generalised to, other kinds of functions 
that have multiple signatures.

If we create an __overloads__ dunder that stored the signatures of 
multi-signature functions, as Raymond suggests, inspect.signature could check 
that dunder to examine whether the function is a multi-dispatch signature, and 
change its representation of the function accordingly. This kind of solution 
could be easily reused by other parts of the stdlib, like 
@functools.singledispatch, and by third-party packages such as plum-dispatch, 
multipledispatch, and Nikita's dry-python/classes library.

So, while it would undoubtedly be more complex to implement, I much prefer 
Raymond's suggested solution.

--

___
Python tracker 

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



[issue45459] Limited API support for Py_buffer

2022-02-22 Thread STINNER Victor


STINNER Victor  added the comment:

pmp-p:
> There's some side effects with "buffer.h" inclusion in Panda3D when building 
> againt 3.11a5, project manager concerns are here 
> https://github.com/python/cpython/pull/29991#issuecomment-1031731100

Thanks for the report. It has been fixed. I close again the issue.

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



[issue46829] Confusing CancelError message if multiple cancellations are scheduled

2022-02-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What about `CancelledError(*msg_list)` or 
`CancelledError(*reversed(msg_list))`? It is backward compatible and all 
messages are uniformely represented.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue44886] asyncio: create_datagram_endpoint() does not return a DatagramTransport

2022-02-22 Thread Andrew Svetlov


Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue44886] asyncio: create_datagram_endpoint() does not return a DatagramTransport

2022-02-22 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
versions: +Python 3.10, Python 3.11 -Python 3.8

___
Python tracker 

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



[issue44886] asyncio: create_datagram_endpoint() does not return a DatagramTransport

2022-02-22 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
assignee:  -> asvetlov

___
Python tracker 

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



[issue45883] reuse_address mistakenly removed from loop.create_server

2022-02-22 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



[issue31327] [doc] Add example of platform-specific support for negative timestamps to the time doc

2022-02-22 Thread Vidhya


Vidhya  added the comment:

[Entry level contributor seeking guidance]If this is not yet fixed, I can work 
on this. Please let me know.

--
nosy: +vidhya

___
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-02-22 Thread Guido van Rossum


Guido van Rossum  added the comment:

I would like to go on record (again) as preferring to get rid of the 
cancel-message parameter altogether. Let's deprecate it. When we initially 
designed things without a cancel message we did it on purpose -- "cancellation" 
is a single flag, not a collection of data.

--

___
Python tracker 

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



[issue43119] asyncio.Queue.put never yields if the queue is unbounded

2022-02-22 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Sorry, that's how asyncio works: it never switches to another task if `await 
...` doesn't need to wait for something actually.

Adding `await asyncio.sleep(0)` to every call decreases performance.

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



[issue46771] Add some form of cancel scopes

2022-02-22 Thread Tin Tvrtković

Change by Tin Tvrtković :


--
pull_requests: +29640
pull_request: https://github.com/python/cpython/pull/31513

___
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-02-22 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Deprecation is a good answer. 
Let's not forget to apply it to 3.11 then.

--

___
Python tracker 

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



[issue44886] asyncio: create_datagram_endpoint() does not return a DatagramTransport

2022-02-22 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +29641
pull_request: https://github.com/python/cpython/pull/31514

___
Python tracker 

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



[issue44886] asyncio: create_datagram_endpoint() does not return a DatagramTransport

2022-02-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29642
pull_request: https://github.com/python/cpython/pull/31515

___
Python tracker 

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



[issue40358] pathlib's relative_to should behave like os.path.relpath

2022-02-22 Thread Socob


Change by Socob <206a8...@opayq.com>:


--
nosy: +Socob

___
Python tracker 

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



[issue42234] pathlib relative_to behaviour change

2022-02-22 Thread Socob


Change by Socob <206a8...@opayq.com>:


--
nosy: +Socob

___
Python tracker 

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



[issue44078] Output relative path when using PurePath.relative_to

2022-02-22 Thread Socob


Change by Socob <206a8...@opayq.com>:


--
nosy: +Socob

___
Python tracker 

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



[issue40358] pathlib's relative_to should behave like os.path.relpath

2022-02-22 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy:  -terry.reedy

___
Python tracker 

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



[issue45885] Specialize COMPARE_OP

2022-02-22 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher
nosy_count: 2.0 -> 3.0
pull_requests: +29643
pull_request: https://github.com/python/cpython/pull/31516

___
Python tracker 

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



[issue46765] Replace Locally Cached Strings with Statically Initialized Objects

2022-02-22 Thread Eric Snow


Eric Snow  added the comment:


New changeset 1f455361ecfb1892e375bdbee813cdf095b6cfb8 by Eric Snow in branch 
'main':
bpo-46765: Replace Locally Cached Strings with Statically Initialized Objects 
(gh-31366)
https://github.com/python/cpython/commit/1f455361ecfb1892e375bdbee813cdf095b6cfb8


--

___
Python tracker 

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



  1   2   >