[issue46119] Update bundled pip to 21.3.1 and setuptools to 59.7.0

2021-12-17 Thread Kumar Aditya


Change by Kumar Aditya :


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

___
Python tracker 

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



[issue46119] Update bundled pip to 21.3.1 and setuptools to 59.7.0

2021-12-17 Thread Kumar Aditya


Change by Kumar Aditya :


--
components: Distutils
nosy: dstufft, eric.araujo, kumaraditya303, pablogsal
priority: normal
severity: normal
status: open
title: Update bundled pip to 21.3.1 and setuptools to 59.7.0
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



[issue46117] tk could not refresh auto in mac os

2021-12-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The macOS system tk, 8.5.9, is over a decade old and buggy.  python.org python 
now always uses the recent 8.6 version included with the installer.

--

___
Python tracker 

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



[issue46117] tk could not refresh auto in mac os

2021-12-17 Thread asper


asper  added the comment:

Thank you for your reply. The phenomenon is still exist on mac os, when I add 
'root.update_idletasks()'. The version of tk on mac os is 8.5.9, the version of 
tk is show 8.6.12 from the enviroment of python3.10.
Now, I use lower() and lift() to switch two frame in tkinter, it works well.

--

___
Python tracker 

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



[issue6110] IDLE has two "Preferences..." menu's on OSX

2021-12-17 Thread Ned Deily


Change by Ned Deily :


--
pull_requests:  -28396

___
Python tracker 

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



[issue6110] IDLE has two "Preferences..." menu's on OSX

2021-12-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +28396
pull_request: https://github.com/python/cpython/pull/30177

___
Python tracker 

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



[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2021-12-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue6110] IDLE has two "Preferences..." menu's on OSX

2021-12-17 Thread Ned Deily


Change by Ned Deily :


--
pull_requests:  -28394

___
Python tracker 

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



[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2021-12-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I made a draft PR here:

https://github.com/python/cpython/pull/30177

to fix the issue. But we should benchmark and evaluate it before deciding 
anything.

--

___
Python tracker 

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



[issue6110] IDLE has two "Preferences..." menu's on OSX

2021-12-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal
nosy_count: 2.0 -> 3.0
pull_requests: +28394
pull_request: https://github.com/python/cpython/pull/30177

___
Python tracker 

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



[issue46095] Improve SeqIter documentation

2021-12-17 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
title: Warning about iterate/modify has unwarranted detail -> Improve SeqIter 
documentation
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



[issue46095] Warning about iterate/modify has unwarranted detail

2021-12-17 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I think this note can be removed.  The tutorial now has coverage of mutating 
while iterating.  That is the correct place for discussion of looping 
techniques.

The part about the "internal counter" needs to be rewritten and moved to 
stdtypes.rst section on Sequence types.  Here is a first draft:

"Forward and reversed iterators over sequences access values using an index.  
That index will continue to march forward (or backward) even if the underlying 
sequence is mutated.  The iterator terminates only when an IndexError or 
StopIteration is encountered (or when the index drops below zero)."

Sequence iterators are roughly equivalent to:

def seqiter(seq):
i = 0
while True:
try:
yield seq[i]
except (IndexError, StopIteration):
break
i += 1

--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2021-12-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I worked in the past in a refactor of the math based rules 
(https://github.com/python/cpython/pull/20696/files) that could prevent 
**this** particular example, but others could still make the parser crash by 
stack overflow

--

___
Python tracker 

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



[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2021-12-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This is a known issue for recursive descendent parsers. The only thing we can 
do here is somehow limit the maximum stack depth of the C stack, but that can:

* Slow down the parser.
* Limit valid expressions that otherwise won't segfault.
* Still don't work in certain systems.

--

___
Python tracker 

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



[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2021-12-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This is a stack overflow in the parser, unfortunately, which unfortunately is 
very difficult to defend against.

--

___
Python tracker 

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



[issue46110] compile("-"*3000000 + "4", '', mode) causes hard crash

2021-12-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Windows, IDLE, 3.10.1: compile("-"*300 + "4", '', mode) crashes execution 
process for any of 'exec', 'eval', 'single'.

#42609 is also about 'too high' string multiplication with new compilet, though 
the exact breaking point in crash dumps seems different.

--
nosy: +pablogsal, terry.reedy
title: `eval("-"*300 + "4")` in cmd causes hard crash -> 
compile("-"*300 + "4", '', mode) causes hard crash

___
Python tracker 

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



[issue46103] inspect.getmembers will call the instance __bases__ attribute, which may cause an exception

2021-12-17 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +yselivanov

___
Python tracker 

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



[issue46103] inspect.getmembers will call the instance __bases__ attribute, which may cause an exception

2021-12-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

PR edits inspect._getmembers. I nosied people who have edited it previously.

--
nosy: +ethan.furman, ping, pitrou, terry.reedy

___
Python tracker 

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



[issue46090] C extensions can't swap out live frames anymore

2021-12-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Relevant section:

 https://docs.python.org/3/c-api/init.html#non-python-created-threads

--

___
Python tracker 

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



[issue46090] C extensions can't swap out live frames anymore

2021-12-17 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

That is weird, but can happen for example if some pthread of some c extensión 
for example picks up the Gil, causing a new PyThreadState to be created and 
linked but has not called into Python yet.

Basically, an external native thread that calls 
PyGILState_Ensure leaves a thread state with these characteristics.

--

___
Python tracker 

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



[issue44896] AttributeError in ast.unparse

2021-12-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

#46073 may be a duplicate of this and perhaps should have the same resolution.

--
nosy: +terry.reedy

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


Terry J. Reedy  added the comment:

You might post on python-ideas list to get comments from other possible users.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue46044] Update distutils documentation to say PyPI only accepts tar.gz and zip.

2021-12-17 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset dbd1dc23f60a6883adf1d18e660f163fa76b8ba9 by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-46044: Annotate deprecated sdists formats (GH-30043) (#30154)
https://github.com/python/cpython/commit/dbd1dc23f60a6883adf1d18e660f163fa76b8ba9


--

___
Python tracker 

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



[issue46044] Update distutils documentation to say PyPI only accepts tar.gz and zip.

2021-12-17 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 8202a7e3dd55d551906390742fc748d0747256b8 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-46044: Annotate deprecated sdists formats (GH-30043) (GH-30155)
https://github.com/python/cpython/commit/8202a7e3dd55d551906390742fc748d0747256b8


--

___
Python tracker 

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



[issue46044] Update distutils documentation to say PyPI only accepts tar.gz and zip.

2021-12-17 Thread Brett Cannon


Brett Cannon  added the comment:

Nah, I don't think setuptools cares about this doc update.

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



[issue46090] C extensions can't swap out live frames anymore

2021-12-17 Thread Guido van Rossum


Guido van Rossum  added the comment:

A thread without a frame looks like a natural end case when you consider the 
frames as a linked list. Could it be that exec()/eval() run in the current 
frame, and if there isn't a frame, they refuse to run? (Sorry, I don't recall 
anything more specific without going hunting through old code.)

--

___
Python tracker 

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



[issue46118] Migrate importlib.resources into a package

2021-12-17 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Compatibility considerations: 

- importlib.readers and importlib.simple are public, so probably need aliases.
- Same abc classes.

Should we embark on an effort to migrate users to the new names in 
`importlib.resources`, or simply leave the `importlib.{mod}` names as 
preferred? My instinct is to do the former, mainly because then the names would 
be congruent between `importlib.resources` and `importlib_resources`. But I'm 
also reluctant to introduce a deprecation (even deferred) comparable to what 
happened with `collections.abc`.

--

___
Python tracker 

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



[issue46118] Migrate importlib.resources into a package

2021-12-17 Thread Jason R. Coombs


Change by Jason R. Coombs :


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

___
Python tracker 

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



[issue46092] Fix/update missing parameters in function signatures for Built-in Functions documentation.

2021-12-17 Thread Vivek Vashist


Vivek Vashist  added the comment:

Noticed that new removeprefix() and removesuffix() functions that were added in 
3.9 have slash notation added in Built-in Types document.

str.removeprefix(prefix, /)
str.removesuffix(suffix, /)

https://docs.python.org/3/library/stdtypes.html#str.removeprefix
https://docs.python.org/3/library/stdtypes.html#str.removesuffix

--

___
Python tracker 

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



[issue46109] Separate resources and abc docs from other importlib docs

2021-12-17 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I wonder if maybe it's more important to address issue46118 first.

--

___
Python tracker 

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



[issue46118] Migrate importlib.resources into a package

2021-12-17 Thread Jason R. Coombs


New submission from Jason R. Coombs :

The importlib.resources module has several modules on which it relies 
(_adapters, _legacy, simple) and some classes in other modules shared by other 
parts of importlib (namely abc).

Because these implementations overlap, it adds difficulty in maintaining the 
`importlib_resources` backport, which must maintain these modules but keep them 
separate from the unrelated functionality in other parts of importlib.

In an earlier refactoring, `importlib.metadata` was refactored into its own 
package (https://github.com/python/cpython/pull/25565). This refactoring had 
benefits of making it clearer which functionality of importlib was related to 
metadata and which was not.

I'd like to do the same for importlib.resources.

The main complicate

--
messages: 408815
nosy: jaraco
priority: normal
severity: normal
status: open
title: Migrate importlib.resources into a package
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



[issue46109] Separate resources and abc docs from other importlib docs

2021-12-17 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

My main motivation for moving `.abc` was because it contains classes 
exclusively relevant to `.resources` (those also present in 
`importlib_resources.abc`. I want to explore moving those classes to the 
resources documentation so they're available together and maintained 
independently.

Other classes in `.abc` are relevant to the import system more generally, so 
maybe should stay in the main docs.

--

___
Python tracker 

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



[issue20741] Documentation archives should be available also in tar.xz format

2021-12-17 Thread Éric Araujo

Éric Araujo  added the comment:

tar is modular and depends on optional external programs to handle compression 
(tar itself does archival only).

gzip is still common, and xz has largely replaced bz2 these days.
I would expect it to be installed on most systems.

(For HTTP compression there are new competitors, brotli and zstd, but I haven’t 
seen these used to compress files.)

--

___
Python tracker 

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



[issue20741] Documentation archives should be available also in tar.xz format

2021-12-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

https://docs.python.org/3/download.html says a) tar.bz2 can be read by the tar 
program, which I presume is true also of tar.xz.  So there is no issue of 
*needing* two separate programs.  It also claims "The .tar.bz2 archives provide 
the best compression and fastest download times."  This only need be true, if 
it is, for the doc formats, as opposed to python code.  In the absence of at 
least 2 requests from *nix consumers of the archives, why even think of 
changing?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue46117] tk could not refresh auto in mac os

2021-12-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

IDLE is neither the Python it is written it, nor the tkinter module it depends 
on.  For this tracker, this is at most a tkinter on macOS 12 issue.  But I 
suspect that it is an issue of the 3rd party tcl/tk on the new macOS version.  
There have been others.  Perhaps someone else can test on earlier macOS.  (I 
verified that the code works as intended on Win 10 with Tk 8.6.12.)

I am not sure of your intention in half-closing this issue.  But, does adding 
'root.update_idletasks()' to the end of 'change' make any difference?

--
assignee: terry.reedy -> 
components: +Tkinter, macOS -IDLE
nosy: +epaine, ned.deily, ronaldoussoren, serhiy.storchaka
status: pending -> open

___
Python tracker 

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



[issue46044] Update distutils documentation to say PyPI only accepts tar.gz and zip.

2021-12-17 Thread Éric Araujo

Éric Araujo  added the comment:

I am not sure if this sould also be reported to 
https://github.com/pypa/distutils/ because I don’t know if they build and 
publish the docs somewhere.

--
nosy: +eric.araujo
stage: patch review -> commit review
versions: +Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue46044] Update distutils documentation to say PyPI only accepts tar.gz and zip.

2021-12-17 Thread Matthias Bussonnier


Change by Matthias Bussonnier :


--
pull_requests: +28392
pull_request: https://github.com/python/cpython/pull/30171

___
Python tracker 

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



[issue46064] Permalinks to underscored documentation entries don't work.

2021-12-17 Thread Éric Araujo

Éric Araujo  added the comment:

I can reproduce.

Source code:


__debug__¶

HTML IDs should start with a letter, a rule which is generally ignored by 
browsers because of the amount of pages using numerical IDs for example.  I 
think the HTML5 spec does not require starting with a letter, but I haven’t 
found that stated clearly.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue46095] Warning about iterate/modify has unwarranted detail

2021-12-17 Thread Éric Araujo

Éric Araujo  added the comment:

The note does say it’s about mutable sequences like lists.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue17005] Add a topological sort algorithm

2021-12-17 Thread Éric Araujo

Éric Araujo  added the comment:

See https://bugs.python.org/issue46071 for request to change the API
(I preferred adding a note here than adding all people to nosy there)

--
nosy: +eric.araujo

___
Python tracker 

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



[issue46071] Graphlib documentation

2021-12-17 Thread Éric Araujo

Change by Éric Araujo :


--
assignee: docs@python -> 
components: +Library (Lib) -Documentation
nosy:  -docs@python
versions:  -Python 3.10, Python 3.9

___
Python tracker 

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



[issue46068] Change use of warnings.warn to logging.warning in a few places

2021-12-17 Thread Éric Araujo

Éric Araujo  added the comment:

To have a discussion about this, you should open a thread on discuss.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue20741] Documentation archives should be available also in tar.xz format

2021-12-17 Thread Éric Araujo

Éric Araujo  added the comment:

Oh to counter my own proposal: formats should not be removed without warnings, 
there are probably downstream tools that expect specific URL patterns and 
formats.  So adding something very modern to get the smallest size might be 
good, but not removing existing format without warning.

--

___
Python tracker 

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



[issue20741] Documentation archives should be available also in tar.xz format

2021-12-17 Thread Éric Araujo

Éric Araujo  added the comment:

I don’t think that consistency or standardization really applies here, it’s not 
like there are tools that want to process both source and doc archives and are 
broken by the difference in formats.

It could be useful to review the formats used and decide if they are still the 
best choices (maybe zip for universality, tar + modern and well-supported 
compression for size), but consistency for consistency’s sake is needless churn.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue46090] C extensions can't swap out live frames anymore

2021-12-17 Thread Brandt Bucher


Brandt Bucher  added the comment:

Also, it appears that in earlier versions of CPython, it was okay to set 
tstate->frame = NULL. Some of Greenlet's tests *seem* to be doing this 
(although it also possible that my current scaffolding has just broken 
Greenlet).

Does anybody know off the top of their head what it means to set a NULL frame? 
I can dig around through the old code and see what the interpreter does when 
that happens, but it seems pretty nonsensical to me. Is it something that only 
happens during interpreter/thread initialization/shutdown? Or maybe it keeps 
that thread from becoming active?

--

___
Python tracker 

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



[issue46090] C extensions can't swap out live frames anymore

2021-12-17 Thread Brandt Bucher


Brandt Bucher  added the comment:

I'm going to take a stab at making this work today. The idea is to do something 
like this when setting a new frame:

- Clear and pop tstate->cframe->current_frame and all of its linked 
predecessors.
  - These should all belong to the same CFrame, right?
- Push copies of the new InterpreterFrame and all of its predecessors (bottom 
to top, of course), and update all of the PyFrameObjects to point to the new 
copies.
  - I'm just going to assert(f->f_owns_frame) before copying each of these (and 
set it to 0, after). I don't think it could ever be valid to stick a new copy 
of an active frame onto the top of the stack?
- Set tstate->cframe->current_frame to the new, top InterpreterFrame.
  - If my understanding of the new CFrame mechanics is correct, I don't think 
we'd need to touch the C stack at all? Maybe I'm missing something, though... 
if we do need to change the size of the C stack, this whole thing becomes a 
*lot* more painful.

Anyone see any obvious flaws here? I'm new to a lot of this code, so any 
guidance would be appreciated.

--

___
Python tracker 

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



[issue45383] PyType_FromSpec API fails to use metaclass of bases

2021-12-17 Thread Sebastian Berg


Sebastian Berg  added the comment:

Btw. huge thanks for looking into this!  Let me know if I can try to help out 
(I can make due with static metatypes, but my story seems much clearer if I 
could say: Well with Py 3.11 you can, and probably should, do it dynamically.). 
 I had lost a lot of time chasing "metaclass should just work" followed by "but 
I can't get it right without bad hacks".

And now the solution seems fairly clear, which is amazing :)!

--

___
Python tracker 

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



[issue45995] string formatting: normalize negative zero

2021-12-17 Thread Mark Dickinson


Mark Dickinson  added the comment:

Thanks, John. I should have time to review within the next week or so.

--

___
Python tracker 

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



[issue45995] string formatting: normalize negative zero

2021-12-17 Thread Mark Dickinson


Change by Mark Dickinson :


--
assignee:  -> mark.dickinson

___
Python tracker 

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



[issue46109] Separate resources and abc docs from other importlib docs

2021-12-17 Thread Eric Snow


Eric Snow  added the comment:

FWIW, one benefit to having everything in one doc (instead of one doc per 
submodule) is that it's a little easier to see the bigger picture.  This is 
particularly important for folks interested in customizing the import system 
(rather than just interacting with it).

However, they would probably be better served by an explicit section on how to 
customize the import system.  The language reference provides the info but its 
focus is to specify rather than to guide.  So it may make sense to have a 
dedicated section to at least cover the supported customization approaches (at 
a high level).

This would definitely be covered by a separate issue but it makes less sense if 
we don't move the submodules to their own docs.

--

___
Python tracker 

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



[issue46109] Separate resources and abc docs from other importlib docs

2021-12-17 Thread Eric Snow


Eric Snow  added the comment:

+1 to splitting out the importlib.resources docs

I'm mostly +1 for splitting out the others (.abc, .machinery, .util) too, not 
just .abc.

Regardless, a ToC at the top of the main page which identifies the submodules 
(and provides a brief summary for each) would be extra helpful.  I suppose that 
could be helpful regardless of whether or not we move submodule docs out.

--
nosy: +eric.snow

___
Python tracker 

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



[issue45383] PyType_FromSpec API fails to use metaclass of bases

2021-12-17 Thread Sebastian Berg


Sebastian Berg  added the comment:

Well, what we need is a way to say: I am calling `type.__new__` (i.e. 
PyType_FromSpec) on purpose from (effectively) my own `mytype.__new__`?

That is, because right now I assume we want to protect users from calling 
PyType_FromSpec thinking that it is equivalent to calling `class new(base)` 
when it may not be if base is a metaclass.  So calling `PyType_FromSpec` might 
refuse to work if it finds a custom `metaclass.__new__` (init?).

I don't really see that it matters if we only support effectively this from C:
```
class MyMetaClass(type):
def __new__(cls, *args, **kwargs):
self = type.__new__(...)  # this is PyType_FromSpec
# more stuff
```
So, I thought telling `PyType_FromSpec` that we are "inside" a custom `__new__` 
is sufficient and that even as a flag passed as part of the spec could be 
enough.
But... I agree that I do not quite see that it would be pretty, so it probably 
was a bad idea :).

Plus, if you add a new method it should also solves the issue of setting the 
`tp_type` slot to the metaclass explicitly when it is not implicit by 
inheritance (which is the only thing I care about).
(PyType_FromSpec and PyType_ApplySpec will still need to do the work of 
resolving the metaclass from the base classes, though.)

--

___
Python tracker 

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



[issue41033] readline.c: endless loop on SIGWINCH when loaded twice

2021-12-17 Thread daniel hahler


Change by daniel hahler :


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



[issue41033] readline.c: endless loop on SIGWINCH when loaded twice

2021-12-17 Thread daniel hahler


daniel hahler  added the comment:

Yes, the example also does not segfault for me either (also with Python 3.8.12 
I have now as `python3.8`), so this was likely only happening in the more 
complex setup, and/or maybe with some specific version of readline back then.

--
title: readline.c: SEGFAULT on SIGWINCH when loaded twice -> readline.c: 
endless loop on SIGWINCH when loaded twice

___
Python tracker 

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



[issue40915] multiple problems with mmap.resize() in Windows

2021-12-17 Thread neonene


Change by neonene :


--
nosy: +neonene
nosy_count: 6.0 -> 7.0
pull_requests: +28391
pull_request: https://github.com/python/cpython/pull/30175

___
Python tracker 

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



[issue46114] OpenSSL 3.0 uses different version scheme

2021-12-17 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset a9b3edb66f2976a5895b6399ee905ac2f27718ac by Christian Heimes in 
branch '3.9':
[3.9] bpo-46114: Fix OpenSSL version check for 3.0.1 (GH-30170) (GH-30173)
https://github.com/python/cpython/commit/a9b3edb66f2976a5895b6399ee905ac2f27718ac


--

___
Python tracker 

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



[issue23522] Misleading note in Statistics module documentation

2021-12-17 Thread Mark Dickinson


Mark Dickinson  added the comment:

Steven: I've made a PR at https://github.com/python/cpython/pull/30174. Does 
this match what you had in mind?

--

___
Python tracker 

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



[issue23522] Misleading note in Statistics module documentation

2021-12-17 Thread Mark Dickinson


Change by Mark Dickinson :


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

___
Python tracker 

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



[issue45383] PyType_FromSpec API fails to use metaclass of bases

2021-12-17 Thread Petr Viktorin


Petr Viktorin  added the comment:

Nice! It's starting to look reasonable, I'll try an implementation when I get 
some focus time. (Sadly I can't promise it'll be this year.)

Just one detail:

> A flag probably can do the same.  I have no preference, `ApplySpec` seems 
> great to me.

I didn't get what you mean here.

--

___
Python tracker 

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



[issue46114] OpenSSL 3.0 uses different version scheme

2021-12-17 Thread miss-islington


miss-islington  added the comment:


New changeset 251d2eadc7f5b4042245709f41c38169a284e146 by Miss Islington (bot) 
in branch '3.10':
bpo-46114: Fix OpenSSL version check for 3.0.1 (GH-30170)
https://github.com/python/cpython/commit/251d2eadc7f5b4042245709f41c38169a284e146


--

___
Python tracker 

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



[issue45383] PyType_FromSpec API fails to use metaclass of bases

2021-12-17 Thread Sebastian Berg


Sebastian Berg  added the comment:

Fully, agree!  In the end, `PyType_FromSpec` replaces `type.__new__()` (and 
init I guess) when working in C.  In Python, we would call `type.__new__` 
(maybe via super) from the `metatype.__new__`, but right now, in C, the 
metatype cannot reliably use `PyType_FromSpec` in its own `metatype.__new__` to 
do the same.

I agree with the scenarios:
* If we do not have a custom `metatype.__new__` (init?) then `PyType_FromSpec` 
should have no reason to refuse doing the work, because nothing can go wrong.
* If we do have a custom `tp_new` the user has to provide C API to create the 
metaclass instance.  But they still need a way to call `type.__new__` in C 
(i.e. get what `PyType_FromSpec` does, and promising to do the rest).

`PyType_ApplySpec` would provide that way to create a custom `metatype.__new__` 
in C when `PyType_FromSpec()` would otherwise reject it to make the first 
scenario safe.
A flag probably can do the same.  I have no preference, `ApplySpec` seems great 
to me.

--

___
Python tracker 

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



[issue46114] OpenSSL 3.0 uses different version scheme

2021-12-17 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +28389
pull_request: https://github.com/python/cpython/pull/30173

___
Python tracker 

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



[issue45383] PyType_FromSpec API fails to use metaclass of bases

2021-12-17 Thread Petr Viktorin


Petr Viktorin  added the comment:

I don't see how instantiating a metaclass with non-default tp_new would work if 
you don't know some details about the specific metaclass. So IMO we can we 
limit ourselves to scenarios where either:
1) the metaclass uses default tp_new, or
2) the code that creates the class knows about the metaclass

For case 2), we could leave allocation to the calling code, and add an API 
function that does the rest of the work of applying the spec. Something like:

/* Create a metaclass */
metatype_spec = {stuff};
metatype = PyType_FromSpecAndBases(&metatype_spec, &PyType_Type);
/* Create a type */
type_spec = {other_stuff};
newtype = alloc_metatype();
PyType_ApplySpec(newtype, &type_spec);

PyType_ApplySpec would assert PyType_Ready wasn't called before, and call it 
after filling in the name, slots, etc.
The metatype could disable its tp_new to disallow PyType_FromSpec (and Python 
__new__), effectively enforcing "using_metaclass_cinit_pretty_promise_please".

There could be a slot for code to run at the end of PyType_ApplySpec -- the 
"PyArray_InitDTypeFromSpec" in your pseudocode.


That seems better than calling the metaclass, but to answer questions on that 
idea:

>> - basicsize/itemsize could be allowed with __basicsize__/__itemsize__ in the 
>> dict.
>Do we need this?  I need the basicsize of the metaclass, but that of the class 
>seems fixed/OK?

That's the size of the instance. One more level down :)

>> - members could theoretically be copied to individual descriptors; there 
>> doesn't seem much need for keeping tp_members around.
> But a Python MetaClass (that the author may not even realize about) might 
> need access to these to work properly?
> A bit far fetched, but...

Seems very far-fetched to me. IMO these, like e.g. tp_methods, should only be 
used as arguments for the code that puts the descriptors in __dict__. How the 
descriptors got there is a detail, the class doesn't need to use tp_members 
(nor advertise that it does).

--

___
Python tracker 

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



[issue44035] Regenerating the configure script fails even if dependencies are satisfied

2021-12-17 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset da8cf8a74714f4cc34fb768345cb1caf9dcddd62 by Christian Heimes in 
branch 'main':
bpo-44035: Show git diff after autoreconf and regen (GH-30117)
https://github.com/python/cpython/commit/da8cf8a74714f4cc34fb768345cb1caf9dcddd62


--

___
Python tracker 

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



[issue46114] OpenSSL 3.0 uses different version scheme

2021-12-17 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue46114] OpenSSL 3.0 uses different version scheme

2021-12-17 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 2985feac4e02d590bb78bcce9e30864be53280ac by Christian Heimes in 
branch 'main':
bpo-46114: Fix OpenSSL version check for 3.0.1 (GH-30170)
https://github.com/python/cpython/commit/2985feac4e02d590bb78bcce9e30864be53280ac


--

___
Python tracker 

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



[issue46072] Unify handling of stats in the CPython VM

2021-12-17 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset efd6236d36b292c2c43540132c87cf8425e8d627 by Mark Shannon in 
branch 'main':
bpo-46072:  Add top level stats struct (GH-30169)
https://github.com/python/cpython/commit/efd6236d36b292c2c43540132c87cf8425e8d627


--

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-12-17 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 396b58345f81d4c8c5a52546d2288e666a1b9b8b by Irit Katriel in 
branch 'main':
bpo-45711: Remove type and traceback from exc_info (GH-30122)
https://github.com/python/cpython/commit/396b58345f81d4c8c5a52546d2288e666a1b9b8b


--

___
Python tracker 

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



[issue46117] tk could not refresh auto in mac os

2021-12-17 Thread asper


asper  added the comment:

sorry, I update mac os to 12.1, when press "change" button, this simple sample 
can refresh the label'text, but have a delay. when I use grid_remove() and 
grid() to switch two frame, it cannot refresh auto, must move the mouse can 
refresh.

--
status: open -> pending

___
Python tracker 

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



[issue46116] _asyncio_backend.py datagram_received doesn't handle Future cancelled, throws Exception

2021-12-17 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

dns package is not a part of Python standard library.

Please file a bug in https://github.com/rthalley/dnspython/issues bugtracker.

P.S.
The fix is pretty straightforward:
if not fut.done():
fut.set_result(...)

--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue46110] `eval("-"*3000000 + "4")` in cmd causes hard crash

2021-12-17 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

https://bugs.python.org/issue42609 too

--

___
Python tracker 

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



[issue22047] Deprecate unsupported nesting of argparse groups

2021-12-17 Thread Irit Katriel


Irit Katriel  added the comment:

_MutuallyExclusiveGroup inherits add_argument_group from _ArgumentGroup.

--

___
Python tracker 

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



[issue46110] `eval("-"*3000000 + "4")` in cmd causes hard crash

2021-12-17 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

See also https://bugs.python.org/issue32758

--
nosy: +serhiy.storchaka, xtreak

___
Python tracker 

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



[issue46117] tk could not refresh auto in mac os

2021-12-17 Thread asper


New submission from asper :

from tkinter import *
from tkinter import ttk


def change():
global flag
if flag == 1:
namelbl.grid_remove()
namelbl2.grid(column=0, row=0)
entry2.grid(column=1, row=0, sticky=(W, E))
flag = 2
elif flag == 2:
namelbl2.grid_remove()
namelbl.grid()
flag = 1


root = Tk()
root.columnconfigure(1, weight=1)

namelbl = ttk.Label(root, text="Name")
namelbl2 = ttk.Label(root, text="Name2")
entry1 = ttk.Entry(root)
entry2 = ttk.Entry(root)

ok = ttk.Button(root, text="change", command=change)
ok.grid(column=1, row=1)
namelbl.grid(column=0, row=0)
entry1.grid(column=1, row=0, sticky=(W, E))
flag = 1

root.mainloop()

I run the script in mac os 12.1, use python3.10 download from python.org. when 
the main window show, I change it's size, and press the   "change" button, the 
script change the label'text from "Name" to "Name2".When press the button 
again, the label'text from "Name2" to "Name". but the label cannot refresh the 
text, it show nothing. when I move the mouse, the text showed immediately. 
The script run normally on windows system.
I use the grid_remove() and grid() to switch frame.

--
assignee: terry.reedy
components: IDLE
messages: 408780
nosy: asper, terry.reedy
priority: normal
severity: normal
status: open
title: tk could not refresh auto in mac os
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue46114] OpenSSL 3.0 uses different version scheme

2021-12-17 Thread Christian Heimes


Christian Heimes  added the comment:

FYI, OpenSSL_version_num() is not deprecated and Python does not fail to build 
with OpenSSL 3.0.1. One test case is failing because OpenSSL 3 changed the 
version scheme slightly.

--
title: OpenSSL deprecated OpenSSL_version_num() since version 3.0.0 -> OpenSSL 
3.0 uses different version scheme

___
Python tracker 

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



[issue46116] _asyncio_backend.py datagram_received doesn't handle Future cancelled, throws Exception

2021-12-17 Thread James Lawrie


New submission from James Lawrie :

The datagram_received:

def datagram_received(self, data, addr):
if self.recvfrom:
self.recvfrom.set_result((data, addr))
self.recvfrom = None

Throws an exception if self.recvfrom is a Future Cancelled:

Exception in callback _SelectorDatagramTransport._read_ready()
handle: 
Traceback (most recent call last):
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
  File "/usr/lib/python3.8/asyncio/selector_events.py", line 1021, in 
_read_ready
self._protocol.datagram_received(data, addr)
  File "/usr/local/lib/python3.8/dist-packages/dns/_asyncio_backend.py", line 
30, in datagram_received
self.recvfrom.set_result((data, addr))
asyncio.exceptions.InvalidStateError: invalid state

In my test code (attached), this wasn't caught in a try: catch:

--
components: asyncio
files: asynctest.py
messages: 408778
nosy: asvetlov, james2, yselivanov
priority: normal
severity: normal
status: open
title: _asyncio_backend.py datagram_received doesn't handle Future cancelled, 
throws Exception
versions: Python 3.8
Added file: https://bugs.python.org/file50500/asynctest.py

___
Python tracker 

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



[issue42738] subprocess: don't close all file descriptors by default (close_fds=False)

2021-12-17 Thread Cristian Rodriguez


Cristian Rodriguez  added the comment:

My 2 CLP.
On linux/glibc you do not have to do this, there is a 
posix_spawn_file_actions_addclosefrom_np action which is implemented using  
close_range(2) which will give you the fastest way to this job without hassle.

for the not posix_spawn case, interate over /proc/self/fd and set the CLOEXEC 
flag using fcntl.. if close_Range is not available or returns returns different 
than 0

--
nosy: +judas.iscariote

___
Python tracker 

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



[issue46114] OpenSSL deprecated OpenSSL_version_num() since version 3.0.0

2021-12-17 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue46072] Unify handling of stats in the CPython VM

2021-12-17 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +28386
pull_request: https://github.com/python/cpython/pull/30169

___
Python tracker 

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



[issue46114] OpenSSL deprecated OpenSSL_version_num() since version 3.0.0

2021-12-17 Thread Christian Heimes


Change by Christian Heimes :


--
assignee: christian.heimes -> 
components: +Tests
stage:  -> needs patch
type:  -> behavior
versions:  -Python 3.8

___
Python tracker 

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



[issue46114] OpenSSL deprecated OpenSSL_version_num() since version 3.0.0

2021-12-17 Thread Christian Heimes


Christian Heimes  added the comment:

The test case does not work for OpenSSL >= 3.0.1. The test assumes that the 
version starts with M.NN.FF, but OpenSSL 3 uses M.NN.PP. The FF (fix) part is 
always 00. The issue didn't show up before because fix and patch level were 0 
for 3.0.0 alphas and betas.

--

___
Python tracker 

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



[issue46110] `eval("-"*3000000 + "4")` in cmd causes hard crash

2021-12-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal

___
Python tracker 

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



[issue46108] Enum repr() incorrect when mixed with non-__new__ data types

2021-12-17 Thread Ethan Furman


Ethan Furman  added the comment:

Thanks, test added.  I also updated the title.

Code updated to treat any __repr__s as affecting the display of the member 
value instead of the member itself (i.e. the "<...: %r>" portion).  if a user 
actually wants to change the member repr they can assign it when creating the 
Enum:

class Entries(Foo, Enum):
ENTRY = 1
__repr__ = Foo.__repr__

assert repr(Entries.ENTRY1) == 'Entries(a=1)'

--
title: Enum repr() incorrect when mixed with dataclasses -> Enum repr() 
incorrect when mixed with non-__new__ data types

___
Python tracker 

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



[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

2021-12-17 Thread Kumar Aditya


Change by Kumar Aditya :


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

___
Python tracker 

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



[issue45755] Specialized generic class does not return class attributes in dir

2021-12-17 Thread miss-islington


miss-islington  added the comment:


New changeset 87539cc716fab47cd4f501f2441c4ab8e80bce6f by Miss Islington (bot) 
in branch '3.10':
bpo-45755: [typing] Reveal class attributes of generic in generic aliases in 
`dir()` (GH-29962)
https://github.com/python/cpython/commit/87539cc716fab47cd4f501f2441c4ab8e80bce6f


--

___
Python tracker 

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



[issue46114] OpenSSL deprecated OpenSSL_version_num() since version 3.0.0

2021-12-17 Thread Alexey Stepanov


Alexey Stepanov  added the comment:

Error example:
test_ssl: testing with 'OpenSSL 3.0.1 14 Dec 2021' (3, 0, 0, 1, 0)
...
AssertionError: False is not true : ('OpenSSL 3.0.1 14 Dec 2021', (3, 0, 0, 1, 
0), '0x3010')

--

___
Python tracker 

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



[issue46115] Interrupting subprocess.popen in recursive calls by KeyboardInterrupt causes Fatal Python error.

2021-12-17 Thread Xinmeng Xia


New submission from Xinmeng Xia :

Popen works when stdio fds are available. However, when interrupting popen in a 
recursive function call. The Python interpreter reports a Fatal Python error.

test.py

import subprocess
import os
import sys


def test_small_errpipe_write_fd():
new_stdout = os.dup(1)
try:
os.close(1)
subprocess.Popen([sys.executable, '-c', 
"print('AssertionError:0:CLOEXEC failure.')"]).wait()
finally:
os.dup2(new_stdout, 0)
os.dup2(new_stdout, 1)
test_small_errpipe_write_fd()

test_small_errpipe_write_fd()
===

Reported message:
-
xxm@xxm:~$ 'cpython-main/python' '/home/xxm/Desktop/test/test.py' 
^CFatal Python error: init_import_site: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
  File "/home/xxm/Desktop/compilers/cpython-main/Lib/site.py", line 73, in 

import os
^
  File "/home/xxm/Desktop/compilers/cpython-main/Lib/os.py", line 29, in 

from _collections_abc import _check_methods
^^^
  File "/home/xxm/Desktop/compilers/cpython-main/Lib/_collections_abc.py", line 
1015, in 
class Sequence(Reversible, Collection):
^^^
  File "/home/xxm/Desktop/compilers/cpython-main/Lib/abc.py", line 106, in 
__new__
cls = super().__new__(mcls, name, bases, namespace, **kwargs)
  ^^^
KeyboardInterrupt
---

Reproduce step:
1. run test.py in the console
2. use "Ctrl C" to interrupt the program

If typing a "Ctrl C", the program does not stop and no error is reported. Just 
type "Ctrl C" constantly. Sometimes, it need 5 or 6 "Ctrl C" to reproduce this 
bug. 



verson of Python: Python 3.11.0a2+ (main, Nov 26 2021, 18:38:48) [GCC 7.5.0] on 
linux (it also crashes Python 3.6.15, 3.7.12,3.8.12)

--
components: Interpreter Core
messages: 408772
nosy: xxm
priority: normal
severity: normal
status: open
title: Interrupting subprocess.popen in recursive calls by KeyboardInterrupt 
causes Fatal Python error.
type: crash
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



[issue32339] Make the dict type used in csv.DictReader configurable

2021-12-17 Thread AnLong


AnLong  added the comment:

As https://github.com/python/cpython/pull/4904 is closed now, I think this 
issue should be closed now?

--
nosy: +asaka

___
Python tracker 

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



[issue46114] OpenSSL deprecated OpenSSL_version_num() since version 3.0.0

2021-12-17 Thread Alexey Stepanov


New submission from Alexey Stepanov :

Documentation: 
https://www.openssl.org/docs/manmaster/man3/OpenSSL_version_num.html

Python build fail with OpenSSL 3.0.1
(looks like OpenSSL broken deprecated API)

--
assignee: christian.heimes
components: SSL
messages: 408770
nosy: christian.heimes, penguinolog
priority: normal
severity: normal
status: open
title: OpenSSL deprecated OpenSSL_version_num() since version 3.0.0
versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9

___
Python tracker 

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



[issue46112] PEP 8 code format

2021-12-17 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

> not complied with the PEP-8 formatting.

PEP 8 says:

"Some other good reasons to ignore a particular guideline:

3. Because the code in question predates the introduction of the guideline and 
there is no other reason to be modifying that code."

So PEP 8 itself tells us that legacy code that ignores the style guidelines is 
already compliant with PEP 8.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-12-17 Thread Stefan Behnel


Stefan Behnel  added the comment:

FYI, we track the Cython side of this in
https://github.com/cython/cython/issues/4500

--

___
Python tracker 

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



[issue46113] Typos and minor fixes in built in types documentation

2021-12-17 Thread Vivek Vashist


Vivek Vashist  added the comment:

PR: https://github.com/python/cpython/pull/30167

Fix#1 - isidentifier() function output
Fix#2 Update the str.splitlines() function parameter
Fix#3 Removed unwanted full stop for str and bytes types double quotes examples 
Fix#4 Updated class dict from **kwarg to **kwargs

--

___
Python tracker 

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



[issue46113] Typos and minor fixes in built in types documentation

2021-12-17 Thread Vivek Vashist


Change by Vivek Vashist :


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

___
Python tracker 

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



[issue46113] Typos and minor fixes in built in types documentation

2021-12-17 Thread Vivek Vashist


New submission from Vivek Vashist :

Will raise a PR shortly.

--
assignee: docs@python
components: Documentation
messages: 408766
nosy: docs@python, vivekvashist
priority: normal
severity: normal
status: open
title: Typos and minor fixes in built in types documentation
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



[issue22047] Deprecate unsupported nesting of argparse groups

2021-12-17 Thread László Attila Tóth

László Attila Tóth  added the comment:

Hi, according to the group update the _MutuallyExclusiveGroup should have an 
add_argument_group() call with the deprecation warning, but that method is 
missing in commit 30322c497e0b8d978f7a0de95985aac9c5daf1ac.

--
nosy: +Laszlo.Attila.Toth

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-12-17 Thread Stefan Behnel


Change by Stefan Behnel :


--
nosy: +scoder

___
Python tracker 

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



[issue46111] test_unittest fails in optimized mode

2021-12-17 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue45755] Specialized generic class does not return class attributes in dir

2021-12-17 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue46111] test_unittest fails in optimized mode

2021-12-17 Thread miss-islington


miss-islington  added the comment:


New changeset 72225b5bdf5d2c70307dbad0d3a1caa39c95a22a by Miss Islington (bot) 
in branch '3.9':
bpo-46111: Fix unittest tests in optimized mode (GH-30163)
https://github.com/python/cpython/commit/72225b5bdf5d2c70307dbad0d3a1caa39c95a22a


--

___
Python tracker 

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



[issue46112] PEP 8 code format

2021-12-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PEP 8 is a guide for writing new code. It does not require rewriting the old 
code. In fact, patches with mass reformatting of the stdlib code have always 
been rejected.

--
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



  1   2   >