[issue46054] Incorrect error when parsing non-utf8 files

2021-12-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 4325a766f5f603ef6dfb8c4d5798e5e73cb5efd5 by Pablo Galindo Salgado 
in branch 'main':
bpo-46054: Fix parsing error when parsing non-utf8 characters in source files 
(GH-30068)
https://github.com/python/cpython/commit/4325a766f5f603ef6dfb8c4d5798e5e73cb5efd5


--

___
Python tracker 

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



[issue46054] Incorrect error when parsing non-utf8 files

2021-12-11 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +28290
pull_request: https://github.com/python/cpython/pull/30069

___
Python tracker 

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



[issue44674] dataclasses should allow frozendict default value

2021-12-11 Thread Gianni Mariani


Gianni Mariani  added the comment:

Excellent. Thanks!

--

___
Python tracker 

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



[issue40477] Python Launcher app on macOS 10.15+ fails to run scripts

2021-12-11 Thread Ned Deily


Ned Deily  added the comment:

>From comments in duplicate Issue46043:
"There is definitely something odd going on here. I am seeing different 
behaviors across different systems: I have at least one macOS 12.0.1 system 
where the Launcher app seems to work OK with the current 3.10.1 (as long as the 
Terminal.app is already running) but then on some other 12.0.1 systems and on 
an 11.6.1 system it fails as you describe it. This is also across a mixture of 
Intel and Apple Silicon systems and VMs so no obvious correlation there. 
Launching via IDLE does seem to work properly on the systems I've tested so 
perhaps that might be a temporary workaround as well as just manually running 
the script in a Terminal.app window. I am going to close this issue as a 
duplicate of Issue40477 and am bumping the priority with the aim to have a fix 
prior to the next round of releases in early January."

--
nosy: +AegisEmerald545, nicholasjbond2020
priority: high -> critical
title: Python Launcher app on macOS 10.15 Catalina fails to run scripts -> 
Python Launcher app on macOS 10.15+ fails to run scripts

___
Python tracker 

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



[issue46043] Python Launcher Not Opening Files.

2021-12-11 Thread Ned Deily


Ned Deily  added the comment:

There is definitely something odd going on here. I am seeing different 
behaviors across different systems: I have at least one macOS 12.0.1 system 
where the Launcher app seems to work OK with the current 3.10.1 (as long as the 
Terminal.app is already running) but then on some other 12.0.1 systems and on 
an 11.6.1 system it fails as you describe it. This is also across a mixture of 
Intel and Apple Silicon systems and VMs so no obvious correlation there. 
Launching via IDLE does seem to work properly on the systems I've tested so 
perhaps that might be a temporary workaround as well as just manually running 
the script in a Terminal.app window. I am going to close this issue as a 
duplicate of Issue40477 and am bumping the priority with the aim to have a fix 
prior to the next round of releases in early January.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Python Launcher app on macOS 10.15 Catalina fails to run scripts

___
Python tracker 

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



[issue46055] Speed up binary shifting operators

2021-12-11 Thread Xinhang Xu


New submission from Xinhang Xu :

See its PR.

-

Inspired by [bpo-44946](https://bugs.python.org/issue44946), I found there were 
no special shortcuts for shifting operation applied to "medium value" long 
object. So I modified CPython's VM to accelerate my python project where there 
is plenty of binary shifting operation. I guess somebody else might also need 
it.

--
components: Interpreter Core
messages: 408362
nosy: xuxinhang
priority: normal
pull_requests: 28289
severity: normal
status: open
title: Speed up binary shifting operators
type: performance
versions: Python 3.11

___
Python tracker 

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



[issue46054] Incorrect error when parsing non-utf8 files

2021-12-11 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue46054] Incorrect error when parsing non-utf8 files

2021-12-11 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

Python3.9 shows:

 ../3.9/python /bin/ls
SyntaxError: Non-UTF-8 code starting with '\xfc' in file /bin/ls on line 2, but 
no encoding declared; see https://python.org/dev/peps/pep-0263/ for detail

while 3.10 shows:

 python /bin/ls
  File "/bin/ls", line 0

SyntaxError: unknown parsing error

--
components: Parser
messages: 408361
nosy: lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Incorrect error when parsing non-utf8 files
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue46042] Error range of "duplicate argument" SyntaxErrors is too big

2021-12-11 Thread Carl Friedrich Bolz-Tereick


Carl Friedrich Bolz-Tereick  added the comment:

Oh, don't worry, it's all good! It got fixed and I learned something.

--

___
Python tracker 

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



[issue23469] Delete Misc/*.wpr files

2021-12-11 Thread Kumar Aditya


Change by Kumar Aditya :


--
keywords: +patch
nosy: +kumaraditya303
nosy_count: 4.0 -> 5.0
pull_requests: +28287
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30067

___
Python tracker 

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



[issue46043] Python Launcher Not Opening Files.

2021-12-11 Thread AegisEmerald545


AegisEmerald545  added the comment:

Same here. macOS Monterey with an Apple Silicon SoC and there seems not to be 
any workaround this time

--
nosy: +AegisEmerald545

___
Python tracker 

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



[issue45977] Unexpected effect of sys.pycache_prefix = ""

2021-12-11 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Thanks, I've misunderstood how it works. It makes sense now. Closing as not a 
bug.

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



[issue46052] Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys

2021-12-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

IDLE is a tkinter application and tkinter wraps the tcl/tk GUI framework. Your 
problem is mostly in the interaction between Windows, your Cyrillic input 
method, and tk.  As a test, run

import tkinter as tk
r = tk.Tk()
t = tk.Text(r)
t.pack()

Click in the box, type something, and try Ctrl-X, -C, -V.  If they work, we can 
add explicit bindings somewhat similar to those IDLE makes.

Also, how do you make your keyboard a Cyrillic keyboard.

EP, are you aware of any related tk issues?  Serhiy, do you know of any 
specific problems with Cyrillic and tkinter/tk?

--
assignee: terry.reedy -> 
components: +Tkinter
nosy: +epaine, serhiy.storchaka
title: Ctrl+C, Ctrl+V in IDLE on Windows do not work with Cyrillic keyboard 
layout -> Ctrl+C, C+V in IDLE on Windows do not work with Cyrillic keys

___
Python tracker 

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



[issue46042] Error range of "duplicate argument" SyntaxErrors is too big

2021-12-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 438817fdd5b731d486285d205bed2e78b655c0d6 by Miss Islington (bot) 
in branch '3.10':
bpo-46042: Improve SyntaxError locations in the symbol table (GH-30059) 
(GH-30064)
https://github.com/python/cpython/commit/438817fdd5b731d486285d205bed2e78b655c0d6


--

___
Python tracker 

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



[issue10116] Sporadic failures in test_urllibnet

2021-12-11 Thread Irit Katriel


Irit Katriel  added the comment:

The www.example.com url was replaced by a local one in Issue36019, so this 
seems to complete what remained to do here.

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



[issue26951] [doc] Unintuitive error when using generator expression in class property

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


--
title: Unintuitive error when using generator expression in class property -> 
[doc] Unintuitive error when using generator expression in class property
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 
3.6

___
Python tracker 

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



[issue17840] base64_codec uses assert for runtime validity checks

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.11 -Python 3.5

___
Python tracker 

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



[issue20128] Re-enable test_modules_search_builtin() in test_pydoc

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4

___
Python tracker 

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



[issue20123] pydoc.synopsis fails to load binary modules

2021-12-11 Thread Irit Katriel


Irit Katriel  added the comment:

Re-enabling the test is tracked on 20128, so this issue is no longer needed.

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



[issue22858] unittest.__init__:main shadows unittest.main

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.11 -Python 3.5

___
Python tracker 

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



[issue21737] runpy.run_path() fails with frozen __main__ modules

2021-12-11 Thread Irit Katriel


Irit Katriel  added the comment:

The code looks very different from the patch now, is this issue still relevant?

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

___
Python tracker 

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



[issue26216] run runtktests.py error when test tkinter

2021-12-11 Thread Irit Katriel


Irit Katriel  added the comment:

runtktests.py was deleted here: https://github.com/python/cpython/pull/28929

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



[issue36207] robotsparser deny all with some rules

2021-12-11 Thread Irit Katriel


Irit Katriel  added the comment:

I restored one non-spam message from the OP that was deleted.

Changing to enhancement because this is not a bug (i.e., deviation from 
documentation).

I don't know enough about this to have a view on whether this enhancement 
request should be accepted.

--
nosy: +iritkatriel
type: behavior -> enhancement
versions: +Python 3.11 -Python 3.5

___
Python tracker 

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



[issue36207] robotsparser deny all with some rules

2021-12-11 Thread wats0ns


wats0ns  added the comment:

I can't find a documentation about it, but all of the robots.txt checkers I 
find behave like this. You can test on this site: 
http://www.eskimoz.fr/robots.txt, I believe that this is how it's implemented 
now in most parsers ?

--
nosy: +quentin-maire

___
Python tracker 

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



[issue41222] POpen bufsize=0 ignored with universal_newlines=True

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11 -Python 3.5, Python 3.6, Python 3.7, Python 
3.8

___
Python tracker 

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



[issue30512] CAN Socket support for NetBSD

2021-12-11 Thread Thomas Klausner


Change by Thomas Klausner :


--
pull_requests: +28286
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30066

___
Python tracker 

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



[issue43794] OpenSSL 3.0.0: Handle UNEXPECTED_EOF_WHILE_READING / wrap SSL_OP_IGNORE_UNEXPECTED_EOF

2021-12-11 Thread Alex Grönholm

Alex Grönholm  added the comment:

OpenSSL 1.1.1 also handled EOFs strictly, but this behavior was generally 
suppressed in the ssl module through the default setting of 
suppress_ragged_eofs=True (thus enabling truncation attacks by default). The PR 
changes the behavior of existing applications in such a way that previously 
detectable unexpected EOFs are now no longer detectable by default. To make 
matters worse, EOF errors are not translated to SSLEOFError anymore, and 
instead I have to match the strerror attribute in SSLError to detect this 
condition.

--
nosy: +alex.gronholm

___
Python tracker 

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



[issue46032] functools' singledispatch does not support GenericAlias

2021-12-11 Thread Alex Waygood


Change by Alex Waygood :


--
components: +Documentation
type: enhancement -> behavior

___
Python tracker 

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



[issue46053] NetBSD: ossaudio support incomplete

2021-12-11 Thread Thomas Klausner


Change by Thomas Klausner :


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

___
Python tracker 

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



[issue46053] NetBSD: ossaudio support incomplete

2021-12-11 Thread Thomas Klausner


New submission from Thomas Klausner :

When compiling Python on NetBSD, the ossaudio module is not enabled.
1. the code tries to export some #define that are not in the public OSS API 
(but that some other implementations provide)
2. on NetBSD, you need to link against libossaudio when using OSS

--
components: Extension Modules
messages: 408349
nosy: wiz
priority: normal
severity: normal
status: open
title: NetBSD: ossaudio support incomplete
type: enhancement
versions: Python 3.11

___
Python tracker 

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



[issue46032] functools' singledispatch does not support GenericAlias

2021-12-11 Thread Alex Waygood


Alex Waygood  added the comment:

The PR looks good to me. I think it's also important that we document that 
these types aren't supported, as it's not mentioned anywhere at the moment. 
Related: Issue34498.

--
nosy: +uriyyo

___
Python tracker 

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



[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2021-12-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is still reproducible if increase the depth. In 3.8-3.10 it needs 329 nested 
classes, in 3.11 -- 496.

Seems the limit is sys.getrecursionlimit()//k - 4, where k=4 in 3.7 and older, 
k=3 in 3.8-3.10, and k=2 in 3.11. It is much better than was initially, but the 
ideal is k=1.

--
resolution: out of date -> 
stage: resolved -> 
status: closed -> open
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 
3.6, Python 3.7

___
Python tracker 

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



[issue37701] shutil.copyfile raises SpecialFileError for symlink to fifo

2021-12-11 Thread Eryk Sun


Eryk Sun  added the comment:

> Raising a SpecialFileError would be OK if `follow_symlinks` was False.

I expect it to fail if follow_symlinks is True, which is the default value. I 
expect it to succeed with follow_symlinks=False, which should create a shallow 
copy of just the symlink, regardless of its target. Instead, what happens is 
that it calls shutil._stat(fn) on both src and dst, regardless of 
follow_symlinks. I think the call should be shutil._stat(fn, follow_symlinks). 
This requires updating shutil._stat() to pass the value to fn.stat() and 
os.stat().

--
nosy: +eryksun

___
Python tracker 

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



[issue46052] Ctrl+C, Ctrl+V in IDLE on Windows do not work with Cyrillic keyboard layout

2021-12-11 Thread Anton Bryl


New submission from Anton Bryl :

Ctrl+C and Ctrl+V key combinations in IDLE on Windows do not work with Cyrillic 
keyboard layout. It is unexpected, as well as inconvenient when editing string 
constants.

--
assignee: terry.reedy
components: IDLE
messages: 408345
nosy: anton.bryl, terry.reedy
priority: normal
severity: normal
status: open
title: Ctrl+C, Ctrl+V in IDLE on Windows do not work with Cyrillic keyboard 
layout
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue9436] test_sysconfig failure: build a 32-bit Python a 64-bit OS

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


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



[issue46042] Error range of "duplicate argument" SyntaxErrors is too big

2021-12-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Oh no, I was about to open mine ;-)

Sorry, Carl, I apologize. I hope it was not too disruptive to do the work. I 
was taking a look and I felt bad that the issue was probably messier than I 
thought and I didn't want you to have to iterate many times :(

Thanks a lot for helping review the PR and for pointing out the extra cases!!

--

___
Python tracker 

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



[issue46042] Error range of "duplicate argument" SyntaxErrors is too big

2021-12-11 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



[issue46042] Error range of "duplicate argument" SyntaxErrors is too big

2021-12-11 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue46042] Error range of "duplicate argument" SyntaxErrors is too big

2021-12-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 59435eea08d30796174552c0ca03c59b41adf8a5 by Pablo Galindo Salgado 
in branch 'main':
bpo-46042: Improve SyntaxError locations in the symbol table (GH-30059)
https://github.com/python/cpython/commit/59435eea08d30796174552c0ca03c59b41adf8a5


--

___
Python tracker 

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



[issue27718] help('signal') incomplete (e.g: signal.signal not visible)

2021-12-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This is due to use functools.wraps(). If __all__ is not defined all non-builtin 
functions should have correct __module__ to be displayed by pydoc. 
functools.wraps() assigns __module__, __name__, __qualname__, __doc__ and 
__annotations__. __module__ should be preserved ('signal', not '_signal'), 
__name__ and __qualname__ are already correct, __annotations__ does not exist. 
So only __doc__ should be copied.

--

___
Python tracker 

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



[issue44475] Dataclass Causes Infinite Recursion when using type of bytes

2021-12-11 Thread Eric V. Smith


Eric V. Smith  added the comment:

Closing due to lack of feedback.

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



[issue24372] Documentation for ssl.wrap_socket's ssl_version parameter is odd

2021-12-11 Thread Eric V. Smith


Change by Eric V. Smith :


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



[issue44053] Can't connect to a server also not showing any type of output

2021-12-11 Thread Eric V. Smith


Eric V. Smith  added the comment:

Closing due to lack of feedback.

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

___
Python tracker 

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



[issue45650] cgitb does not emit CGI headers when format='text'

2021-12-11 Thread Eric V. Smith


Eric V. Smith  added the comment:

Having not heard back about a use case for this, I'm going to close it. If you 
want to move this forward, I suggest proposing it on the python-ideas mailing 
list.

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



[issue27718] help('signal') incomplete (e.g: signal.signal not visible)

2021-12-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
nosy: +serhiy.storchaka
nosy_count: 6.0 -> 7.0
pull_requests: +28283
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30063

___
Python tracker 

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



[issue46024] Different behaviour with zipfile

2021-12-11 Thread Eric V. Smith


Eric V. Smith  added the comment:

Actually, printing out:
print(repr(path), repr(ZipPath(path)))
would be more useful.

If I don't hear back in a few days, I'm going to close this issue.

--
status: pending -> open

___
Python tracker 

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



[issue14484] missing return in win32_kill?

2021-12-11 Thread Eryk Sun


Eryk Sun  added the comment:

The details of os.kill() on Windows have been discussed extensively for years 
in various issues such as bpo-26350, bpo-23948, and bpo-42962. But the problem 
of the missing return statement is always overwhelmed by discussion of the 
egregiously bad design of this function and its misuse, which depends on bugs 
in WinAPI GenerateConsoleCtrlEvent() when passed a PID that is not a process 
group ID and/or not attached to the console.

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



[issue14484] missing return in win32_kill?

2021-12-11 Thread Eryk Sun


Change by Eryk Sun :


--
Removed message: https://bugs.python.org/msg408336

___
Python tracker 

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



[issue14484] missing return in win32_kill?

2021-12-11 Thread Eryk Sun


Eryk Sun  added the comment:

The details of os.kill() on Windows have been discussed extensively for years 
in various issues such as bpo-26350, bp-23948, and bp42962. But the problem of 
the missing return statement is always overwhelmed by discussion of the 
egregiously bad design of this function and its misuse, which depends on bugs 
in WinAPI GenerateConsoleCtrlEvent() when passed a PID that is not a process 
group ID and/or not attached to the console.

--
nosy: +eryksun

___
Python tracker 

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



[issue44674] dataclasses should allow frozendict default value

2021-12-11 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue44674] dataclasses should allow frozendict default value

2021-12-11 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset e029c53e1a408b89a4e3edf30a9b38b094f9c880 by Eric V. Smith in 
branch 'main':
bpo-44674: Use unhashability as a proxy for mutability for default dataclass 
__init__ arguments. (GH-29867)
https://github.com/python/cpython/commit/e029c53e1a408b89a4e3edf30a9b38b094f9c880


--

___
Python tracker 

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



[issue42962] Windows: SystemError during os.kill(..., signal.CTRL_C_EVENT)

2021-12-11 Thread Eryk Sun


Change by Eryk Sun :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> missing return in win32_kill?

___
Python tracker 

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



[issue23948] Deprecate os.kill() on Windows

2021-12-11 Thread Eryk Sun


Change by Eryk Sun :


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

___
Python tracker 

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



[issue46043] Python Launcher Not Opening Files.

2021-12-11 Thread Nicholas Bond


Nicholas Bond  added the comment:

I am on macOS 12 and it still doesn't work when Terminal.app is open.

--

___
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

2021-12-11 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
nosy:  -yan12125

___
Python tracker 

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



[issue46005] [doc] replace 'distutils' examples with 'setuptools'

2021-12-11 Thread Nikita Sobolev


Change by Nikita Sobolev :


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

___
Python tracker 

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



[issue46005] [doc] replace 'distutils' examples with 'setuptools'

2021-12-11 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

Or maybe we should just include 
https://github.com/python/cpython/blob/main/Doc/distutils/_setuptools_disclaimer.rst
 as others do?

I will send my proposal :)

--
nosy: +sobolevn

___
Python tracker 

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



[issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 
3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue19459] Python does not support the GEORGIAN-PS charset

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.3, Python 3.4

___
Python tracker 

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



[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


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



[issue9504] signal.signal/signal.alarm not working as expected

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue34557] When sending binary file to a Microsoft FTP server over FTP TLS, the SSL unwind method hangs

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 
3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2021-12-11 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11:

>>> import argparse
>>> parser = argparse.ArgumentParser(prog='PROG')
>>> 
>>> parser.add_argument('--badger', nargs='+')
_StoreAction(option_strings=['--badger'], dest='badger', nargs='+', const=None, 
default=None, type=None, choices=None, help=None, metavar=None)
>>> parser.add_argument('spam')
_StoreAction(option_strings=[], dest='spam', nargs=None, const=None, 
default=None, type=None, choices=None, help=None, metavar=None)
>>> parser.parse_args('--badger A B C D'.split())
usage: PROG [-h] [--badger BADGER [BADGER ...]] spam
PROG: error: the following arguments are required: spam

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 
3.3

___
Python tracker 

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



[issue26571] turtle regression in 3.5

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5

___
Python tracker 

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



[issue27257] get_addresses results in traceback with an addrspec with an empty local part.

2021-12-11 Thread Irit Katriel


Irit Katriel  added the comment:

I am unable to reproduce this on 3.11:

>>> with open(b'lkml-exception.mail', mode = 'r') as f:
...  msg = email.message_from_file(f, policy=email.policy.SMTP)
... 
Traceback (most recent call last):
  File "", line 2, in 
AttributeError: module 'email' has no attribute 'policy'
>>> import email.policy
>>> with open(b'lkml-exception.mail', mode = 'r') as f:
...  msg = email.message_from_file(f, policy=email.policy.SMTP)
... 
>>> msg.get_all('to')
['unlisted-recipients:;, @pop.kundenserver.de']
>>>

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

___
Python tracker 

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



[issue37701] shutil.copyfile raises SpecialFileError for symlink to fifo

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 
3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue37700] shutil.copyfile does not raise SpecialFileError for socket files

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 
3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue27718] help('signal') incomplete (e.g: signal.signal not visible)

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue27227] argparse fails to parse [] when using choices and nargs='*'

2021-12-11 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11.

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

___
Python tracker 

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



[issue46040] asyncio.coroutine documented as removed in 3.10

2021-12-11 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



[issue46040] asyncio.coroutine documented as removed in 3.10

2021-12-11 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 991736697dff693b6c9f8964bb7540081bbf4ddb by Andrew Svetlov in 
branch '3.10':
[3.10] bpo-46040: Fix removal text for @asyncio.coroutine (GH-30061)
https://github.com/python/cpython/commit/991736697dff693b6c9f8964bb7540081bbf4ddb


--

___
Python tracker 

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



[issue14484] missing return in win32_kill?

2021-12-11 Thread Irit Katriel


Irit Katriel  added the comment:

That piece of code is still there, the function is now called os_kill_impl.

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

___
Python tracker 

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



[issue35999] multpirocessing.Process alive after SIGTERM on parent

2021-12-11 Thread Irit Katriel


Irit Katriel  added the comment:

This example is not working for me on 3.11:

>>> from multiprocessing import Process
>>> from time import sleep
>>> from os import getpid
>>> 
>>> def log(daemon_mode):
... while True:
... print('worker %i %s' % (getpid(), daemon_mode))
... sleep(3)
... 
>>> 
>>> print('parent pid %i' % getpid())
parent pid 77378
>>> 
>>> a = Process(target=log, args=(0,), daemon=False)
>>> a.start()
>>> :744: DeprecationWarning: 
>>> BuiltinImporter.module_repr() is deprecated and slated for removal in 
>>> Python 3.12
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/iritkatriel/src/cpython-654/Lib/multiprocessing/spawn.py", line 
116, in spawn_main
exitcode = _main(fd, parent_sentinel)
   ^^
  File "/Users/iritkatriel/src/cpython-654/Lib/multiprocessing/spawn.py", line 
126, in _main
self = reduction.pickle.load(from_parent)
   ^^
AttributeError: Can't get attribute 'log' on 

--
nosy: +iritkatriel

___
Python tracker 

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



[issue46040] asyncio.coroutine documented as removed in 3.10

2021-12-11 Thread Andrew Svetlov


Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue24010] Add error checks to PyInit__locale()

2021-12-11 Thread Irit Katriel


Irit Katriel  added the comment:

This function now looks like this:

PyMODINIT_FUNC
PyInit__locale(void)
{
return PyModuleDef_Init(&_localemodule);
}

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



[issue24012] Add error checks to PyInit_pyexpat()

2021-12-11 Thread Irit Katriel


Irit Katriel  added the comment:

This is all sorted now:

iritkatriel@Irits-MBP cpython % grep "PyModule_AddObject(" Modules/pyexpat.c 
if (PyModule_AddObject(mod, name, submodule) < 0) {
if (PyModule_AddObject(errors_module, "codes", codes_dict) < 0) {
if (PyModule_AddObject(errors_module, "messages", rev_codes_dict) < 0) {
if (PyModule_AddObject(mod, "features", list) < 0) {
if (PyModule_AddObject(mod, "version_info", versionInfo) < 0) {
if (PyModule_AddObject(mod, "expat_CAPI", capi_object) < 0) {
iritkatriel@Irits-MBP cpython % grep "PyDict_SetItem(" Modules/pyexpat.c
PyDict_SetItem(self->intern, result, result) == 0)
else if (PyDict_SetItem(container, n, v)) {
int res = PyDict_SetItem(rev_codes_dict, num, str);
iritkatriel@Irits-MBP cpython % grep "PySys_GetObject(" Modules/pyexpat.c
iritkatriel@Irits-MBP cpython %

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



[issue46042] Error range of "duplicate argument" SyntaxErrors is too big

2021-12-11 Thread Carl Friedrich Bolz-Tereick


Carl Friedrich Bolz-Tereick  added the comment:

ah, confused, seems you fixed them both too. will take a closer look!

--

___
Python tracker 

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



[issue46042] Error range of "duplicate argument" SyntaxErrors is too big

2021-12-11 Thread Carl Friedrich Bolz-Tereick


Carl Friedrich Bolz-Tereick  added the comment:

Oh no, I was about to open mine ;-)

https://github.com/python/cpython/compare/main...cfbolz:bpo-46042-syntax-error-range-duplicate-argument?expand=1

Basically equivalent, but I fixed the second bug too (would be very easy to add 
to yours)

--

___
Python tracker 

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



[issue12833] Document the need to pass the prompt to raw_input() with readline

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


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



[issue46042] Error range of "duplicate argument" SyntaxErrors is too big

2021-12-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Don't worry, turns out it was a bit messier than I thought, so I prepared the 
PR. If you have some time, it would be great if you can take a quick look.

--

___
Python tracker 

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



[issue28816] [doc] Clarify that zipimport does not invoke import hooks to load custom files from zip.

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +28280
status: pending -> open
pull_request: https://github.com/python/cpython/pull/30060

___
Python tracker 

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



[issue46042] Error range of "duplicate argument" SyntaxErrors is too big

2021-12-11 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue46051] Make @atexit.register work for functions with arguments

2021-12-11 Thread quapka


New submission from quapka :

Hi folks!

Let me first present an example that motivated this issue. Imagine a script 
that builds Docker images and later starts them as Docker containers. To avoid 
having to stop the containers "manually" (in code and potentially forgot) I had 
an idea to register each container when started and stop each using atexit 
module. I chose to encapsulate this behavior inside a class. A much simplified 
example looks like this:

import atexit

class Program:
# keep a class level list of started containers
running_containers = []

@atexit.register
@classmethod
def clean_up(cls, *args, **kwargs):
for container in cls.running_containers:
print(f'stopping {container}')

def start_container(self, container):
print(f'starting {container}')
self.__class__.running_containers.append(container)

prog = Program()
a.start_container('container_A')
a.start_container('container_B')

And I'd expect this to produce:

starting container_A
starting container_B
stopping container_A
stopping container_B

To me, this reads rather nicely: the Program.clean_up method can be called by 
the user, but if he forgets it will be handled for him using atexit. However, 
this code does not work. :) I've spent some time debugging and what follows are 
my observations:

1) If the order of decorators is @atexit.register and then @classmethod then 
the code throws 'TypeError: the first argument must be callable'. I believe it 
is because classmethod and staticmethod are descriptors without the __call__ 
method implemented. atexit.register does not check this and instead of 
func.__func__ (which resolves to Program.clean_up) gets func (a classmethod) 
which is not callable 
(https://github.com/python/cpython/blob/main/Modules/atexitmodule.c#L147).

2) If the order of decorators is swapped (@classmethod and @atexit.register) 
then the code throws "Error in atexit._run_exitfuncs:\nTypeError: clean_up() 
missing 1 required positional argument: 'cls'". From my limited understanding 
of CPython and atexitmodule.c I think what happens is that the @atexit.register 
returns 
(https://github.com/python/cpython/blob/main/Modules/atexitmodule.c#L180) the 
func without the args and kwargs (since this issue 
https://bugs.python.org/issue1597824).

3) However, if I step away from decorating using @atexit.register and instead 
use

[...]
atexit.register(Program.clean_up) # <-- register post definition
prog = Program()
a.start_container('container_A')
a.start_container('container_B')

then the code works as expected and outputs:

starting container_A
starting container_B
stopping container_A
stopping container_B


To summarize, I don't like 3) as it puts the responsibility in a bit awkward 
place (good enough if I'm the only user, but I wonder about the more general 
library-like cases). My decorating skills are a bit dull now and it's my first 
time seriously looking into CPython internals - I've tried to encapsulate 
atexit.register in my custom decorator, to check whether that could be a 
workaround but overall was unsuccessful. In short, I'd say that in both 1) and 
2) the cls arg is lost when atexit calls the function. I've tried to dig it up 
from the func passed to atexit.register

def my_atexit_decorator(func, *args, **kwargs):
cls = # some magic with under attrs and methods
register.atexit(func, cls=cls, *args, **kwargs)
[...]

, but failed (it also felt like a fragile approach).

I was not able to understand why @atexit.register does not work when the 
function's signature is not empty. Also, if fixable I'm happy to actually put 
the effort into fixing it myself (looks like a nice first CPython PR), but I'd 
like to have someone else's opinion before I start marching in the wrong 
direction. Also, let me know if you'd like more details or code/tests I've 
produced while debugging this.

Cheers!

--
messages: 408321
nosy: quapka
priority: normal
severity: normal
status: open
title: Make @atexit.register work for functions with arguments
type: enhancement

___
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

2021-12-11 Thread Christian Heimes


Christian Heimes  added the comment:

I just noticed that tomli has dropped support for Python 3.6. That's a road 
block for general adoption of the package in the Python ecosystem. Python 3.6 
is the default Python interpreter in CentOS 8, C8S, RHEL 8, and Ubuntu 18.04 
LTS. https://github.com/hukkin/tomli/pull/134

--
nosy: +christian.heimes

___
Python tracker 

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



[issue46028] 3.11.0a3: under tox, sys._base_executable is wrong

2021-12-11 Thread Saaket Prakash


Saaket Prakash  added the comment:

But on windows with the python.org installer, the behavior is same for both 
both a2 and a3.

# With a3 installed

> py -m venv venv_a3
> venv_a3/Scripts/python -c "import sys,os.path; print(e := 
> sys._base_executable); print(os.path.exists(e))"
C:\Users\ss\AppData\Local\Programs\Python\Python311\python.exe
True
> cat venv_a3/pyvenv.cfg
home = C:\Users\ss\AppData\Local\Programs\Python\Python311
include-system-site-packages = false
version = 3.11.0

# With a2 installed

> py -m venv venv_a2
> venv_a2/Scripts/python -c "import sys,os.path; print(e := 
> sys._base_executable); print(os.path.exists(e))"
C:\Users\ss\AppData\Local\Programs\Python\Python311\python.exe
True
> cat venv_a2/pyvenv.cfg
home = C:\Users\ss\AppData\Local\Programs\Python\Python311
include-system-site-packages = false
version = 3.11.0

--

___
Python tracker 

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



[issue46028] 3.11.0a3: under tox, sys._base_executable is wrong

2021-12-11 Thread Saaket Prakash


Saaket Prakash  added the comment:

I tried the same stuff as nedbat on WSL2, and I see similar change in the path 
of sys._base_executable (though I get a different "base" path on a3, so the 
path exists even there).

$ ~/.pyenv/versions/3.11.0a2/bin/python -m venv venv_a2
$ ~/.pyenv/versions/3.11.0a3/bin/python -m venv venv_a3
$ venv_a2/bin/python -c "import sys,os.path; print(e := sys._base_executable); 
print(os.path.exists(e))"
/home/ss/venv_a2/bin/python
True

$ venv_a3/bin/python -c "import sys,os.path; print(e := sys._base_executable); 
print(os.path.exists(e))"
/home/ss/.pyenv/versions/3.11.0a3/bin/python
True

$ cat venv_a2/pyvenv.cfg
home = /home/ss/.pyenv/versions/3.11.0a2/bin
include-system-site-packages = false
version = 3.11.0

$ cat venv_a3/pyvenv.cfg
home = /home/ss/.pyenv/versions/3.11.0a3/bin
include-system-site-packages = false
version = 3.11.0

--
nosy: +saaketp

___
Python tracker 

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



[issue46040] asyncio.coroutine documented as removed in 3.10

2021-12-11 Thread Ken Jin


Change by Ken Jin :


--
keywords: +easy

___
Python tracker 

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



[issue34798] pprint ignores the compact parameter for dicts

2021-12-11 Thread Irit Katriel


Irit Katriel  added the comment:

Don't discuss on a closed issue. Create a new one if there is still a problem.

--

___
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

2021-12-11 Thread Martin Reboredo


Martin Reboredo  added the comment:

A new python-ideas mail thread was created for this, you can check it out at 
https://mail.python.org/archives/list/python-id...@python.org/thread/IWJ3I32A4TY6CIVQ6ONPEBPWP4TOV2V7/.

--
nosy: +YakoYakoYokuYoku

___
Python tracker 

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



[issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building

2021-12-11 Thread Christian Heimes


Christian Heimes  added the comment:

In his code review Eric made a point that the relationship of variables and 
their impact on normal and cross builds are not obvious. I'm going to introduce 
new variables for freezing and freezing dependencies. Bonus: Cross builds no 
longer build non-functional _bootstrap_python and Programs/_freeze_module.

Normal build:

PYTHON_FOR_FREEZE=./_bootstrap_python
FREEZE_MODULE_BOOTSTRAP=./Programs/_freeze_module
FREEZE_MODULE_BOOTSTRAP_DEPS=Programs/_freeze_module
FREEZE_MODULE=$(PYTHON_FOR_FREEZE) $(srcdir)/Programs/_freeze_module.py
FREEZE_MODULE_DEPS=_bootstrap_python $(srcdir)/Programs/_freeze_module.py


Cross build:

PYTHON_FOR_FREEZE=/path/to/build/python
FREEZE_MODULE_BOOTSTRAP=$(PYTHON_FOR_FREEZE) 
$(srcdir)/Programs/_freeze_module.py
FREEZE_MODULE_BOOTSTRAP_DEPS=$(srcdir)/Programs/_freeze_module.py
FREEZE_MODULE=$(FREEZE_MODULE_BOOTSTRAP)
FREEZE_MODULE_DEPS=$(FREEZE_MODULE_BOOTSTRAP_DEPS)

--

___
Python tracker 

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



[issue46040] asyncio.coroutine documented as removed in 3.10

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


--
components: +asyncio
nosy: +asvetlov, yselivanov

___
Python tracker 

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



[issue46050] [pathlib] Option so that OSError does not block glob in pathlib library

2021-12-11 Thread matt


New submission from matt :

Hi there,
ISSUE DESCRIPTION
when I browse starting from the linux root ('/')
path = pathlib.Path('/')
_glob = '**/*'
for p in path.glob(_glob):

The program stops on my machine because of OSError.
  File "/usr/lib/python3.8/pathlib.py", line 535, in _select_from
entries = list(scandir_it)

OSError: [Errno 22] Invalid argument: '/proc/5916/task/5916/net'


Entering post mortem debugging...

> /usr/lib/python3.8/pathlib.py(535)_select_from()
533 try:
534 with scandir(parent_path) as scandir_it:
--> 535 entries = list(scandir_it)
536 for entry in entries:
537 if self.dironly:

I also another case is if a cloud drive is disconnected.

QUICK SOLUTION
I solved both issues for me by adding an adding an except OSError: return at 
the end of the two function below:

class _WildcardSelector(_Selector):
def _select_from(self, parent_path, is_dir, exists, scandir):
(...)
except OSError:
return

class _RecursiveWildcardSelector(_Selector):
def _iterate_directories(self, parent_path, is_dir, scandir):
(...)
except OSError:
return

FEATURE REQUEST
I don't know the consequences of those 2 modifications so perhaps they could 
follow an option when calling glob with an optional parameter ignoreOSerror = 
false by default?!

--
components: Library (Lib)
messages: 408314
nosy: matt32106
priority: normal
severity: normal
status: open
title: [pathlib] Option so that OSError does not block glob in pathlib library
type: enhancement
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



[issue45578] Missing tests for the dis module

2021-12-11 Thread Nikita Sobolev


Change by Nikita Sobolev :


--
pull_requests: +28278
pull_request: https://github.com/python/cpython/pull/30058

___
Python tracker 

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



[issue46028] 3.11.0a3: under tox, sys._base_executable is wrong

2021-12-11 Thread Ned Batchelder


Ned Batchelder  added the comment:

The two venvs seem analogous:


$ cat venv_a2/pyvenv.cfg
home = /usr/local/bin
include-system-site-packages = false
version = 3.11.0

$ ls -al venv_a2/bin
total 72
drwxr-xr-x  13 nedbatchelder  wheel   416 Dec 11 10:43 ./
drwxr-xr-x   6 nedbatchelder  wheel   192 Dec 11 10:43 ../
-rw-r--r--   1 nedbatchelder  wheel  9033 Dec 11 10:43 Activate.ps1
-rw-r--r--   1 nedbatchelder  wheel  1993 Dec 11 10:43 activate
-rw-r--r--   1 nedbatchelder  wheel   919 Dec 11 10:43 activate.csh
-rw-r--r--   1 nedbatchelder  wheel  2061 Dec 11 10:43 activate.fish
-rwxr-xr-x   1 nedbatchelder  wheel   244 Dec 11 10:43 pip*
-rwxr-xr-x   1 nedbatchelder  wheel   244 Dec 11 10:43 pip3*
-rwxr-xr-x   1 nedbatchelder  wheel   244 Dec 11 10:43 pip3.11*
lrwxr-xr-x   1 nedbatchelder  wheel14 Dec 11 10:43 python@ -> python3.11.0a2
lrwxr-xr-x   1 nedbatchelder  wheel14 Dec 11 10:43 python3@ -> 
python3.11.0a2
lrwxr-xr-x   1 nedbatchelder  wheel14 Dec 11 10:43 python3.11@ -> 
python3.11.0a2
lrwxr-xr-x   1 nedbatchelder  wheel29 Dec 11 10:43 python3.11.0a2@ -> 
/usr/local/bin/python3.11.0a2

$ cat venv_a3/pyvenv.cfg
home = /usr/local/bin
include-system-site-packages = false
version = 3.11.0

$ ls -al venv_a3/bin
total 72
drwxr-xr-x  13 nedbatchelder  wheel   416 Dec 11 10:43 ./
drwxr-xr-x   6 nedbatchelder  wheel   192 Dec 11 10:43 ../
-rw-r--r--   1 nedbatchelder  wheel  9033 Dec 11 10:43 Activate.ps1
-rw-r--r--   1 nedbatchelder  wheel  1993 Dec 11 10:43 activate
-rw-r--r--   1 nedbatchelder  wheel   919 Dec 11 10:43 activate.csh
-rw-r--r--   1 nedbatchelder  wheel  2061 Dec 11 10:43 activate.fish
-rwxr-xr-x   1 nedbatchelder  wheel   244 Dec 11 10:43 pip*
-rwxr-xr-x   1 nedbatchelder  wheel   244 Dec 11 10:43 pip3*
-rwxr-xr-x   1 nedbatchelder  wheel   244 Dec 11 10:43 pip3.11*
lrwxr-xr-x   1 nedbatchelder  wheel14 Dec 11 10:43 python@ -> python3.11.0a3
lrwxr-xr-x   1 nedbatchelder  wheel14 Dec 11 10:43 python3@ -> 
python3.11.0a3
lrwxr-xr-x   1 nedbatchelder  wheel14 Dec 11 10:43 python3.11@ -> 
python3.11.0a3
lrwxr-xr-x   1 nedbatchelder  wheel29 Dec 11 10:43 python3.11.0a3@ -> 
/usr/local/bin/python3.11.0a3

--

___
Python tracker 

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



[issue45997] asyncio.Semaphore waiters deque doesn't work

2021-12-11 Thread Yevhenii Hyzyla


Change by Yevhenii Hyzyla :


--
versions: +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



[issue23469] Delete Misc/*.wpr files

2021-12-11 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy -patch

___
Python tracker 

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



[issue46028] 3.11.0a3: under tox, sys._base_executable is wrong

2021-12-11 Thread Steve Dower


Steve Dower  added the comment:

What's the contents of the pyvenv.cfg in these cases?

It looks like the first case is definitely wrong, because the base 
executable should not be in "venv_a2" (that's sys.executable), but I 
don't know where it should be on your system.

--

___
Python tracker 

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



[issue46028] 3.11.0a3: under tox, sys._base_executable is wrong

2021-12-11 Thread Ned Batchelder


Ned Batchelder  added the comment:

Tox isn't needed, just venv from the stdlib:


$ python3.11.0a2 -m venv venv_a2

$ venv_a2/bin/python -c "import sys,os.path; print(e := sys._base_executable); 
print(os.path.exists(e))"
/private/tmp/venv_a2/bin/python
True

$ python3.11.0a3 -m venv venv_a3

$ venv_a3/bin/python -c "import sys,os.path; print(e := sys._base_executable); 
print(os.path.exists(e))"
/usr/local/bin/python
False

--

___
Python tracker 

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



[issue46049] ._pth files untested on Linux

2021-12-11 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



[issue18861] Problems with recursive automatic exception chaining

2021-12-11 Thread Irit Katriel


Irit Katriel  added the comment:

I think this problem is actually simpler than what we've been discussing. 

First, note that by-and-large our current system works:

>>> try:
...   raise VE(1)
... except VE as e1:
...   try:
... raise VE(2)
...   except VE as e2:
... raise VE(3) from e2
... 
Traceback (most recent call last):
  File "", line 2, in 
ValueError: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 5, in 
ValueError: 2

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "", line 7, in 
ValueError: 3



Here VE(2) is the cause of VE(3) and VE(1) is the context of VE(2), so VE(1) is 
not hidden by the fact that VE(3) has a cause.

The reason that Nick's example didn't work is because he is doing

raise VE(3) from VE(2)

i.e., creating a new exception VE(2) that doesn't have VE(1) as a context. I'm 
not sure there is a use case for this, so I don't think we need to worry about 
it.


The case of None does need fixing. We use None to indicate that there was no 
cause (while suppressing context). But None can't have a context, so VE(1) gets 
lost. We could, instead of None, use a NoException(Exception) class. This 
exception would be chained with the current exc_info() as context so that it 
works like VE(1) as above, and the traceback printing logic will know that it 
needs to be omitted from the output.


This proposal involves no changes to the exception propagation mechanism of the 
interpreter. It would require these changes:

1. Define the new exception type
2. in do_raise, in the case of raise-from the None case changes
3. traceback display code needs to be updated to omit NoExceptions

--
versions: +Python 3.11 -Python 3.5

___
Python tracker 

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



  1   2   >