[issue44507] Spam

2021-06-24 Thread Zachary Ware


Change by Zachary Ware :


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

___
Python tracker 

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



[issue44507] Spam

2021-06-24 Thread Zachary Ware


Change by Zachary Ware :


--
nosy:  -Old Sub Sailor
title: Favor needed ASAP -> Spam

___
Python tracker 

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



[issue38825] shutil.disk_usage - Lacking documentation

2021-06-24 Thread Norman Lorrain


Norman Lorrain  added the comment:

This issue is a bit dated, but here goes: 

   On Unix, the function `statvfs()` is called. `path` should be a path on a 
mounted filesystem (it should not be a device).

   On Windows, the function `GetDiskFreeSpaceExW()` is called. `path` is any 
directory on a disk volume.


Looking through the rest of the page, no other functions get into such 
specifics; maybe this is outside the scope of the document. Maybe the issue 
should be closed.

--
nosy: +Norman Lorrain

___
Python tracker 

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



[issue34278] Documentation: os.waitid and os.WNOHANG

2021-06-24 Thread Irit Katriel


Irit Katriel  added the comment:

See also issue41825, issue38802, issue27808.

--
components: +Library (Lib)
nosy: +iritkatriel

___
Python tracker 

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



[issue27808] os.waitpid does not return (0, 0) when child has not exited (FreeBSD)

2021-06-24 Thread Irit Katriel


Irit Katriel  added the comment:

See also issue34278, issue38802, issue41825.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue38802] Clearer wording of os.WNOHANG documentation to avoid misinterpretation

2021-06-24 Thread Irit Katriel


Irit Katriel  added the comment:

see also issue41825, issue34278, issue27808.

--
components: +Library (Lib)
nosy: +iritkatriel

___
Python tracker 

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



[issue41825] os.waitid() documentation needs TLC

2021-06-24 Thread Irit Katriel


Irit Katriel  added the comment:

See also issue38802, issue34278, issue27808.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue41825] os.waitid() documentation needs TLC

2021-06-24 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Library (Lib)
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



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

2021-06-24 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 8bec9fb92f09d02c24611ebd0a90103a1a414a40 by Miss Islington (bot) 
in branch '3.10':
bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in 
tests (GH-26905) (GH-26907)
https://github.com/python/cpython/commit/8bec9fb92f09d02c24611ebd0a90103a1a414a40


--

___
Python tracker 

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



[issue44447] Syntax Error not as detailed as shown

2021-06-24 Thread Eesa Ibrahim Khokhar


Eesa Ibrahim Khokhar  added the comment:

OK, Thanks for letting me know!

On Fri, Jun 18, 2021 at 3:09 PM Pablo Galindo Salgado <
rep...@bugs.python.org> wrote:

>
> Pablo Galindo Salgado  added the comment:
>
> Indeed, as Andre mentions your example is different because in you case
> the call is interpreted as a generator comprehension, not as a function
> call.
>
> --
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue36438] Python 3.5.7 import error on Cross compile

2021-06-24 Thread Irit Katriel


Irit Katriel  added the comment:

Closing as there has been no followup for over two years. Please create a new 
issue if you are still seeing an issue with a current (3.9+) version of Python.

--
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



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

2021-06-24 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 22e7effad571f8e524d2f71ff55bbf2a25306753 by Irit Katriel in 
branch 'main':
bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in 
tests (GH-26905)
https://github.com/python/cpython/commit/22e7effad571f8e524d2f71ff55bbf2a25306753


--

___
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-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25483
pull_request: https://github.com/python/cpython/pull/26907

___
Python tracker 

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



[issue24132] Direct sub-classing of pathlib.Path

2021-06-24 Thread Kevin Follstad


Change by Kevin Follstad :


--
pull_requests: +25482
pull_request: https://github.com/python/cpython/pull/26906

___
Python tracker 

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



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

2021-06-24 Thread Eric V. Smith


Change by Eric V. Smith :


--
assignee:  -> eric.smith
status: open -> pending

___
Python tracker 

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



[issue44507] Favor needed ASAP

2021-06-24 Thread Steven D'Aprano


Change by Steven D'Aprano :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue44507] Favor needed ASAP

2021-06-24 Thread Glenn Travis


New submission from Glenn Travis :

- This mail is in HTML. Some elements may be ommited in plain text. -

Hi to you!
Need a favor from you, do you have an account with Amazon?
Glenn Travis

--
messages: 396511
nosy: Old Sub Sailor
priority: normal
severity: normal
status: open
title: Favor needed ASAP

___
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-24 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +25481
pull_request: https://github.com/python/cpython/pull/26905

___
Python tracker 

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



[issue42853] `OverflowError: signed integer is greater than maximum` in ssl.py for files larger than 2GB

2021-06-24 Thread Christian Heimes


Christian Heimes  added the comment:

Right now sending and receiving buffers >2 GB over TLS consistently fails on 
all platforms with Python 3.9. A backport of 
bf624032c12c763b72594e5f41ff8af309b85264 to Python 3.9 would make the behavior 
inconsistent. Your code would work on your laptop with a recent Fedora or 
Ubuntu version that has OpenSSL 1.1.1. But it would suddenly fail on your 
production system with Debian 10, because it has OpenSSL 1.1.0 and Python would 
have to fall back to SSL_read().

In my experience these kinds of inconsistencies cause headaches and 
frustrations. A consistent error gives you a chance to notice a problem early 
and to implement a workaround.

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



[issue42853] `OverflowError: signed integer is greater than maximum` in ssl.py for files larger than 2GB

2021-06-24 Thread jakirkham


jakirkham  added the comment:

Not following. Why would it break? Presumably once one builds Python for a 
particular OS they keep there (like system package managers for example).

Or alternatively they build on a much older OS and then deploy to newer ones. 
The latter case is what we do in conda-forge (Anaconda does the same thing). We 
also build our own OpenSSL so have control of that knob too. Though I've seen 
application developers do similar things.

Do you have an example where this wouldn't work? Maybe that would help as we 
can define a better solution there.

--

___
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-24 Thread miss-islington


miss-islington  added the comment:


New changeset a80a38ee9a7b2e26dba848793cc298d8435fddd5 by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-44498: Issue a deprecation warning on asynchat, asyncore and smtpd 
import (GH-26882) (GH-26904)
https://github.com/python/cpython/commit/a80a38ee9a7b2e26dba848793cc298d8435fddd5


--

___
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-24 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:


New changeset 8488b85c6397fe58f17fc00e047044c959ac0b04 by Barry Warsaw in 
branch 'main':
bpo-44498: Issue a deprecation warning on asynchat, asyncore and smtpd import 
(#26882)
https://github.com/python/cpython/commit/8488b85c6397fe58f17fc00e047044c959ac0b04


--

___
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-24 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +25480
pull_request: https://github.com/python/cpython/pull/26904

___
Python tracker 

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



[issue42892] AttributeError in email.message.get_body()

2021-06-24 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Put up the PR here: https://github.com/python/cpython/pull/26903

--

___
Python tracker 

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



[issue42892] AttributeError in email.message.get_body()

2021-06-24 Thread Andrei Kulakov


Change by Andrei Kulakov :


--
pull_requests: +25479
pull_request: https://github.com/python/cpython/pull/26903

___
Python tracker 

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



[issue44185] mock_open file handle __exit__ does not call close

2021-06-24 Thread Samet Yaslan


Change by Samet Yaslan :


--
keywords: +patch
nosy: +sametyaslan
nosy_count: 3.0 -> 4.0
pull_requests: +25478
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26902

___
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-24 Thread Maarten Derickx


Maarten Derickx  added the comment:

Hi Marc-Andre Lemburg,

Thanks for your reply. I tried using gencodec.py as could be downloaded from 
https://github.com/python/cpython/blob/main/Tools/unicode/gencodec.py as you 
mentioned. However the code in gencodec.py seems to be in a much worse shape 
than the iso6937.py attached here. The code in gencodec relies on being able to 
compare integers with tuples. This is caused by the lines:

mappings = sorted(map)

hinting that this code has never been run using python 3.

providing a decent sort key solves this issue. But after that other issues pop 
up. For example there seems to be some problems handling the 0x-001  by the not 
appropriately handling of items in the mapping that have MISSING_CODE resulting 
in things like:

0x80: 0x-001

showing up in the generated code.

And then there is the issue that python_mapdef_code has as a side effect that 
it does 'del map["IDENTITY"]' causing "'IDENTITY' in map" in 
python_tabledef_code to always evaluate to False even when it should evaluate 
to True.

The problems above can be observed by just running gencodec.py on 
https://unicode.org/Public/MAPPINGS/VENDORS/APPLE/SYMBOL.TXT .

If gencodec.py was a trustworthy and well maintained piece of code, I would 
happily use it. However at the moment I don't see it as a valid option since 
debugging gencodec.py would cost me at least as much time as just writing its 
output myself instead of generating it. Additionally https://unicode.org/ 
doesn't seem to provide a mapping file for iso6937.

I do agree that using codecs.charmap_encode and codecs.charmap_decode is a much 
better solution then the one in iso6937.py. But I don't understand gencodec.py 
well enough to actually fix it.

--

___
Python tracker 

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



[issue44505] loop invariant code motion

2021-06-24 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue44505] loop invariant code motion

2021-06-24 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

There are multiple issues with doing 'static' loop invariant code motion in 
python, but the most obvious one is how would you detect if anything in the 
body is related to the loop or not? The trivial way that the compiled languages 
do this optimization is generating some sort of data dependency graph, and 
seeing whether anything in an expression refers to the loop target though in 
Python you can't know for sure unless you know every possible type in the loop 
body and the type of the loop target which is something nearly impossible to 
infer (due to the dynamic nature of python). You could theoretically do this 
only if the whole loop only uses simple values:

for x in [1, 2, 3, 4, 5]:
a = 5
if a > 3:
a += 2
continue

and in that case, it is better to just optimize the whole loop away but since 
this kind of code doesn't exist at all in the public, there is no need to make 
the compiler more complicated.

Another option is generating multiple code objects with guards, which would 
require to do first some sort of partial type inference and generate the code 
for the possible types. It would require a substantial amount of changes on 
both the compiler and the interpreter which is something I'd say can be 
deferred for later if we implement a tracing JIT. With traces, it should be way 
easier to do this sort of trivial compiler optimization (loop invariants, 
constant propagation, GVN, etc.) since we would know the types, and possible 
code paths.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2021-06-24 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Two new failures today:

https://github.com/python/cpython/runs/2905621215:
2021-06-24T14:18:23.3772681Z 
==
2021-06-24T14:18:23.3773622Z FAIL: 
test_sendfile_close_peer_in_the_middle_of_receiving 
(test.test_asyncio.test_sendfile.ProactorEventLoopTests)
2021-06-24T14:18:23.3774665Z 
--
2021-06-24T14:18:23.3775258Z Traceback (most recent call last):
2021-06-24T14:18:23.3776123Z   File 
"D:\a\cpython\cpython\lib\test\test_asyncio\test_sendfile.py", line 457, in 
test_sendfile_close_peer_in_the_middle_of_receiving
2021-06-24T14:18:23.3777065Z with self.assertRaises(ConnectionError):
2021-06-24T14:18:23.375Z AssertionError: ConnectionError not raised
2021-06-24T14:18:23.3778226Z 
2021-06-24T14:18:23.3778744Z 
--
2021-06-24T14:18:23.3779161Z 
2021-06-24T14:18:23.3779555Z Ran 2022 tests in 54.341s
2021-06-24T14:18:23.3779870Z 
2021-06-24T14:18:23.3780352Z FAILED (failures=1, skipped=63)
2021-06-24T14:18:23.3780890Z test test_asyncio failed


https://github.com/python/cpython/runs/2906141524:
2021-06-24T15:23:11.7177493Z 
==
2021-06-24T15:23:11.7178338Z FAIL: 
test_sendfile_close_peer_in_the_middle_of_receiving 
(test.test_asyncio.test_sendfile.ProactorEventLoopTests)
2021-06-24T15:23:11.7179234Z 
--
2021-06-24T15:23:11.7179754Z Traceback (most recent call last):
2021-06-24T15:23:11.7180469Z   File 
"D:\a\cpython\cpython\lib\test\test_asyncio\test_sendfile.py", line 457, in 
test_sendfile_close_peer_in_the_middle_of_receiving
2021-06-24T15:23:11.7181284Z with self.assertRaises(ConnectionError):
2021-06-24T15:23:11.7182125Z AssertionError: ConnectionError not raised
2021-06-24T15:23:11.7182560Z 
2021-06-24T15:23:11.7183334Z 
--
2021-06-24T15:23:11.7183839Z

--
nosy: +erlendaasland

___
Python tracker 

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



[issue44506] test_asyncio: test_sendfile_close_peer_in_the_middle_of_receiving fails on Windows x64 and x86

2021-06-24 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> [Windows] test_asyncio: Proactor 
test_sendfile_close_peer_in_the_middle_of_receiving failure

___
Python tracker 

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



[issue44506] test_asyncio: test_sendfile_close_peer_in_the_middle_of_receiving fails on Windows x64 and x86

2021-06-24 Thread Erlend E. Aasland


New submission from Erlend E. Aasland :

https://github.com/python/cpython/runs/2905621215:
2021-06-24T14:18:23.3772681Z 
==
2021-06-24T14:18:23.3773622Z FAIL: 
test_sendfile_close_peer_in_the_middle_of_receiving 
(test.test_asyncio.test_sendfile.ProactorEventLoopTests)
2021-06-24T14:18:23.3774665Z 
--
2021-06-24T14:18:23.3775258Z Traceback (most recent call last):
2021-06-24T14:18:23.3776123Z   File 
"D:\a\cpython\cpython\lib\test\test_asyncio\test_sendfile.py", line 457, in 
test_sendfile_close_peer_in_the_middle_of_receiving
2021-06-24T14:18:23.3777065Z with self.assertRaises(ConnectionError):
2021-06-24T14:18:23.375Z AssertionError: ConnectionError not raised
2021-06-24T14:18:23.3778226Z 
2021-06-24T14:18:23.3778744Z 
--
2021-06-24T14:18:23.3779161Z 
2021-06-24T14:18:23.3779555Z Ran 2022 tests in 54.341s
2021-06-24T14:18:23.3779870Z 
2021-06-24T14:18:23.3780352Z FAILED (failures=1, skipped=63)
2021-06-24T14:18:23.3780890Z test test_asyncio failed


https://github.com/python/cpython/runs/2906141524:
2021-06-24T15:23:11.7177493Z 
==
2021-06-24T15:23:11.7178338Z FAIL: 
test_sendfile_close_peer_in_the_middle_of_receiving 
(test.test_asyncio.test_sendfile.ProactorEventLoopTests)
2021-06-24T15:23:11.7179234Z 
--
2021-06-24T15:23:11.7179754Z Traceback (most recent call last):
2021-06-24T15:23:11.7180469Z   File 
"D:\a\cpython\cpython\lib\test\test_asyncio\test_sendfile.py", line 457, in 
test_sendfile_close_peer_in_the_middle_of_receiving
2021-06-24T15:23:11.7181284Z with self.assertRaises(ConnectionError):
2021-06-24T15:23:11.7182125Z AssertionError: ConnectionError not raised
2021-06-24T15:23:11.7182560Z 
2021-06-24T15:23:11.7183334Z 
--
2021-06-24T15:23:11.7183839Z

--
components: Tests, asyncio
messages: 396502
nosy: asvetlov, erlendaasland, yselivanov
priority: normal
severity: normal
status: open
title: test_asyncio: test_sendfile_close_peer_in_the_middle_of_receiving fails 
on Windows x64 and x86
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



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

2021-06-24 Thread Dong-hee Na


Dong-hee Na  added the comment:

Since the distutils is deprecated at PEP632, I would like to suggest changing 
the implementation to use setuptools.

--
nosy: +corona10

___
Python tracker 

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



[issue44321] os.EX_OK for Windows

2021-06-24 Thread Steve Dower


Steve Dower  added the comment:


New changeset 19459f8ce63cc7f905e3c1a55d09d4d10d245343 by Samuel Marks in 
branch 'main':
bpo-44321: Adds `os.EX_OK` for Windows (GH-26559)
https://github.com/python/cpython/commit/19459f8ce63cc7f905e3c1a55d09d4d10d245343


--

___
Python tracker 

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



[issue44321] os.EX_OK for Windows

2021-06-24 Thread Steve Dower


Steve Dower  added the comment:

Thanks for the patch!

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



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

2021-06-24 Thread Dong-hee Na


Change by Dong-hee Na :


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



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

2021-06-24 Thread Dong-hee Na


Change by Dong-hee Na :


--
resolution:  -> wont fix

___
Python tracker 

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



[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-06-24 Thread Patrick Reader


Patrick Reader  added the comment:

I would like to note that syntax like this is in heavy use in the Code Golf 
community (a sport in which the aim is to write the shortest code possible to 
complete a particular task).

It will be disappointing if it becomes an error and break many past programs 
(you can search for phrases like `1and`, `0for` on 
https://codegolf.stackexchange.com/search?q=0for for examples).

I could understand if this change remains because code golf is not exactly an 
important thing with serious ramifications, but I think it should be taken in 
to consideration as a use-case nonetheless.

--
nosy: +pxeger

___
Python tracker 

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



[issue42892] AttributeError in email.message.get_body()

2021-06-24 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

I'll try to fix the unit test today.

--
nosy: +andrei.avk

___
Python tracker 

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



[issue39254] python shebang in python3 tarball files

2021-06-24 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> port shebang of tools from python2 to python3

___
Python tracker 

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



[issue44456] Improve syntax error for mixing keyword/positional in max patterns

2021-06-24 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue44456] Improve syntax error for mixing keyword/positional in max patterns

2021-06-24 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed

___
Python tracker 

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



[issue44505] loop invariant code motion

2021-06-24 Thread zcpara


New submission from zcpara :

It is a common scenario to call functions in loop, such as
def foo():
  for i in range(10):
len("abc")
Currently, we generate bytecode like this;
2   0 SETUP_LOOP  24 (to 26)
  2 LOAD_GLOBAL  0 (range)
  4 LOAD_CONST   1 (10)
  6 CALL_FUNCTION1
  8 GET_ITER
>>   10 FOR_ITER12 (to 24)
 12 STORE_FAST   0 (i)

  3  14 LOAD_GLOBAL  1 (len)
 16 LOAD_CONST   2 ('abc')
 18 CALL_FUNCTION1
 20 POP_TOP
 22 JUMP_ABSOLUTE   10
>>   24 POP_BLOCK
>>   26 LOAD_CONST   0 (None)
 28 RETURN_VALUE
If we can make sure len is a loop invariant, we can generate code as follows. 
Only one LOAD_GLOBAL len is executed before the loop. LOAD_GLOBAL len is 
replaced with LOAD_FAST __local__len in the loop.
2   0 LOAD_GLOBAL  0 (range)
  2 LOAD_CONST   1 (10)
  4 CALL_FUNCTION1
  6 GET_ITER
  8 LOAD_GLOBAL  1 (len)
 10 STORE_FAST   1 (__local__len)
>>   12 FOR_ITER 6 (to 26)
 14 STORE_FAST   0 (i)

  3  16 LOAD_FAST1 (__local__len)
 18 LOAD_CONST   2 ('abc')
 20 CALL_FUNCTION1
 22 POP_TOP
 24 JUMP_ABSOLUTE6 (to 12)

  2 >>   26 LOAD_CONST   0 (None)
 28 RETURN_VALU

I prototyped this optimization and gain 4.6% performance improvement on 
regex_v8 of PyPerformance. Currently, only the global invariants are moved out 
of the loop. There are some other loop invariants can be moved. Other 
optimizations such as function inline can provide more opportunities for LICM.
I meet a problem with the following case;
1 def no_pop_blocks():
2y = 1
3while not y:
4bla
5x = 1

bla is not defined anywhere. With LICM, LOAD_GLOBAL bla will be move out of the 
loop. Then it executes with an error: bla is not defined.

--
components: Interpreter Core
messages: 396496
nosy: zhangchaospecial
priority: normal
severity: normal
status: open
title: loop invariant code motion
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



[issue44456] Improve syntax error for mixing keyword/positional in max patterns

2021-06-24 Thread miss-islington


miss-islington  added the comment:


New changeset 11f1a30cdb59f9da0209798d2057f7afacbd9547 by Miss Islington (bot) 
in branch '3.10':
bpo-44456: Improve the syntax error when mixing keyword and positional patterns 
(GH-26793)
https://github.com/python/cpython/commit/11f1a30cdb59f9da0209798d2057f7afacbd9547


--

___
Python tracker 

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



[issue44504] Make docstring quotes consistent in Lib/_collections_abc.py

2021-06-24 Thread Yevhen Kuzmovych


Change by Yevhen Kuzmovych :


--
title: Make docstring quotes consistent in Lib -> Make docstring quotes 
consistent in Lib/_collections_abc.py

___
Python tracker 

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



[issue44491] [sqlite3] allow clearing the authoriser callback

2021-06-24 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue44501] Packing constant call arguments

2021-06-24 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

I've tested this with pyperformance, and no significant (1.02 faster on some, 
1.01x slower on others, nothing significant) change on those so this is a 
targeted optimization.

--

___
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-24 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue44456] Improve syntax error for mixing keyword/positional in max patterns

2021-06-24 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44456] Improve syntax error for mixing keyword/positional in max patterns

2021-06-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 0acc258fe6f0ec200ca2f6f9294adbf52a244802 by Pablo Galindo in 
branch 'main':
bpo-44456: Improve the syntax error when mixing keyword and positional patterns 
(GH-26793)
https://github.com/python/cpython/commit/0acc258fe6f0ec200ca2f6f9294adbf52a244802


--

___
Python tracker 

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



[issue26724] Serialize dict with non-string keys to JSON — unexpected result

2021-06-24 Thread Irit Katriel


Irit Katriel  added the comment:

This is documented, was added here: 
https://github.com/python/cpython/commit/f2123d2db54d661a016f02c5a1a02484d6d79e0d

If nobody objects I will close as won't fix.

--
nosy: +iritkatriel
resolution:  -> wont fix
status: open -> pending

___
Python tracker 

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



[issue44491] [sqlite3] allow clearing the authoriser callback

2021-06-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset b19f45533942e4ad7ddf9d2d94f8b87c6f746bce by Erlend Egeberg 
Aasland in branch 'main':
bpo-44491: Allow clearing the sqlite3 authoriser callback (GH-26863)
https://github.com/python/cpython/commit/b19f45533942e4ad7ddf9d2d94f8b87c6f746bce


--
nosy: +pablogsal

___
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-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 71ba16b21cb35923098026117b5e6d823c5f5707 by Miss Islington (bot) 
in branch '3.8':
bpo-44229: Ignore spurious EPROTOTYPE on macOS in test_ssl (GH-26893) (GH-26895)
https://github.com/python/cpython/commit/71ba16b21cb35923098026117b5e6d823c5f5707


--

___
Python tracker 

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



[issue43066] Zipfile with leading slashes

2021-06-24 Thread Andrei Kulakov


Change by Andrei Kulakov :


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

___
Python tracker 

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



[issue44504] Make docstring quotes consistent in Lib

2021-06-24 Thread Yevhen Kuzmovych


Change by Yevhen Kuzmovych :


--
title: Make docstring quotes consistent in Lib/_collections_abc.py -> Make 
docstring quotes consistent in Lib

___
Python tracker 

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



[issue43066] Zipfile with leading slashes

2021-06-24 Thread Garrison Taylor


Garrison Taylor  added the comment:

That addition to the documentation sounds appropriate to me. Thanks!

--

___
Python tracker 

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



[issue24203] Deprecate threading.Thread.isDaemon etc

2021-06-24 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Deprecate camelCase aliases from threading.py

___
Python tracker 

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



[issue44504] Make docstring quotes consistent in Lib/_collections_abc.py

2021-06-24 Thread Yevhen Kuzmovych


Change by Yevhen Kuzmovych :


--
title: Typo in the docstring of Mapping.get method -> Make docstring quotes 
consistent in Lib/_collections_abc.py

___
Python tracker 

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



[issue40939] Remove the old parser

2021-06-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25474
pull_request: https://github.com/python/cpython/pull/26898

___
Python tracker 

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



[issue40939] Remove the old parser

2021-06-24 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 29987f72650b7cccee4df216c8297e8484a44e6a by Petr Viktorin in 
branch 'main':
bpo-40939: Remove documentation for `PyParser_*` & add porting notes (GH-26855)
https://github.com/python/cpython/commit/29987f72650b7cccee4df216c8297e8484a44e6a


--

___
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-24 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

FYI, here's a CI failure against 3.9:
https://github.com/python/cpython/runs/2894813367?check_suite_focus=true

--

___
Python tracker 

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



[issue22543] -W option cannot use non-standard categories

2021-06-24 Thread Omer Ozarslan


Change by Omer Ozarslan :


--
nosy: +ozars

___
Python tracker 

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



[issue43553] [sqlite3] Improve test coverage

2021-06-24 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


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



[issue33450] unexpected EPROTOTYPE returned by sendto on MAC OSX

2021-06-24 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

See also bpo-44229.

--

___
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-24 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Marking this as a duplicate of bpo-44229. Please revert if you disagree.

--
dependencies:  -test_ssl: test_get_server_certificate() and 
test_msg_callback_deadlock_bpo43577() fail randomly on the macOS CI
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> test_ssl: test_get_server_certificate() and 
test_msg_callback_deadlock_bpo43577() fail randomly on the macOS CI

___
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-24 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Marking bpo-44237 as a duplicate of this issue.

--

___
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-24 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Marking bpo-43855 as a duplicate of this issue.

--

___
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-24 Thread miss-islington


miss-islington  added the comment:


New changeset b3fac2926b23b4f1342099e591aa3fed7f16876d by Miss Islington (bot) 
in branch '3.10':
bpo-44229: Ignore spurious EPROTOTYPE on macOS in test_ssl (GH-26893)
https://github.com/python/cpython/commit/b3fac2926b23b4f1342099e591aa3fed7f16876d


--

___
Python tracker 

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



[issue43855] test_ssl: test_msg_callback_deadlock_bpo43577() failed on macOS of GitHub Action

2021-06-24 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Closing as a duplicate of bpo-44229. Please revert if you disagree.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> test_ssl: test_get_server_certificate() and 
test_msg_callback_deadlock_bpo43577() fail randomly on the macOS CI

___
Python tracker 

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



[issue44504] Typo in the docstring of Mapping.get method

2021-06-24 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +25473
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/26897

___
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-24 Thread miss-islington


miss-islington  added the comment:


New changeset 0796e21fea31fe7b697d84c8d03186817792c458 by Miss Islington (bot) 
in branch '3.9':
bpo-44229: Ignore spurious EPROTOTYPE on macOS in test_ssl (GH-26893)
https://github.com/python/cpython/commit/0796e21fea31fe7b697d84c8d03186817792c458


--

___
Python tracker 

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



[issue44504] Typo in the docstring of Mapping.get method

2021-06-24 Thread Yevhen Kuzmovych


Change by Yevhen Kuzmovych :


--
status: closed -> open

___
Python tracker 

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



[issue44504] Typo in the docstring of Mapping.get method

2021-06-24 Thread Yevhen Kuzmovych


Change by Yevhen Kuzmovych :


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



[issue44504] Typo in the docstring of Mapping.get method

2021-06-24 Thread Yevhen Kuzmovych


New submission from Yevhen Kuzmovych :

The comment of `Mapping.get` method should state

'D.get(k[,d]) -> D[k] if k in D else d.  d defaults to None.'

instead of 

'D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.' (note the comma 
before `else`.

--
components: Library (Lib)
messages: 396478
nosy: kuzmovich.goog
priority: normal
severity: normal
status: open
title: Typo in the docstring of Mapping.get method
type: enhancement
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



[issue40528] Improve / Clear ASDL generator

2021-06-24 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:


New changeset 6c76df2b86d742cc294beae7f9b6bafabb946ad5 by Batuhan Taskaya in 
branch 'main':
bpo-40528: move asdl identifier collection to the new metadata system (GH-26858)
https://github.com/python/cpython/commit/6c76df2b86d742cc294beae7f9b6bafabb946ad5


--

___
Python tracker 

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



[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2021-06-24 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 733587011dbb47c2e461188f0574e1cc5288062a by Miss Islington (bot) 
in branch '3.10':
bpo-43916: Use test.support.check_disallow_instantiation() in test_tcl 
(GH-26412) (GH-26888)
https://github.com/python/cpython/commit/733587011dbb47c2e461188f0574e1cc5288062a


--

___
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-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 0b6b2865187bca7ed7f1f511a02fc8bd13ee38ca by Mark Shannon in 
branch '3.10':
bpo-44297: Add a regression test for line numbers in with statements (GH-26891)
https://github.com/python/cpython/commit/0b6b2865187bca7ed7f1f511a02fc8bd13ee38ca


--

___
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-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25472
pull_request: https://github.com/python/cpython/pull/26896

___
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-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25471
pull_request: https://github.com/python/cpython/pull/26895

___
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-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset b5a52eef67997246b4235b5407e52a01e822ce56 by Erlend Egeberg 
Aasland in branch 'main':
bpo-44229: Ignore spurious EPROTOTYPE on macOS in test_ssl (GH-26893)
https://github.com/python/cpython/commit/b5a52eef67997246b4235b5407e52a01e822ce56


--

___
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-24 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue43553] [sqlite3] Improve test coverage

2021-06-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 2c1ae09764446beda5248759fb99c859e14f1b25 by Erlend Egeberg 
Aasland in branch 'main':
bpo-43553: Improve `sqlite3` test coverage (GH-26886)
https://github.com/python/cpython/commit/2c1ae09764446beda5248759fb99c859e14f1b25


--
nosy: +pablogsal

___
Python tracker 

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



[issue36991] zipfile: AttributeError on extract

2021-06-24 Thread Irit Katriel


Irit Katriel  added the comment:

This seems resolved, can we close?

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

___
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-24 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


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

___
Python tracker 

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



[issue40471] Grammar typo in issubclass docstring

2021-06-24 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -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



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

2021-06-24 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

I can reproduce these issues easily on 3.7, 3.8, and 3.9:

$ python3.7 -m test test_ssl -u all -F -m test_get_server_certificate -v
[...]
test_get_server_certificate (test.test_ssl.SimpleBackgroundTests) ...  server:  
new connection from ('127.0.0.1', 57294)

 server:  bad connection attempt from ('127.0.0.1', 57294):
Traceback (most recent call last):
   File "/Users/erlendaasland/install/lib/python3.7/test/test_ssl.py", line 
2313, in wrap_conn
self.sock, server_side=True)
   File "/Users/erlendaasland/install/lib/python3.7/ssl.py", line 423, in 
wrap_socket
session=session
   File "/Users/erlendaasland/install/lib/python3.7/ssl.py", line 870, in 
_create
self.do_handshake()
   File "/Users/erlendaasland/install/lib/python3.7/ssl.py", line 1139, in 
do_handshake
self._sslobj.do_handshake()
 OSError: [Errno 41] Protocol wrong type for socket
ERROR

==
ERROR: test_get_server_certificate (test.test_ssl.SimpleBackgroundTests)
--
Traceback (most recent call last):
  File "/Users/erlendaasland/install/lib/python3.7/test/test_ssl.py", line 
2108, in test_get_server_certificate
_test_get_server_certificate(self, *self.server_addr, cert=SIGNING_CA)
  File "/Users/erlendaasland/install/lib/python3.7/test/test_ssl.py", line 
2273, in _test_get_server_certificate
pem = ssl.get_server_certificate((host, port), ca_certs=cert)
  File "/Users/erlendaasland/install/lib/python3.7/ssl.py", line 1313, in 
get_server_certificate
with  create_connection(addr) as sock:
  File "/Users/erlendaasland/install/lib/python3.7/socket.py", line 728, in 
create_connection
raise err
  File "/Users/erlendaasland/install/lib/python3.7/socket.py", line 716, in 
create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused


$ python3.8 -m test test_ssl -u all -F -m test_get_server_certificate -v
test_ssl: testing with 'OpenSSL 1.1.1k  25 Mar 2021' (1, 1, 1, 11, 15)
  under Mac ('10.16', ('', '', ''), 'x86_64')
  HAS_SNI = True
  OP_ALL = 0x8054
  OP_NO_TLSv1_1 = 0x1000
test_get_server_certificate (test.test_ssl.SimpleBackgroundTests) ...  server:  
new connection from ('127.0.0.1', 59370)

 server:  bad connection attempt from ('127.0.0.1', 59370):
Traceback (most recent call last):
   File 
"/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/test/test_ssl.py",
 line 2348, in wrap_conn
self.sslconn = self.server.context.wrap_socket(
   File 
"/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 
500, in wrap_socket
return self.sslsocket_class._create(
   File 
"/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 
1040, in _create
self.do_handshake()
   File 
"/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 
1309, in do_handshake
self._sslobj.do_handshake()
 OSError: [Errno 41] Protocol wrong type for socket
ERROR

==
ERROR: test_get_server_certificate (test.test_ssl.SimpleBackgroundTests)
--
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/test/test_ssl.py",
 line 2142, in test_get_server_certificate
_test_get_server_certificate(self, *self.server_addr, cert=SIGNING_CA)
  File 
"/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/test/test_ssl.py",
 line 2309, in _test_get_server_certificate
pem = ssl.get_server_certificate((host, port), ca_certs=cert)
  File 
"/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 
1484, in get_server_certificate
with context.wrap_socket(sock) as sslsock:
  File 
"/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 
500, in wrap_socket
return self.sslsocket_class._create(
  File 
"/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 
1040, in _create
self.do_handshake()
  File 
"/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 
1309, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 54] Connection reset by peer


$ python3.9 -m test test_ssl -u all -F -m test_get_server_certificate -v
[...]
test_ssl: testing with 'OpenSSL 1.1.1k  25 Mar 2021' (1, 1, 1, 11, 15)
  under Mac ('10.16', ('', '', ''), 'x86_64')
  HAS_SNI = True
  OP_ALL = 0x8054
  OP_NO_TLSv1_1 = 0x1000
test_get_server_certificate (test.test_ssl.SimpleBackgroundTests) ...  server:  
new connection from ('127.0.0.1', 60096)

 server:  bad connection attempt from ('127.0.0.1', 60096):
Traceback (most recent call last):
   File 

[issue44503] Hide __enter__ calls in mock_open

2021-06-24 Thread Pierre Ossman


Pierre Ossman  added the comment:

Also see Issue44185 for __exit__.

--

___
Python tracker 

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



[issue44503] Hide __enter__ calls in mock_open

2021-06-24 Thread Pierre Ossman


New submission from Pierre Ossman :

I'd like to write this test case:

  with patch('builtins.open') as pyopen:
mock_open(pyopen, read_data="foo")
run()
pyopen.assert_has_calls([call("filename", "wt"),
 call().write("gazonk"),
 call().close()])

and I shouldn't have to care if the code is written like this:

  def run():
f = open("filename", "wt")
try:
  write("gazonk")
finally:
  f.close()

or like this:

  def run():
with open("filename", "wt") as f:
  write("gazonk")

--
components: Library (Lib)
messages: 396469
nosy: CendioOssman
priority: normal
severity: normal
status: open
title: Hide __enter__ calls in mock_open
type: enhancement

___
Python tracker 

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



[issue27086] Add closefd argument to os.listdir

2021-06-24 Thread Irit Katriel


Irit Katriel  added the comment:

I agree with Serhiy and David. The responsibility for closing the file is with 
whoever opened it, and adding an option in a function for it to also close the 
fd after doing what it was designed to do makes the API unnecessarily 
over-complicated.

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



[issue44502] bla in cpython/Lib/test/test_sys_settrace.py

2021-06-24 Thread Irit Katriel


Irit Katriel  added the comment:

y = 1, so the body of the while loop will never execute and the name will never 
need to be resolved.

The bug tracker is not an appropriate place to ask questions about the code, it 
is for reporting bugs in python.

--
nosy: +iritkatriel
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



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

2021-06-24 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

... should perhaps also return True in that case, but it does not seem to have 
any thing to say.

--

___
Python tracker 

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



[issue44502] bla in cpython/Lib/test/test_sys_settrace.py

2021-06-24 Thread zcpara


New submission from zcpara :

In cpython/Lib/test/test_sys_settrace.py, there is a function:
1 def no_pop_blocks():
2y = 1
3while not y:
4bla
5x = 1

what does bla mean? bla is not defined anywhere. But the function can pass the 
compilation. bla is treated as a global name in symtable during compilation. 
Why does python allow this statement (line 4)? Will line 4 be deleted in the 
future? Or be replaced with pass?

--
components: Tests
messages: 396465
nosy: zhangchaospecial
priority: normal
severity: normal
status: open
title: bla in cpython/Lib/test/test_sys_settrace.py
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



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

2021-06-24 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Using this patch, I'm (so far) no longer able to reproduce these test failures:

diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index cee97a8302..c9c1546467 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -2443,9 +2443,13 @@ def wrap_conn(self):
 self.server.conn_errors.append(str(e))
 if self.server.chatty:
 handle_error("\n server:  bad connection attempt from " + 
repr(self.addr) + ":\n")
-self.running = False
-self.server.stop()
-self.close()
+
+# bpo-44229, bpo-43855, bpo-44237, and bpo-33450:
+# Ignore spurious EPROTOTYPE returned by write() on macOS.
+if e.errno != errno.EPROTOTYPE and sys.platform != "darwin":
+self.running = False
+self.server.stop()
+self.close()
 return False
 else:
 
self.server.shared_ciphers.append(self.sslconn.shared_ciphers())



Running for 40 minutes now, right now passing 6k iterations for 
test_get_server_certificate, test_msg_callback_deadlock_bpo43577, and 
test_get_server_certificate_sni.

--

___
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-24 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +25468
pull_request: https://github.com/python/cpython/pull/26891

___
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-24 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +25467
pull_request: https://github.com/python/cpython/pull/26890

___
Python tracker 

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



[issue42853] `OverflowError: signed integer is greater than maximum` in ssl.py for files larger than 2GB

2021-06-24 Thread Christian Heimes


Christian Heimes  added the comment:

No, it would be a backwards incompatible change and introduce inconsistent 
behavior. SSL_read_ex() is not available in LibreSSL, OpenSSL 1.0.2, and 
OpenSSL 1.1.0. Your code would work on CentOS 8, Debian 10, and Ubuntu 20.04, 
but break on CentOS 7, Debian 9, Ubuntu 18.04, and OpenBSD.

--

___
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-24 Thread kryheb


kryheb  added the comment:

Thanks vstinner for your help and for taking care of this case!

--

___
Python tracker 

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



[issue42853] `OverflowError: signed integer is greater than maximum` in ssl.py for files larger than 2GB

2021-06-24 Thread jakirkham


jakirkham  added the comment:

Right with this change ( https://github.com/python/cpython/pull/25468 ). Thanks 
for adding that Christian :)

I guess what I'm wondering is if in older Python versions we could do an 
`#ifdef` check to try and use `SSL_read_ex` & `SSL_write_ex` if the symbols are 
found at build time? This would allow package maintainers the option to build 
with a newer OpenSSL to fix this issue (even on older Pythons)

--

___
Python tracker 

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



[issue42853] `OverflowError: signed integer is greater than maximum` in ssl.py for files larger than 2GB

2021-06-24 Thread Inada Naoki


Inada Naoki  added the comment:

I see. But Python 3.8 is now security fix mode.
Let's revert the optimization in the 3.9 branch.

--

___
Python tracker 

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



[issue42853] `OverflowError: signed integer is greater than maximum` in ssl.py for files larger than 2GB

2021-06-24 Thread Christian Heimes


Christian Heimes  added the comment:

The ssl module supports sending or receiving buffers of more than 2GB in Python 
3.10. It cannot be reliable fixed in Python 3.9 and earlier.

--

___
Python tracker 

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



  1   2   >