[issue47040] Remove invalid versionchanged in doc

2022-03-17 Thread Ma Lin


Ma Lin  added the comment:

`binascii.crc32` doc also has this invalid document:
doc: https://docs.python.org/3/library/binascii.html#binascii.crc32
3.0.0 code: https://github.com/python/cpython/blob/v3.0/Modules/binascii.c#L1035

In addition, `binascii.crc32` has an `USE_ZLIB_CRC32` code path, but it's buggy.
The length of zlib `crc32()` function is `unsigned int`, so if use 
`USE_ZLIB_CRC32` code path and the data > 4GiB, the result is wrong.
Should we remove `USE_ZLIB_CRC32` code path in `binascii.c`, or fix it?

`USE_ZLIB_CRC32` code path in binascii.c (bug code): 
https://github.com/python/cpython/blob/v3.11.0a6/Modules/binascii.c#L756-L767
crc32 in zlibmodule.c, it uses an UINT_MAX sliding window (right code):
 https://github.com/python/cpython/blob/v3.11.0a6/Modules/zlibmodule.c#L1436

--
title: Remove an invalid versionchanged in doc -> Remove invalid versionchanged 
in doc

___
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-17 Thread miss-islington


miss-islington  added the comment:


New changeset 612019e60e3a5340542122dabbc7ce5a27a8c635 by Miss Islington (bot) 
in branch '3.9':
bpo-45979: Fix Tkinter tests with old Tk (>= 8.5.12) (GH-31938)
https://github.com/python/cpython/commit/612019e60e3a5340542122dabbc7ce5a27a8c635


--

___
Python tracker 

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



[issue46981] Empty typing.Tuple

2022-03-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 15df8f8d89a0e563bdd15e4cd6734298736a5a1d by Serhiy Storchaka in 
branch 'main':
bpo-46981: Remove typing._TypingEmpty (GH-31836)
https://github.com/python/cpython/commit/15df8f8d89a0e563bdd15e4cd6734298736a5a1d


--

___
Python tracker 

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



[issue47041] requests module parse url failed

2022-03-17 Thread Christian Heimes


Christian Heimes  added the comment:

Requests is a 3rd party package and not part of the standard library.

There is a problem with the HTTP server at http://183.246.199.100:8321. It is 
sending a HTTP redirect with the port number duplicated: ":8321:8321". Please 
report the issue to the server admin.

--
nosy: +christian.heimes
resolution:  -> third party
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



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

2022-03-17 Thread Arie Bovenberg


Arie Bovenberg  added the comment:

@eric.smith did you give this some thought? Would we want to imitate the attrs 
behavior regarding __weafref__?

It'd be nice if I can submit a PR to be included in 3.11

--

___
Python tracker 

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



[issue46981] Empty typing.Tuple

2022-03-17 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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-17 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

One consideration is support for older LTS distributions of Linux, RHEL/Centos 
7 appears to ship with Tcl/Tk 8.5. 

The system install of Tcl/Tk on macOS is also 8.5, but that variant has too 
many bugs to try to support it.

--
nosy: +ronaldoussoren

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


Serhiy Storchaka  added the comment:

8.5.12 will be 10 years old at the time of releasing 3.11.

We can relax the requirements for 8.5.x, so the code can be build with older 
versions, but some tests will fail because we removed workarounds for 
differences in behavior in older versions from tests.

The LTS distributions can also provide their own patches which relax the 
requirements.

--

___
Python tracker 

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



[issue46890] getpath problems with framework build

2022-03-17 Thread Ronald Oussoren


Change by Ronald Oussoren :


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

___
Python tracker 

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



[issue47042] Fix test_html_doc in test_pydoc

2022-03-17 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Due to missed splitlines() in test_pydoc the HTML output was not tested 
correctly. Instead of testing that the actual output contains every *line* from 
the expected output it tested that the actual output contains every *character* 
from the expected output. The test would pass with any actual output which 
contains all Latin letters and some punctuation.

The following PR fixes this bug and makes the test even more strict. Now it 
tests that the actual output contains the same lines as the expected output, in 
the same order, ignoring indentation and empty lines.

--
components: Tests
messages: 415396
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Fix test_html_doc in test_pydoc
type: behavior
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



[issue47042] Fix test_html_doc in test_pydoc

2022-03-17 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

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


Change by Serhiy Storchaka :


--
dependencies: +Fix test_html_doc in test_pydoc

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


Serhiy Storchaka  added the comment:


New changeset c2e3c06139e9468efb32629d147d99a1672d9e19 by Serhiy Storchaka in 
branch 'main':
bpo-46996: Remove support of Tcl/Tk < 8.5.12 (GH-31839)
https://github.com/python/cpython/commit/c2e3c06139e9468efb32629d147d99a1672d9e19


--

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



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

2022-03-17 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset ef1327e3b622e0cafdf8bfc1f480fed0dd386be6 by Christian Heimes in 
branch 'main':
bpo-40280: Skip more tests on Emscripten (GH-31947)
https://github.com/python/cpython/commit/ef1327e3b622e0cafdf8bfc1f480fed0dd386be6


--

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


Serhiy Storchaka  added the comment:

__slotnames__ is used for storing all slot names.

New object.__getstate__() proposed in issue26579 may have some relation to this 
discussion.

--
nosy: +serhiy.storchaka

___
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-17 Thread Eric V. Smith


Eric V. Smith  added the comment:

Serhiy: Could you point to some documentation on __slotnames__? I see a few 
references in the code to it, but it's not set on simple test class.

>>> class A:
... __slots__=('a',)
...
>>> A.__slotnames__
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: type object 'A' has no attribute '__slotnames__'. Did you mean: 
'__slots__'?
>>>

--

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


Serhiy Storchaka  added the comment:

>
> It is not set automatically. It is set in object.__reduce__ by calling
> some helper function from the copyreg module.

--

___
Python tracker 

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



[issue46968] Insufficient sigaltstack size used by CPython prevents extensions from using new ISA

2022-03-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Commit 393e2bf6bc6effbfe821f051a230978f0edd70df has broken CPython in RedHat 6:


[2022-03-16T18:49:20.608Z] 2022/03/16 14:48:55 ERROR 
/tmp/python3.10-3.10.3-0/Modules/faulthandler.c:28:12: fatal error: sys/auxv.h: 
No such file or directory
#  include 
^~~~
compilation terminated.

--
nosy: +pablogsal
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue46968] Insufficient sigaltstack size used by CPython prevents extensions from using new ISA

2022-03-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This is problematic because this has been backported to stable releases.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue46968] Insufficient sigaltstack size used by CPython prevents extensions from using new ISA

2022-03-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

We may need to revert these commits and do another release sigh :(

--

___
Python tracker 

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



[issue46968] Insufficient sigaltstack size used by CPython prevents extensions from using new ISA

2022-03-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The code is assuming that if linux/auxvec.h then sys/auxv.h will be available, 
which is wrong.

--

___
Python tracker 

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



[issue46968] Insufficient sigaltstack size used by CPython prevents extensions from using new ISA

2022-03-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The configure file is checking for "linux/auxvec.h"

checking linux/auxvec.h usability... yes

but the code is including "sys/auxvec.h"

--

___
Python tracker 

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



[issue46968] Insufficient sigaltstack size used by CPython prevents extensions from using new ISA

2022-03-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
priority: normal -> release blocker

___
Python tracker 

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



[issue46968] Insufficient sigaltstack size used by CPython prevents extensions from using new ISA

2022-03-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This may be quite bad, because this means that 3.10 and 3.9 doesn't build in 
CentOS 6, which is used for manylinux2010 wheels

--

___
Python tracker 

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



[issue47038] Rewrite asyncio.wait_for test to use IsolatedAsyncioTestCase

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



[issue42941] Infinite loop in asyncio sslproto

2022-03-17 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

sslproto was rewritten from scratch in Python 3.11

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



[issue40007] An attempt to make asyncio.transport.writelines (selector) use Scatter I/O

2022-03-17 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

A duplicate of #47010

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Implement zero copy writes in SelectorSocketTransport in asyncio

___
Python tracker 

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



[issue40811] Allow to create new Event Loops on Threads

2022-03-17 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I suggest closing.
The documentation explicitly describes how asyncio works with threads.

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



[issue42838] Wait for cleanup coroutines before event loop is closed.

2022-03-17 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

asyncio.run() does the task

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



[issue47023] re.sub shows key error on regex escape chars provided in repl param

2022-03-17 Thread Eric V. Smith


Change by Eric V. Smith :


--
status: open -> pending

___
Python tracker 

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



[issue47043] Argparse can't parse subparsers with parse_known_args

2022-03-17 Thread rive_n


New submission from rive_n :

Let's say we have default parser configuration:
https://docs.python.org/3/library/argparse.html#other-utilities

Like this one:

```python3
import argparse

parser = argparse.ArgumentParser(prog='PROG')
parser.add_argument('--foo', action='store_true', help='foo help')
subparsers = parser.add_subparsers(help='sub-command help')

# create the parser for the "a" command
parser_a = subparsers.add_parser('a', help='a help')
parser_a.add_argument('-a', help='bar help')

# create the parser for the "b" command
parser_b = subparsers.add_parser('b', help='b help')
parser_b.add_argument('-b', help='baz help')

```

So i want to parse all subparsers arguments. For this purpose i could use 
`parse_known_args` method. 

But for some reason there is no way to get all of current args specified via 
command prompt or via list:
`print(parser.parse_known_args(['a', '-a', '12', 'b', '-b', '32']))` - will not 
print 'a' and 'b' data. It will only contain first valid argument; 

This is pretty strange behavior. Why i can't just get all of actions 
(subparsers) ?

--
components: Parser
messages: 415412
nosy: lys.nikolaou, pablogsal, rive-n
priority: normal
severity: normal
status: open
title: Argparse can't parse subparsers with parse_known_args
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue46968] Insufficient sigaltstack size used by CPython prevents extensions from using new ISA

2022-03-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +30049
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/31961

___
Python tracker 

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



[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-03-17 Thread Eric V. Smith


Eric V. Smith  added the comment:

Is there any reason to keep this issue open? The PR was merged.

--

___
Python tracker 

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



[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-03-17 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


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



[issue47043] Argparse can't parse subparsers with parse_known_args

2022-03-17 Thread rive_n


rive_n  added the comment:

Let's say we have default parser configuration:
https://docs.python.org/3/library/argparse.html#other-utilities

Like this one:

```python3
import argparse

parser = argparse.ArgumentParser(prog='PROG')
parser.add_argument('--foo', action='store_true', help='foo help')
subparsers = parser.add_subparsers(help='sub-command help')

# create the parser for the "a" command
parser_a = subparsers.add_parser('a', help='a help')
parser_a.add_argument('-a', help='bar help')

# create the parser for the "b" command
parser_b = subparsers.add_parser('b', help='b help')
parser_b.add_argument('-b', help='baz help')

```

So i want to parse all subparsers arguments. For this purpose i could use 
`parse_known_args` method. 

But for some reason there is no way to get all of current args specified via 
command prompt or via list:
`print(parser.parse_known_args(['a', '-a', '12', 'b', '-b', '32']))` - will not 
print 'a' and 'b' data. It will only contain first valid argument; 

This is pretty strange behavior. Why i can't just get all of actions 
(subparsers) ? 

--- 

I've found a solutions:
1. Easy way (and most stupid):

```python3
args, unk_args = (parser.parse_known_args(['a', '-a', '12', 'b', '-b', '32']))
args, unk_args = (parser.parse_known_args(unk_args))
```

Simple recursive calls on `unk_args`

2. Hard way -> sources fork (or just fix this, lul!)

`parse_know_args` -> 1799-1807 lines:

```python3
try:
namespace, args = self._parse_known_args(args, namespace)
if hasattr(namespace, _UNRECOGNIZED_ARGS_ATTR):
args.extend(getattr(namespace, _UNRECOGNIZED_ARGS_ATTR))
delattr(namespace, _UNRECOGNIZED_ARGS_ATTR)
return namespace, args
except ArgumentError:
err = _sys.exc_info()[1]
self.error(str(err))
```

There is only 1 call to `self._parse_known_args` instead of amount of current 
subparsers.

--

___
Python tracker 

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



[issue47043] Argparse can't parse subparsers with parse_known_args

2022-03-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal

___
Python tracker 

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



[issue43019] wait_for(to_thread)) does not work as expected. Extra documentation or fix needed.

2022-03-17 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Threads are not interruptable in Python.
The same for concurrent.future executor.
asyncio and `wait_for` is not special.

I'm not sure should we document it and *if* yes -- where should we do it?

Adding a note to every function could be cumbersome.

--

___
Python tracker 

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



[issue42683] asyncio should handle keyboard interrupt while the event loop is running

2022-03-17 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Duplicate for #39622

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> KeyboardInterrupt is ignored when await asyncio.sleep(0)

___
Python tracker 

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



[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2022-03-17 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Implemented by #32591

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Deprecate sys.set_coroutine_wrapper and replace it with more 
focused API(s)

___
Python tracker 

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



[issue40465] Deprecate the optional *random* argument to random.shuffle()

2022-03-17 Thread Hugo van Kemenade


Hugo van Kemenade  added the comment:

GH-31818 adds an entry to What's New in 3.11.

--
message_count: 5.0 -> 6.0
nosy: +hugovk
nosy_count: 3.0 -> 4.0
pull_requests: +30050
pull_request: https://github.com/python/cpython/pull/31818

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


Serhiy Storchaka  added the comment:

Sorry, the previous message was written via a phone because of blackout, so the 
formatting is a tine bit messy.

__slotnames__ is set in copyreg._slotnames(). If you want to keep a list of all 
slots you should save it in __slotnames__, either using copyreg._slotnames() 
directly or by duplicating its code.

But as for the original issue, I do not think that the current behavior is 
incorrect. At least it is consistent with the behavior of regular classes.

--

___
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-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Ronald: According to a page (which I cannot find, E. Paine should know) Centos 
7 has the oldest tcl among current *nix distributions.  
https://centos.pkgs.org/7/centos-x86_64/tcl-8.5.13-8.el7.x86_64.rpm.html
says it is 8.5.13, which is what I remember from the comparison page.

Serhiy: IDLE has required TkVersion >= 8.5 for some years (currently top of 
pyshell.py).  Does the _tkinter.c line
  #error "Tk older than 8.5.12 not supported"
translate into an ImportError (which is already caught).  I never worried about 
someone trying to import 8.3 or before, but Apple's 8.5.9 is possible.

Is there any reason that IDLE might someday require 8.6 before tkinter does?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue47044] Python 2.7.18 + tck/tk 8.6.1 + Osx Lion : tkinter built failes

2022-03-17 Thread Laurent Delphin


New submission from Laurent Delphin :

Hello Python developers :

The module tkinter failed to be built for Python 2.7.18, although for Python 
3,it works with the following test : python -m tkinter. It doesn't with 
Python2. 
Configuration :
Mac osx Lion 10.7.5.
Python2 : 2.7.18
Compiler : clang (Xcode).
Tcl/Tk : 8.6.12.
If I succeed, log files will be enclosed hereby.
Thank you.

--
messages: 415421
nosy: laurentang001
priority: normal
severity: normal
status: open
title: Python 2.7.18 + tck/tk 8.6.1 + Osx Lion : tkinter built failes
type: compile error

___
Python tracker 

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



[issue47044] Python 2.7.18 + tck/tk 8.6.1 + Osx Lion : tkinter built failes

2022-03-17 Thread Christian Heimes


Christian Heimes  added the comment:

Python 2.7 is no longer supported by us and we no longer accept bug reports for 
it. Please update to a supported version.

--
nosy: +christian.heimes
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



[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-03-17 Thread Mark Shannon


Change by Mark Shannon :


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



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

2022-03-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

After PR 31839 has been merged you cannot build the _tkinter module with Tcl/Tk 
older than 8.5.12. If you will still try to run IDLE on such incomplete build, 
an import error during importing tkinter will be translated to IDLE error:

$ ./python -m idlelib
** IDLE can't import Tkinter.
Your Python may not be configured for Tk. **

IDLE might someday require 8.6 if it start using some 8.6 features 
non-optionally.

--

___
Python tracker 

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



[issue47045] Remove the RESUME instruction

2022-03-17 Thread Mark Shannon


New submission from Mark Shannon :

The RESUME instruction was added to make resumption points explicit in the 
bytecode. This makes it easier to implement tracing, quickening, and interrupt 
checks as there is an explicit place to perform these checks.

Unfortunately, it also has considerable overhead. So we should remove it.
To do that, we need to:
1. Remove f_state from the InterpreterFrame so we don't need to update it.
2 .Quicken automatically in the adaptive instructions.
3. Check the evalbreaker when resuming a frame in the interpreter.
4. Add some metadata to the code object, so that we know when to fire "call" 
events when tracing.

--
assignee: Mark.Shannon
messages: 415424
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Remove the RESUME instruction
type: performance

___
Python tracker 

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



[issue34790] Deprecate-remove passing coroutine objects to asyncio.wait()

2022-03-17 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
title: Deprecate passing coroutine objects to asyncio.wait() -> 
Deprecate-remove passing coroutine objects to asyncio.wait()

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


Change by Serhiy Storchaka :


--
pull_requests: +30051
pull_request: https://github.com/python/cpython/pull/31962

___
Python tracker 

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



[issue24080] asyncio.Event.wait() Task was destroyed but it is pending

2022-03-17 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Duplicate for #39622

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> KeyboardInterrupt is ignored when await asyncio.sleep(0)

___
Python tracker 

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



[issue47042] Fix test_html_doc in test_pydoc

2022-03-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset a5d246066b5352a7d72e70ec0acb643e7c0861fa by Serhiy Storchaka in 
branch 'main':
bpo-47042: Fix testing the HTML output in test_pydoc (GH-31959)
https://github.com/python/cpython/commit/a5d246066b5352a7d72e70ec0acb643e7c0861fa


--

___
Python tracker 

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



[issue47046] Add `f_state` attribute to FrameObjects.

2022-03-17 Thread Mark Shannon


New submission from Mark Shannon :

When tracing, the event supplied is insufficient to determine what is actually 
happening.

E.g. A "call" event could be a call to a function or resuming a generator or 
coroutine.

Adding a state field to the FrameObject would allow these cases to be 
disambiguated without having to make dubious deductions from `f_lasti` or other 
frame attributes.

The proposed states would be:

FRAME_CREATED# Frame created, but not executed at all
FRAME_SUSPENDED  # Frame suspended after yield or yield from
FRAME_EXECUTING  # Frame is executed normally
FRAME_COMPLETED  # Frame has completed 
FRAME_CLEARED# Frame has been cleared


Ned, any other states that you might need to know about?

--
messages: 415427
nosy: Mark.Shannon, nedbat
priority: normal
severity: normal
status: open
title: Add `f_state` attribute to FrameObjects.

___
Python tracker 

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



[issue47045] Remove the RESUME instruction

2022-03-17 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue47037] Build problems on Windows

2022-03-17 Thread Eryk Sun


Change by Eryk Sun :


--
priority: normal -> critical

___
Python tracker 

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



[issue47047] smtplib: allow custom policy or use msg.policy in send_message

2022-03-17 Thread Mikael Koli


New submission from Mikael Koli :

The method smtplib.SMTP.send_message does not use the message's Policy if all 
of the from_addrs or to_addrs are not international. See: 
https://github.com/python/cpython/blob/v3.10.3/Lib/smtplib.py#L983 (unchanged 
in current main). The email.generator.BytesGenerator does not capture the 
email's policy as it was not passed to its init.

This has at least one notable setback: you cannot set the mangle_from to False 
meaning that the method will always turn "From ..." to ">From ..." in the plain 
text part (though often that is desirable). This is especially confusing as 
email library has the mangle_from as False by default for EmailMessages but 
smtplib.SMTP's send_message does not respect this by default.

The smtplib.SMTP.send_message has a mention about this in the docstring thus 
not entirely sure if intentional:

... Otherwise the generator is called without modifying the
policy.


If we changed this line: 
https://github.com/python/cpython/blob/v3.10.3/Lib/smtplib.py#L983

from this:
g = email.generator.BytesGenerator(bytesmsg)

to this:
g = email.generator.BytesGenerator(bytesmsg, policy=msg.policy.clone()

smptlib's tests are passed but I suspect it's not that simple. The docstring 
mention indicates this is at some level intentional and I think the mangle_from 
needs to remain True as otherwise, it may cause security problems in existing 
code. Another option perhaps could be that the policy could be passed with the 
send_message and that is used if not None or we could have argument 
"msg_policy=False" that if True, the message's policy is used.

One could also think that this could be overcome by subclassing the SMTP. 
However, the logic is such deep in that it is not convenient.

So in short, the options I thought of:
- Have an argument "policy" in send_message to force usage of your own policy 
(safe option)
- Have an argument "msg_policy" (name debatable) in send_message and if True, 
the message's policy is always used (safe option)
- Use the message's policy always (unsafe, possibly breaking and causing 
security issues in existing code)

--
components: Library (Lib), email
messages: 415428
nosy: Miksus, barry, r.david.murray
priority: normal
severity: normal
status: open
title: smtplib: allow custom policy or use msg.policy in send_message
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



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

2022-03-17 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
status: closed -> open

___
Python tracker 

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



[issue47048] Python 3.10.3 + Osx Lion : fatal error (make) signalmodule or more

2022-03-17 Thread Laurent Delphin


New submission from Laurent Delphin :

Hello developers :

Hereafter somme comments about a fatal error when Running make. Enclosed log 
(txt) files if I succeed in uploading them. 
Python3 : 3.10.3.
Osx : Lion 10.7.5. 
Compiler family : clang (Xcode). 

Message :
return PyErr_SetFromErrno(PyExec_OSError) ;
fatal error : error in backend etc.

Kind regards,

--
messages: 415429
nosy: laurentang001
priority: normal
severity: normal
status: open
title: Python 3.10.3 + Osx Lion : fatal error (make) signalmodule or more
type: compile error

___
Python tracker 

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



[issue42838] Wait for cleanup coroutines before event loop is closed.

2022-03-17 Thread xloem


xloem <0xl...@gmail.com> added the comment:

I'm sorry, is this closure an error? Could you explain more how to use 
asyncio.run() to clean up resources when an unhandled exception is thrown? Is 
this new with a recent python improvement?

--
status: closed -> open

___
Python tracker 

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



[issue47048] Python 3.10.3 + Osx Lion : fatal error (make) signalmodule or more

2022-03-17 Thread Laurent Delphin


Change by Laurent Delphin :


Added file: https://bugs.python.org/file50683/make.log

___
Python tracker 

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



[issue47048] Python 3.10.3 + Osx Lion : fatal error (make) signalmodule or more

2022-03-17 Thread Laurent Delphin


Change by Laurent Delphin :


Added file: https://bugs.python.org/file50684/config.log

___
Python tracker 

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



[issue47048] Python 3.10.3 + Osx Lion : fatal error (make) signalmodule or more

2022-03-17 Thread Laurent Delphin


Change by Laurent Delphin :


Added file: https://bugs.python.org/file50685/my-configure.log

___
Python tracker 

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



[issue47048] Python 3.10.3 + Osx Lion : fatal error (make) signalmodule or more

2022-03-17 Thread Laurent Delphin


Laurent Delphin  added the comment:

But make OK with Gcc 4.9.4, built with the formentionned clang (Xcode) compiler.
So, Compiler sensitive... 
Thank you,

--

___
Python tracker 

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



[issue42838] Wait for cleanup coroutines before event loop is closed.

2022-03-17 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

asyncio.run() present since Python 3.7
After the main coroutine finish, it cancels all background tasks and waits for 
their termination.

Background tasks can use old good `try/finally` for resources cleanup.
An additional API is not required IMHO.

--

___
Python tracker 

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



[issue46965] Enable informing callee it's awaited via vector call flag

2022-03-17 Thread Dino Viehland


Dino Viehland  added the comment:

Doh, sorry about that link, this one goes to a specific commit: 
https://github.com/facebookincubator/cinder/blob/6863212ada4b569c15cd95c4e7a838f254c8ccfb/Python/ceval.c#L6642

I do think a new opcode is a good way to go, and that could just be emitted by 
the compiler when it recognizes the pattern.  I think we mainly avoided that 
because we had some issues around performance testing when we updated the byte 
code version and the peek was negligible, but with improved call performance in 
3.11 that may not be the case anymore.

It's probably possible to keep most of gather in Python if necessary, there'd 
still need to be a C wrapper which could flow the wrapper in and the wait 
handle creation would need to be possible from Python (which slightly scares 
me).  There's probably also a perf win from the C implementation - I'll see if 
@v2m has any data on that.

--

___
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-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

tk release availability is a bit confusing.
  https://wiki.tcl-lang.org/page/Changes+in+Tcl%2FTk+8%2E6
appears to lists things 'new' in 3.6.1, but that seems to mean new since 8.5.1, 
as it includes thing introduced in 8.5.n, where n > 1. For instance, ttk 
spinbox is listed in this doc, but was available in 8.5.9, so is in 8.5.12+ and 
can be used without an 8.6 requirement.

Similarly,
  https://www.tcl.tk/man/tcl8.5/TkCmd/ttk_treeview.html
the 8.5.19 doc for the widget, shows the 'new in 8.6' treeview tag commands.  I 
suspect that they were present in 8.5.13.  Is there a specific 8.5.12 doc 
available?  I searched and tried adding '.12' in the url above and both failed. 
 Buildbots without _tkinter don't help either.

--
status: open -> closed

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



[issue34790] Deprecate-remove passing coroutine objects to asyncio.wait()

2022-03-17 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
pull_requests: +30053
pull_request: https://github.com/python/cpython/pull/31964

___
Python tracker 

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



[issue47037] Build problems on Windows

2022-03-17 Thread Steve Dower


Steve Dower  added the comment:

I think this is also a good enough reason to switch the GitHub CI back to a 
debug build, rather than release, so that assert failures are caught before 
they get merged. This is not the first time it's happened.

--

___
Python tracker 

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



[issue47037] Build problems on Windows

2022-03-17 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +30054
pull_request: https://github.com/python/cpython/pull/31965

___
Python tracker 

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



[issue47047] smtplib: allow custom policy or use msg.policy in send_message

2022-03-17 Thread Mikael Koli


Mikael Koli  added the comment:

It seems the message's policy is actually used. However, the mangle_from_ is 
still always True as the policy is not passed in the initiation of the 
generator. It seems though that all the options I mentioned could still make 
the mangle_from_ to be changeable if one wishes so.

--

___
Python tracker 

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



[issue47049] Incorrect shutil.copytree() behaviour with symlinks

2022-03-17 Thread Zoltan Vajda

New submission from Zoltan Vajda :

shutil.copytree incorrectly does not copy symlink contents if called
with symlink=False and ignore_dangling_symlinks=True.

The wrong behaviour can be reproduced like this:

$ tree
.
└── a
├── a.txt
└── b
└── a.txt -> ../a.txt

$ python3 -c "import shutil;shutil.copytree('a/b', 'c', symlinks=False, 
ignore_dangling_symlinks=True)"

As a result directoy c will be created but it will remain empty.
Expected result is a file c/a.txt with the contents of a/b/a.txt.

--
components: Library (Lib)
messages: 415437
nosy: vajdaz
priority: normal
severity: normal
status: open
title: Incorrect shutil.copytree() behaviour with symlinks
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



[issue47050] Cannot install Python 3.10.3 on Windows

2022-03-17 Thread Alex Waygood


New submission from Alex Waygood :

I have tried several times now to upgrade to Python 3.10.3 using the 64-bit 
installer for Windows at https://www.python.org/downloads/release/python-3103/. 
Each time, I encounter an error message stating that "The feature you are 
trying to use is on a network resource that is unavailable". Further error 
messages include statements that "The older version of Python 3.10.3 Test Suite 
(64-bit) cannot be removed", and finally, "0x80070643 - Fatal error during 
installation".

Screenshots of the full error messages are attached.

Hardware details:
- Microsoft Windows 10 Home, Version 10.0.19043 Build 19043
- A x64-based PC
- An HP Pavilion Notebook laptop
- Processor AMD A8-7410 APU

Does anybody have any idea what might be going wrong?

I initially tried installing Python 3.10.3 with 3.10.2 still installed, but 
have now uninstalled Python 3.10.2 from my machine. It has made no difference.

--
components: Windows
files: error_messages-compressed.pdf
messages: 415438
nosy: AlexWaygood, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Cannot install Python 3.10.3 on Windows
versions: Python 3.10
Added file: https://bugs.python.org/file50686/error_messages-compressed.pdf

___
Python tracker 

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



[issue47050] Cannot install Python 3.10.3 on Windows

2022-03-17 Thread Steve Dower


Steve Dower  added the comment:

Looks like you may have "cleaned up" your package cache at some point, which 
means you can't uninstall the old version anymore.

Try getting the 3.10.2 installer and running it directly. If it's the right 
one, you'll get Modify/Repair/Uninstall options, and those should work. (At 
worst, "Repair" will work and then it should be uninstallable.)

--

___
Python tracker 

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



[issue47050] Cannot install Python 3.10.3 on Windows

2022-03-17 Thread Alex Waygood


Alex Waygood  added the comment:

Attaching the log file from the installation.

--
Added file: https://bugs.python.org/file50687/installer_log_file.txt

___
Python tracker 

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



[issue47049] Incorrect shutil.copytree() behaviour with symlinks

2022-03-17 Thread Zoltan Vajda


Change by Zoltan Vajda :


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

___
Python tracker 

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



[issue47050] Cannot install Python 3.10.3 on Windows

2022-03-17 Thread Alex Waygood


Alex Waygood  added the comment:

> Looks like you may have "cleaned up" your package cache at some point, which 
> means you can't uninstall the old version anymore.

Not knowingly!

> Try getting the 3.10.2 installer and running it directly.

Thanks, I'll have a go.

--

___
Python tracker 

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



[issue47050] Cannot install Python 3.10.3 on Windows

2022-03-17 Thread Alex Waygood


Alex Waygood  added the comment:

Hmm, well if I try running the 3.10.2 installer, it now presents me with an 
error message saying that "a newer version of Python 3.10 is already installed".

--

___
Python tracker 

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



[issue47025] bytes do not work on sys.path

2022-03-17 Thread Brett Cannon


Change by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue47025] bytes do not work on sys.path

2022-03-17 Thread Brett Cannon


Brett Cannon  added the comment:

I think it depends on whether we want to say the standard/included/built-in 
import mechanisms don't support byte paths, or byte paths are entirely not 
supported even for 3rd-party code? I definitely think we should at least do the 
former, but I'm hesitant to close the door for those that need it by doing the 
latter.

--

___
Python tracker 

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



[issue47046] Add `f_state` attribute to FrameObjects.

2022-03-17 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue46841] Inline bytecode caches

2022-03-17 Thread Brandt Bucher


Change by Brandt Bucher :


--
pull_requests: +30057
pull_request: https://github.com/python/cpython/pull/31968

___
Python tracker 

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



[issue47023] re.sub shows key error on regex escape chars provided in repl param

2022-03-17 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

There seem to be a number of escaping problems in the OP's example.

Is this what was intended?

>>> re.sub(r"\{(\w+)\}", r"\1", "Hello! {user}")
'Hello! user'

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

___
Python tracker 

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



[issue47051] Windows v3.10.3 .chm file (in python310\doc) page headings are messed up and spread out over several lines. Also the font has changed from the former san serif font to a smaller and harde

2022-03-17 Thread Donald O'Donnell


Change by Donald O'Donnell :


--
assignee: docs@python
components: Documentation
nosy: DonnieODonnell, docs@python
priority: normal
severity: normal
status: open
title: Windows v3.10.3 .chm file (in python310\doc) page headings are messed up 
and spread out over several lines. Also the font has changed from the former 
san serif font to a smaller and harder to read serif font.
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue46030] socket module add couple of FreeBSD constants

2022-03-17 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 33698e8ff40fcc67df3d95658e87196f8021de6f by David CARLIER in 
branch 'main':
bpo-46030: socket module add couple of FreeBSD constants. (GH-30018)
https://github.com/python/cpython/commit/33698e8ff40fcc67df3d95658e87196f8021de6f


--
nosy: +asvetlov

___
Python tracker 

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



[issue46030] socket module add couple of FreeBSD constants

2022-03-17 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue34790] Deprecate-remove passing coroutine objects to asyncio.wait()

2022-03-17 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 903f0a02c16240dc769a08c30e8d072a4fb09154 by Andrew Svetlov in 
branch 'main':
bpo-34790: Remove passing coroutine objects to asyncio.wait() (GH-31964)
https://github.com/python/cpython/commit/903f0a02c16240dc769a08c30e8d072a4fb09154


--

___
Python tracker 

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



[issue34790] Deprecate-remove passing coroutine objects to asyncio.wait()

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



[issue47052] allow string as sep in _Py_strhex_impl ( bytearray.hex() )

2022-03-17 Thread arne123


New submission from arne123 :

I use Python to support some C development.
Often I need to convert bytearrays to C like convention:
0x12, 0x34

It would be very convenient for this use case if the separator could be a 
string (like ", 0x") instead of just a single character.

--
components: IO
messages: 415447
nosy: arne123
priority: normal
severity: normal
status: open
title: allow string as sep in _Py_strhex_impl ( bytearray.hex() )
type: enhancement

___
Python tracker 

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



[issue47023] re.sub shows key error on regex escape chars provided in repl param

2022-03-17 Thread Eric V. Smith


Eric V. Smith  added the comment:

Yes, I assume that's what the OP intended, but then stumbled across the error 
with '\s'.

In any event, I don't think there's a bug here so I'm going to close this. 
@siddheshsathe: if you disagree, please respond here.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: enhancement -> behavior

___
Python tracker 

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



[issue47050] Cannot install Python 3.10.3 on Windows

2022-03-17 Thread Steve Dower


Steve Dower  added the comment:

Okay, that kind of makes sense.

If you try to uninstall 3.10.3 (either through Programs & Features, or through 
the installer), how far can you get? Hopefully far enough that one of the 
3.10.2 options will work, or possibly for a new 3.10.3 install to succeed.

Unfortunately, once an install gets corrupted like this, it gets real hard to 
clean things up. The next option is to find a tool that will remove MSI 
metadata from your system so you can just delete the installs that way, clean 
up the files manually, and start fresh. But there's no nice recovery here, I'm 
afraid.

--

___
Python tracker 

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



[issue47052] allow string as sep in _Py_strhex_impl ( bytearray.hex() )

2022-03-17 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Would there be substantial benefit of a new feature over using the existing 
feature and then calling str.replace()?

>>> b = b'abracadabra'
>>> "0x" + b.hex(":").replace(":", ", 0x")
'0x61, 0x62, 0x72, 0x61, 0x63, 0x61, 0x64, 0x61, 0x62, 0x72, 0x61'

--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue47052] allow string as sep in _Py_strhex_impl ( bytearray.hex() )

2022-03-17 Thread arne123


arne123  added the comment:

Well, I think there are many ways to solve this in python (e.g. I used 
iteration before, wasn't aware of the sep. at all), but when there is already a 
separator, why limiting it to one character?

--

___
Python tracker 

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



[issue47052] allow string as sep in _Py_strhex_impl ( bytearray.hex() )

2022-03-17 Thread Dennis Sweeney

Dennis Sweeney  added the comment:

In particular, it's one ascii character:

>>> b'abracadabra'.hex('😋')
ValueError: sep must be ASCII.

I wouldn't be completely opposed to allowing longer strings, but since there 
are easy enough ways to do it already, put me at a -0. We can see if anyone 
else is in favor.

--
components: +Interpreter Core -IO
nosy: +gregory.p.smith
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



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

2022-03-17 Thread Eric V. Smith


Eric V. Smith  added the comment:

I don't have a problem saying that for a class to be used as a base class for a 
dataclass, its __slots__ must not be an iterator that's been exhausted. That 
doesn't seem like a very onerous requirement.

I'm also not concerned about people using __slots__ to iterate over the fields, 
but I agree that a documentation note couldn't hurt.

@ariebovenberg: go ahead and submit your PR. Thanks!

--

___
Python tracker 

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



[issue47023] re.sub shows key error on regex escape chars provided in repl param

2022-03-17 Thread Matthew Barnett


Matthew Barnett  added the comment:

I'd just like to point out that to a user it could _look_ like a bug, that an 
error occurred while reporting, because the traceback isn't giving a 'clean' 
report; the stuff about the KeyError is an internal detail.

--

___
Python tracker 

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



[issue47053] Reduce de-optimization in BINARY_OP_INPLACE_ADD_UNICODE

2022-03-17 Thread Dennis Sweeney


New submission from Dennis Sweeney :

There was a discussion here: 
https://github.com/faster-cpython/ideas/discussions/269

Checking for whether the assignment target is the left-hand side, rather than 
just checking for the right refcount, is more stable and reduces the number of 
deoptimizations, and even increases performance on some benchmarks.

Note that `PyUnicode_Append` is already a somewhat expensive function that 
already checks for the right reference counts, so it's fine to let as much code 
as possible get there, even if it will take the slow path -- we mostly just 
want to reduce allocations and avoid the quadratic string concatenation 
otherwise.

--
components: Interpreter Core
messages: 415455
nosy: Dennis Sweeney, brandtbucher
priority: normal
severity: normal
status: open
title: Reduce de-optimization in BINARY_OP_INPLACE_ADD_UNICODE
type: security
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



[issue47053] Reduce de-optimization in BINARY_OP_INPLACE_ADD_UNICODE

2022-03-17 Thread Dennis Sweeney


Change by Dennis Sweeney :


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

___
Python tracker 

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



[issue47053] Reduce de-optimization in BINARY_OP_INPLACE_ADD_UNICODE

2022-03-17 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
type: security -> performance

___
Python tracker 

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



[issue47046] Add `f_state` attribute to FrameObjects.

2022-03-17 Thread Ned Batchelder


Ned Batchelder  added the comment:

These look great.  Currently, coverage.py only tries to distinguish between 
return/yield, which I guess will now be COMPLETED and SUSPENDED?

--

___
Python tracker 

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



  1   2   >