[issue45627] OpenSSL 1.1.1 still implements some disable-flags for Blake2, Scrypt

2021-10-28 Thread Alexandru Ardelean


Alexandru Ardelean  added the comment:

Apologies for the slow reply.

It was the end of work-day when I submitted the bug & patch.
I know, not a good method, but I do what I can :)

So, OpenWrt's OpenSSL does not build BLAKE2 by default.
See: 
https://github.com/openwrt/openwrt/blob/master/package/libs/openssl/Makefile#L190

Scrypt is on by default. In the sense that there is no disable flag.

I only care about BLAKE2, but I was trying not to half-ass the implementation, 
given that Scrypt is also disable-able.

Now there are 2 options that I feel could be reasonable (anyone is free to 
disagree with me here):
1. this is patch upstream as I'm trying here
2. keep this patch downstream (i.e. just in our tree for OpenWrt's Python) 
until OpenSSL (or OpenWrt) enables BLAKE2 by default

There are several options that feel a bit more difficult (to me):
3. Enable OpenSSL BLAKE2 on by default in OpenWrt core; this may also work, but 
requires some discussion with the OpenWrt core-team that handles OpenSSL; 
though usually OpenWrt tries to be minimal, so I'm feeling there would be some 
resistance 
4. Not build hashlib (in Python) if BLAKE2 is not enabled in OpenSSL ; this is 
doable, but maybe a bit too complicated (for what is worth); it can cause 
support issues (in OpenWrt) like "hey, where did hashlib go?"

I may have missed a few possible options. But these are the more obvious ones.

Moving forward, I am fine with either of the first 2 options.
I am feeling that option 2 is closer to what is desired by upstream Python 
(which I am fine to do).

Thank you :)
Alex

--

___
Python tracker 

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



[issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows

2021-10-28 Thread swgmma


swgmma  added the comment:

Just added a commit implementing `force_hide_console`.

What is the most trivial way to test it's behaviour?

--

___
Python tracker 

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



[issue45641] Error In opening a file through Idle

2021-10-28 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

You need to give us some steps to reproduce this error, or we cannot even begin 
to try to fix it.

What are the minimum steps needed to reproduce the error?

--
nosy: +steven.daprano

___
Python tracker 

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



[issue45641] Error In opening a file through Idle

2021-10-28 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Please read:

https://stackoverflow.com/help/minimal-reproducible-example

http://www.sscce.org/

--

___
Python tracker 

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



[issue44904] Classmethod properties are erroneously "called" in multiple modules

2021-10-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27527
pull_request: https://github.com/python/cpython/pull/29262

___
Python tracker 

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



[issue44904] Classmethod properties are erroneously "called" in multiple modules

2021-10-28 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44904] Classmethod properties are erroneously "called" in multiple modules

2021-10-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset b1302abcc8a4be5f39b4d60a1ce28032b77655b3 by Alex Waygood in 
branch 'main':
bpo-44904: Fix classmethod property bug in doctest module (GH-28838)
https://github.com/python/cpython/commit/b1302abcc8a4be5f39b4d60a1ce28032b77655b3


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue45641] Error In opening a file through Idle

2021-10-28 Thread Dev Kumar


Dev Kumar  added the comment:

For that,
First, open IDlE
Then click file & then click on Open 
After that it's showing the error THE OPEN FILE OPERATION FAILED. 
Note: I didn't open any file

--

___
Python tracker 

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



[issue45641] Error In opening a file through Idle

2021-10-28 Thread Dev Kumar


Change by Dev Kumar :


Added file: https://bugs.python.org/file50402/Screen Shot 2021-10-28 at 1.39.08 
PM.png

___
Python tracker 

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



[issue44904] Classmethod properties are erroneously "called" in multiple modules

2021-10-28 Thread miss-islington


miss-islington  added the comment:


New changeset 1f45cc0dfa9a8febfc256411c803b4536719db97 by Miss Islington (bot) 
in branch '3.10':
bpo-44904: Fix classmethod property bug in doctest module (GH-28838)
https://github.com/python/cpython/commit/1f45cc0dfa9a8febfc256411c803b4536719db97


--

___
Python tracker 

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



[issue45641] Error In opening a file through Idle

2021-10-28 Thread Dev Kumar


Change by Dev Kumar :


Added file: https://bugs.python.org/file50403/Screen Shot 2021-10-28 at 1.41.31 
PM.png

___
Python tracker 

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



[issue44904] Classmethod properties are erroneously "called" in multiple modules

2021-10-28 Thread miss-islington


miss-islington  added the comment:


New changeset 8365a5b5abe51cbe4151d89a5d0a993273320067 by Miss Islington (bot) 
in branch '3.9':
bpo-44904: Fix classmethod property bug in doctest module (GH-28838)
https://github.com/python/cpython/commit/8365a5b5abe51cbe4151d89a5d0a993273320067


--

___
Python tracker 

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



[issue45627] OpenSSL 1.1.1 still implements some disable-flags for Blake2, Scrypt

2021-10-28 Thread Alexandru Ardelean


Alexandru Ardelean  added the comment:

So, I've read through:

https://www.python.org/dev/peps/pep-0644/#compatibility


I also stumbled over:
https://lwn.net/Articles/841664/

Which also led to:
https://www.python.org/dev/peps/pep-0644/#libressl-support

The answer is loud and clear now: will keep this downstream.

Thank you and apologies for the noise.

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



[issue45641] Error In opening a file through Idle

2021-10-28 Thread Dev Kumar


Dev Kumar  added the comment:

This is the File which is opening every time and not even saving it.

--
Added file: https://bugs.python.org/file50404/Screen Shot 2021-10-28 at 1.40.04 
PM.png

___
Python tracker 

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



[issue45530] Improve listobject.c's unsafe_tuple_compare()

2021-10-28 Thread Stefan Pochmann


Stefan Pochmann  added the comment:

> This is already faster in pure Python than list.sort() for cases like:

Seems to depend on the system, it's slower on my laptop but faster on GCE:

Python 3.10.0 on my laptop:
 7.42 s  lexisort
 6.83 s  sort
 5.07 s  groupsort

Python 3.9.2 on Google Compute Engine:
 2.09 s  lexisort
 2.64 s  list.sort
 1.52 s  groupsort

This is my groupsort btw:

def groupsort(xs):
xs.sort(key=itemgetter(0))
start = 0
n = len(xs)
tail = itemgetter(slice(1, None))
for i in range(1, n+1):
if i == n or xs[i-1][0] < xs[i][0]:
sublist = xs[start:i]
sublist.sort(key=tail)
xs[start:i] = sublist
start = i

--

___
Python tracker 

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



[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> issubclass(x, list[int]) rejects the second argument for reasons explained in 
> the PEP.

1. One problem is that isinstance(x, type) != issubclass(type(x), type)
if x is list[int]. It is unprecedented, I cannot recall any other case
in which isinstance() and issubclas() are inconsistent. Ant it breaks
code because these two expressions are often considered equivalent and
interchangeable in refactoring.

2. Other problem is that isinstance(x, type) is used as a guard before
using x as a type. `isinstance(obj, type) and issubclass(obj,
SomeClass)` is a common idiom, because issubclass() raises an exception
if its first argument is not a type. It is now broken for list[int].


> What other places are there that are broken because of this?
$ find Lib -name '*.py' \! -path '*/test*' -exec egrep 'isinstance.*,
type\)' '{}' + | wc -l
55

In msg403826 I showed few examples from just two files, but there are
tens more potential examples. I'll show them all if I have enough of
spare time.

--

___
Python tracker 

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



[issue45627] OpenSSL 1.1.1 still implements some disable-flags for Blake2, Scrypt

2021-10-28 Thread Christian Heimes


Christian Heimes  added the comment:

Ah, OpenWRT. :)

Thanks for you detailed explanation. I kinda agree that it makes sense for 
small, embedded systems like OpenWRT to reduce the size of binaries. After all 
storage and memory are precious on these systems.

PEP 644 favors usability over flexibility. 3rd party library developers can now 
rely on the presence of hashlib features. Before 3.10 they could not be sure 
that a Python build had certain features.

A downstream patch in OpenWRT makes sense.

By the way, you might be interested in --with-builtin-hashlib-hashes configure 
flag. It lets you disable builtin modules like _md5 and _sha3. The shared 
libraries are large. If you disable the builtin blake2 module, then certain 
features like MAC and tree hashing are not working.

--

___
Python tracker 

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



[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See also issue40296.

--

___
Python tracker 

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



[issue45627] OpenSSL 1.1.1 still implements some disable-flags for Blake2, Scrypt

2021-10-28 Thread Alexandru Ardelean

Alexandru Ardelean  added the comment:

> Thanks for you detailed explanation. I kinda agree that it makes sense for 
> small, embedded systems like OpenWRT to reduce the size of binaries. After 
> all storage and memory are precious on these systems.

So, OpenWrt is not as tiny as it used to be.
A large part is due to the Linux kernel increasing in default size.
But other libs do a small increase as well (with each new revision).
I think a new micro-OpenWrt (or similar project) would be required in some 
future to support the devices with less than 4 MB of flash and less than 32 MB 
of RAM.
OpenWrt last supported the 4/32 combination in 2018 (with the 18.06 release).
(But that's another topic I for when I retire maybe :p )

I think where users still install Python is where they have at least 64/128 MB 
of persistent storage/flash memory.

I am still surprised about the desire of users to install Python on such 
devices (even after doing this for ~7 years of [co-]maintaining it it on 
OpenWrt).
The Turris devices/routers (are one example that) use a lot of CPython for some 
userspace stuff.

> PEP 644 favors usability over flexibility. 3rd party library developers can 
> now rely on the presence of hashlib features. Before 3.10 they could not be 
> sure that a Python build had certain features.

Ack.

> A downstream patch in OpenWRT makes sense.

I've started down that path.
But guess what... I hit LibreSSL (on the host build) :P
Now I have a bigger job (than I thought) to update to 3.10
But that's fine.
These events are rare, and I do enjoy to fix them (when I can).

> By the way, you might be interested in --with-builtin-hashlib-hashes 
> configure flag. It lets you disable builtin modules like _md5 and _sha3. The 
> shared libraries are large. If you disable the builtin blake2 module, then 
> certain features like MAC and tree hashing are not working.

I would not add too many flags in the Python build (on our side).
For now we have some ways to "modularize" a Python installation.
It's basically a hack-job of splitting Core-Python libraries into separate 
packages.
That's when someone really wants to do a minimal installation of Python, and 
add only 2-3 libraries on top.
Essentially, we build Python with all defaults possible, then some libs (.so & 
.py files) get packaged together (like ssl.py and _ssl.so from python).
The more immediate benefits (in this example) are that you can avoid installing 
OpenSSL libs on your device, but have some Python.

I know... crazy stuff, but people seem to do it.

I do admit some Python fans and developers would cringe at this but ¯\_(ツ)_/¯

--

___
Python tracker 

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



[issue45641] Error In opening a file through Idle

2021-10-28 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Are you using macOS 12 (Monterey)?

I get an error as well using that version of the OS (see open-error). The error 
happens within a second or two after opening the open dialog, without 
interacting with the dialog in any way. This is on an M1 laptop running macOS 
12.0.1.

This is likely the same issue as described in #44828. In particular, I get the 
same error message when I run the reproducer script in that issue. 

I'm adding the Tkinter component as well because this is likely a problem

--
components: +Tkinter
Added file: https://bugs.python.org/file50405/open-error.png

___
Python tracker 

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



[issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows

2021-10-28 Thread Eryk Sun


Eryk Sun  added the comment:

> What is the most trivial way to test it's behaviour?

With CREATE_NO_WINDOW, the child process is attached to a console that has no 
window. Thus calling GetConsoleWindow() in the child returns NULL without an 
error. OTOH, if the child has no console (e.g. DETACHED_PROCESS or executing 
"pythonw.exe"), then GetConsoleWindow() returns NULL with the last error set to 
ERROR_INVALID_HANDLE (6). For example:

script = r'''
import sys
import ctypes
kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)
kernel32.GetConsoleWindow.restype = ctypes.c_void_p
ctypes.set_last_error(0)
result = kernel32.GetConsoleWindow()
status = bool(result or ctypes.get_last_error())
sys.exit(status)
'''
args = [sys.executable, '-c', script]

The child's exit status will be 0 if CREATE_NO_WINDOW works as expected. 
Otherwise the exit status will be 1.

--

___
Python tracker 

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



[issue45641] Error In opening a file through Idle

2021-10-28 Thread Dev Kumar


Dev Kumar  added the comment:

Yes,
 I also have a MacBook Air M1 & I recently updated it to macOS 12.0.1. 
How to get rid of this error ??

--

___
Python tracker 

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



[issue45548] Update Modules/Setup

2021-10-28 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +27528
pull_request: https://github.com/python/cpython/pull/29263

___
Python tracker 

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



[issue45642] Unable to save

2021-10-28 Thread Craig Dowkes


New submission from Craig Dowkes :

I recently updated to Mac OS Montery 12.0.1 and am now unable to open or save 
any idle files. Running on a 2021 M1 iMac. I get the save dialogue box but then 
also an error box as shown in the attached picture. Failed to connect to the 
open and save panel service.

--
files: Screenshot 2021-10-28 at 10.24.11 am.jpg
messages: 405168
nosy: craig.dowkes
priority: normal
severity: normal
status: open
title: Unable to save
type: performance
versions: Python 3.10
Added file: https://bugs.python.org/file50406/Screenshot 2021-10-28 at 10.24.11 
am.jpg

___
Python tracker 

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



[issue45641] Error In opening a file through Idle

2021-10-28 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

See issue #45642

--

___
Python tracker 

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



[issue45642] Unable to save

2021-10-28 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

See issue #45641

--
nosy: +steven.daprano

___
Python tracker 

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



[issue45641] Error In opening a file through Idle

2021-10-28 Thread Dev Kumar


Dev Kumar  added the comment:

Ya, I saw it, same thing is happening with me.
But now what?
what is the solution?

--

___
Python tracker 

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



[issue45548] Update Modules/Setup

2021-10-28 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 4c95fb4640c0247903562dae4478158b348cea6d by Christian Heimes in 
branch 'main':
bpo-45548: Fix out-of-tree and Debian builds (GH-29263)
https://github.com/python/cpython/commit/4c95fb4640c0247903562dae4478158b348cea6d


--

___
Python tracker 

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



[issue30570] issubclass segfaults on objects with weird __getattr__

2021-10-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset d56375a0dd4cee162081b173310298a3d32af293 by Dennis Sweeney in 
branch 'main':
bpo-30570: Fix segfault on buildbots caused by stack overflow from recursion in 
tests (GH-29258)
https://github.com/python/cpython/commit/d56375a0dd4cee162081b173310298a3d32af293


--
nosy: +pablogsal

___
Python tracker 

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



[issue45643] SIGSTKFLT is missing from the signals module on Linux

2021-10-28 Thread Gareth Rees

New submission from Gareth Rees :

BACKGROUND

On Linux, "man 7 signal" includes SIGSTKFLT in its table of "various other 
signals":

Signal Value   Action  Comment
───
SIGSTKFLT  -,16,-   Term   Stack fault on coprocessor (unused)

Here "-,16,-" means that the signal is defined with the value 16 on x86 and ARM 
but not on Alpha, SPARC or MIPS. I believe that the intention was to use 
SIGSTKFLT for stack faults on the x87 math coprocessor, but this was either 
removed or never implemented, so that the signal is defined in 
/usr/include/signal.h but not used by the Linux kernel.


USE CASE

SIGSTKFLT is one of a handful of signals that are not used by the kernel, so 
that user-space programs are free to use it for their own purposes, for example 
for inter-thread or inter-process pre-emptive communication.

Accordingly, it would be nice if the name SIGSTKFLT were available in the 
Python signal module on the platforms where the signal is available, for use 
and reporting in these cases.

--
components: Library (Lib)
messages: 405174
nosy: g...@garethrees.org
priority: normal
severity: normal
status: open
title: SIGSTKFLT is missing from the signals module on Linux
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



[issue45641] Error In opening a file through Idle

2021-10-28 Thread Craig Dowkes


Craig Dowkes  added the comment:

Same issue for me on Mac OS 12.0.1 hoping for a quick solution to this

--
nosy: +craig.dowkes

___
Python tracker 

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



[issue45562] python -d creates lots of tokenizer messages

2021-10-28 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Hi Pablo,

I think you missed one instance:

   print_escape(stdout, tok->cur, tok->inp - tok->cur);

Cheers

--

___
Python tracker 

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



[issue45643] SIGSTKFLT is missing from the signals module on Linux

2021-10-28 Thread Gareth Rees


Change by Gareth Rees :


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

___
Python tracker 

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



[issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows

2021-10-28 Thread swgmma


swgmma  added the comment:

For users who simply want to hide a process' window and do not have intimate 
knowledge of how the window is created by Windows, is it feasible to just have 
one option that handles all cases? Or do we have to implement both `force_hide` 
and `force_hide_console` and let users figure out which to use from the docs?

--

___
Python tracker 

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



[issue45641] Error In opening a file through Idle

2021-10-28 Thread E. Paine


E. Paine  added the comment:

> This is likely the same issue as described in #44828

I agree; Ned and Marc are working on it. I doubt the patch will be ready for 
3.9.8, but it'll probably be in 3.9.9 and 3.10.1.

--
nosy: +epaine

___
Python tracker 

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



[issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP

2021-10-28 Thread Mark Shannon


Mark Shannon  added the comment:

Do you have results for pyperformance?

--

___
Python tracker 

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



[issue45637] The fallback to find the current frame in the gdb helpers fails for inlined frames

2021-10-28 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +27530
pull_request: https://github.com/python/cpython/pull/29267

___
Python tracker 

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



[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread Marc Culler


Marc Culler  added the comment:

Thanks for doing all the testing, Ned.  I guess that the path forward is now 
clear.  I will revert to the 8.6.11 code for 10.15 and earlier and use the new 
code for 11 and later.  Of course the 8.6.11 code already has two cases, for 
10.14 and earlier and 10.15 and later.  So I will have some code cleanup to do.

The UFO, by the way, was a standalone file dialog which was first being 
rendered as a separate window and then immediately attached to the parent 
window as a sheet.  This was easier to see on a slower machine, like a VMWare 
VM which does not have graphics acceleration.

Evidently the big change for 10.15 was that the file dialog was changed so that 
it became managed by a separate process, rather than just borrowing the current 
process's event queue.  The reason, supposedly, was to make it so that an app 
running in a sandbox could still read and write the user's files.  It seems 
that Apple had a hard time making this work, and the UFO as well as the 
assertion error suggest to me that they still haven't figured it out.  So I 
thnk we can expect more trouble with the next OS.  At least we have a year 
before that adventure starts.

Needless to say, having some documentation from Apple would be much more 
pleasant than the trial and error method that we are forced to use now.  But we 
know better than to expect that.

--

___
Python tracker 

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



[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread Marc Culler


Marc Culler  added the comment:

Hmmm, the 10.15 segfault seems to occur when writing the filename into the 
entry widget on the dialog.  So maybe it is actually an issue with reference 
counting an NSString.  I will have to look at that more carefully.

--

___
Python tracker 

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



[issue45548] Update Modules/Setup

2021-10-28 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +27531
pull_request: https://github.com/python/cpython/pull/29268

___
Python tracker 

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



[issue45644] Make json.tool soak up input before opening output for writing

2021-10-28 Thread Chris Wesseling


New submission from Chris Wesseling :

json.tool is very cute and handy for making json readable.

But rewriting a file in place requires tools like sponge (on POSIX) or a 
tmpfile, because 

$ python -m json.tool foo.json foo.json

results in an empty foo.json.

I propose soaking up the infile before opening the outfile for writing, to 
prevent that. Much like sort -o does, but without the explicit flag.
The patch I have prepared changes no behaviours, other than preventing an empty 
file... (still I see this as an enhancement and not a bug fix)

--
messages: 405182
nosy: CharString
priority: normal
severity: normal
status: open
title: Make json.tool soak up input before opening output for writing
type: enhancement

___
Python tracker 

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



[issue45637] The fallback to find the current frame in the gdb helpers fails for inlined frames

2021-10-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset f291404a802d6a1bc50f817c7a26ff3ac9a199ff by Mark Shannon in 
branch 'main':
bpo-45637: Store the frame pointer in the cframe (GH-29267)
https://github.com/python/cpython/commit/f291404a802d6a1bc50f817c7a26ff3ac9a199ff


--

___
Python tracker 

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



[issue45644] Make json.tool soak up input before opening output for writing

2021-10-28 Thread Chris Wesseling


Change by Chris Wesseling :


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

___
Python tracker 

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



[issue45562] python -d creates lots of tokenizer messages

2021-10-28 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +27534
pull_request: https://github.com/python/cpython/pull/29270

___
Python tracker 

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



[issue45630] Dump CodeObject API for debugging

2021-10-28 Thread Mark Shannon


Mark Shannon  added the comment:

What is the motivation for this?

I see it could be useful when modifying the compiler, but there is already code 
for dumping the CFG in the compiler.
https://github.com/python/cpython/blob/main/Python/compile.c#L7565

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue45645] Deep recursion terminates script execution with no error (Windows, Python 3.9)

2021-10-28 Thread PABLO LOBATO DE LA CRUZ


New submission from PABLO LOBATO DE LA CRUZ :

Deep recursion crashes on Windows (Python 3.9) when the depth limit is 
increased and no error is shown.
Seems to work fine on other systems that I have tried (Linux and MacOS).
Please find attached the script to reproduce the error.
Expected and other systems output:

Calculated N2
Try block finished correctly
This is the finally block

Output:

Calculated N2

--
components: Windows
files: forstack.py
messages: 405185
nosy: pablolob, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Deep recursion terminates script execution with no error (Windows, 
Python 3.9)
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file50407/forstack.py

___
Python tracker 

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



[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread Marc Culler


Marc Culler  added the comment:

Hi Ned.  Here is one more attempt, hopefully the final one.  I tested with IDLE 
on 10.14 (VM), 10.15(hard), 11(hard), 12(VM).  I used Python 3.10.0.  I 
replaced libtk8.6.dylib with the Tk lib compiled from the tip of the 
macosx_filedialog branch.  I could not reproduce any of the issues that you 
reported.  (But I hope you will retry as well, since just replacing the 
tkMacOSXDialog.c file in 8.6.11 is not the same as using the soon-to-be 8.6.12 
release candidate.)

I will attach the tkMacOSXDialog.c that I used.

--
Added file: https://bugs.python.org/file50408/tkMacOSXDialog.c

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-28 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +27535
pull_request: https://github.com/python/cpython/pull/29271

___
Python tracker 

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



[issue45646] The documentation wrongly uses or_expr for star expresion in displays

2021-10-28 Thread Arthur Milchior


New submission from Arthur Milchior :

According to the current documentation, I believe there is an error in
list_display, set_display and dict_display.
According to list display, this is a valid expression
[* l1 ^ l2]
parsed as
list_display:
  "["
  starred_list:
starred_item:
  "*"
  or_expr:
xor_expr:
  xor_expr: "l1"
  "^"
  and_expr: "l2"
  "]"  

I add the full derivation from and_expr to l2 at the end of the report, it's 
not important for this topic. 

The same issue is present for set. For dictionary it is also present, but 
instead the error is in key_datum.

I have no idea what would be the proper correction.
Indeed [*l1+l2] is valid (in 3.9) at least. So it's not like the element after 
a star is restricted to be an atom.

At the very least, I believe it should be clearly indicated that, contrary to 
what the name indicates, "or_expr" do not mean that we accept any or, nor any 
expression. It just mean that 
*some_complex_expression
is interpreted as
* (some_complex_expression)
and that it is valid iff some_complex_expression is valid



shift_expr:
  a_expr:
m_expr:
  power:
primary:
  atom:
identifier:
  "l2"

--
assignee: docs@python
components: Documentation
messages: 405187
nosy: Arthur-Milchior, docs@python
priority: normal
severity: normal
status: open
title: The documentation wrongly uses or_expr for star expresion in displays
versions: Python 3.10, Python 3.11, Python 3.6, 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



[issue45646] "expression" is erroneous in the doc

2021-10-28 Thread Arthur Milchior


Arthur Milchior  added the comment:

https://docs.python.org/3/reference/expressions.html#grammar-token-python-grammar-expression
 is wrong
This line state:
`expression ::=  conditional_expression | lambda_expr`
and it is a problem because, by the way sphinx understand reference, this mean 
that any people who use the token `expression` will be linked to this 
particular line.
For example in 
https://docs.python.org/3/reference/expressions.html#grammar-token-python-grammar-key_datum
`key_datum  ::=  expression ":" expression | "**" or_expr`
while clearly a key_datum is not expecting only a conditional expression or a 
lambda expression.

Admittedly, you can derive, from  expression:
* conditional_expression
* or_test
* and_test
* not_test
* comparison
* or_expr
* xor_expr
* and_expr
* shift_expr
* a_expr
* m_expr
* u_expr
* power
* primary
* atom

in this order, so in practice you can probably derive most of the expressions. 
However, I doubt that this is what the documentation meant here, and clearly 
not practical.

--
title: The documentation wrongly uses or_expr for star expresion in displays -> 
"expression" is erroneous in the doc

___
Python tracker 

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



[issue45647] "expression" is erroneous in the doc

2021-10-28 Thread Arthur Milchior


New submission from Arthur Milchior :

https://docs.python.org/3/reference/expressions.html#grammar-token-python-grammar-expression
 is wrong
This line state:
`expression ::=  conditional_expression | lambda_expr`
and it is a problem because, by the way sphinx understand reference, this mean 
that any people who use the token `expression` will be linked to this 
particular line.
For example in 
https://docs.python.org/3/reference/expressions.html#grammar-token-python-grammar-key_datum
`key_datum  ::=  expression ":" expression | "**" or_expr`
while clearly a key_datum is not expecting only a conditional expression or a 
lambda expression.

Admittedly, you can derive, from  expression:
* conditional_expression
* or_test
* and_test
* not_test
* comparison
* or_expr
* xor_expr
* and_expr
* shift_expr
* a_expr
* m_expr
* u_expr
* power
* primary
* atom

in this order, so in practice you can probably derive most of the expressions. 
However, I doubt that this is what the documentation meant here, and clearly 
not practical.

--
assignee: docs@python
components: Documentation
messages: 405189
nosy: Arthur-Milchior, docs@python
priority: normal
severity: normal
status: open
title: "expression" is erroneous in the doc
versions: Python 3.10, Python 3.11, Python 3.6, 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



[issue45646] Star expression in comprehension wrongly indicates to use or_expression after the star

2021-10-28 Thread Arthur Milchior


Change by Arthur Milchior :


--
title: "expression" is erroneous in the doc -> Star expression in comprehension 
wrongly indicates to use or_expression after the star

___
Python tracker 

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



[issue45648] Better tp_version_tag overflow checks in specializer

2021-10-28 Thread Ken Jin


Change by Ken Jin :


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

___
Python tracker 

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



[issue45648] Better tp_version_tag overflow checks in specializer

2021-10-28 Thread Ken Jin


New submission from Ken Jin :

Unless I'm mistaken, the current code in Python/specialize.c doesn't check for 
valid tp_version_tag, so version tag could overflow and it wouldn't know any 
better.

Ideally, we should add more robust tests for when tp_version_tag overflows, but 
that's a project for another day.

--
messages: 405190
nosy: Mark.Shannon, kj
priority: normal
severity: normal
status: open
title: Better tp_version_tag overflow checks in specializer
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



[issue45646] Star expression in comprehension wrongly indicates to use or_expression after the star

2021-10-28 Thread Arthur Milchior


Arthur Milchior  added the comment:

Message 405188 was supposed to be another bug report. My bad.

--

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-28 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 0a1a36b74bdf8da286924a1c9652853b1c46f536 by Ken Jin in branch 
'main':
bpo-44525: Add recursive checks for `CALL_FUNCTION_BUILTIN_O` (GH-29271)
https://github.com/python/cpython/commit/0a1a36b74bdf8da286924a1c9652853b1c46f536


--

___
Python tracker 

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



[issue45256] Remove the usage of the C stack in Python to Python calls

2021-10-28 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 7f61d9d84843e3445f62eb00c47902f0daa30a72 by Mark Shannon in 
branch 'main':
bpo-45256: Rationalize code around Python-to-Python calls a bit. (GH-29235)
https://github.com/python/cpython/commit/7f61d9d84843e3445f62eb00c47902f0daa30a72


--

___
Python tracker 

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



[issue45644] Make json.tool soak up input before opening output for writing

2021-10-28 Thread Chris Wesseling


Change by Chris Wesseling :


--
pull_requests: +27537
pull_request: https://github.com/python/cpython/pull/29273

___
Python tracker 

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



[issue45649] Add tarinfo.Path

2021-10-28 Thread Filipe Laíns

New submission from Filipe Laíns :

It would be helpful to have a pathlib-compatible object in tarfile, similarly 
to zipfile.Path.

--
components: Library (Lib)
messages: 405194
nosy: FFY00, jaraco
priority: normal
severity: normal
status: open
title: Add tarinfo.Path
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



[issue45641] Error In opening a file through tkinter on macOS Monterey

2021-10-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
assignee: terry.reedy -> 
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 
Monterey, breaking IDLE saves
title: Error In opening a file through Idle -> Error In opening a file through 
tkinter on macOS Monterey

___
Python tracker 

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



[issue39679] functools: singledispatchmethod doesn't work with classmethod

2021-10-28 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 97388c204b557f30e48a2b2ef826868702204cf2 by Alex Waygood in 
branch '3.9':
[3.9] bpo-39679: Fix `singledispatchmethod` `classmethod`/`staticmethod` bug 
(GH-29087)
https://github.com/python/cpython/commit/97388c204b557f30e48a2b2ef826868702204cf2


--

___
Python tracker 

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



[issue39679] functools: singledispatchmethod doesn't work with classmethod

2021-10-28 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks for the 3.9 fix, Alex! ✨ 🍰 ✨

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



[issue45629] Tools/freeze needs tests in the test suite.

2021-10-28 Thread Eric Snow


Eric Snow  added the comment:


New changeset 13d9205f4057f80a25d410ad123876dc60cd by Eric Snow in branch 
'main':
bpo-45629: Add a test for the "freeze" tool. (gh-29222)
https://github.com/python/cpython/commit/13d9205f4057f80a25d410ad123876dc60cd


--

___
Python tracker 

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



[issue45629] Tools/freeze needs tests in the test suite.

2021-10-28 Thread Eric Snow


Change by Eric Snow :


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



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

2021-10-28 Thread Kier Davis


New submission from Kier Davis :

## Context ##

* Python is executing a script on behalf of a web server (e.g. Apache httpd) 
following the CGI protocol.
* cgitb is enabled and configured to use the 'text' format.
* An unhandled exception occurs before any CGI response headers have been 
emitted.


## Expected behaviour ##

A valid response is returned from the CGI script to the web server and 
ultimately to the client.


## Observed behaviour ##

The response is rejected by the web server because it does not begin with a 
valid CGI header block.

[cgi:error] [pid x] [client xxx.xxx.xxx.xxx:x] malformed header 
from script 'web.py': Bad header: A problem occurred in a Pyt

Any traceback info included (if display=1) gets discarded and the web server 
returns its own Internal Server Error response instead.


## Comments ##

A valid response is observed if format='html'. This bug only concerns 
format='text'.
The behaviour is the same regardless of whether display=0 or display=1.

I imagine this is because cgitb.reset (which emits the headers) is only called 
when format='html'.
We could resolve this by always calling cgitb.reset regardless of the format, 
or by introducing separate text-format and HTML-format versions of cgitb.reset.
I'm happy to prepare a patch if you agree on the approach.

--
components: Library (Lib)
files: repro_cgitb_not_emitting_headers_in_text_mode.py
messages: 405198
nosy: kierdavis
priority: normal
severity: normal
status: open
title: cgitb does not emit CGI headers when format='text'
type: behavior
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9
Added file: 
https://bugs.python.org/file50409/repro_cgitb_not_emitting_headers_in_text_mode.py

___
Python tracker 

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



[issue45562] python -d creates lots of tokenizer messages

2021-10-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset cdc7a5827754bec83970bb052d410d55f85b3fff by Pablo Galindo Salgado 
in branch 'main':
bpo-45562: Ensure all tokenizer debug messages are printed to stderr (GH-29270)
https://github.com/python/cpython/commit/cdc7a5827754bec83970bb052d410d55f85b3fff


--

___
Python tracker 

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



[issue45562] python -d creates lots of tokenizer messages

2021-10-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27538
pull_request: https://github.com/python/cpython/pull/29275

___
Python tracker 

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



[issue45630] Dump CodeObject API for debugging

2021-10-28 Thread penguin_wwy


penguin_wwy <940375...@qq.com> added the comment:

This interface can dump code at any time, not just at compile time.

Can observe the comparison before and after dynamic optimization(eg. specialize 
and super instr), and can also observe the instructions actually executed.

Another situation is to execute the dump by command line in gdb/lldb(eg. 
`expression _PyCode_DebugDump(co, "test")`), when debugging.

--

___
Python tracker 

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



[issue45651] -X frozen_modules not defaulting to "on" on Windows?

2021-10-28 Thread Eric Snow


New submission from Eric Snow :

(forked from https://bugs.python.org/issue45020#msg404344)

On Mon, Oct 18, 2021 at 7:14 PM Guido van Rossum  wrote:
> I built on Windows with default options (PCbuild\build.bat) and it looks like 
> the frozen modules are used by default even though I am running in the source 
> directory. (I put a printf() call in unmarshal_frozen_code().)

We need to verify if this is still the case.  First we need to make sure 
there's a test that checks the default (both when running out of the source 
tree and when not).  I suspect the case Guido observed hasn't been fixed yet.

--
components: Interpreter Core
messages: 405201
nosy: FFY00, eric.snow
priority: normal
severity: normal
status: open
title: -X frozen_modules not defaulting to "on" on Windows?
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue45562] python -d creates lots of tokenizer messages

2021-10-28 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Thanks, Pablo :-)

--

___
Python tracker 

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



[issue45020] Freeze all modules imported during startup.

2021-10-28 Thread Eric Snow


Eric Snow  added the comment:

On Mon, Oct 18, 2021 at 7:14 PM Guido van Rossum  wrote:
> Is gh-28940 only for UNIX?
> I built on Windows with default options (PCbuild\build.bat) and it looks like 
> the frozen modules are used by default even though I am running in the source 
> directory. (I put a printf() call in unmarshal_frozen_code().)

FYI, I opened https://bugs.python.org/issue45651 for sorting this out.

--

___
Python tracker 

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



[issue45651] -X frozen_modules not defaulting to "off" on Windows when running in source tree?

2021-10-28 Thread Eric Snow


Change by Eric Snow :


--
title: -X frozen_modules not defaulting to "on" on Windows? -> -X 
frozen_modules not defaulting to "off" on Windows when running in source tree?

___
Python tracker 

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



[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread Ned Deily


Ned Deily  added the comment:

> Here is one more attempt, hopefully the final one.

I think we have a winner! The issues I've seen all seem to be resolved in this 
latest round. Thank you, Marc! For the record, my testing for this has been 
very rudimentary manual testing so I'm certainly not saying there aren't other 
problems that we haven't run into yet but I'm reasonably confident that, with 
this Tk fix applied, IDLE behavior with python.org Pythons should be similar on 
macOS 12 Monterey to macOS 11 Big Sur.

I'm going to merge this Tk patch into our macOS installer build scripts and 
plan to release it in 3.9.8 which is scheduled for next week. And I'm working 
with the rest of the release team on how best to provide this fix for 3.10 
since 3.10.1 is not planned for another month. I'll also try to test with the 
Tk 8.6.12 branch soon.

--

___
Python tracker 

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



[issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows

2021-10-28 Thread Eryk Sun


Eryk Sun  added the comment:

> is it feasible to just have one option that handles all cases?

I'm in favor of whatever has broad support and is least surprising for users. I 
like CREATE_NO_WINDOW, which is restricted to console applications. The 
alternative is hiding the window, like what we do with shell=True. But the new 
option would also hide the main window of many GUI apps, which may come as a 
surprise and is hardly ever desired behavior.

--

___
Python tracker 

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



[issue45522] Allow to build Python without freelists

2021-10-28 Thread Mark Shannon


Mark Shannon  added the comment:

I think we should revert this. It just makes working with freelists more 
cumbersome. Having more configure options just makes it more likely that we 
will fail to test some configuration.

If you want to disable freelists in your experiments, feel free to do so, but 
it doesn't need to be in main, IMO.

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue45649] Add tarinfo.Path

2021-10-28 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I vaguely recall exploring this concept and finding that tarfiles don’t supply 
the requisite interface because they’re not random access. I’m only 10% 
confident in that recollection, so worth exploring.

--

___
Python tracker 

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



[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread Ned Deily


Change by Ned Deily :


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

___
Python tracker 

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



[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread Marc Culler


Marc Culler  added the comment:

That is great news!  I will now merge the changes into the Tk core-8-6-branch 
and core-8-6-12-rc branches.

--

___
Python tracker 

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



[issue45652] co_filename does not match __file__ for frozen stdlib modules

2021-10-28 Thread Eric Snow


New submission from Eric Snow :

Frozen modules currently have co_filename set to "".  It would be 
good to have it match __file__ instead.  This will require require also fixing 
any code objects in the module's co_consts (and so on).  It may make sense to 
take care of the while unmarshaling, but could be done (less efficiently) after 
the fact.

--
components: Interpreter Core
messages: 405209
nosy: FFY00, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: co_filename does not match __file__ for frozen stdlib modules
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue45649] Add tarinfo.Path

2021-10-28 Thread Filipe Laíns

Filipe Laíns  added the comment:

That is good to know. This isn't very high on my priority list, but I will try 
to explore when I have some time.

--

___
Python tracker 

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



[issue45653] Freeze the encodings module.

2021-10-28 Thread Eric Snow


New submission from Eric Snow :

Currently we freeze all the modules imported during runtime initialization, 
except for the encodings module.  It has a lot of submodules and this results 
in a lot of extra noise in builds.  We hadn't frozen it yet because we were 
still ironing out changes related to frozen modules and the extra noise was a 
pain.  We also waited because we weren't sure if we should freeze all the 
submodules or just the most likely ones to be used during startup.  In the case 
of the latter, we were also blocked on having __path__ set on the package.

At this point there are no blockers.  So we should freeze the encodings modules 
with either all submodules or the most commonly used subset.

--
components: Build
messages: 405211
nosy: FFY00, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Freeze the encodings module.
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue45654] Freeze the runpy module.

2021-10-28 Thread Eric Snow


New submission from Eric Snow :

Currently we are freezing the modules that are imported during startup.  
However, if someone uses "python -m module" then the runtime imports the runpy 
module and uses it.  Given that this case is quite common, runpy and its 
dependencies should be frozen.

--
components: Build
messages: 405212
nosy: FFY00, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Freeze the runpy module.
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue45653] Freeze the encodings module.

2021-10-28 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

encodings is a package. I think you first have to check whether mixing
frozen and non-frozen submodules are even supported. I've never tried
having only part of a package frozen.

Freezing the whole package certainly works.

--
nosy: +lemburg

___
Python tracker 

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



[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-10-28 Thread Joe Wells

Joe Wells  added the comment:

1. As background, it is worth remembering that a major motivation for why 
FrameSummary.__init__ stringifies the local variable values in its parameter 
locals is to prevent the resulting data structure from keeping those values 
live.  This enables them to be garbage collected.

2. It has been suggested that TracebackException.__init__ or 
StackSummary.extract could be given a function parameter.  This could either be 
a new parameter or could involve using the existing capture_locals parameter 
with a non-bool.  The purpose of this suggestion is to allow customizing the 
use of repr to stringify local variable values.  If this suggestion is 
followed, it would be quite useful if this function parameter was given not 
just the local variable values, but also the name of the local variable and 
maybe also the stack frame it is in.  This would enable filtering out undesired 
variables.  For example, I would usually prefer to filter most of the variables 
from the __main__ module frame, because they are just noise that makes it hard 
to see the important details.  Some ability to filter would also help with the 
security issue that is discussed in issue 23597 that Irit pointed to.

3. I doubt that new students will be setting up calls to TracebackException or 
modifying sys.excepthook on their own.  Although a simple interface is clearly 
good, it might be more important to have an interface that maximizes the 
usefulness of the feature.

4. I no longer have the tracebacks my students were getting.  You can look at 
the traceback from the example in msg 404319 for a traceback.  While I was 
debugging this, I got much more complicated tracebacks because two of the 
classes in traceback.py also throw exceptions during their __init__ method that 
leave the not-yet-initialized object in a repr-will-raise-an-exception state.  
Despite having decades of programming experience, it actually took me a long 
time before I realized that the exceptions I was debugging were junk exceptions 
due to attempts to call repr on not-yet-initialized objects.  I think figuring 
this out would be extremely challenging for my second-year undergraduate 
students.

5. If one of the calls to repr in FrameSummary.__init__ raises an exception, 
this prevents all the other local variable values from being inspected.  If it 
is desired to report local variable values that cause repr to raise an 
exception, then it would be good to collect all such exceptions, which requires 
handling each exception and then continuing to traverse the traceback stack.  
Because of point 1 above, it might often be best to turn each such exception 
into a string.  To avoid infinite loops in the debugging/logging tools, it 
would often be best not to attempt to traverse the traceback stack of each of 
these extra exceptions.  If this argument is a good argument, this seems to 
mean that my most recent proposed fix is a good balance.

6. It is not clear if there is a reliable way to detect whether repr raises an 
exception due to an object's initialization having been interrupted, but all of 
the failures that I observed of this sort were for the variable name “self”.  
In one case, the repr failure was for a normal local variable of an __new__ 
method which was not a parameter of this method; the variable was named “self” 
by convention, but this convention would be difficult to automatically verify.  
In the two other cases, the repr failure was for a parameter named “self” which 
was the first parameter of an __init__ method.  So it would help to give 
special treatment to the first parameter of __init__ methods, but this would 
not solve the problem for __new__ methods.

7. In some cases, it might be a bit complicated to ensure the object is always 
in a safe state for repr-ing during initialization.  This is because there may 
be many attributes that need to be modified and this is not generally done 
atomically.  One attribute could be designated to indicate that initialization 
is done, so that repr will be extra careful if that attribute does not have an 
expected value.  Given that this is only (so far) an issue for debuggers and 
traceback inspection tools, it is not clear how to motivate everyone who writes 
a __new__, __init__, or __repr__ method to do this safely.  Documentation can 
of course help.

--

___
Python tracker 

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



[issue45655] List of PEPs at top of typing docs is too long to be readable

2021-10-28 Thread Alex Waygood


New submission from Alex Waygood :

The list of relevant PEPs at the top of the typing docs has become too long to 
be readable or helpful. It would be good if this information could be presented 
in a more structured way.

--
assignee: docs@python
components: Documentation
messages: 405215
nosy: AlexWaygood, docs@python, gvanrossum, kj
priority: normal
severity: normal
status: open
title: List of PEPs at top of typing docs is too long to be readable
type: enhancement
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



[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27541
pull_request: https://github.com/python/cpython/pull/29278

___
Python tracker 

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



[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread Ned Deily


Ned Deily  added the comment:


New changeset be8318be05e1a874215fa75b8845ede74b2c69b6 by Ned Deily in branch 
'main':
bpo-44828: Avoid tkinter file dialog failure on macOS 12 Monterey (GH-29276)
https://github.com/python/cpython/commit/be8318be05e1a874215fa75b8845ede74b2c69b6


--

___
Python tracker 

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



[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 16.0 -> 17.0
pull_requests: +27540
pull_request: https://github.com/python/cpython/pull/29277

___
Python tracker 

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



[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27542
pull_request: https://github.com/python/cpython/pull/29279

___
Python tracker 

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



[issue45655] List of PEPs at top of typing docs is too long to be readable

2021-10-28 Thread Alex Waygood


Change by Alex Waygood :


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

___
Python tracker 

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



[issue45656] argparse bug: prefix_chars argument to add_argument_group doesn't really work

2021-10-28 Thread Samwyse


New submission from Samwyse :

Using the prefix_chars argument to parser.add_argument_group causes usage 
information to print correctly, but the resulting parser doesn't recognize the 
options.  The included program reproduces the issue; it produces the following 
output on my system.

--- python version
3.6.8 (default, Sep 26 2019, 11:57:09)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
--- test using prefix_chars='-/' with ArgumentParser
--- show help info
usage: test-1 [-h] [-foo FOO] [/bar BAR]

optional arguments:
  -h, --help  show this help message and exit
  -foo FOO
  /bar BAR

--- try parsing something
Namespace(bar='b', foo='f')
--- test using prefix_chars='-/' with an argument group
--- show help info
usage: test-2 [-h] [-foo FOO] [/bar BAR]

optional arguments:
  -h, --help  show this help message and exit

other arguments:
  -foo FOO
  /bar BAR

--- try parsing something
usage: test-2 [-h] [-foo FOO] [/bar BAR]
test-2: error: unrecognized arguments: /bar b

--
components: Library (Lib)
files: argparser-bug.py
messages: 405217
nosy: samwyse
priority: normal
severity: normal
status: open
title: argparse bug: prefix_chars argument to add_argument_group doesn't really 
work
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file50410/argparser-bug.py

___
Python tracker 

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



[issue45657] Enum behavior when values are functions

2021-10-28 Thread Ronald Pandolfi


New submission from Ronald Pandolfi :

Enum members assigned values that are functions don't remember those members. 
For example:

def my_func():
...
class Test(enum.Enum):
a=1
b=my_func

Test.__members__
Out[7]: mappingproxy({'a': })
Test.b
Out[8]: 

Even though b doesn't show in __members__ it is still an attribute of the Enum.

--
messages: 405218
nosy: ronpandolfi
priority: normal
severity: normal
status: open
title: Enum behavior when values are functions
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



[issue45658] Implement FrozenImporter.get_source()

2021-10-28 Thread Eric Snow


Eric Snow  added the comment:

Note that once the get_source() implementation is done, the only missing method 
for importlib.abc.InspectLoader is source_to_code().  (See 
https://docs.python.org/3/library/importlib.html#importlib.abc.InspectLoader.)

--

___
Python tracker 

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



[issue45658] Implement FrozenImporter.get_source()

2021-10-28 Thread Eric Snow


New submission from Eric Snow :

FrozenImporter (in Lib/importlib/_bootstrap.py) has a get_source() method but 
it always returns None.  Now that __file__ is set on frozen (stdlib) modules, 
we can implement FrozenImporter.get_source() appropriately.

--
components: Library (Lib)
messages: 405219
nosy: FFY00, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Implement FrozenImporter.get_source()
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP

2021-10-28 Thread Brandt Bucher


Brandt Bucher  added the comment:

Slower (29):
- unpack_sequence: 43.7 ns +- 0.9 ns -> 45.7 ns +- 1.1 ns: 1.04x slower
- float: 80.5 ms +- 0.9 ms -> 83.5 ms +- 1.3 ms: 1.04x slower
- regex_effbot: 3.15 ms +- 0.03 ms -> 3.26 ms +- 0.04 ms: 1.04x slower
- go: 165 ms +- 1 ms -> 171 ms +- 3 ms: 1.03x slower
- pickle_dict: 26.8 us +- 0.1 us -> 27.5 us +- 0.1 us: 1.03x slower
- scimark_monte_carlo: 77.5 ms +- 0.8 ms -> 79.3 ms +- 1.3 ms: 1.02x slower
- sqlalchemy_imperative: 18.6 ms +- 0.5 ms -> 18.9 ms +- 0.9 ms: 1.02x slower
- chaos: 76.7 ms +- 0.7 ms -> 78.1 ms +- 0.8 ms: 1.02x slower
- logging_format: 6.73 us +- 0.09 us -> 6.84 us +- 0.08 us: 1.02x slower
- richards: 56.9 ms +- 0.9 ms -> 57.7 ms +- 1.0 ms: 1.01x slower
- chameleon: 7.48 ms +- 0.10 ms -> 7.58 ms +- 0.12 ms: 1.01x slower
- json_loads: 25.4 us +- 0.2 us -> 25.7 us +- 0.2 us: 1.01x slower
- sympy_expand: 501 ms +- 5 ms -> 507 ms +- 4 ms: 1.01x slower
- logging_silent: 116 ns +- 3 ns -> 117 ns +- 2 ns: 1.01x slower
- django_template: 37.2 ms +- 0.5 ms -> 37.7 ms +- 0.4 ms: 1.01x slower
- regex_v8: 23.2 ms +- 0.1 ms -> 23.4 ms +- 0.3 ms: 1.01x slower
- regex_dna: 212 ms +- 1 ms -> 214 ms +- 1 ms: 1.01x slower
- xml_etree_process: 59.1 ms +- 0.6 ms -> 59.6 ms +- 0.6 ms: 1.01x slower
- xml_etree_generate: 80.4 ms +- 0.7 ms -> 81.2 ms +- 0.8 ms: 1.01x slower
- scimark_lu: 138 ms +- 3 ms -> 140 ms +- 3 ms: 1.01x slower
- logging_simple: 6.15 us +- 0.08 us -> 6.20 us +- 0.09 us: 1.01x slower
- regex_compile: 144 ms +- 2 ms -> 145 ms +- 1 ms: 1.01x slower
- spectral_norm: 107 ms +- 1 ms -> 108 ms +- 2 ms: 1.01x slower
- 2to3: 271 ms +- 1 ms -> 272 ms +- 1 ms: 1.00x slower
- sympy_integrate: 22.0 ms +- 0.2 ms -> 22.1 ms +- 0.1 ms: 1.00x slower
- sympy_str: 303 ms +- 4 ms -> 304 ms +- 3 ms: 1.00x slower
- dulwich_log: 67.6 ms +- 0.3 ms -> 67.8 ms +- 0.3 ms: 1.00x slower
- python_startup_no_site: 5.90 ms +- 0.00 ms -> 5.91 ms +- 0.01 ms: 1.00x slower
- python_startup: 8.51 ms +- 0.01 ms -> 8.52 ms +- 0.01 ms: 1.00x slower

Faster (13):
- pickle_list: 4.48 us +- 0.04 us -> 4.31 us +- 0.03 us: 1.04x faster
- scimark_fft: 355 ms +- 10 ms -> 348 ms +- 3 ms: 1.02x faster
- nqueens: 90.1 ms +- 0.7 ms -> 88.3 ms +- 0.8 ms: 1.02x faster
- xml_etree_iterparse: 107 ms +- 3 ms -> 105 ms +- 2 ms: 1.02x faster
- nbody: 115 ms +- 2 ms -> 113 ms +- 3 ms: 1.02x faster
- fannkuch: 427 ms +- 4 ms -> 420 ms +- 4 ms: 1.02x faster
- unpickle_list: 5.05 us +- 0.04 us -> 4.96 us +- 0.06 us: 1.02x faster
- telco: 6.38 ms +- 0.25 ms -> 6.29 ms +- 0.13 ms: 1.01x faster
- json_dumps: 12.6 ms +- 0.1 ms -> 12.5 ms +- 0.1 ms: 1.01x faster
- pyflate: 539 ms +- 9 ms -> 533 ms +- 3 ms: 1.01x faster
- crypto_pyaes: 87.5 ms +- 0.6 ms -> 86.6 ms +- 1.2 ms: 1.01x faster
- raytrace: 331 ms +- 2 ms -> 330 ms +- 2 ms: 1.00x faster
- mako: 11.9 ms +- 0.1 ms -> 11.9 ms +- 0.1 ms: 1.00x faster

Benchmark hidden because not significant (16): deltablue, hexiom, 
meteor_contest, pathlib, pickle, pickle_pure_python, pidigits, scimark_sor, 
scimark_sparse_mat_mult, sqlalchemy_declarative, sqlite_synth, sympy_sum, 
tornado_http, unpickle, unpickle_pure_python, xml_etree_parse

Geometric mean: 1.00x slower

--

___
Python tracker 

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



[issue45657] Enum behavior when values are functions

2021-10-28 Thread Alex Waygood


Alex Waygood  added the comment:

It would be difficult to define methods in Enum classes if functions in the 
class namespace were automatically converted into members. You can get around 
this by wrapping your functions in `functools.partial` objects; see 
https://stackoverflow.com/questions/40338652/how-to-define-enum-values-that-are-functions.

--
nosy: +AlexWaygood, ethan.furman

___
Python tracker 

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



[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread miss-islington


miss-islington  added the comment:


New changeset 54579087c69f95531cbe7a97401c67f104a3e52f by Miss Islington (bot) 
in branch '3.10':
bpo-44828: Avoid tkinter file dialog failure on macOS 12 Monterey (GH-29276)
https://github.com/python/cpython/commit/54579087c69f95531cbe7a97401c67f104a3e52f


--

___
Python tracker 

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



[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-10-28 Thread miss-islington


miss-islington  added the comment:


New changeset 8e5e74e3049875e9d834fe4408263676fe21e890 by Miss Islington (bot) 
in branch '3.9':
bpo-44828: Avoid tkinter file dialog failure on macOS 12 Monterey (GH-29276)
https://github.com/python/cpython/commit/8e5e74e3049875e9d834fe4408263676fe21e890


--

___
Python tracker 

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



[issue45659] Add FrozenImporter.get_filename().

2021-10-28 Thread Eric Snow


New submission from Eric Snow :

Now that __file__ is set on frozen (stdlib) modules, we can add an 
implementation for FrozenImporter.get_filename().  This would make 
FrozenImporter and implementation of ExecutionLoader. [1]

There is a caveat: in spec_from_loader() [2] we infer the presence of 
get_filename() to mean the loader is file-based, which FrozenImporter isn't. 
 In that case we call spec_from_file_location() [3], which should not be used 
for frozen modules.  Most importantly, spec.origin for frozen modules should 
remain "frozen", spec.cached should remain None, and spec.has_location should 
remain False.  That's because the module was imported frozen and not from a 
file (even though it originated in a file).


[1] 
https://docs.python.org/3/library/importlib.html#importlib.abc.ExecutionLoader
[2] in Lib/import/_bootstrap.py
[3] in Lib/import/_bootstrap_external.py

--
components: Library (Lib)
messages: 405225
nosy: FFY00, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Add FrozenImporter.get_filename().
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue45659] Add FrozenImporter.get_filename().

2021-10-28 Thread Eric Snow


Eric Snow  added the comment:

Note that there isn't any intent currently to implement the FileLoader ABC [1], 
which would require having FrozenImporter instances, adding the "name" and 
"path" attributes to them, as well as the get_data() method.  The same goes for 
the SourceLoader ABC. [2]

Again, frozen modules don't have files but instead were only derived from files 
during the build process.  For frozen stdlib modules we happen to know where to 
find the corresponding source files.


[1] https://docs.python.org/3/library/importlib.html#importlib.abc.FileLoader
[2] https://docs.python.org/3/library/importlib.html#importlib.abc.SourceLoader

--

___
Python tracker 

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



  1   2   >