[issue44496] string.Formatter class not allowing {.field}

2021-06-23 Thread Aschwin


New submission from Aschwin :

I expected the custom Formatter to behave the same as the normal "".format() 
function, but unnamed args or not supported.
Below is an example, which fails at a KeyError.


from string import Formatter

class test():
def __init__(self):
self.msg = "OK"
t = test()

print("Normal format() is {.msg}".format(t))

f = Formatter()
print(f.format("Formatter.format() is {.msg}", t))

--
components: Library (Lib)
messages: 396383
nosy: avdwoude
priority: normal
severity: normal
status: open
title: string.Formatter class not allowing {.field}
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



[issue44489] _handle_existing_loggers should respect loggers that were manually disabled

2021-06-23 Thread Vinay Sajip


Change by Vinay Sajip :


--
type:  -> enhancement
versions: +Python 3.11 -Python 3.8

___
Python tracker 

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



[issue24339] iso6937 encoding missing

2021-06-23 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Maarten, the code posted on bugs is copyrighted by the person who wrote it. We 
can only accept it for inclusion in Python after the CLA has been signed, since 
then we are allowed to relicense it.

As a result you can only take John's code and post it elsewhere, if John 
permits you to do so, since the files don't include a license.

Note: Creating a character map based codec is not hard using gencodec.py from 
the Tools/unicode/ dir and perhaps some added extra logic.

--

___
Python tracker 

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



[issue44496] string.Formatter class not allowing {.field}

2021-06-23 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread kryheb


kryheb  added the comment:

Hi vstinner,

I apologize for the inaccurate code sample.
Please find a simplified example without threads `inittab-bug_no-threads.c` in 
attachments. Please notice that __main__.py has changed, there is no infinite 
loop anymore.

Steps to reproduce:

1. Append embedded module
2. Initialize Python from config with run_filename
3. Run main
4. Finalize
5. Repeat all above

Observed behavior:
The script is executed at the first iteration, but re-initialization fails with 
a segmentation fault:

gdb) r
Starting program: /home/kheb/proj/tmp/pyc/a.out 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Run Python Script
>>> This is the python script
Python Script completed (0)

Program received signal SIGSEGV, Segmentation fault.
__strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
65  VPCMPEQ (%rdi), %ymm0, %ymm1
Missing separate debuginfos, use: dnf debuginfo-install 
libxcrypt-4.4.20-2.fc33.x86_64
(gdb) bt
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
#1  0x77d039f0 in PyUnicode_FromString (
u=0x )
at Objects/unicodeobject.c:2309
#2  0x77dbf049 in list_builtin_module_names () at 
./Python/sysmodule.c:2056
#3  0x77dc1777 in _PySys_InitCore (tstate=tstate@entry=0x422ac0, 
sysdict=sysdict@entry=0x7fffea221070)
at ./Python/sysmodule.c:2813
#4  0x77dc36ef in _PySys_Create (tstate=tstate@entry=0x422ac0, 
sysmod_p=sysmod_p@entry=0x7fffd9d8)
at ./Python/sysmodule.c:3087
#5  0x77da9b32 in pycore_interp_init (tstate=0x422ac0) at 
Python/pylifecycle.c:824
#6  0x77da9c8e in pyinit_config (runtime=runtime@entry=0x77fbe820 
<_PyRuntime>, 
tstate_p=tstate_p@entry=0x7fffdca8, config=config@entry=0x7fffdac0) 
at Python/pylifecycle.c:866
#7  0x77daba3e in pyinit_core (runtime=runtime@entry=0x77fbe820 
<_PyRuntime>, 
src_config=src_config@entry=0x7fffdd40, 
tstate_p=tstate_p@entry=0x7fffdca8) at Python/pylifecycle.c:1029
#8  0x77dabb18 in Py_InitializeFromConfig (config=0x7fffdd40) at 
Python/pylifecycle.c:1214
#9  0x004012d3 in main (argc=1, argv=0x7fffdfc8) at 
inittab-bug_no-threads.c:45

I hope this example helps.

Best regards,
Krystian

--
Added file: https://bugs.python.org/file50125/inittab-bug_no-threads.c

___
Python tracker 

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



[issue44494] Overhaul of Doc/library/__main__.rst

2021-06-23 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +cameron

___
Python tracker 

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



[issue44426] Docs fail to build with Sphinx 4 due to Invalid C declaration

2021-06-23 Thread Karolina Surma


Karolina Surma  added the comment:

It looks good on my end, documentation builds just fine. Thank you!

--
status: pending -> open

___
Python tracker 

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



[issue44494] Overhaul of Doc/library/__main__.rst

2021-06-23 Thread Irit Katriel


Irit Katriel  added the comment:

Hi Jack,

I'm not sure it's necessary to create a new issue for "Overhaul of 
Doc/library/__main__.rst" when we already have Issue39452 to "Improve the 
__main__ module documentation" and Issue24632 to "Improve documentation about 
__main__.py".  What we really need to is close all but one of them as 
duplicates and consolidate the work. Also, the people who are on the nosy lists 
of the previous issues will not necessarily see the discussion you opened on 
this one if you won't alert them to it.

Have you looked at the open PR on issue39452?  I think there may be some 
overlap with what you did here (but I didn't check in any detail).

--
nosy: +iritkatriel

___
Python tracker 

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



[issue44492] Building a C extension on Big Sur and SDK v10.15 fails

2021-06-23 Thread Phil Thompson


Phil Thompson  added the comment:

Another aspect of this is when building a Python v3.10 C extension on macOS 
v10.15 (Catalina) with SDK 10.15, the wheel has the 'universal2' platform tag 
when it actually only contains an x86_64 implementation.

--

___
Python tracker 

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



[issue39947] [C API] Make the PyThreadState structure opaque (move it to the internal C API)

2021-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25444
pull_request: https://github.com/python/cpython/pull/26869

___
Python tracker 

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



[issue20012] Re: Allow Path.relative_to() to accept non-ancestor paths

2021-06-23 Thread Janus


Janus  added the comment:

This issue is being addressed in #40358 which has open PR for v3.11

--
nosy: +Japanuspus

___
Python tracker 

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



[issue44297] Frame with -1 line number

2021-06-23 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Oh it is also occurring when running from script (I ran it from IDLE and it 
always results in correct lineno). I wrote example similar to how unittests 
work and the frame with -1 lineno is also occurring there. Here is the code -

```
class A:
def __enter__(self):
return self
def __exit__(self, *args, **kwargs):
raise Exception("Frame is -1 if program is run from command line")

with A():
raise Exception("Normal Error")
```

Also, unsurprisingly, pdb fails with a "TypeError: '>=' not supported between 
instances of 'NoneType' and 'int'". Full pdb log -

Traceback (most recent call last):
  File "C:\Users\shrey\Desktop\line_negative_one.py", line -1, in 
  File "C:\github\cpython\lib\bdb.py", line 96, in trace_dispatch
return self.dispatch_exception(frame, arg)
  File "C:\github\cpython\lib\bdb.py", line 169, in dispatch_exception
if self.stop_here(frame):
  File "C:\github\cpython\lib\bdb.py", line 212, in stop_here
return frame.f_lineno >= self.stoplineno
TypeError: '>=' not supported between instances of 'NoneType' and 'int'

--

___
Python tracker 

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



[issue44486] Modules should alway have a dictionary

2021-06-23 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset c3f52b4d707a78eb342372a2be00f3eb846a05b9 by Mark Shannon in 
branch 'main':
bpo-44486: Make sure that modules always have a dictionary. (GH-26847)
https://github.com/python/cpython/commit/c3f52b4d707a78eb342372a2be00f3eb846a05b9


--

___
Python tracker 

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



[issue28395] Remove unnecessary semicolons in tests

2021-06-23 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 5a3108044d2e5b694da2d1f4176c9bbaef15c142 by Dong-hee Na in branch 
'main':
bpo-28395: Remove unnecessary semicolons in tests (GH-26868)
https://github.com/python/cpython/commit/5a3108044d2e5b694da2d1f4176c9bbaef15c142


--

___
Python tracker 

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



[issue28395] Remove unnecessary semicolons in tests

2021-06-23 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue28395] Remove unnecessary semicolons in tests

2021-06-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25446
pull_request: https://github.com/python/cpython/pull/26871

___
Python tracker 

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



[issue44426] Docs fail to build with Sphinx 4 due to Invalid C declaration

2021-06-23 Thread Mark Dickinson


Mark Dickinson  added the comment:

Thanks! Closing.

--
status: open -> closed

___
Python tracker 

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



[issue44497] distutil findall can choke with recursive symlinks (performance)

2021-06-23 Thread Sorin Sbarnea


New submission from Sorin Sbarnea :

As the results of investigating a very poor performance of pip while trying to 
install some code I was able to identify that the root cause was the current 
implementation of distutils.filelist.findall or to be more precise the 
_find_all_simple function, which does followsymlinks but without any measures 
for preventing recursivity and duplicates.

To give an idea in my case it was taking 5-10minutes to run while the CPU was 
at 100%, for a repository with 95k files (most of them temp inside .tox 
folders). Removal of the symlinks did make it run in ~5s.

IMHO, _find_all_simple should normalize paths and avoid returning any 
duplicates.


Realted: https://bugs.launchpad.net/pbr/+bug/1933311

--
components: Distutils
messages: 396394
nosy: dstufft, eric.araujo, ssbarnea
priority: normal
severity: normal
status: open
title: distutil findall can choke with recursive symlinks (performance)
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



[issue44497] distutil findall can choke with recursive symlinks (performance)

2021-06-23 Thread Sorin Sbarnea


Change by Sorin Sbarnea :


--
type:  -> performance

___
Python tracker 

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



[issue44483] Fatal error in type union

2021-06-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 7e6cad7e303b3991360a0fe332b0d21aa0f6fe5e by Miss Islington (bot) 
in branch '3.10':
bpo-44483: Fix crash in union object with bad ``__module__`` (GH-26848) 
(GH-26852)
https://github.com/python/cpython/commit/7e6cad7e303b3991360a0fe332b0d21aa0f6fe5e


--

___
Python tracker 

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



[issue44483] Fatal error in type union

2021-06-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Yes, Checking each result individually is a right way. Not only because 
performance, but because calling any Python code while an error is set will 
cause a crash in debug build and weird bugs in release build. It is better to 
return as fast as you have an error.

Thank you for your PR Ken Jin.

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



[issue44482] Possible resource leeak in glob in non-refcount implementations

2021-06-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 5c7940257e1f611e7284fd504887bd29a63d0a94 by Serhiy Storchaka in 
branch 'main':
bpo-44482: Fix very unlikely resource leak in glob in non-CPython 
implementations (GH-26843)
https://github.com/python/cpython/commit/5c7940257e1f611e7284fd504887bd29a63d0a94


--

___
Python tracker 

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



[issue44482] Possible resource leeak in glob in non-refcount implementations

2021-06-23 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44483] Fatal error in type union

2021-06-23 Thread Ken Jin


Ken Jin  added the comment:

Oh, that's a good point too. Thanks for the explanation, reviews and merge 
Serhiy.

--

___
Python tracker 

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



[issue44498] remove deprecated smtpd from the stdlib

2021-06-23 Thread Irit Katriel


New submission from Irit Katriel :

smtpd uses asynchat which has been deprecated since 3.6.

See discussion at
https://mail.python.org/archives/list/python-committ...@python.org/thread/KNF6YQE2O4OLJDNKSGAT4NLZUNCQ5QSH/#KNF6YQE2O4OLJDNKSGAT4NLZUNCQ5QSH

--
messages: 396399
nosy: iritkatriel, vstinner
priority: normal
severity: normal
status: open
title: remove deprecated smtpd from the stdlib
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



[issue44497] distutil findall can choke with recursive symlinks (performance)

2021-06-23 Thread Sorin Sbarnea


Change by Sorin Sbarnea :


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

___
Python tracker 

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



[issue44498] remove deprecated smtpd from the stdlib

2021-06-23 Thread Irit Katriel


Change by Irit Katriel :


--
assignee:  -> iritkatriel

___
Python tracker 

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



[issue28395] Remove unnecessary semicolons in tests

2021-06-23 Thread miss-islington


miss-islington  added the comment:


New changeset 280425d41797f9c0b20fb02a22341937a13a8987 by Miss Islington (bot) 
in branch '3.10':
bpo-28395: Remove unnecessary semicolons in tests (GH-26868)
https://github.com/python/cpython/commit/280425d41797f9c0b20fb02a22341937a13a8987


--

___
Python tracker 

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



[issue28395] Remove unnecessary semicolons in tests

2021-06-23 Thread miss-islington


miss-islington  added the comment:


New changeset fcde2c6a8c99a56576b25733d5cc60bce6d51f46 by Miss Islington (bot) 
in branch '3.9':
bpo-28395: Remove unnecessary semicolons in tests (GH-26868)
https://github.com/python/cpython/commit/fcde2c6a8c99a56576b25733d5cc60bce6d51f46


--

___
Python tracker 

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



[issue28395] Remove unnecessary semicolons in tests

2021-06-23 Thread Dong-hee Na


Change by Dong-hee Na :


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



[issue44482] Possible resource leeak in glob in non-refcount implementations

2021-06-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Yes. I added you Guido to the nosy list to attract attention to a general 
issue. If the generator owns resources, it should be guaranteed closed. Since 
generator do not support the context manager protocol, we need to use closing().

Using generators is common in the code on my work, so I am going to revise all 
uses of resource-owning generators in my work code, in the stdlib and in common 
libraries like aiohttp.

May be we will add a decorator for generator functions which would add support 
of the context manager protocol. Or make generator objects supporting the 
context manager protocol by default. Or make the with statement fall back to 
the close() method by default. Or even add special syntax shortcut for 
combining "with" and "for" if this idiom will be common enough.

--

___
Python tracker 

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



[issue44498] move deprecated asynchat, asyncore and smtpd from the stdlib to test.support

2021-06-23 Thread Irit Katriel


Irit Katriel  added the comment:

There are some tests that use asynchat, asyncore and smtpd so we first move 
them to test.support and document their removal from the stdlib.

--
title: remove deprecated smtpd from the stdlib -> move deprecated asynchat, 
asyncore and smtpd from the stdlib to test.support

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25449
pull_request: https://github.com/python/cpython/pull/26874

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for inittab-bug_no-threads.c reproducer. I managed to reproduce the 
issue and I wrote PR 26767 to fix with a regression test.

--

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:

Oh, I didn't notice your PR 26767 fix! Thanks. I wrote PR 26874 which includes 
the same fix, but adds also a regression test.

--

___
Python tracker 

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



[issue44482] Possible resource leeak in glob in non-refcount implementations

2021-06-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 38e021ab90b595945f15c59273c788f2f24053dc by Miss Islington (bot) 
in branch '3.10':
bpo-44482: Fix very unlikely resource leak in glob in non-CPython 
implementations (GH-26843) (GH-26872)
https://github.com/python/cpython/commit/38e021ab90b595945f15c59273c788f2f24053dc


--

___
Python tracker 

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



[issue44404] tkinter's after() AttributeError with functools.partial (no attribute __name__)

2021-06-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset e9c8f784fa13ea3a51df3b72a498a3896ec9e768 by E-Paine in branch 
'main':
bpo-44404: tkinter `after` support callable classes (GH-26812)
https://github.com/python/cpython/commit/e9c8f784fa13ea3a51df3b72a498a3896ec9e768


--

___
Python tracker 

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



[issue44404] tkinter's after() AttributeError with functools.partial (no attribute __name__)

2021-06-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is on borderline between new feature and bugfix (depends on your 
interpretation of the documentation), so I decided to backport it to not yet 
released 3.10, but not to 3.9 which has been already used for a year.

--
stage: patch review -> 
type: behavior -> enhancement
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



[issue20012] Re: Allow Path.relative_to() to accept non-ancestor paths

2021-06-23 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> pathlib's relative_to should behave like os.path.relpath

___
Python tracker 

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



[issue42234] pathlib relative_to behaviour change

2021-06-23 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> pathlib's relative_to should behave like os.path.relpath

___
Python tracker 

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



[issue20859] Context of documentation for conditional expressions

2021-06-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> "and exponentiation and conditional expressions, which group from right to 
> left".

LGTM

> "Python evaluates expressions from left to right (except for conditional 
> expressions)."

LGTM. It would be nice to add also examples for conditional and assignment 
expressions.

> Should 'except for lambda' be added to the end of the sentence?

Yes, lambda and assignment expressions have lower priority.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34389] CPython may fail to build in the presence of a ~/.pydistutils.cfg

2021-06-23 Thread Antony Lee


Change by Antony Lee :


--
nosy:  -Antony.Lee

___
Python tracker 

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



[issue20012] Re: Allow Path.relative_to() to accept non-ancestor paths

2021-06-23 Thread Antony Lee


Change by Antony Lee :


--
nosy:  -Antony.Lee

___
Python tracker 

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



[issue44494] Overhaul of Doc/library/__main__.rst

2021-06-23 Thread Jack DeVries


Jack DeVries  added the comment:

@iritkatriel, ok, I will close this issue, close PR26867, and move the work I 
have over there. I probably can merge in and build upon the work from the 
contributor on bpo-39452.

--

___
Python tracker 

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



[issue44494] Overhaul of Doc/library/__main__.rst

2021-06-23 Thread Jack DeVries


Change by Jack DeVries :


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



[issue44496] string.Formatter class not allowing {.field}

2021-06-23 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-06-23 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 019ad62afd20e80c74f879aa716e339b992a0bb9 by Erlend Egeberg 
Aasland in branch 'main':
bpo-42064: Remove stale extern declarations in `sqlite3` headers (GH-26840)
https://github.com/python/cpython/commit/019ad62afd20e80c74f879aa716e339b992a0bb9


--

___
Python tracker 

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



[issue44498] move deprecated asynchat, asyncore and smtpd from the stdlib to test.support

2021-06-23 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue44237] test_ssl randomly fails on macOS GH Action: test_get_server_certificate_sni() and test_get_server_certificate_timeout()

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:

https://github.com/python/cpython/pull/26874/checks?check_run_id=2893904059

ERROR: test_connect_cadata (test.test_ssl.SimpleBackgroundTests)
--
Traceback (most recent call last):
  File "/Users/runner/work/cpython/cpython/Lib/test/test_ssl.py", line 2131, in 
test_connect_cadata
s.connect(self.server_addr)
  File "/Users/runner/work/cpython/cpython/Lib/ssl.py", line 1379, in connect
self._real_connect(addr, False)
  File "/Users/runner/work/cpython/cpython/Lib/ssl.py", line 1370, in 
_real_connect
self.do_handshake()
  File "/Users/runner/work/cpython/cpython/Lib/ssl.py", line 1346, in 
do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 54] Connection reset by peer

--

___
Python tracker 

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



[issue44494] Overhaul of Doc/library/__main__.rst

2021-06-23 Thread Irit Katriel


Irit Katriel  added the comment:

That's a good plan!

--

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 489699ca05bed5cfd10e847d8580840812b476cd by Victor Stinner in 
branch 'main':
bpo-1: _PyImport_Fini2() resets PyImport_Inittab (GH-26874)
https://github.com/python/cpython/commit/489699ca05bed5cfd10e847d8580840812b476cd


--

___
Python tracker 

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



[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-06-23 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +25452
pull_request: https://github.com/python/cpython/pull/26876

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25453
pull_request: https://github.com/python/cpython/pull/26877

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25454
pull_request: https://github.com/python/cpython/pull/26878

___
Python tracker 

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



[issue43770] Rework C types initialization

2021-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25455
pull_request: https://github.com/python/cpython/pull/26879

___
Python tracker 

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



[issue43770] Rework C types initialization

2021-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25456
pull_request: https://github.com/python/cpython/pull/26880

___
Python tracker 

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



[issue44498] move deprecated asynchat, asyncore and smtpd from the stdlib to test.support

2021-06-23 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

+1 for removal

--
nosy: +barry

___
Python tracker 

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



[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-06-23 Thread miss-islington


miss-islington  added the comment:


New changeset a50e28377bcf37121b55c2de70d95a5386c478f8 by Erlend Egeberg 
Aasland in branch 'main':
bpo-42064: Move `sqlite3` exceptions to global state, part 1 of 2 (GH-26745)
https://github.com/python/cpython/commit/a50e28377bcf37121b55c2de70d95a5386c478f8


--
nosy: +miss-islington

___
Python tracker 

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



[issue43770] Rework C types initialization

2021-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25457
pull_request: https://github.com/python/cpython/pull/26881

___
Python tracker 

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



[issue44499] [sqlite3] make sqlite3.Connection exception refs strong

2021-06-23 Thread Erlend E. Aasland


New submission from Erlend E. Aasland :

Currently, pysqlite_Connection keeps borrowed references to all the sqlite3 
exception types. Suggesting to convert these to strong refs.

See comments on GH-26745: 
https://github.com/python/cpython/pull/26745#issuecomment-866810269

--
assignee: erlendaasland
components: Extension Modules
messages: 396417
nosy: erlendaasland, petr.viktorin
priority: normal
severity: normal
status: open
title: [sqlite3] make sqlite3.Connection exception refs strong
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



[issue44498] move deprecated asynchat, asyncore and smtpd from the stdlib to test.support

2021-06-23 Thread Petr Viktorin


Petr Viktorin  added the comment:

Please follow the backwards compatibility policy (PEP 387):
- Have a discussion
- Raise deprecation warnings
- Wait at least two minor Python versions where warnings are raised
- Consider any feedback
- Then remove stuff
(Or ask the SC for an exception, but these "are only granted for extreme 
situations such as dangerously broken or insecure features or features no one 
could reasonably be depending on".)

There were no deprecation warnings raised so far, so removing these in 3.11 is 
very premature.

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue44498] move deprecated asynchat, asyncore and smtpd from the stdlib to test.support

2021-06-23 Thread Christian Heimes


Christian Heimes  added the comment:

I'm with Petr, please follow PEP 4 and PEP 387. At a bare minimum you should 
have one minor Python version with deprecation warnings. You could ask Pablo if 
he allows to add deprecation warnings to Python 3.10 beta.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue43770] Rework C types initialization

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2a396d65b8e63300ff05e217adacf0765c502ba3 by Victor Stinner in 
branch 'main':
bpo-43770:  Cleanup PyModuleDef_Init() (GH-26879)
https://github.com/python/cpython/commit/2a396d65b8e63300ff05e217adacf0765c502ba3


--

___
Python tracker 

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



[issue39947] [C API] Make the PyThreadState structure opaque (move it to the internal C API)

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset db532a09990c837ec1348e6e6bd2719f5d4a8216 by Victor Stinner in 
branch 'main':
bpo-39947: Remove old private trashcan C API functions (GH-26869)
https://github.com/python/cpython/commit/db532a09990c837ec1348e6e6bd2719f5d4a8216


--

___
Python tracker 

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



[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-06-23 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 34356a0a4bad0be124ae892cda6c30a38f5f1061 by Erlend Egeberg 
Aasland in branch 'main':
bpo-42862: Strip stale sqlite3 cache ignores from c-analyzer (GH-26876)
https://github.com/python/cpython/commit/34356a0a4bad0be124ae892cda6c30a38f5f1061


--
nosy: +corona10

___
Python tracker 

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



[issue44482] Possible resource leeak in glob in non-refcount implementations

2021-06-23 Thread Guido van Rossum


Guido van Rossum  added the comment:

I think this may be worth bringing up on python-dev. The solution currently is 
rather verbose. I like adding the with-protocol to generators.

--
nosy: +Guido.van.Rossum

___
Python tracker 

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



[issue44480] test_compile killed by signal 9 on AMD64 FreeBSD Non-Debug 3.x

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:

https://buildbot.python.org/all/#/builders/172/builds/399

test_sequence_unpacking_error (test.test_compile.TestSpecifics) ... ok
test_single_statement (test.test_compile.TestSpecifics) ... ok
test_stack_overflow (test.test_compile.TestSpecifics) ... *** Signal 9
Stop.
make: stopped in /usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build
program finished with exit code 1
elapsedTime=835.734730

--

___
Python tracker 

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



[issue44229] test_ssl: test_get_server_certificate() and test_msg_callback_deadlock_bpo43577() fail randomly on the macOS CI

2021-06-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Two GHI test macOS failures yesterday, once on main, this is on 3.10 backport
https://github.com/python/cpython/pull/26850/checks?check_run_id=2885797677

ERROR: test_get_server_certificate (test.test_ssl.SimpleBackgroundTests)
--
Traceback (most recent call last):
  File "/Users/runner/work/cpython/cpython/Lib/test/test_ssl.py", line 2180, in 
test_get_server_certificate
_test_get_server_certificate(self, *self.server_addr, cert=SIGNING_CA)
  File "/Users/runner/work/cpython/cpython/Lib/test/test_ssl.py", line 2377, in 
_test_get_server_certificate
pem = ssl.get_server_certificate((host, port), ca_certs=cert)
  File "/Users/runner/work/cpython/cpython/Lib/ssl.py", line 1527, in 
get_server_certificate
with create_connection(addr, timeout=timeout) as sock:
  File "/Users/runner/work/cpython/cpython/Lib/socket.py", line 844, in 
create_connection
raise err
  File "/Users/runner/work/cpython/cpython/Lib/socket.py", line 832, in 
create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused

So far reported (including #44237) ConnectionRefusedError in
test_get_server_certificate X many
test_msg_callback_deadlock_bpo43577
test_get_server_certificate_sni

ConnectionResetError: 
test_connect_cadata

Please, please, skip the randomly failing tests, as is done for other modules.  
This has been going on a month now.  It waste other people's time, making 
merging more painful.

--
priority: normal -> high

___
Python tracker 

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



[issue41621] Document collections.defaultdict parameter default_factory

2021-06-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 88a3342314c8b9ff40a2b6fd4759cfbf64712c67 by Miss Islington (bot) 
in branch '3.10':
bpo-41621: Document defaultdict's default_factory parameter (GH-21945)
https://github.com/python/cpython/commit/88a3342314c8b9ff40a2b6fd4759cfbf64712c67


--

___
Python tracker 

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



[issue41621] Document collections.defaultdict parameter default_factory

2021-06-23 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ece3841d3ddf38875b997eb919488cbb911a66e2 by Victor Stinner in 
branch '3.10':
bpo-1: _PyImport_Fini2() resets PyImport_Inittab (GH-26874) (GH-26877)
https://github.com/python/cpython/commit/ece3841d3ddf38875b997eb919488cbb911a66e2


--

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5ed7827b1620f5b3729bc9767158d24a33863fa9 by Victor Stinner in 
branch '3.9':
bpo-1: _PyImport_Fini2() resets PyImport_Inittab (GH-26874) (GH-26878)
https://github.com/python/cpython/commit/5ed7827b1620f5b3729bc9767158d24a33863fa9


--

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks kryheb for your bug report, reproducer and your fix!

The bug should now be fixed in 3.9, 3.10 and main branches.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11

___
Python tracker 

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



[issue44297] Frame with -1 line number

2021-06-23 Thread Mark Shannon


Mark Shannon  added the comment:

Thanks for the reproducer.

--
assignee:  -> Mark.Shannon

___
Python tracker 

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



[issue44229] test_ssl: test_get_server_certificate() and test_msg_callback_deadlock_bpo43577() fail randomly on the macOS CI

2021-06-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Although I simphatise with the frustration and I would really like to skip them 
myself, as a release manager I am quite concerned that skip them would masks an 
actual regression, as these failures are not present in previous versions.

--

___
Python tracker 

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



[issue44486] Modules should alway have a dictionary

2021-06-23 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue44500] Document changes to code object.

2021-06-23 Thread Mark Shannon


New submission from Mark Shannon :

We are making lots of changes to the code object.

We should clearly document all the changes in one place and explain the new 
design well before 3.11 beta.

--
assignee: docs@python
components: Documentation
messages: 396432
nosy: Mark.Shannon, docs@python, eric.snow, gvanrossum
priority: normal
severity: normal
status: open
title: Document changes to code object.
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



[issue44470] 3.11 docs.python.org in Polish not English?

2021-06-23 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy:  -mark.dickinson

___
Python tracker 

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



[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-23 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 769d7d0c66c5b86e2dd29b9ce67ac2daaab1bb38 by Guido van Rossum in 
branch 'main':
bpo-43693 Get rid of CO_NOFREE -- it's unused (GH-26839)
https://github.com/python/cpython/commit/769d7d0c66c5b86e2dd29b9ce67ac2daaab1bb38


--

___
Python tracker 

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



[issue44404] tkinter's after() AttributeError with functools.partial (no attribute __name__)

2021-06-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I was thinking the same.

--

___
Python tracker 

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



[issue40620] [doc] Range tutorial shorthand could be made clearer

2021-06-23 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy
title: Range tutorial shorthand could be made clearer -> [doc] Range tutorial 
shorthand could be made clearer
versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8

___
Python tracker 

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



[issue41515] typing.get_type_hints generates KeyError

2021-06-23 Thread Will Chen


Change by Will Chen :


--
nosy: +WCA
nosy_count: 6.0 -> 7.0
pull_requests: +25458
pull_request: https://github.com/python/cpython/pull/26862

___
Python tracker 

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



[issue36243] Python os.listdir fails with FileNotFoundError when directory exists

2021-06-23 Thread Irit Katriel


Irit Katriel  added the comment:

Geoff, it's been over two years. Do you think there is a chance you will want 
to follow up with a reproducer, or shall we close this issue?

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

___
Python tracker 

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



[issue44229] test_ssl: test_get_server_certificate() and test_msg_callback_deadlock_bpo43577() fail randomly on the macOS CI

2021-06-23 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Has these issues (ConnectionRefusedError/ConnectionResetError during handshake) 
been reported on other systems than macOS? AFAICS, they've only been reported 
for the macOS CI.

--

___
Python tracker 

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



[issue44498] move deprecated asynchat, asyncore and smtpd from the stdlib to test.support

2021-06-23 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


--
pull_requests: +25459
pull_request: https://github.com/python/cpython/pull/26882

___
Python tracker 

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



[issue44498] add deprecation warnings for asynchat, asyncore and smtpd

2021-06-23 Thread Irit Katriel


Change by Irit Katriel :


--
title: move deprecated asynchat, asyncore and smtpd from the stdlib to 
test.support -> add deprecation warnings for asynchat, asyncore and smtpd

___
Python tracker 

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



[issue44501] Packing constant call arguments

2021-06-23 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

It is a common scenario to make calls with only constant arguments (e.g to 
datetime.datetime/os.path.join/re.match.group/nox.session.run etc) and the 
bytecode that we currently generate looks like this;
f(1,2,3,4,5,6)
  1   0 LOAD_NAME0 (f)
  2 LOAD_CONST   0 (1)
  4 LOAD_CONST   1 (2)
  6 LOAD_CONST   2 (3)
  8 LOAD_CONST   3 (4)
 10 LOAD_CONST   4 (5)
 12 LOAD_CONST   5 (6)
 14 CALL_FUNCTION6
 16 POP_TOP
 18 LOAD_CONST   6 (None)
 20 RETURN_VALUE

But if we are sure that all arguments to a function is positional* (it is also 
possible to support keyword arguments to some extent, needs more research, but 
out of the scope for this particular optimization) and constant, then we could 
simply pack everything together and use CALL_FUNCTION_EX (we also need to set 
some limits, since when it is too little might prevent constant cache, and when 
it is too high might create giant tuples in the code object, perhaps 75 > N > 4)

  1   0 LOAD_NAME0 (f)
  2 LOAD_CONST   0 ((1, 2, 3, 4, 5, 6))
  4 CALL_FUNCTION_EX 0
  6 POP_TOP
  8 LOAD_CONST   1 (None)
 10 RETURN_VALUE

The implementation is also very simple, and doesn't even touch anywhere beside 
the ast optimizer itself. It is possible to do this in the compiler, but that 
might complicate the logic so I'd say it is best to keep it as isolated as it 
can be.

(debug builds)

-s 'foo = lambda *args: None' 'foo("y", 123, 123321321312, (1,2,3), 
"y", 1.0, (1,2,3), "y", "y", (1,2,3), 5, 6, 7)'
Mean +- std dev: [master_artificial] 251 ns +- 2 ns -> [optimized_artificial] 
185 ns +- 1 ns: 1.36x faster

-s 'from datetime import datetime' 'datetime(1997, 7, 27, 12, 10, 0, 0)'
Mean +- std dev: [master_datetime] 461 ns +- 1 ns -> [optimized_datetime] 386 
ns +- 2 ns: 1.19x faster

One other potential candidate to this optimization is doing something similar 
in the CFG optimizer, and folding all contiguous LOAD_CONSTs (within some sort 
of limit ofc) into a single tuple load and then adding an UNPACK_SEQUENCE 
(which would replicate the effect). This is a poorer form, and I was only able 
to observe a speedup of 1.13x / 1.03x respectively on the benchmarks. The good 
thing about that optimization was that, first it was able to work with mixed 
parameters (so if you have some other types of expressions besides constants, 
but all constants follow each other, then it was able to optimize that case as 
well) and also it wasn't only for calls but rather all compiler cases where 
LOAD_CONST blocks were generated.

--
assignee: BTaskaya
components: Interpreter Core
messages: 396437
nosy: BTaskaya, Mark.Shannon, pablogsal, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Packing constant call arguments
type: performance
versions: Python 3.11

___
Python tracker 

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



[issue44498] add deprecation warnings for asynchat, asyncore and smtpd

2021-06-23 Thread Irit Katriel


Change by Irit Katriel :


--
assignee: iritkatriel -> 

___
Python tracker 

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



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-23 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue44229] test_ssl: test_get_server_certificate() and test_msg_callback_deadlock_bpo43577() fail randomly on the macOS CI

2021-06-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Only on MacOS afaik

--

___
Python tracker 

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



[issue44498] add deprecation warnings for asynchat, asyncore and smtpd

2021-06-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I'm fine with a 3.10 backport as long as this is mentioned in python-dev to 
give time for folks to raise concerns. Additionally, please make sure that:

*The test site runs with -Werror as these warnings may make it fail so tests 
may need to be adapted.
* This deprecation is covered in the 3.10 what's new document.
* There is enough time for people to raise objections to the inclusion in 3.10 
(so don't merge immediately after mentioning in python-dwv ;) )

--
nosy: +pablogsal

___
Python tracker 

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



[issue44501] Packing constant call arguments

2021-06-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> folding all contiguous LOAD_CONSTs (within some sort of limit ofc) into a 
> single tuple load and then adding an UNPACK_SEQUENCE

I already experimented with this in issue33325. It does not worth an effort.

For optimizing calls with constant arguments, it looks more interesting. Do you 
have any statistic about what percentage of calls is with constant arguments, 
what is the average number of constant arguments, what are microbenchmark 
results in debug mode for the average number of constant arguments? Please test 
for trivial Python function with variable and fixed number of parameters.

--

___
Python tracker 

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



[issue44229] test_ssl: test_get_server_certificate() and test_msg_callback_deadlock_bpo43577() fail randomly on the macOS CI

2021-06-23 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

See also bpo-33450.

--

___
Python tracker 

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



[issue44498] add deprecation warnings for asynchat, asyncore and smtpd

2021-06-23 Thread Irit Katriel


Irit Katriel  added the comment:

Pablo, to be clear - my understanding is that the question to python-dev is not 
whether to deprecate or not (they have been deprecated for a long time), but 
only whether to issue the warning in 3.10 or 3.11. Is that correct?

--

___
Python tracker 

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



[issue43564] ftp tests in test_urllib2net should skip on unreachable network

2021-06-23 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue44494] Overhaul of Doc/library/__main__.rst

2021-06-23 Thread Jack DeVries


Change by Jack DeVries :


--
pull_requests: +25461
pull_request: https://github.com/python/cpython/pull/26883

___
Python tracker 

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



[issue39452] Improve the __main__ module documentation

2021-06-23 Thread Jack DeVries


Change by Jack DeVries :


--
keywords: +patch
nosy: +jack__d
nosy_count: 6.0 -> 7.0
pull_requests: +25460
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26883

___
Python tracker 

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



[issue39452] Improve the __main__ module documentation

2021-06-23 Thread Jack DeVries


Jack DeVries  added the comment:

Hi All,

As I wrote on the PR::

I am picking up the torch on 39452, continuing where @maggyero left 
off, and also implementing my discourse proposal, which seemed to be 
well-liked.

Feel free to leave any feedback for me on the GitHub PR, I'm looking forward to 
continuing to develop this work based on community feedback.

--

___
Python tracker 

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



[issue39452] Improve the __main__ module documentation

2021-06-23 Thread Jack DeVries


Change by Jack DeVries :


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



[issue39452] Improve the __main__ module documentation

2021-06-23 Thread Zachary Ware


Change by Zachary Ware :


--
versions:  -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



  1   2   >