[issue45620] A misleading url in 'Floating Point Arithmetic' page

2021-10-27 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

I was unable to replicate this. I see the correct article 
"The Perils of Floating Point" at lahey.com/float.htm. Is the site still 
incorrect for you, or did the Lahey site fix the issue?

--
assignee:  -> docs@python
components: +Documentation
nosy: +Dennis Sweeney, docs@python

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2021-10-27 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue45621] Small fixes to mmap

2021-10-27 Thread Tim Golden


New submission from Tim Golden :

Following issue40915 a few small items still need to be addressed, mostly 
cosmetic / naming:

* A comment should have been removed but wasn't
* A comment should have been added but wasn't
* The use of the string "TEST" should be avoided in tests particularly where 
there is a shared namespace and therefore the chance of a collision

--
assignee: tim.golden
messages: 405073
nosy: tim.golden
priority: low
severity: normal
status: open
title: Small fixes to mmap
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



[issue42545] Check that all symbols in the limited ABI are exported

2021-10-27 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Pablo, can this be closed?

--
nosy: +erlendaasland

___
Python tracker 

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



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

2021-10-27 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Gregory P. Smith wrote:
> A higher level "best practices for launching child processes module" with 
> APIs reflecting explicit intents (performance vs security vs simplicity) 
> rather than requiring users to understand subprocess platform specific 
> details may be a good idea at this point (on PyPI I assume).

Interesting that you say that. subprocess was originally written with exactly 
this idea in mind - to create a module which deals with all the platform 
details, so that the user doesn't have to know about them: 
https://www.python.org/dev/peps/pep-0324/#motivation

On the topic itself: I believe Python should come with safe and usable 
defaults, but provide ways to enable alternative approaches which have more 
performance if the user so decides (by e.g. passing in a parameter). In such 
cases, the user then becomes responsible for understanding the implications.

Since there already is a parameter, expert users can already gain more 
performance by using it and then explicitly only closing FDs the users knows 
can/should be closed in the new process.

Perhaps there's a middle ground: have subprocess only loop over the first 64k 
FDs per default and not all possible ones.

--
nosy: +lemburg

___
Python tracker 

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



[issue45622] BlockingIOError: [Errno 11] Resource temporarily unavailable when performing SSL handshake on Solaris

2021-10-27 Thread Florin Spătar

New submission from Florin Spătar :

Trying to connect to an uWSGI (or any other) server, from Solaris, will fail 
with the following error:

-bash-3.00# /opt/opsware/agent/bin/python3 client.py 
/tmp/client.py:9: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
  context = ssl.SSLContext(ssl.PROTOCOL_TLS)
Exception in thread Thread-1 (make_connection):
Traceback (most recent call last):
  File "/opt/opsware/agent/lib/python3.10/threading.py", line 1009, in 
_bootstrap_inner
self.run()
  File "/opt/opsware/agent/lib/python3.10/threading.py", line 946, in run
self._target(*self._args, **self._kwargs)
  File "/tmp/client.py", line 13, in make_connection
with context.wrap_socket(sock, server_hostname=hostname) as ssock:
  File "/opt/opsware/agent/lib/python3.10/ssl.py", line 512, in wrap_socket
return self.sslsocket_class._create(
  File "/opt/opsware/agent/lib/python3.10/ssl.py", line 1070, in _create
self.do_handshake()
  File "/opt/opsware/agent/lib/python3.10/ssl.py", line 1341, in do_handshake
self._sslobj.do_handshake()
BlockingIOError: [Errno 11] Resource temporarily unavailable

I used the following client code (based on 
https://docs.python.org/3.10/library/ssl.html#socket-creation):

import socket
import ssl
import threading

hostname = '192.168.135.9'
port = 1004

def make_connection():
context = ssl.SSLContext(ssl.PROTOCOL_TLS)

with socket.create_connection((hostname, port)) as sock:
sock.settimeout(300) # use non-blocking I/O
with context.wrap_socket(sock, server_hostname=hostname) as 
ssock:
print(ssock.version())


t=threading.Thread(target=make_connection)
t.start()
t.join()

This works fine on multiple Linux distros, AIX, and HP-UX. It even seems to 
work on Solaris Sparc. There seems to be an issue only on Solaris (5.10/5.11) 
x86.
Furthermore, in order to reproduce the issue, the SSL handshake needs to be 
performed from a thread and use non-blocking I/O. If I use blocking I/O or 
don't use thread, the issue doesn't reproduce anymore.

The issues first started to appear in python 3.8.5 when I switched from openssl 
1.0.2u to 1.1.1k. The issue is still reproducible with python 3.10 and openssl 
3.0.0

--
assignee: christian.heimes
components: SSL
files: client.py
messages: 405076
nosy: christian.heimes, florinspatar
priority: normal
severity: normal
status: open
title: BlockingIOError: [Errno 11] Resource temporarily unavailable when 
performing SSL handshake on Solaris
type: behavior
versions: Python 3.10, Python 3.8
Added file: https://bugs.python.org/file50394/client.py

___
Python tracker 

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



[issue45620] A misleading url in 'Floating Point Arithmetic' page

2021-10-27 Thread Sonia


Sonia  added the comment:

I was redirect to https://www.hmbags.tw 
so is this my internet problem?

--

___
Python tracker 

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



[issue45620] A misleading url in 'Floating Point Arithmetic' page

2021-10-27 Thread Sonia

Sonia  added the comment:

It shows the drug ad slogan even with the google search result.
I searched 'The Perils of Floating Point lahey'

--
Added file: https://bugs.python.org/file50395/截圖 2021-10-27 下午5.02.02.png

___
Python tracker 

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



[issue44511] Improve the bytecode for mapping patterns

2021-10-27 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 82a662e5216a9b3969054c540a759a9493468510 by Brandt Bucher in 
branch 'main':
bpo-44511: Improve the bytecode for class and mapping patterns (GH-26922)
https://github.com/python/cpython/commit/82a662e5216a9b3969054c540a759a9493468510


--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue45388] Use JUMP_FORWARD for all forward jumps.

2021-10-27 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



[issue45622] BlockingIOError: [Errno 11] Resource temporarily unavailable when performing SSL handshake on Solaris

2021-10-27 Thread Christian Heimes


Christian Heimes  added the comment:

Thanks for the detailed bug report.

Since the code works on Linux and other platforms as well as OpenSSL 1.0.2, it 
is likely a platform bug or a platform-specific issue with OpenSSL. 
Unfortunately I don't know how to investigate this issue.

--
assignee: christian.heimes -> 

___
Python tracker 

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



[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-10-27 Thread Mark Shannon


Mark Shannon  added the comment:

Damien, thanks for catching this.

The change was not intended.

There are two kind of exceptions raised by send.
1. Where a pre-condition is not met, e.g. a generator is already ruuning 
(caller errors)
2. When the generator/coroutine raises an exception (callee exceptions).

(1) does not change the state of the generator, (2) does.

Sending non-None to a generator that has not started falls into kind 1, IMO. So 
we should revert the change.

--

___
Python tracker 

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



[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-10-27 Thread Mark Shannon


Change by Mark Shannon :


--
priority: normal -> release blocker

___
Python tracker 

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



[issue45623] static build is broken

2021-10-27 Thread egorpugin


New submission from egorpugin :

Static build is not working any more since 3.10.

'winver' member is only defined with dll build.

See master - 'winver' call which is not available for windows+static build.
https://github.com/python/cpython/blob/main/Lib/site.py#L292

See 3.9 file - no 'winver' call.
https://github.com/python/cpython/blob/1016ef37904c7ddc16fb18d3369b2a78cf428fa4/Lib/site.py#L266

Error:
```
1>EXEC : Fatal Python error : init_import_site: Failed to import the site module
1>Python runtime state: initialized
1>Traceback (most recent call last):
1>  File "D:\dev\swst\pkg\8b\0a\10a9\src\sdir\Lib\site.py", line 657, in 

1>main()
1>  File "D:\dev\swst\pkg\8b\0a\10a9\src\sdir\Lib\site.py", line 643, in main
1>known_paths = addusersitepackages(known_paths)
1>  File "D:\dev\swst\pkg\8b\0a\10a9\src\sdir\Lib\site.py", line 380, in 
addusersitepackages
1>user_site = getusersitepackages()
1>  File "D:\dev\swst\pkg\8b\0a\10a9\src\sdir\Lib\site.py", line 367, in 
getusersitepackages
1>USER_SITE = _get_path(userbase)
1>  File "D:\dev\swst\pkg\8b\0a\10a9\src\sdir\Lib\site.py", line 332, in 
_get_path
1>ver_nodot = sys.winver.replace('.', '')
1>AttributeError: module 'sys' has no attribute 'winver'
```

--
messages: 405082
nosy: egorpugin
priority: normal
severity: normal
status: open
title: static build is broken
type: behavior
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-10-27 Thread Mark Shannon


Mark Shannon  added the comment:

Just to be clear, it is the behavior change that should be reverted, not 
necessarily the new bytecode.

In fact we should probably push on with (2) and add an exception handler 
wrapping the whole generator except the GEN_START. That way a GEN_START 
exception will not clear the generator.
GEN_START might need to do a bit of trickery like setting lasti back to -1.

--

___
Python tracker 

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



[issue45624] test_graphlib.py depends on iteration order of sets

2021-10-27 Thread Carl Friedrich Bolz-Tereick


New submission from Carl Friedrich Bolz-Tereick :

test_graphlib fails on PyPy because it depends on the iteration order of sets. 
Will open a PR soon.

--
messages: 405084
nosy: Carl.Friedrich.Bolz
priority: normal
severity: normal
status: open
title: test_graphlib.py depends on iteration order of sets

___
Python tracker 

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



[issue45624] test_graphlib.py depends on iteration order of sets

2021-10-27 Thread Carl Friedrich Bolz-Tereick


Carl Friedrich Bolz-Tereick  added the comment:

here's the traceback running on pypy3.9-alpha:

==
FAIL: test_simple_cases (test.test_graphlib.TestTopologicalSort)
--
Traceback (most recent call last):
  File 
"/home/cfbolz/projects/small-commits-pypy/lib-python/3/test/test_graphlib.py", 
line 39, in test_simple_cases
[(3, 5, 7), (11, 8), (2, 10, 9)],
  File 
"/home/cfbolz/projects/small-commits-pypy/lib-python/3/test/test_graphlib.py", 
line 19, in _test_graph
self.assertEqual(list(static_order_with_groups(ts)), list(expected))
AssertionError: Lists differ: [(3, 7, 5), (8, 11), (2, 9, 10)] != [(3, 5, 7), 
(11, 8), (2, 10, 9)]

First differing element 0:
(3, 7, 5)
(3, 5, 7)

- [(3, 7, 5), (8, 11), (2, 9, 10)]
+ [(3, 5, 7), (11, 8), (2, 10, 9)]

--

___
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-10-27 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 8f24b7dbcbd83311dad510863d8cb41f0e91b464 by Erlend Egeberg 
Aasland in branch 'main':
bpo-42064: Convert `sqlite3` global state to module state (GH-29073)
https://github.com/python/cpython/commit/8f24b7dbcbd83311dad510863d8cb41f0e91b464


--

___
Python tracker 

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



[issue45624] test_graphlib.py depends on iteration order of sets

2021-10-27 Thread Carl Friedrich Bolz-Tereick


Change by Carl Friedrich Bolz-Tereick :


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

___
Python tracker 

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



[issue45623] static build is broken

2021-10-27 Thread egorpugin


Change by egorpugin :


--
components: +Library (Lib)

___
Python tracker 

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



[issue40990] Make http.server support SSL

2021-10-27 Thread Fred


Fred  added the comment:

How is this going? Any progress?

--

___
Python tracker 

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



[issue45625] Add support for top-level await

2021-10-27 Thread Fred


New submission from Fred :

I want top-level await without any boilerplate code or setup.
Just write a "await" statement on line 1 without any indention.

#!/usr/bin/env python3
import asyncio
await asyncio.sleep(1)


I don't want to have to call asyncio.run(main()), and I don't  want to have to 
put the await inside an async function.

--
components: Interpreter Core
messages: 405088
nosy: Fred
priority: normal
severity: normal
status: open
title: Add support for top-level await
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



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

2021-10-27 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +27497
pull_request: https://github.com/python/cpython/pull/29234

___
Python tracker 

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



[issue42545] Check that all symbols in the limited ABI are exported

2021-10-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

We are missing documentation in the devguide. We could close this and open an 
issue in the devguide :)

--

___
Python tracker 

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



[issue40866] Use PyModule_AddType() in posix module initialisation

2021-10-27 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
resolution:  -> out of date

___
Python tracker 

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



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

2021-10-27 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +27498
pull_request: https://github.com/python/cpython/pull/29235

___
Python tracker 

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



[issue34046] subparsers -> add_parser doesn't support hyphen char '-'

2021-10-27 Thread Артём Иконников

Артём Иконников  added the comment:

I've also struggled with this. The subparser documentation describes them as a 
tool to "split up functionality into a number of sub-commands". 
>From the reader's point of view it's not obvious that such "sub-commands" 
>cannot start with --

--
nosy: +tryauuum

___
Python tracker 

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



[issue45626] Email part with content type message is multipart.

2021-10-27 Thread John Howroyd


New submission from John Howroyd :

>From the library documentation, it is an intended feature that an email part 
>with content_maintype == "message" is treated as multipart.  This does not 
>seem to be compliant to MIME specification nor expected semantics.  The 
>attached email (from the dnc wikileaks collection) is a good example where 
>this logic breaks down.

Code:
import pathlib
pth = "16155.eml" # path to example
import email
import email.parser
parser = email.parser.BytesParser()
fl = pth.open("rb")
eml = parser.parse(fl)
pts = [p for p in eml.walk()]
len(pts) # returns 52

Here pts[0] is the root part of content_type 'multipart/report'.
Then pts[1] has content_type 'multipart/alternative' containing the 
'text/plain' pts[2] and the 'text/html' pts[3] (which most email clients would 
consider the message (of this email).  All good so far.

The problem is that pts[4] of content_type 'message/delivery-status' which has 
pts[4].is_multipart() [True] and contains 46 sub parts as returned by 
pts[4].get_payload(): these are pts[5], ... , pts[50]. Finally, pts[51] has 
content_type 'text/rfc822-headers' which is fine.

Each of the subparts of pts[4] (pts[5:51]) have "" returned by 
pts[n].get_payload() as their content is treated as headers. Where as 
pts[4].as_bytes includes the header (and separating blank line) for that part; 
namely, b'Content-Type: message/delivery-status\n\n'.

Looking at the raw file and in particular the MIME boundary makers it would 
seem to me that pts[4] should not be considered multipart and that there is no 
indication from a content-type of 'message/delivery-status' should or even 
could be considered an (rfc822) email.

Moreover, as the main developer of a system to forensically analyse large 
(million +) corpora of emails this behaviour of treating parts even of the 
specific content-type 'message/rfc822' is undisarable; typically, these occur 
as part of bounce messages and have their content-disposition set to 
'attachment'.  As a developer what would seem more natural in the case that 
this behaviour is wanted would be to test parts for the content-type 
'message/rfc822' and pass the .get_payload(decode=True) to the bytes parser 
parser.parse() method.

I appreciate the need to support backwards compatibility, so presumably this 
would require an addition to email.policy to govern which parts should be 
treated as multipart.  I would be more than happy to submit a patch for this 
but fear it would be rejected out of hand (as the original intent is clearly to 
parse out contained emails).

--
components: Library (Lib)
files: 16155.eml
messages: 405091
nosy: jdhowroyd
priority: normal
severity: normal
status: open
title: Email part with content type message is multipart.
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file50396/16155.eml

___
Python tracker 

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



[issue45548] Update Modules/Setup

2021-10-27 Thread Anthony Sottile


Anthony Sottile  added the comment:

I'm seeing some weird breakage in the deadsnakes builds, presumably due to this 
change:

```
...
2021-10-27T08:55:21.9485959Z x86_64-linux-gnu-gcc -pthread -Wno-unused-result 
-Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -g -fdebug-prefix-map=/tmp/code=. 
-specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector -Wformat 
-Werror=format-security-std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration -fvisibility=hidden  
-I../Include/internal -IObjects -IInclude -IPython -I. -I../Include -Wdate-time 
-D_FORTIFY_SOURCE=2   -DPy_BUILD_CORE_BUILTIN  -c 
../Modules/_blake2/blake2module.c -o Modules/_blake2/blake2module.o
2021-10-27T08:55:22.0563233Z Assembler messages:
2021-10-27T08:55:22.0565823Z Fatal error: can't create 
Modules/_blake2/blake2module.o: No such file or directory
2021-10-27T08:55:22.0622105Z Makefile:2177: recipe for target 
'Modules/_blake2/blake2module.o' failed
...
```

https://github.com/deadsnakes/python3.11-nightly/actions/runs/1389342824

I believe this is due to 
https://github.com/python/cpython/pull/29225/files#diff-aac314cb71e95912e95795a4f4a278f2e75a5bc28e93f52e338185c8e7f7d7eaL225

--
nosy: +Anthony Sottile

___
Python tracker 

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



[issue23556] [doc] Scope for raise without argument is different in Python 2 and 3

2021-10-27 Thread Kinshuk Dua


Change by Kinshuk Dua :


--
keywords: +patch
nosy: +kinshukdua
nosy_count: 7.0 -> 8.0
pull_requests: +27499
pull_request: https://github.com/python/cpython/pull/29236

___
Python tracker 

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



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

2021-10-27 Thread Alexandru Ardelean


New submission from Alexandru Ardelean :

This follows update https://bugs.python.org/issue43669

Which is present in Python 3.10

Some OpenSSL 1.1.1 can be built without Blake2 support or Scrypt.

SHA3 and SHAKE do not seem to have any enable/disable flags.

This results in compiler errors where EVP_blake2b512, EVP_blake2s256, 
EVP_PBE_scrypt and PKCS5_v2_scrypt_keyivgen can be un-defined.

This is unfortunate behavior on the part of OpenSSL 1.1.1.

So, for BLAKE2 and SCRYPT, we should still check that the OPENSSL_NO_SCRYPT and 
OPENSSL_NO_BLAKE2 defines are not-define.

--
assignee: christian.heimes
components: Build, Extension Modules, SSL
messages: 405093
nosy: Alexandru Ardelean, christian.heimes
priority: normal
severity: normal
status: open
title: OpenSSL 1.1.1 still implements some disable-flags for Blake2, Scrypt
versions: Python 3.10, Python 3.11

___
Python tracker 

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



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

2021-10-27 Thread Alexandru Ardelean


Alexandru Ardelean  added the comment:

Note: PKCS5_v2_scrypt_keyivgen() will not cause an error, but EVP_PBE_scrypt() 
will

--

___
Python tracker 

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



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

2021-10-27 Thread Marc Culler


Marc Culler  added the comment:

Thanks, Ned, for finding my mistake which you generously called a typo.
I have fixed the inequality in the Tk fossil repository.  Incidentally, there 
is now a core-8-6-12-rc branch of Tk, also containing the fix.  So it should 
not be too long before 8.6.12 is released.

I will look at the code and check whether I see the UFO that you report.  As 
you know, all that Tk does is to open an NSOpenPanel.  Once that is open it is 
completely handled by the OS.  Tk sees no events from the modal interaction and 
does not have any way of controlling any aspect of the dialog.  So the only 
hope would be that it is possible to set some configuration option before 
opening the NSOpenPanel which would somehow cause the OS to assign focus to the 
correct widget.  I will try to investigate what options are available.

--

___
Python tracker 

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



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

2021-10-27 Thread Alexandru Ardelean


Change by Alexandru Ardelean :


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

___
Python tracker 

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



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

2021-10-27 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +27501
pull_request: https://github.com/python/cpython/pull/29238

___
Python tracker 

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



[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-10-27 Thread Damien George


Damien George  added the comment:

Thanks for confirming the bug.

Sending non-None to a not-started generator could arguably be case (2), because 
that's exactly the semantics introduced by the commit that broke the test case 
:)

Honestly I don't have a strong opinion on which way this goes.  But I think it 
would be interesting to know if there was code out there that relied on the 
original behaviour.

--

___
Python tracker 

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



[issue45620] A misleading url in 'Floating Point Arithmetic' page

2021-10-27 Thread Eric V. Smith


Eric V. Smith  added the comment:

The link on the doc page also works for me, sending me to 
http://www.lahey.com/float.htm.

I think the problem is with @hanhantw's browser or ISP, or similar. I'm going 
to close this.

--
nosy: +eric.smith
resolution:  -> works for me
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



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

2021-10-27 Thread Christian Heimes


Christian Heimes  added the comment:

Python 3.10 and newer require OpenSSL 1.1.1+ with blake2, sha3, scrypt, and 
similar features enabled. The required feature set is specified in PEP 644, 
https://www.python.org/dev/peps/pep-0644/#compatibility . Python requires the 
features, because I want to keep our test matrix small and guarantee the 
presence of a minimal feature set.

Why do you want to build OpenSSL without blake2 or scrypt?

--

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-27 Thread Andrei Kulakov


Change by Andrei Kulakov :


--
keywords: +patch
nosy: +andrei.avk
nosy_count: 8.0 -> 9.0
pull_requests: +27502
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29239

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2021-10-27 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +27503
pull_request: https://github.com/python/cpython/pull/29240

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2021-10-27 Thread Ned Deily


Ned Deily  added the comment:


New changeset bcee6aa31550cfecdc3acecbd0e4447bb0051887 by m-aciek in branch 
'main':
bpo-45618: Fix documentation build by pinning Docutils version to 0.17.1 
(GH-29230)
https://github.com/python/cpython/commit/bcee6aa31550cfecdc3acecbd0e4447bb0051887


--
nosy: +ned.deily

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-27 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

I've put up a PR; I'm not sure it's the best way to fix it. I will look more 
into it and will try to post some details about the PR later today.

--

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2021-10-27 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +27504
pull_request: https://github.com/python/cpython/pull/29241

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2021-10-27 Thread Ned Deily


Ned Deily  added the comment:


New changeset 2b7b7c7320cd856df5439afc3c984873678c27d8 by Miss Islington (bot) 
in branch '3.10':
bpo-45618: Fix documentation build by pinning Docutils version to 0.17.1 
(GH-29230) (GH-29240)
https://github.com/python/cpython/commit/2b7b7c7320cd856df5439afc3c984873678c27d8


--

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2021-10-27 Thread Ned Deily


Ned Deily  added the comment:


New changeset 30c1f18ee62cef301e18488b80b4d329290f7b95 by Ned Deily in branch 
'3.9':
[3.9] bpo-45618: Fix documentation build by pinning Docutils version to 0.17.1 
(GH-29230) (GH-29241)
https://github.com/python/cpython/commit/30c1f18ee62cef301e18488b80b4d329290f7b95


--

___
Python tracker 

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



[issue45617] sys.stdin does not iterate correctly on '\r' line separator

2021-10-27 Thread Kelly Brazil


Kelly Brazil  added the comment:

'\r' support is implicitly documented under the sys.stdin section[0]:

"These streams are regular text files like those returned by the open() 
function. Their parameters are chosen as follows..."

By following the link to the open()[1] docs, it says:

"newline controls how universal newlines mode works (it only applies to text 
mode). It can be None, '', '\n', '\r', and '\r\n'. It works as follows:

When reading input from the stream, if newline is None, universal newlines mode 
is enabled. Lines in the input can end in '\n', '\r', or '\r\n', and these are 
translated into '\n' before being returned to the caller. If it is '', 
universal newlines mode is enabled, but line endings are returned to the caller 
untranslated. If it has any of the other legal values, input lines are only 
terminated by the given string, and the line ending is returned to the caller 
untranslated."

When inspecting a newly created sys.stdin object I see that it creates an 
instance of _io.TextIOWrapper and its newlines attribute is set to None:

>>> sys.stdin
<_io.TextIOWrapper name='' mode='r' encoding='utf-8'>
>>> print(sys.stdin.newlines)
None

Note: an oddity here is that the attribute name is newlines instead of newline.

Interestingly, when opening STDIN directly it seems to work fine:

import sys
for line in open(0, sys.stdin.mode):
print(repr(line))

Result:
$ echo -e 'line1\rline2\rline3' | python3 linetest.py 
'line1\n'
'line2\n'
'line3\n'

So, perhaps the sys.stdin documentation should be updated to reflect this 
exception or it could be considered a bug to make its behavior consistent?

[0]https://docs.python.org/3/library/sys.html#sys.stdin
[1]https://docs.python.org/3/library/functions.html#open

--

___
Python tracker 

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



[issue45609] Specialize STORE_SUBSCR

2021-10-27 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
pull_requests: +27505
pull_request: https://github.com/python/cpython/pull/29242

___
Python tracker 

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



[issue45628] TimedRotatingFileHandler backupCount not working

2021-10-27 Thread Ivo Grondman


New submission from Ivo Grondman :

Using the TimedRotatingFileHandler with a non-zero backupCount, I get different 
behaviour between versions 3.9 and 3.10.

Attached is a small example. Running it with 3.9 gives me two backups at most 
even if I run the script for a long time. Running it with 3.10 does not delete 
old backup files at all and just keeps writing new ones.

--
components: Library (Lib), macOS
files: logrotate.py
messages: 405104
nosy: ivogrondman, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: TimedRotatingFileHandler backupCount not working
versions: Python 3.10
Added file: https://bugs.python.org/file50397/logrotate.py

___
Python tracker 

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



[issue45628] TimedRotatingFileHandler backupCount not working

2021-10-27 Thread Ned Deily


Change by Ned Deily :


--
components:  -macOS
nosy: +vinay.sajip -ned.deily, ronaldoussoren

___
Python tracker 

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



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

2021-10-27 Thread Eric Snow


New submission from Eric Snow :

I found that Tools/freeze doesn't get tested.  It has a "test" directory but 
it's more of a rudimentary sanity check that must be run manually.  Since the 
tool isn't tested through our test suite, there's a high likelihood it can get 
broken without anyone realizing it.  The risk has increased with recent changes 
to frozen modules.  So such tests would be valuable.

The tool requires that Python be installed.  In the context of our test suite, 
this means configuring with a temp dir prefix and then re-building.  We must do 
it in a separate directory to avoid affecting other tests.

I'm planning on adding a test that does the following:

1. create a temp dir (TMPDIR)
2. copy the repo to TMPDIR/cpython
3. run configure there with --prefix=TMPDIR/python-installation
4. run make -j
5. run make install -j
6. write a simple script to TMPDIR/app.py
7. run the "freeze" tool on it, with minimal options
8. run the frozen app and verify it worked

Note that there needs to be enough disk space for all that (which not all 
buildbots have).  Also, the test will be relatively slow due to having to 
re-build.

There aren't any other tests that re-build Python or the like, so I'm a little 
hesitant to set precedent.  Perhaps that's why there weren't any tests already. 
 However, I don't see any significant reasons to not add the test (as long as 
it doesn't lead to spurious failures).

--
assignee: eric.snow
components: Demos and Tools
messages: 405105
nosy: eric.snow, lemburg
priority: normal
severity: normal
stage: test needed
status: open
title: Tools/freeze needs tests in the test suite.
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



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

2021-10-27 Thread Eric Snow


Change by Eric Snow :


--
keywords: +patch
pull_requests: +27506
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29222

___
Python tracker 

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



[issue28737] Document that tp_dealloc handler must call PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set

2021-10-27 Thread Sam Gross


Change by Sam Gross :


--
assignee: docs@python -> colesbury

___
Python tracker 

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



[issue45096] Update Tools/freeze to make use of Tools/scripts/freeze_modules.py?

2021-10-27 Thread Eric Snow


Change by Eric Snow :


--
pull_requests:  -27485

___
Python tracker 

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



[issue45096] Update Tools/freeze to make use of Tools/scripts/freeze_modules.py?

2021-10-27 Thread Eric Snow


Change by Eric Snow :


--
stage: patch review -> needs patch

___
Python tracker 

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



[issue45630] Dump CodeObject API for debugging

2021-10-27 Thread penguin_wwy


New submission from penguin_wwy <940375...@qq.com>:

What the title says.

--
components: Interpreter Core
messages: 405106
nosy: penguin_wwy
priority: normal
severity: normal
status: open
title: Dump CodeObject API for debugging
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



[issue45630] Dump CodeObject API for debugging

2021-10-27 Thread penguin_wwy


Change by penguin_wwy <940375...@qq.com>:


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

___
Python tracker 

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



[issue34046] subparsers -> add_parser doesn't support hyphen char '-'

2021-10-27 Thread paul j3

paul j3  added the comment:

Артём Иконников, developers and experienced users are familiar with other 
programs, such as 'svn' which is used as an example

svn checkout, svn update, and svn commit

Also the use of '--foo' as flagged/optional(s) argument is so familiar to 
developers, that it does nor occur us that new users might want to use that 
form here.  While there's no explicit prohibition of using the dash, non of the 
examples use it.  Examples are a good starting place when using new features.

If this problem came up more often, I'd recommend modifying the `add_parser` 
method to raise an error if the user provides a dashed command name (or alias).

--

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Unfortunately, PR 26934 has broken thes 390x RHEL7 LTO 3.x buildbot as you can 
see before. As per the buildbot maintenance procedures, we will need to revert 
this PR unless is fixed in 24 hours.

@markshannon @Fidget-Spinner

--
nosy: +pablogsal

___
Python tracker 

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



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

2021-10-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Unfortunately, seems that https://github.com/python/cpython/pull/28937 has 
broken the AMD64 FreeBSD Shared 3.x buildbot:

https://buildbot.python.org/all/#/builders/483/builds/1003/steps/5/logs/stdio

The buildbot was green until we merged this

--

___
Python tracker 

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



[issue45631] missing unittests for overlapping dest when using subparsers

2021-10-27 Thread paul j3


New submission from paul j3 :

https://bugs.python.org/issue45235
argparse does not preserve namespace with subparser defaults

was passed and put into the latest release with rather obvious buggy behavior.  

This means that the unittest file does not adequately test for overlapping 
'dest' in the main and subparsers.  It probably also does not test many (any?) 
cases of user provided namespace.

Issue9351 added a test, but it only tested defaults set with 

parser.set_defaults(foo=1)
xparser.set_defaults(foo=2)

not the more common practice of setting defaults in add_argument.

45235 adds one test, but again only for 

xparser.set_defaults(foo=1)

It doesn't test for user inputs, as with

['X','--foo=3']

--
messages: 405110
nosy: ALSchwalm, paul.j3, rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: missing unittests for overlapping dest when using subparsers

___
Python tracker 

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



[issue45617] sys.stdin does not iterate correctly on '\r' line separator

2021-10-27 Thread Eryk Sun


Eryk Sun  added the comment:

> like those returned by the open() function. Their parameters are 
> chosen as follows..."

The `newline` argument for sys.std* isn't documented, but it should be. It 
happens to be newline='\n' on every platform except Windows.

> its newlines attribute is set to None

The `newlines` attribute is based on the `newlines` attribute of the 
incremental decoder. It defaults to None if the decoder lacks this attribute. 
AFAIK, only the universal newlines decoder, io.IncrementalNewlineDecoder, 
implements this attribute. If it's not None, the value is a string or tuple 
that tracks the types of newlines that have been seen thus far. For example:

>>> fdr, fdw = os.pipe()
>>> f = open(fdr, 'r', newline=None, closefd=False)
>>> os.write(fdw, b'a\r\n')
3
>>> f.readline()
'a\n'
>>> f.newlines
'\r\n'
>>> os.write(fdw, b'a\n')
2
>>> f.readline()
'a\n'
>>> f.newlines
('\n', '\r\n')

--

___
Python tracker 

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



[issue28737] Document that tp_dealloc handler must call PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set

2021-10-27 Thread Sam Gross


Sam Gross  added the comment:

Antoine Pitrou already fixed the "noddy4" example (now renamed to "custom4") 
and updated the newtypes_tutorial, but I think it's still worth mentioning 
PyObject_GC_Untrack in a few additional places.

--

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2021-10-27 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +27509
pull_request: https://github.com/python/cpython/pull/29245

___
Python tracker 

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



[issue45617] sys.stdin does not iterate correctly on '\r' line separator

2021-10-27 Thread Kelly Brazil


Kelly Brazil  added the comment:

Also, I believe this docstring is being inherited, but this is also where it 
seems that '\r' is documented to work with sys.stdin:

>>> print(sys.stdin.__doc__)
Character and line based layer over a BufferedIOBase object, buffer.

encoding gives the name of the encoding that the stream will be
decoded or encoded with. It defaults to locale.getpreferredencoding(False).

errors determines the strictness of encoding and decoding (see
help(codecs.Codec) or the documentation for codecs.register) and
defaults to "strict".

newline controls how line endings are handled. It can be None, '',
'\n', '\r', and '\r\n'.  It works as follows:

* On input, if newline is None, universal newlines mode is
  enabled. Lines in the input can end in '\n', '\r', or '\r\n', and
  these are translated into '\n' before being returned to the
  caller. If it is '', universal newline mode is enabled, but line
  endings are returned to the caller untranslated. If it has any of
  the other legal values, input lines are only terminated by the given
  string, and the line ending is returned to the caller untranslated.

* On output, if newline is None, any '\n' characters written are
  translated to the system default line separator, os.linesep. If
  newline is '' or '\n', no translation takes place. If newline is any
  of the other legal values, any '\n' characters written are translated
  to the given string.

If line_buffering is True, a call to flush is implied when a call to
write contains a newline character.

I understand that sys.stdin is slightly different than an actual file being 
opened in text mode, but the documentation seems to suggest that it works 
pretty much the same. Though, in practice there is a slight difference in 
behavior.

--

___
Python tracker 

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



[issue28737] Document that tp_dealloc handler must call PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set

2021-10-27 Thread Sam Gross


Change by Sam Gross :


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

___
Python tracker 

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



[issue45621] Small fixes to mmap

2021-10-27 Thread Tim Golden


Change by Tim Golden :


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

___
Python tracker 

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



[issue45632] Strange readline save history behaviour in site.py

2021-10-27 Thread doraeric


New submission from doraeric :

I noticed that in site.py, it saves history to a hard-coded location if the 
current history length is 0. The history is considered as not loaded if the 
length is 0, but it may be actually loaded from a empty file. In this case, the 
history is save to hard-coded ~/.python_history, and maybe another user-defined 
location in PYTHONSTARTUP file.

I think a better solution is to export some config or functions from site.py, 
so users can explicitly disable the atexit callback from site.py.

---
[site.py] 
https://github.com/python/cpython/blob/b9cdd0fb9c463c2503a4d854bb6529a9db58fe1b/Lib/site.py#L470-L491

--
components: Library (Lib)
messages: 405114
nosy: doraeric
priority: normal
severity: normal
status: open
title: Strange readline save history behaviour in site.py
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-27 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

I missed that this is assigned to Raymond, hope we didn't duplicate any effort 
(it only took me a short while to do the PR). Apologies..

--

___
Python tracker 

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



[issue45623] static build is broken

2021-10-27 Thread Christian Heimes


Christian Heimes  added the comment:

Steve changed the line in comment dd18001c308f / bpo-41627.

--
assignee:  -> steve.dower
components: +Windows
nosy: +christian.heimes, paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue45623] static build is broken

2021-10-27 Thread Christian Heimes


Christian Heimes  added the comment:

Full commit hash is dd18001c308fb3bb65006c91d95f6639583a3420

--

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2021-10-27 Thread Ned Deily


Ned Deily  added the comment:

All of the open branches are affected by this since we also have to build 
documentation for security-fix-only branches when releases. PRs for 3.7 and 3.6 
forthcoming.

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



[issue45633] Py_GT listed twice in Doc/extending/newtypes.rst

2021-10-27 Thread Julien Palard


New submission from Julien Palard :

In Doc/extending/newtypes one can read:

> This function is called with two Python objects and the operator as 
> arguments, where the operator is one of Py_EQ, Py_NE, Py_LE, Py_GT, Py_LT or 
> Py_GT.

It bet one of them should be Py_GE.

(I let this one as an easy first contrib.)

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 405119
nosy: docs@python, mdk
priority: normal
severity: normal
status: open
title: Py_GT listed twice in Doc/extending/newtypes.rst

___
Python tracker 

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



[issue28737] Document that tp_dealloc handler must call PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set

2021-10-27 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 35e1ff38ee67ee543d9fcb268c3552c5397f9b3f by Sam Gross in branch 
'main':
bpo-28737: Document when tp_dealloc should call PyObject_GC_UnTrack() (GH-29246)
https://github.com/python/cpython/commit/35e1ff38ee67ee543d9fcb268c3552c5397f9b3f


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue28737] Document that tp_dealloc handler must call PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set

2021-10-27 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27512
pull_request: https://github.com/python/cpython/pull/29248

___
Python tracker 

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



[issue28737] Document that tp_dealloc handler must call PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set

2021-10-27 Thread Sam Gross


Change by Sam Gross :


--
pull_requests: +27513
pull_request: https://github.com/python/cpython/pull/29249

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-27 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

I've looked more into it, the issue is that even before an object can be tested 
with `isinstance()`, both inspect.classify_class_attrs and in pydoc, classdoc 
local function `spill()` use a `getattr()` call, which triggers the property.

So I think my PR is going in the right direction, adding guards in the inspect 
function and in two `spill()` functions. If `isinstance()` can be fixed to 
detect class properties correctly, these guards can be simplified but they 
still need to be there, I think.

--

___
Python tracker 

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



[issue45591] PathFinder does not find namespace packages children

2021-10-27 Thread Brett Cannon


Brett Cannon  added the comment:

The full name argument approach comes from PEP 302.

But you want the full name as you are otherwise missing potentially key 
information for the finder. For instance, if you manipulate __path__, then it's 
just some random directory you're searching in. But searching for what? What if 
you want custom logic based on what package you're searching under?

Because the import system is designed to be flexible enough to let you import 
from a URL or SQLite database as well as DSL files, providing all of the 
available information becomes important.

--

___
Python tracker 

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



[issue45548] Update Modules/Setup

2021-10-27 Thread Brett Cannon


Brett Cannon  added the comment:

> Could Brett or you please add those notes back ? There's no other place
where such details are documented.

It really depends on what "details" you're referring to. Most of what I removed 
were things like "Module by ", or saying _json.c is for "json 
accelerator" which is obvious to me. Anything that seemed pertinent to 
compilation I left in.

So if there's something you specifically want to add back in that you think is 
important then please feel free to as I'm done editing the file for my purposes 
at the moment.

--

___
Python tracker 

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



[issue45634] [sqlite3] don't combine error checks when adding integer constants

2021-10-27 Thread Erlend E. Aasland


New submission from Erlend E. Aasland :

In Modules/_sqlite/module.c, add_integer_constants() accumulates the return 
values of repeated PyModule_AddIntMacro() calls. We should change this to 
instead bailing immediately on error.

--
components: Extension Modules
messages: 405124
nosy: erlendaasland
priority: normal
severity: normal
status: open
title: [sqlite3] don't combine error checks when adding integer constants
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue45562] python -d creates lots of tokenizer messages

2021-10-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue45634] [sqlite3] don't combine error checks when adding integer constants

2021-10-27 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


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

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2021-10-27 Thread Maciej Olko

Maciej Olko  added the comment:

For what it's worth I have just successfully built documentation on 3.7 and 3.6 
branches locally.  It looks like Sphinx 2.3.1 used there doesn't use this part 
of docutils API that have changed recently.

Sphinx 2.3.1 has requirement of "docutils>=0.12", just like 3.2.1.

We can pin docutils version to current (0.18) "just in case" to prevent a 
breakage in the future or do nothing – maybe it won't break – maybe the 
docutils API used is narrow enough.

--

___
Python tracker 

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



[issue45635] Tidy up error handling in traceback.c / python run.c

2021-10-27 Thread Irit Katriel


New submission from Irit Katriel :

They do things like 

err = PyFile_WriteString("TypeError: print_exception(): Exception expected 
for value, ", f);
err += PyFile_WriteString(Py_TYPE(value)->tp_name, f);
err += PyFile_WriteString(" found\n", f);

which means that PyFile_XXX functions are called after error. They should 
return (abort printing the exception) instead.


It gets even more interesting with PyFile_WriteObject calls - this function 
asserts that the exception is not set, so the code calls PyErr_Clear() before 
calling PyFile_WriteObject(). It should avoid making the call altogether.

--
assignee: iritkatriel
messages: 405126
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Tidy up error handling in traceback.c / python run.c

___
Python tracker 

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



[issue45562] python -d creates lots of tokenizer messages

2021-10-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27516
pull_request: https://github.com/python/cpython/pull/29252

___
Python tracker 

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



[issue45562] python -d creates lots of tokenizer messages

2021-10-27 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



[issue45635] Tidy up error handling in traceback.c / python run.c

2021-10-27 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Interpreter Core
versions: +Python 3.11

___
Python tracker 

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



[issue45562] python -d creates lots of tokenizer messages

2021-10-27 Thread miss-islington


miss-islington  added the comment:


New changeset 10bbd41ba8c88bc102df108a4e0444abc7c5ea43 by Pablo Galindo Salgado 
in branch 'main':
bpo-45562: Print tokenizer debug messages to stderr (GH-29250)
https://github.com/python/cpython/commit/10bbd41ba8c88bc102df108a4e0444abc7c5ea43


--

___
Python tracker 

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



[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-27 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset d02ffd1b5c0fd8dec6dd2f7e3f2b0cfae48b7899 by Martin Rueckl in 
branch 'main':
bpo-45438: format of inspect.Signature with generic builtins (#29212)
https://github.com/python/cpython/commit/d02ffd1b5c0fd8dec6dd2f7e3f2b0cfae48b7899


--

___
Python tracker 

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



[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-27 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27518
pull_request: https://github.com/python/cpython/pull/29254

___
Python tracker 

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



[issue45235] argparse does not preserve namespace with subparser defaults

2021-10-27 Thread paul j3


paul j3  added the comment:

I should study previous posts in more detail, but here are some thoughts on 
correctly handling user namespace.

At the start of `parse_known_args`, there's a

if namespace is None:
namespace = Namespace()

We need to hang on to a copy of this namespace, e.g. call it

import copy
orig_namespace = copy.copy(namespace)

In _SubParsersAction.__call__, pass this copy to the subparser (instead of 
None):

subnamespace, arg_strings = parser.parse_known_args(arg_strings, 
orig_namespace)
for key, value in vars(subnamespace).items():
setattr(namespace, key, value)

Prior to 9351, the main namespace was passed to the subparser

namespace, arg_strings = parser.parse_known_args(arg_strings, namespace)

The trick is to get orig_namespace from the main parse_known_args to 
SubParsersAction.__call__ method.

in a 9351 post I explore the idea of allowing the user to specify a 
'sub_namespace' for the subparser.

https://bugs.python.org/msg230056

In any case, this is a complicated issue that needs careful thought and more 
extensive testing.  I didn't entirely like the original 9351 change, but since 
that's been part of argparse for many years, we need to very careful about 
clobbering it.

--
status: pending -> open

___
Python tracker 

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



[issue9351] argparse set_defaults on subcommands should override top level set_defaults

2021-10-27 Thread paul j3


paul j3  added the comment:

A new patch, https://bugs.python.org/issue45235 has clobbered this patch.

It has also exposed the inadequate unittesting for the case(s) where the 'dest' 
of main namespace, subparser namespace, user provided namespace overlap.

--

___
Python tracker 

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



[issue45562] python -d creates lots of tokenizer messages

2021-10-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 038f45230892235e806ef227dfd9484b95687823 by Miss Islington (bot) 
in branch '3.10':
bpo-45562: Print tokenizer debug messages to stderr (GH-29250) (GH-29252)
https://github.com/python/cpython/commit/038f45230892235e806ef227dfd9484b95687823


--

___
Python tracker 

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



[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-27 Thread miss-islington


miss-islington  added the comment:


New changeset ce7a6afb797d2ffde45e9e902516b8437c8f9e31 by Miss Islington (bot) 
in branch '3.10':
bpo-45438: format of inspect.Signature with generic builtins (GH-29212)
https://github.com/python/cpython/commit/ce7a6afb797d2ffde45e9e902516b8437c8f9e31


--

___
Python tracker 

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



[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-27 Thread miss-islington


miss-islington  added the comment:


New changeset 21150c6fa330f80747d698e4b883c7b4801a25bd by Miss Islington (bot) 
in branch '3.9':
bpo-45438: format of inspect.Signature with generic builtins (GH-29212)
https://github.com/python/cpython/commit/21150c6fa330f80747d698e4b883c7b4801a25bd


--

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2021-10-27 Thread Maciej Olko


Maciej Olko  added the comment:

I'm sorry for the confusion. I might have make more checking on my side before 
proposing a fix.

--

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2021-10-27 Thread Maciej Olko


Maciej Olko  added the comment:

It occurs that the documentation builds without warnings on most recent Sphinx 
-- version 4.2.0. Probably we should bump the version in 3.11, 3.10 and 3.9 to 
4.2.0. That would enable us to remove the pin on docutils.

--

___
Python tracker 

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



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

2021-10-27 Thread Brandt Bucher


New submission from Brandt Bucher :

...as discussed in https://github.com/faster-cpython/ideas/issues/101.

This change merges all BINARY_*/INPLACE_* instructions, except for a few 
special cases:

- BINARY_ADD/INPLACE_ADD, which interact with sq_concat/sq_inplace_concat and 
already have their own specialization family.
- BINARY_MULTIPLY/INPLACE_MULTIPLY, which interact with 
sq_repeat/sq_inplace_repeat and already have their own specialization family.
- BINARY_POWER/INPLACE_POWER, which are technically ternary operators 
under-the-hood.
- BINARY_MODULO/INPLACE_MODULO, which contain a special fast path for string 
formatting (but likely can be rolled in later as a specialization).

It has no mean impact on pyperformance, shrinks the eval loop, and makes it 
much simpler to implement operator specializations.

--
assignee: brandtbucher
components: Interpreter Core
messages: 405136
nosy: Mark.Shannon, brandtbucher, gvanrossum
priority: normal
severity: normal
status: open
title: Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP
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



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

2021-10-27 Thread Brandt Bucher


Change by Brandt Bucher :


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

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2021-10-27 Thread Maciej Olko


Change by Maciej Olko :


--
pull_requests: +27520
pull_request: https://github.com/python/cpython/pull/29256

___
Python tracker 

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



  1   2   >