[issue45155] Add default arguments for int.to_bytes()

2021-09-14 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

"big" by default

--

___
Python tracker 

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



[issue45200] test_multiprocessing_fork failws with timeout

2021-09-14 Thread Terry J. Reedy


Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue45200] test_multiprocessing_fork failws with timeout

2021-09-14 Thread Terry J. Reedy


New submission from Terry J. Reedy :

https://github.com/python/cpython/pull/28344/checks?check_run_id=3605759743
All tests pass until test_multiprocessing_fork timed out after 25 min.  On the 
rerun: refail with timeout.

test_get (test.test_multiprocessing_fork.WithProcessesTestQueue) ... Timeout 
(0:20:00)!
Thread 0x7f176a71ebc0 (most recent call first):
  File "/home/runner/work/cpython/cpython/Lib/multiprocessing/synchronize.py", 
line 261 in wait
  File "/home/runner/work/cpython/cpython/Lib/multiprocessing/synchronize.py", 
line 349 in wait
  File "/home/runner/work/cpython/cpython/Lib/test/_test_multiprocessing.py", 
line 1001 in test_get
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 549 in 
_callTestMethod
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 593 in run
  File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 652 in 
__call__
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 122 in 
run
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 122 in 
run
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 122 in 
run
  File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/runner/work/cpython/cpython/Lib/unittest/runner.py", line 206 in 
run
  File "/home/runner/work/cpython/cpython/Lib/test/support/__init__.py", line 
998 in _run_suite
  File "/home/runner/work/cpython/cpython/Lib/test/support/__init__.py", line 
1124 in run_unittest
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/runtest.py", 
line 261 in _test_module
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/runtest.py", 
line 297 in _runtest_inner2
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/runtest.py", 
line 340 in _runtest_inner
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/runtest.py", 
line 215 in _runtest
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/runtest.py", 
line 245 in runtest
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/main.py", line 
337 in rerun_failed_tests
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/main.py", line 
715 in _main
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/main.py", line 
658 in main
  File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/main.py", line 
736 in main
  File "/home/runner/work/cpython/cpython/Lib/test/__main__.py", line 2 in 

  File "/home/runner/work/cpython/cpython/Lib/runpy.py", line 86 in _run_code
  File "/home/runner/work/cpython/cpython/Lib/runpy.py", line 196 in 
_run_module_as_main

--
components: Library (Lib), Tests
messages: 401808
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: test_multiprocessing_fork failws with timeout
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



[issue45197] IDLE should suppress ValueError for list.remove()

2021-09-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The offending function is

def event_delete(self, virtual, *sequences):
if virtual not in self.__eventinfo:
return
func, triplets = self.__eventinfo[virtual]
for seq in sequences:
triplet = _parse_sequence(seq)
if triplet is None:
#print("Tkinter event_delete: %s" % seq, 
file=sys.__stderr__)
widget.event_delete(self, virtual, seq)
else:
if func is not None:
self.__binders[triplet[1]].unbind(triplet, func)
triplets.remove(triplet)

The triplets collection is part of *virtual* whereas each triplet is derived 
from a member of sequences. 
The discrepancy seems to be extremely rare.  I will catch the exception until 
such time as I see a plausible, reproducible, and testable reason.

--

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


Change by Terry J. Reedy :


--
nosy: +terry.reedy
nosy_count: 14.0 -> 15.0
pull_requests: +26756
pull_request: https://github.com/python/cpython/pull/28344

___
Python tracker 

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



[issue45189] Drop the "list_frozen" command from _test_embed.

2021-09-14 Thread Eric Snow


Eric Snow  added the comment:

Yeah, sorry, I got the PRs mixed up.  I added it in 
https://github.com/python/cpython/pull/28320.

_imp._get_frozen_module_names() should work just fine.

--

___
Python tracker 

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



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-14 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +26755
pull_request: https://github.com/python/cpython/pull/28343

___
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-09-14 Thread Eric Snow


Eric Snow  added the comment:


New changeset a65c86889e208dddb26a7ebe7840c24edbcca775 by Eric Snow in branch 
'main':
bpo-45020: Add -X frozen_modules=[on|off] to explicitly control use of frozen 
modules. (gh-28320)
https://github.com/python/cpython/commit/a65c86889e208dddb26a7ebe7840c24edbcca775


--

___
Python tracker 

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



[issue40128] IDLE Show completions pop-up not working on macOS

2021-09-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Pablo, sorry I was not clear. PR_26684 and the line it added, having been 
merged last June, are already in the 3.10.0rc2 release.  What I want to do 
immediately is disable the line with a '#'.  I just posted an explanation on 
#34193.  I am about to make a new PR to do so, and once it is merged and 
backported to 3.10 (but not 3.9), I will ask you to cherrypick it into the 
release branch.

--
priority: release blocker -> normal

___
Python tracker 

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



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I will just mention here that winconfig_event also calls update_idletasks, in 
what should be the proper place, and I think that the second call was only 
needed for mac tk 8.6.8 because of the unique-to-IDLE behavior I want to 
delete.  I suspect that if we create the popup the same way we do with the 
others, we will not need the second call even on 8.6.8.  But making sure 3.10.0 
works comes first.

--

___
Python tracker 

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



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

In msg401744 I suggested any of the following for the upcoming 3.10.0 release.

1. Remove the new line.
2. Disable the line by adding '#'.
3. Make it conditional on macOS and 8.6.8.

Thinking more, I am rejecting 3. because the line is not needed for IDLE and tk 
as installed by our macOS.  As things stand now, I an only willing to support 
IDLE with the tk we install.  But I will go with option 2 so that if someone 
tries to run IDLE with a different tk, and the line is needed, they only need 
to remove the '#'.

A version of 3. is needed for 3.9 but this needs more data and discussion.  In 
looking at your no-issue PR_28332, I realized that I would rather make a more 
extensive change than to patch a badly written function for at least the fourth 
time.  I will open an issue for that PR and explain later.

--
nosy: +lukasz.langa, ned.deily, pablogsal
priority: normal -> release blocker

___
Python tracker 

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



[issue45199] IDLE: document search (find) and replace better

2021-09-14 Thread Terry J. Reedy


New submission from Terry J. Reedy :

The doc currently just says that the Search, File Search, and Search 
dialogs exist for the corresponding menu entries.
  Add a short section in "Editing and navigation" to say more.

1. Any selection becomes search target, except that S is buggy.
2. Search is only within lines.  .* and \n do not match \n even with RE.
3. [x]RE uses Python re module, not tcl re.  It applies to replace also.  So if 
target RE has capture groups, \1 (and \gname? test) in replacement 
works.(match.expand(repl))
4. Refer to re chapter and RegularExpression HOWTO.

--
assignee: terry.reedy
components: IDLE
messages: 401801
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: document search (find) and replace better
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



[issue43574] Regression in overallocation for literal list initialization in v3.9+

2021-09-14 Thread Kevin Mills


Change by Kevin Mills :


--
nosy: +Zeturic

___
Python tracker 

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



[issue45027] Allow basicConfig to configure any logger, not just root

2021-09-14 Thread Greg Werbin


Greg Werbin  added the comment:

Hi, thanks for the comment.

> First of all, library developers should not be configuring loggers at all, 
> other than adding a NullHandler to their top-level logger.

This is true, and I agree. I am not expecting people to start using 
basicConfig() inside their libraries.

> Secondly, it is fine to configure the root logger and then log to any other 
> logger. The default mechanisms mean that handlers added to the root logger 
> are used by loggers which are anywhere in the logger hierarchy. So users that 
> are using basicConfig() but other loggers than the root logger may be using 
> the system as designed.

This change serves the purpose of making it easier to configure non-root 
loggers. Library developers often add logging to their libraries, expecting 
that end users will never see those log messages. However, if you configure the 
root logger in your application, you will see those log messages. This change 
is intended to let users more easily configure the specific loggers that they 
want to configure, without also getting a lot of extraneous output from loggers 
that they don't care about.

I have seen experienced Python developers misunderstand how this works, and go 
through all kinds of ugly contortions (setting filters on handlers, etc.) to 
avoid the boilerplate of instantiating Handler and Formatter objects.

> Thirdly, logging.config.dictConfig() allows usage of a dictionary to 
> configure multiple loggers, handlers etc. all at once, for use cases which 
> are more demanding than basicConfig(). It doesn't make sense to do what 
> you're proposing, since it appears to offer a different way of configuring 
> other loggers than the root logger, when dictConfig() already offers that.

Good point. I am proposing an alternative interface to the functionality 
provided by dictConfig().

I would frame this proposal as a third configuration option, with complexity 
somewhere between the current basicConfig() and dictConfig().

Also, using the kwarg means better support for IDE tab-completion and type 
checking, and another opportunity for discoverability in the docs.

On that note, it would be nice to adjust the type stubs for dictConfig() to use 
a TypedDict with types corresponding to the "dictionary configuration schema" 
(https://docs.python.org/3/library/logging.config.html#logging-config-dictschema)
 instead of Any (see 
https://github.com/python/typeshed/blob/ee48730/stdlib/logging/config.pyi#L22). 
But that's a separate change. I'm happy to make a PR to Typeshed for it, though!

Regardless of whether this change is accepted, I also think there should be a 
note about dictConfig() in the docs for basicConfig(): 
https://docs.python.org/3/library/logging.html#logging.basicConfig. I believe a 
lot of users simply don't know about the "low-boilerplate" options for logging 
configuration in Python, so they either don't do it right or don't do it at all 
and use print(). Both are bad outcomes. Again, I'm happy to make a separate PR 
for that change.

--

___
Python tracker 

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



[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-09-14 Thread Guido van Rossum


Change by Guido van Rossum :


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



[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-09-14 Thread Jarry Shaw


Jarry Shaw  added the comment:

Apparently static checkers like mypy doesn't rely on the 
`typing.get_type_hints` function to implement its type checking functions (as I 
had browsed through the code repo).

$ cat test.py
def foo(arg) -> ' str': ...
$ mypy test.py
Success: no issues found in 1 source file

If type checkers *think* this is acceptable, but the standard library doesn't, 
this can be some sort of inconsistency in my perspective.

As Saiyang Gou had suggested, I would rather prefer to change the behaviour of 
`compile` in `eval` mode to preserve the internal consistency of builtin 
functions and therefore to eliminate this *buggy* behaviour of 
`typing.get_type_hints`.

--

___
Python tracker 

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



[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-09-14 Thread Benjamin Szőke

Change by Benjamin Szőke :


--
pull_requests: +26754
pull_request: https://github.com/python/cpython/pull/28341

___
Python tracker 

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



[issue4356] Add "key" argument to "bisect" module functions

2021-09-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset dda5ff2d095c795f00afaa64505069a2409f6099 by Miss Islington (bot) 
in branch '3.10':
bpo-4356: Mention the new key arguments for the bisect module APIs in the 3.10 
What's new (GH-28339) (GH-28340)
https://github.com/python/cpython/commit/dda5ff2d095c795f00afaa64505069a2409f6099


--

___
Python tracker 

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



[issue40128] IDLE Show completions pop-up not working on macOS

2021-09-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Pablo, I'm not sure what you cherry-picked,

I cherry-picked https://github.com/python/cpython/pull/26684

but this can be easily undone as this is cherry-picked to the 3.10.0 release 
branch that I have much more control upon.

What would you prefer me to do: undo the cherry-picking or wait for 
https://github.com/python/cpython/pull/28328/files ?

Notice that this would need to be done ASAP if you want it to be in 3.10.0, 
otherwise will have to wait until 3.10.1

--

___
Python tracker 

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



[issue4356] Add "key" argument to "bisect" module functions

2021-09-14 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 21.0 -> 22.0
pull_requests: +26753
pull_request: https://github.com/python/cpython/pull/28340

___
Python tracker 

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



[issue4356] Add "key" argument to "bisect" module functions

2021-09-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 1aaa85949717e4ab2ed700e58762f0a3ce049a37 by Pablo Galindo Salgado 
in branch 'main':
bpo-4356: Mention the new key arguments for the bisect module APIs in the 3.10 
What's new (GH-28339)
https://github.com/python/cpython/commit/1aaa85949717e4ab2ed700e58762f0a3ce049a37


--

___
Python tracker 

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



[issue40128] IDLE Show completions pop-up not working on macOS

2021-09-14 Thread Tal Einat


Tal Einat  added the comment:

Pablo, I'm not sure what you cherry-picked, but this fix for macOS broke the 
completions pop-up on Linux, and that appears to still be the state of things 
now on the 3.10.0 branch. Let's please not leave things this way if at all 
possible.

--

___
Python tracker 

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



[issue4356] Add "key" argument to "bisect" module functions

2021-09-14 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal
nosy_count: 20.0 -> 21.0
pull_requests: +26752
pull_request: https://github.com/python/cpython/pull/28339

___
Python tracker 

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



[issue45183] Unexpected exception with zip importer

2021-09-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Brett, can you take a look when you have some time?

--

___
Python tracker 

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



[issue45183] Unexpected exception with zip importer

2021-09-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I bisected this to:

3abf6f010243a91bf57cbf357dac33193f7b8407 is the first bad commit
commit 3abf6f010243a91bf57cbf357dac33193f7b8407
Author: Desmond Cheong 
Date:   Tue Mar 9 04:06:02 2021 +0800

bpo-14678: Update zipimport to support importlib.invalidate_caches() 
(GH-24159)



Added an invalidate_caches() method to the zipimport.zipimporter class 
based on the implementation of importlib.FileFinder.invalidate_caches(). This 
was done by adding a get_files() method and an _archive_mtime attribute to 
zipimport.zipimporter to check for updates or cache invalidation whenever the 
cache of files and toc entry information in the zipimporter is accessed.

 Doc/library/zipimport.rst  |9 +
 Lib/test/test_zipimport.py |   41 +
 Lib/zipimport.py   |   10 +
 .../2021-01-07-21-25-49.bpo-14678.1zniCH.rst   |3 +
 Python/importlib_zipimport.h   | 1896 ++--
 5 files changed, 1020 insertions(+), 939 deletions(-)
 create mode 100644 
Misc/NEWS.d/next/Library/2021-01-07-21-25-49.bpo-14678.1zniCH.rst
bisect run success


Which is https://bugs.python.org/issue14678

--
nosy: +brett.cannon

___
Python tracker 

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



[issue40128] IDLE Show completions pop-up not working on macOS

2021-09-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks Terry,

I have cherry-picked commit b441e99d89a3f05210cc36ade57699384986ca00 to the 
3.10.0 release branch!

--

___
Python tracker 

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



[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread Gregory P. Smith


Change by Gregory P. Smith :


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

___
Python tracker 

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



[issue45147] Typo in "What's New In Python 3.10" documentation

2021-09-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> @pablogsal: You might want to merge this back to 3.10.0, once it's merged to 
> 3.10. I'll merge it shortly, once the tests have run.


Thanks for the ping. I have cherry-picked PR 28259 to 3.10.0

--

___
Python tracker 

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



[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread miss-islington


miss-islington  added the comment:


New changeset be200c3c6e2f82db553c0e5424e4ba70caf189c3 by Miss Islington (bot) 
in branch '3.10':
bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331)
https://github.com/python/cpython/commit/be200c3c6e2f82db553c0e5424e4ba70caf189c3


--

___
Python tracker 

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



[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread miss-islington


miss-islington  added the comment:


New changeset 9ccdc90488302b212bd3405d10dc5c22052e9b4c by Miss Islington (bot) 
in branch '3.9':
bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331)
https://github.com/python/cpython/commit/9ccdc90488302b212bd3405d10dc5c22052e9b4c


--

___
Python tracker 

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



[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The bug is not a crash in the interpreter and this PR touches fundamental code 
in the interpreter, so I think the safest approach is waiting for 3.10.1

--
priority: release blocker -> 

___
Python tracker 

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



[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
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



[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26751
pull_request: https://github.com/python/cpython/pull/28338

___
Python tracker 

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



[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset b668cdfa09e9bdfcfddaadd23dbd455d5f667383 by junyixie in branch 
'main':
bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331)
https://github.com/python/cpython/commit/b668cdfa09e9bdfcfddaadd23dbd455d5f667383


--

___
Python tracker 

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



[issue45190] unicode 14.0 upgrade

2021-09-14 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 024fda47d40b8cee77ac1cd3d31ee549edc11986 by Benjamin Peterson in 
branch 'main':
closes bpo-45190: Update Unicode data to version 14.0.0. (GH-28336)
https://github.com/python/cpython/commit/024fda47d40b8cee77ac1cd3d31ee549edc11986


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



[issue45190] unicode 14.0 upgrade

2021-09-14 Thread Benjamin Peterson


Change by Benjamin Peterson :


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

___
Python tracker 

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



[issue45198] __set_name__ documentation not clear about its usage with non-descriptor classes

2021-09-14 Thread xitop


New submission from xitop :

The object.__set_name__() function (introduced in Python 3.6 by PEP-487) is 
mentioned in the "what's new " summary as an extension to the descriptor 
protocol [1] and documented in the "implementing descriptors" section [2].

However, the PEP itself states that it "adds an __set_name__ initializer for 
class attributes, especially if they are descriptors.". And it indeed works for 
plain classes where the descriptor protocol is not used at all (no __get__ or 
__set__ or __delete__):


class NotDescriptor:
def __set_name__(self, owner, name):
print('__set_name__ called')

class SomeClass:
attr = NotDescriptor()


It is clear that this method is helpful when used in descriptors and that is 
its intended use, but other valid use-cases probably exist.

I suggest to amend the documentation to clarify that (correct me if I'm wrong) 
the __set_name__ is called for every class used as an attribute in an other 
class, not only for descriptors.

---

URLs:

[1]: 
https://docs.python.org/3/whatsnew/3.6.html#pep-487-descriptor-protocol-enhancements

[2]: https://docs.python.org/3/reference/datamodel.html#implementing-descriptors

--
assignee: docs@python
components: Documentation
messages: 401785
nosy: docs@python, xitop
priority: normal
severity: normal
status: open
title: __set_name__ documentation not clear about its usage with non-descriptor 
classes
versions: 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



[issue21736] Add __file__ attribute to frozen modules

2021-09-14 Thread Eric Snow


Change by Eric Snow :


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

___
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-09-14 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +26745
pull_request: https://github.com/python/cpython/pull/28335

___
Python tracker 

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



[issue45188] De-couple the Windows builds from freezing modules.

2021-09-14 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +26747
pull_request: https://github.com/python/cpython/pull/28335

___
Python tracker 

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



[issue45186] Marshal output isn't completely deterministic.

2021-09-14 Thread Eric Snow


Change by Eric Snow :


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

___
Python tracker 

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



[issue38085] Interrupting class creation in __init_subclass__ may lead to incorrect isinstance() and issubclass() results

2021-09-14 Thread xitop


xitop  added the comment:

2nd anniversary. Any reaction from developers would be appreciated. Thank you.

--

___
Python tracker 

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



[issue45195] test_readline: test_nonascii() failed on aarch64 RHEL8 Refleaks 3.x

2021-09-14 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +26743
pull_request: https://github.com/python/cpython/pull/28333

___
Python tracker 

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



[issue45195] test_readline: test_nonascii() failed on aarch64 RHEL8 Refleaks 3.x

2021-09-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 797c8eb9ef511f0c25f10a453b35c4d2fe383c30 by Victor Stinner in 
branch 'main':
bpo-45195: Fix test_readline.test_nonascii() (GH-28329)
https://github.com/python/cpython/commit/797c8eb9ef511f0c25f10a453b35c4d2fe383c30


--

___
Python tracker 

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



[issue45195] test_readline: test_nonascii() failed on aarch64 RHEL8 Refleaks 3.x

2021-09-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26744
pull_request: https://github.com/python/cpython/pull/28334

___
Python tracker 

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



[issue45197] IDLE should suppress ValueError for list.remove()

2021-09-14 Thread Raymond Hettinger


New submission from Raymond Hettinger :

I got this today running a stock Python 3.9.6 for macOS downloaded from 
python.org.

-

Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py",
 line 1892, in __call__
return self.func(*args)
  File 
"/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/idlelib/multicall.py",
 line 176, in handler
r = l[i](event)
  File 
"/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/idlelib/autocomplete_w.py",
 line 350, in keypress_event
self.hide_window()
  File 
"/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/idlelib/autocomplete_w.py",
 line 463, in hide_window
self.widget.event_delete(HIDE_VIRTUAL_EVENT_NAME, seq)
  File 
"/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/idlelib/multicall.py",
 line 392, in event_delete
triplets.remove(triplet)
ValueError: list.remove(x): x not in list

--
assignee: terry.reedy
components: IDLE
messages: 401782
nosy: rhettinger, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE should suppress ValueError for list.remove()
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue15870] PyType_FromSpec should take metaclass as an argument

2021-09-14 Thread Josh Haberman


Josh Haberman  added the comment:

I found a way to use metaclasses with the limited API.

I found that I can access PyType_Type.tp_new by creating a heap type derived 
from PyType_Type:

  static PyType_Slot dummy_slots[] = {
{0, NULL}
  };

  static PyType_Spec dummy_spec = {
  "module.DummyClass", 0, 0, Py_TPFLAGS_DEFAULT, dummy_slots,
  };

  PyObject *bases = Py_BuildValue("(O)", _Type);
  PyObject *type = PyType_FromSpecWithBases(_spec, bases);
  Py_DECREF(bases);

  type_new = PyType_GetSlot((PyTypeObject*)type, Py_tp_new);
  Py_DECREF(type);

  #ifndef Py_LIMITED_API
assert(type_new == PyType_Type.tp_new);
  #endif

  // Creates a type using a metaclass.
  PyObject *uses_metaclass = type_new(metaclass, args, NULL);

PyType_GetSlot() can't be used on PyType_Type directly, since it is not a heap 
type.  But a heap type derived from PyType_Type will inherit tp_new, and we can 
call PyType_GetSlot() on that.

Once we have PyType_Type.tp_new, we can use it to create a new type using a 
metaclass. This avoids any of the class-switching tricks I was trying before.  
We can also get other slots of PyType_Type like tp_getattro to do the 
equivalent of super().

The PyType_FromSpecEx() function proposed in this bug would still be a nicer 
solution to my problem.  Calling type_new() doesn't let you specify object size 
or slots.  To work around this, I derive from a type I created with 
PyType_FromSpec(), relying on the fact that the size and slots will be 
inherited.  This works, but it introduces an extra class into the hierarchy 
that ideally could be avoided.

But I do have a workaround that appears to work, and avoids the problems 
associated with setting ob_type directly (like PyPy incompatibility).

--
nosy: +haberman2

___
Python tracker 

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



[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread junyixie


junyixie  added the comment:

ignore test_decimal.py crash backtrace.

--

___
Python tracker 

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



[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread junyixie


Change by junyixie :


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

___
Python tracker 

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



[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread junyixie


Change by junyixie :


--
type:  -> crash

___
Python tracker 

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



[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread junyixie


New submission from junyixie :

test_io.py
```
=
==54932==ERROR: AddressSanitizer: requested allocation size 0x7fff 
(0x80001000 after adjustments for alignment, red zones etc.) exceeds 
maximum supported size of 0x100 (thread T0)
  #0 0x102f1fa6c in wrap_malloc+0x94 
(libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fa6c)
  #1 0x102565fcc in _buffered_init bufferedio.c:730
  #2 0x10255bba4 in _io_BufferedReader___init__ bufferedio.c.h:435
  #3 0x10226c8c8 in wrap_init typeobject.c:6941
  #4 0x10216d3f8 in _PyObject_Call call.c:305
  #5 0x102387a6c in _PyEval_EvalFrameDefault ceval.c:4285
  #6 0x10237eaa8 in _PyEval_Vector ceval.c:5073
  #7 0x102396860 in call_function ceval.c:5888
  #8 0x102385444 in _PyEval_EvalFrameDefault ceval.c:4206
  #9 0x10237eaa8 in _PyEval_Vector ceval.c:5073
  #10 0x102396860 in call_function ceval.c:5888
  #11 0x102385444 in _PyEval_EvalFrameDefault ceval.c:4206
  #12 0x10237eaa8 in _PyEval_Vector ceval.c:5073
  #13 0x102172bec in method_vectorcall classobject.c:53
  #14 0x102396860 in call_function ceval.c:5888
  #15 0x1023885e4 in _PyEval_EvalFrameDefault ceval.c:4221
  #16 0x10237eaa8 in _PyEval_Vector ceval.c:5073
  #17 0x102396860 in call_function ceval.c:5888
  #18 0x102385444 in _PyEval_EvalFrameDefault ceval.c:4206
  #19 0x10237eaa8 in _PyEval_Vector ceval.c:5073
  #20 0x102172af4 in method_vectorcall classobject.c:83
  #21 0x10216d0a8 in PyVectorcall_Call call.c:255
  #22 0x102387a6c in _PyEval_EvalFrameDefault ceval.c:4285
  #23 0x10237eaa8 in _PyEval_Vector ceval.c:5073
  #24 0x10216c248 in _PyObject_FastCallDictTstate call.c:142
  #25 0x10216dc00 in _PyObject_Call_Prepend call.c:431
  #26 0x102268740 in slot_tp_call typeobject.c:7481
  #27 0x10216c5d4 in _PyObject_MakeTpCall call.c:215
  #28 0x102396b88 in call_function ceval.c
  #29 0x1023885e4 in _PyEval_EvalFrameDefault ceval.c:4221

==54932==HINT: if you don't care about these errors you may set 
allocator_may_return_null=1
SUMMARY: AddressSanitizer: allocation-size-too-big 
(libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fa6c) in wrap_malloc+0x94
==54932==ABORTING
Fatal Python error: Aborted

Current thread 0x000102e93d40 (most recent call first):
 File "/Users/xiejunyi/github-cpython/Lib/unittest/case.py", line 201 in handle
 File "/Users/xiejunyi/github-cpython/Lib/unittest/case.py", line 730 in 
assertRaises
 File "/Users/xiejunyi/github-cpython/Lib/test/test_io.py", line 1558 in 
test_constructor
 File "/Users/xiejunyi/github-cpython/Lib/unittest/case.py", line 549 in 
_callTestMethod
 File "/Users/xiejunyi/github-cpython/Lib/unittest/case.py", line 591 in run
 File "/Users/xiejunyi/github-cpython/Lib/unittest/case.py", line 650 in 
__call__
 File "/Users/xiejunyi/github-cpython/Lib/unittest/suite.py", line 122 in run
 File "/Users/xiejunyi/github-cpython/Lib/unittest/suite.py", line 84 in 
__call__
 File "/Users/xiejunyi/github-cpython/Lib/unittest/suite.py", line 122 in run
 File "/Users/xiejunyi/github-cpython/Lib/unittest/suite.py", line 84 in 
__call__
 File "/Users/xiejunyi/github-cpython/Lib/unittest/suite.py", line 122 in run
 File "/Users/xiejunyi/github-cpython/Lib/unittest/suite.py", line 84 in 
__call__
 File "/Users/xiejunyi/github-cpython/Lib/test/support/testresult.py", line 140 
in run
 File "/Users/xiejunyi/github-cpython/Lib/test/support/__init__.py", line 990 
in _run_suite
 File "/Users/xiejunyi/github-cpython/Lib/test/support/__init__.py", line 1115 
in run_unittest
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/runtest.py", line 
261 in _test_module
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/runtest.py", line 
297 in _runtest_inner2
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/runtest.py", line 
335 in _runtest_inner
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/runtest.py", line 
215 in _runtest
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/runtest.py", line 
245 in runtest
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/runtest_mp.py", line 
83 in run_tests_worker
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/main.py", line 678 
in _main
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/main.py", line 658 
in main
 File "/Users/xiejunyi/github-cpython/Lib/test/libregrtest/main.py", line 736 
in main
 File "/Users/xiejunyi/github-cpython/Lib/test/regrtest.py", line 43 in _main
 File "/Users/xiejunyi/github-cpython/Lib/test/regrtest.py", line 47 in 
 File "/Users/xiejunyi/github-cpython/Lib/runpy.py", line 86 in _run_code
 File "/Users/xiejunyi/github-cpython/Lib/runpy.py", line 196 in 
_run_module_as_main
```

test_decimal.py
```
0:05:09 load avg: 159.57 [287/427/30] test_decimal crashed (Exit code -6) -- 
running: test_pickle (1 min 35 sec), test_tokenize (3 min 14 sec), test_unparse 
(4 min 32 sec), test_peg_generator (48.6 sec), test_subprocess (1 min 50 sec), 
test_faulthandler (36.0 sec), 

[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2021-09-14 Thread Hasan


Hasan  added the comment:

Okey. There will be huge changes for this issue as this keyword has been used 
in a lot of places. 

That's why i will try to send pull requests module by module to keep it clean 
and simple for review.

--

___
Python tracker 

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



[issue45185] test.test_ssl.TestEnumerations is not run

2021-09-14 Thread Nikita Sobolev


Change by Nikita Sobolev :


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

___
Python tracker 

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



[issue45185] test.test_ssl.TestEnumerations is not run

2021-09-14 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

Looks like `TestEnumerations` was never added to `tests` in `test_main`. 
https://github.com/python/cpython/commit/a02cb474f9c097c83cd444a47e9fb5f99b4aaf45#diff-d526ded1c360bed6b222de46f4ca92b834f978ebed992fb3189bf9a94a198578R4702

I will try to enable it and fix failures.

--
nosy: +sobolevn

___
Python tracker 

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



[issue44949] test_readline: test_auto_history_disabled() fails randomly on aarch64 RHEL8 Refleaks 3.9, 3.10 and 3.x

2021-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

Similar issue in test_readline.test_nonascii(): bpo-45195.

--

___
Python tracker 

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



[issue45195] test_readline: test_nonascii() failed on aarch64 RHEL8 Refleaks 3.x

2021-09-14 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue45195] test_readline: test_nonascii() failed on aarch64 RHEL8 Refleaks 3.x

2021-09-14 Thread STINNER Victor


New submission from STINNER Victor :

aarch64 RHEL8 Refleaks 3.x:
https://buildbot.python.org/all/#/builders/551/builds/131

This issue looks like bpo-44949 which has been fixed by commit 
6fb62b42f4db56ed5efe0ca4c1059049276c1083.

"\r\n" is missing at the end of the expected output.

=== logs ===

readline version: 0x700
readline runtime version: 0x700
readline library version: '7.0'
use libedit emulation? False

FAIL: test_nonascii (test.test_readline.TestReadline)
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.refleak/build/Lib/test/test_readline.py",
 line 258, in test_nonascii
self.assertIn(b"history " + expected + b"\r\n", output)
^^^
AssertionError: b"history '[\\xefnserted]|t\\xebxt[after]'\r\n" not found in 
bytearray(b"^A^B^B^B^B^B^B^B\t\tx\t\r\n[\xc3\xafnserted]|t\xc3\xab[after]\x08\x08\x08\x08\x08\x08\x08text
 \'t\\xeb\'\r\nline \'[\\xefnserted]|t\\xeb[after]\'\r\nindexes 11 
13\r\n\x07text \'t\\xeb\'\r\nline \'[\\xefnserted]|t\\xeb[after]\'\r\nindexes 
11 13\r\nsubstitution \'t\\xeb\'\r\nmatches [\'t\\xebnt\', 
\'t\\xebxt\']\r\nx[after]\x08\x08\x08\x08\x08\x08\x08t[after]\x08\x08\x08\x08\x08\x08\x08\r\nresult
 \'[\\xefnserted]|t\\xebxt[after]\'\r\nhistory 
\'[\\xefnserted]|t\\xebxt[after]\'")


=== test.pythoninfo ===

readline._READLINE_LIBRARY_VERSION: 7.0
readline._READLINE_RUNTIME_VERSION: 0x700
readline._READLINE_VERSION: 0x700

platform.architecture: 64bit ELF
platform.libc_ver: glibc 2.28
platform.platform: Linux-4.18.0-305.12.1.el8_4.aarch64-aarch64-with-glibc2.28

os.environ[LANG]: en_US.UTF-8
locale.encoding: UTF-8
sys.filesystem_encoding: utf-8/surrogateescape
sys.stderr.encoding: utf-8/backslashreplace
sys.stdin.encoding: utf-8/strict
sys.stdout.encoding: utf-8/strict

--
components: Tests
messages: 401775
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_readline: test_nonascii() failed on aarch64 RHEL8 Refleaks 3.x
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



[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset fd74d2680ef96c0140bc02cf94d1cf1f2ef814c2 by Miss Islington (bot) 
in branch '3.10':
bpo-45156: Fixes inifite loop on unittest.mock.seal() (GH-28300) (GH-28326)
https://github.com/python/cpython/commit/fd74d2680ef96c0140bc02cf94d1cf1f2ef814c2


--

___
Python tracker 

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



[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-14 Thread miss-islington


miss-islington  added the comment:


New changeset 13257d9fca13dfa1bda5b802d68ddaec72f3a07e by Miss Islington (bot) 
in branch '3.9':
bpo-45156: Fixes inifite loop on unittest.mock.seal() (GH-28300)
https://github.com/python/cpython/commit/13257d9fca13dfa1bda5b802d68ddaec72f3a07e


--

___
Python tracker 

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



[issue45194] asyncio scheduler jitter

2021-09-14 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

asyncio provides the preemptive concurrency, not the real-time one.
It means that the exact time of task switches depends on other tasks' execution 
and can vary by design.

Sorry, the jitter is unavoidable.

--
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue45194] asyncio scheduler jitter

2021-09-14 Thread QuadCorei8085


QuadCorei8085  added the comment:

correction:
a) of course i meant loop.create_task(test_task())

b) when using threading the sleep returns every 1000ms when going lower 10-15ms 
is also spot on. (I wanted to use threading in my app but one library - 
websocket - is asyncio based thus i'm stuck with asyncio)

--

___
Python tracker 

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



[issue39503] [security][CVE-2020-8492] Denial of service in urllib.request.AbstractBasicAuthHandler

2021-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

This issue was a security vulnerability. It's now closed, please don't comment 
closed issues. If you consider that there is a regression, please open a new 
issue.

--

___
Python tracker 

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



[issue45194] asyncio scheduler jitter

2021-09-14 Thread QuadCorei8085


New submission from QuadCorei8085 :

I'm trying to do something periodically and this would be on the millisec level 
precision.
However for some reason I could not achieve precise timing in a task.
Below example shows that a simple sleep randomly awakes with a jitter between 
0.1-20.0ms I haven't hystogrammed the distribution but it seems to be mostly 
19-20ms.

Any way to achieve better timings with asyncio?

async def test_task():
while True:
ts_now = time.time();
await asyncio.sleep(1.000);
print("{}".format((time.time()-ts_now)*1000.0));

if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.create_task(thread_main())
loop.run_forever()

--
components: asyncio
messages: 401769
nosy: QuadCorei8085, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: asyncio scheduler jitter
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



[issue39503] [security][CVE-2020-8492] Denial of service in urllib.request.AbstractBasicAuthHandler

2021-09-14 Thread tongxiaoge


tongxiaoge  added the comment:

At the beginning of the issue, there is the following reproduction code:
from urllib.request import AbstractBasicAuthHandler
auth_handler = AbstractBasicAuthHandler()
auth_handler.http_error_auth_reqed(
'www-authenticate',
'unused',
'unused',
{
'www-authenticate': 'Basic ' + ',' * 64 + ' ' + 'foo' + ' ' +
'realm'
}
)

Here's the headers:

{
'www-authenticate': 'Basic ' + ',' * 64 + ' ' + 'foo' + ' ' +
'realm'
 }

I think this is a dict object, so the current problem is fixed and no longer 
compatible with the previous usage?

--

___
Python tracker 

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



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-14 Thread Tal Einat


Tal Einat  added the comment:

See PR GH-28328 with proposed fix. It should be tested on macOS with several 
relevant versions of Tcl/Tk to ensure that the Tk version range used is correct.

--

___
Python tracker 

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



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-14 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +26739
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/28328

___
Python tracker 

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



[issue39503] [security][CVE-2020-8492] Denial of service in urllib.request.AbstractBasicAuthHandler

2021-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

> "headers" is a dict object? If so, the dict object does not seem to have no 
> attribute "get_all".

No, it's not a dict object.

--

___
Python tracker 

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



[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26738
pull_request: https://github.com/python/cpython/pull/28327

___
Python tracker 

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



[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-14 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +26737
pull_request: https://github.com/python/cpython/pull/28326

___
Python tracker 

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



[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7f60c9e1c6e22cc0e846a872c318570926cd3094 by Nikita Sobolev in 
branch 'main':
bpo-45156: Fixes inifite loop on unittest.mock.seal() (GH-28300)
https://github.com/python/cpython/commit/7f60c9e1c6e22cc0e846a872c318570926cd3094


--
nosy: +vstinner

___
Python tracker 

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



[issue45168] dis output for LOAD_CONST is confusing

2021-09-14 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue45168] dis output for LOAD_CONST is confusing

2021-09-14 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset c99fc4e53a60084df88ac5c69b3b13bc033677e1 by Irit Katriel in 
branch 'main':
bpo-45168: change dis output to omit missing values rather than replacing them 
by their index (GH-28313)
https://github.com/python/cpython/commit/c99fc4e53a60084df88ac5c69b3b13bc033677e1


--

___
Python tracker 

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



[issue45152] Prepare for splitting LOAD_CONST into several opcodes

2021-09-14 Thread Mark Shannon

Mark Shannon  added the comment:


New changeset c2f1e953371c25f6c42b599ba3d8797effbb503e by Irit Katriel in 
branch 'main':
bpo-45152: Add HAS_CONST macro and get_const_value() function and use… (#28262)
https://github.com/python/cpython/commit/c2f1e953371c25f6c42b599ba3d8797effbb503e


--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue45191] Error.__traceback__.tb_lineno is wrong

2021-09-14 Thread nahco314


Change by nahco314 :


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

___
Python tracker 

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



[issue39503] [security][CVE-2020-8492] Denial of service in urllib.request.AbstractBasicAuthHandler

2021-09-14 Thread tongxiaoge


tongxiaoge  added the comment:

https://github.com/python/cpython/blob/9f93018b69d72cb48d3444554261ae3b0ea00c93/Lib/urllib/request.py#L989
"headers" is a dict object? If so, the dict object does not seem to have no 
attribute "get_all".

--
nosy: +sxt1001
versions: +Python 3.10, Python 3.11 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue45189] Drop the "list_frozen" command from _test_embed.

2021-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

imp._get_frozen_module_names() doesn't exist. I cannot see it in GH-28319. 
Moreover, the imp module is now deprecated. If something is added, it should be 
added to the private _imp module.

--

___
Python tracker 

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



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-14 Thread Tal Einat


Change by Tal Einat :


--
stage: patch review -> needs patch

___
Python tracker 

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



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-14 Thread Tal Einat


Change by Tal Einat :


--
pull_requests:  -26735

___
Python tracker 

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



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-14 Thread Tal Einat


Change by Tal Einat :


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

___
Python tracker 

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



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-14 Thread Tal Einat


Tal Einat  added the comment:

I've also tested this on Windows 10 with the latest main branch (to be 3.11). 
The completions window works as expected with or without the recently added 
.update_idletasks() call.

I do recommend limiting this to macOS (platform.system() == "Darwin"). 

Ideally we'd test this on macOS with several versions of tcl/tk (8.6.8, 8.6.9, 
8.6.10, 8.6.11) and limit it to only those versions where the fix is required:

TK_VERSION = tuple(map(int, tk.call("info", "patchlevel").split(".")))
if (8, 6, 8) <= TK_VERSION < (8, 6, 10):
acw.update_idletasks()

Also we might check if calling .update() is enough, since that does less than 
.update_idletasks().

--

___
Python tracker 

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



[issue40128] IDLE Show completions pop-up not working on macOS

2021-09-14 Thread Tal Einat


Tal Einat  added the comment:

I've created a separate issue for the completion window not appearing on Linux, 
issue #45193. Let's move the discussion there.

--

___
Python tracker 

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



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-14 Thread Tal Einat


New submission from Tal Einat :

The completion window never appears with Python version 3.9.7 and with the 
current main branch.

Ubuntu 20.04 (reproduced on two separate machines)
Tested with Tcl/Tk versions 8.6.10 and 8.6.11.

This is directly caused by the fix for issue #40128. Commenting out that line 
resolves this issue entirely.

(See also the PR for that fix, PR GH-26672.)

--
assignee: terry.reedy
components: IDLE
messages: 401758
nosy: taleinat, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE Show completions pop-up not working on Ubuntu Linux
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue45167] deepcopy of GenericAlias with __deepcopy__ method is broken

2021-09-14 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +26734
pull_request: https://github.com/python/cpython/pull/28324

___
Python tracker 

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



[issue40128] IDLE Show completions pop-up not working on macOS

2021-09-14 Thread Tal Einat


Tal Einat  added the comment:

Note that _tkinter.TK_VERSION and _tkinter.TK_VERSION are simply "8.6", not 
enough to differentiate between patch versions. The best way to get this info 
appears to be tk.call("info", "patchlevel").

Specifically I suggest:

TK_VERSION = tuple(map(int, tk.call("info", "patchlevel").split(".")))

...

if (8, 6, 8) <= TK_VERSION < (8, 6, 10):
...

--

___
Python tracker 

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



[issue40128] IDLE Show completions pop-up not working on macOS

2021-09-14 Thread Tal Einat


Tal Einat  added the comment:

Confirmed with python 3.9.7 installed via the "deadsnakes" apt repo on another 
Ubuntu 20.04 machine.

"Confirmed" meaning specifically that the completion window never appears, and 
commenting out that single line resolves the issue.

--

___
Python tracker 

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



[issue45192] The tempfile._infer_return_type function cannot infer the type of os.PathLike objects.

2021-09-14 Thread Kyungmin Lee


Change by Kyungmin Lee :


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

___
Python tracker 

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