[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-10-05 Thread Chris Hills


Chris Hills  added the comment:

The new behaviour seems broken on my system.

$ PYTHON_VERSION=3.10.0

$ 
PKG_CONFIG_PATH="/home/chaz/.local/local/sqlite3/lib/pkgconfig:/home/chaz/.local/local/openssl3/lib64/pkgconfig"

$ LLVM_PROFDATA=/home/chaz/.local/local/clang+llvm/bin/llvm-profdata CC=clang 
CXX=clang++ ./configure 
--prefix=/home/chaz/.local/local/python-${PYTHON_VERSION} 
--enable-optimizations --enable-shared --enable-loadable-sqlite-extensions 
--with-openssl-rpath=auto

[..]

building '_ssl' extension
clang -pthread -fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code 
-DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes 
-Werror=implicit-function-declaration -fvisibility=hidden 
-fprofile-instr-use=code.profclangd -I./Include/internal 
-I/home/chaz/.local/local/openssl-3.0.0/include -I./Include -I. 
-I/usr/local/include -I/home/chaz/Downloads/Python-3.10.0/Include 
-I/home/chaz/Downloads/Python-3.10.0 -c 
/home/chaz/Downloads/Python-3.10.0/Modules/_ssl.c -o 
build/temp.linux-x86_64-3.10/home/chaz/Downloads/Python-3.10.0/Modules/_ssl.o
warning: no profile data available for file "_ssl.c" 
[-Wprofile-instr-unprofiled]
clang -pthread -shared 
build/temp.linux-x86_64-3.10/home/chaz/Downloads/Python-3.10.0/Modules/_ssl.o 
-L/home/chaz/.local/local/openssl-3.0.0/lib64 -L. -L/usr/local/lib 
-R/home/chaz/.local/local/openssl-3.0.0/lib64 -lssl -lcrypto -o 
build/lib.linux-x86_64-3.10/_ssl.cpython-310-x86_64-linux-gnu.so
clang -pthread -fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code 
-DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes 
-Werror=implicit-function-declaration -fvisibility=hidden 
-fprofile-instr-use=code.profclangd -I./Include/internal 
-I/home/chaz/.local/local/openssl-3.0.0/include -I./Include -I. 
-I/usr/local/include -I/home/chaz/Downloads/Python-3.10.0/Include 
-I/home/chaz/Downloads/Python-3.10.0 -c 
/home/chaz/Downloads/Python-3.10.0/Modules/_hashopenssl.c -o 
build/temp.linux-x86_64-3.10/home/chaz/Downloads/Python-3.10.0/Modules/_hashopenssl.o
warning: no profile data available for file "_hashopenssl.c" 
[-Wprofile-instr-unprofiled]
clang -pthread -shared 
build/temp.linux-x86_64-3.10/home/chaz/Downloads/Python-3.10.0/Modules/_hashopenssl.o
 -L/home/chaz/.local/local/openssl-3.0.0/lib64 -L. -L/usr/local/lib 
-R/home/chaz/.local/local/openssl-3.0.0/lib64 -lssl -lcrypto -o 
build/lib.linux-x86_64-3.10/_hashlib.cpython-310-x86_64-linux-gnu.so
*** WARNING: renaming "_ssl" since importing it failed: libssl.so.3: cannot 
open shared object file: No such file or directory
*** WARNING: renaming "_hashlib" since importing it failed: libssl.so.3: cannot 
open shared object file: No such file or directory

$ ldd 
/home/chaz/Downloads/Python-3.10.0/build/lib.linux-x86_64-3.10/_ssl.cpython-310-x86_64-linux-gnu_failed.so
linux-vdso.so.1 =>  (0x7fffc99f4000)
libssl.so.3 => not found
libcrypto.so.3 => not found
libpthread.so.0 => /lib64/libpthread.so.0 (0x7faa70802000)
libc.so.6 => /lib64/libc.so.6 (0x7faa70434000)
/lib64/ld-linux-x86-64.so.2 (0x7faa70a1e000)

$ readelf -d 
/home/chaz/Downloads/Python-3.10.0/build/lib.linux-x86_64-3.10/_ssl.cpython-310-x86_64-linux-gnu_failed.so
 | grep PATH

It appears that RPATH/RUNPATH is not getting set.

--
nosy: +chaz6

___
Python tracker 

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



[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-10-05 Thread Chris Hills


Chris Hills  added the comment:

If I set LDFLAGS as with previous versions, it works as expected. I do not know 
if it is related, but I noticed that by default rpath does not get set for the 
files in DESTDIR/bin/* (e.g. python3.10 or pip3.10) hence the inclusion of 
/home/chaz/.local/local/python-${PYTHON_VERSION}/lib in the rpath.

LDFLAGS="-Wl,-rpath,'/home/chaz/.local/local/openssl3/lib64:/home/chaz/.local/local/sqlite3/lib:/home/chaz/.local/local/python-'${PYTHON_VERSION}'/lib'
 -Wl,--enable-new-dtags"

--

___
Python tracker 

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



[issue45370] Typo in pep-0636 page

2021-10-05 Thread AdrienGoncalves


New submission from AdrienGoncalves :

There is a typo in https://www.python.org/dev/peps/pep-0636/#composing-patterns

The second sentence in the first paragraph : "[...] we have being doing that 
implicitly in the examples above."

When it should be "[...] we have been doing that implicitly in the examples 
above."

--
assignee: docs@python
components: Documentation
messages: 403201
nosy: adrigs, docs@python
priority: normal
severity: normal
status: open
title: Typo in pep-0636 page
type: enhancement
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



[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-10-05 Thread Christian Heimes


Christian Heimes  added the comment:

Chris, this bug report is closed. Please open a new bug report.

I think it's a bug in distutils. UnixCCompiler.runtime_library_dir_option() may 
not support clang and add wrong option 
"-R/home/chaz/.local/local/openssl-3.0.0/lib64".

--

___
Python tracker 

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



[issue33125] Windows 10 ARM64 platform support

2021-10-05 Thread Rubin Simons


Rubin Simons  added the comment:

Hi Python peeps,

* distlib-0.3.3 and higher now has support for windows on ARM64, see: 
https://github.com/pypa/pip/issues/10489#issuecomment-924677949

* setuptools-58.2.0 and higher now has support for Windows on ARM64, see: 
https://github.com/pypa/setuptools/pull/2758#issuecomment-932874436

* pip-21.3 and higher now has support for Windows on ARM64, see: 
https://github.com/pypa/pip/issues/10489#issuecomment-932896285

* nsait-linaro offered ci/cd services on Windows on ARM64 hardware so Python 
release builds can be tested and released

It sounds to me like all stars are aligned for a Windows on ARM64 release, it 
would be rather great if this could happen!

--

___
Python tracker 

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



[issue45368] ~(True) and ~(False) gives incorrect result

2021-10-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue45369] Remove LibreSSL workarounds

2021-10-05 Thread Christian Heimes


Change by Christian Heimes :


--
title: Remove LibreSSL support -> Remove LibreSSL workarounds
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



[issue45371] distutil's runtime_library_dir (rpath) option doesn't work with clang

2021-10-05 Thread Christian Heimes


New submission from Christian Heimes :

Chris Hills reported in bpo-43466 that the new --with-openssl-rpath=auto does 
not work with clang. It turns out to be a bug in distutils. 
UnixCCompiler.runtime_library_dir_option() does not detect clang correctly and 
emits wrong option for rpath.

--
components: Distutils
messages: 403204
nosy: christian.heimes, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: distutil's runtime_library_dir (rpath) option doesn't work with clang
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue45371] distutil's runtime_library_dir (rpath) option doesn't work with clang

2021-10-05 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue45371] distutil's runtime_library_dir (rpath) option doesn't work with clang

2021-10-05 Thread Christian Heimes


Christian Heimes  added the comment:

$ CC=clang ./configure 
--with-openssl=/home/heimes/dev/python/multissl/openssl/3.0.0 
--with-openssl-rpath=auto
$ make
$ readelf -d build/lib.linux-x86_64-3.11/_ssl.cpython-311-x86_64-linux-gnu.so | 
grep RUNPATH
 0x001d (RUNPATH)Library runpath: 
[/home/heimes/dev/python/multissl/openssl/3.0.0/lib]

--

___
Python tracker 

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



[issue45366] dataclass init=False field with default works but default_factory does not

2021-10-05 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

Right now `dataclasses.py` has this explanation: 
https://github.com/python/cpython/blame/07cf10bafc8f6e1fcc82c10d97d3452325fc7c04/Lib/dataclasses.py#L962-L966

```
 if isinstance(getattr(cls, f.name, None), Field):
if f.default is MISSING:
# If there's no default, delete the class attribute.
# This happens if we specify field(repr=False), for
# example (that is, we specified a field object, but
# no default value).  Also if we're using a default
# factory.  The class attribute should not be set at
# all in the post-processed class.
delattr(cls, f.name)
else:
setattr(cls, f.name, f.default)
```

This is why: imagine, that we execute `.default_factory` there.
It will be vulnerable to "default mutable" problem:

```
from dataclasses import dataclass, field

@dataclass(init=False)
class TestObject(object):
m: str = field(default='hi')
k: list = field(default_factory=list)

def test(self):
print(f'm is {self.m} ')
self.k.append(1)
print(f'k is {self.k}')

if __name__ == '__main__':
myobject = TestObject()
print(TestObject.m)  # hi
print(TestObject.k)  # []

myobject.test()
# m is hi 
# k is [1]

other_object = TestObject()
other_object.test()
# m is hi 
# k is [1, 1]
```

Another, more complex solution is to track fields with `default_factory` and 
still generate `__init__` / `__new__` / etc for them to run their 
`default_factories`s when object is created.

--
nosy: +sobolevn

___
Python tracker 

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



[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-10-05 Thread Christian Heimes


Christian Heimes  added the comment:

Chris, please try the fix from bpo-45371.

--

___
Python tracker 

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



[issue45372] Unwarranted "certificate has expired" when urlopen-ing R3 sites

2021-10-05 Thread Aivar Annamaa


New submission from Aivar Annamaa :

In one of my Windows 10 computers I'm not able to urlopen sites which use R3 
certificates. The same is reported by several of the users of my software.

Following is taken from a session in the fresh IDLE 3.10 in up-to date Windows 
10:


Python 3.10.0 (tags/v3.10.0:b494f59, Oct  4 2021, 18:46:30) [MSC v.1929 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> from urllib.request import urlopen
>>> urlopen("https://openssl.org";)
Traceback (most recent call last):
  File "C:\Python310-32\lib\urllib\request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
  File "C:\Python310-32\lib\http\client.py", line 1276, in request
self._send_request(method, url, body, headers, encode_chunked)
  File "C:\Python310-32\lib\http\client.py", line 1322, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
  File "C:\Python310-32\lib\http\client.py", line 1271, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
  File "C:\Python310-32\lib\http\client.py", line 1031, in _send_output
self.send(msg)
  File "C:\Python310-32\lib\http\client.py", line 969, in send
self.connect()
  File "C:\Python310-32\lib\http\client.py", line 1448, in connect
self.sock = self._context.wrap_socket(self.sock,
  File "C:\Python310-32\lib\ssl.py", line 512, in wrap_socket
return self.sslsocket_class._create(
  File "C:\Python310-32\lib\ssl.py", line 1070, in _create
self.do_handshake()
  File "C:\Python310-32\lib\ssl.py", line 1341, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate 
verify failed: certificate has expired (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
urlopen("https://openssl.org";)
  File "C:\Python310-32\lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
  File "C:\Python310-32\lib\urllib\request.py", line 519, in open
response = self._open(req, data)
  File "C:\Python310-32\lib\urllib\request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
  File "C:\Python310-32\lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
  File "C:\Python310-32\lib\urllib\request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
  File "C:\Python310-32\lib\urllib\request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: 



In the same session, requests works fine:

>>> import requests
>>> requests.get("https://openssl.org";)




It's really weird, that in my another Windows 10, also 64-bit, having same 
state of updates, using same version of Python 3.10, connected to the same 
network -- everything works fine. Neither of the computers use any extra 
network middleware or proxies.

In both computers Chrome and Firefox are happy with the certificate of 
https://openssl.org

Same applies to Python 3.7

It must be somehow related to 
https://www.fortinet.com/blog/psirt-blogs/fortinet-and-expiring-lets-encrypt-certificates

--
messages: 403208
nosy: aivarannamaa
priority: normal
severity: normal
status: open
title: Unwarranted "certificate has expired" when urlopen-ing R3 sites
versions: Python 3.10, Python 3.7

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

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



[issue45373] ./configure --enable-optimizations should enable LTO

2021-10-05 Thread STINNER Victor


New submission from STINNER Victor :

When Python is configured with:

   ./configure --enable-optimizations

PGO is enabled but not LTO.

I recall that a few years ago, GCC with LTO had bugs. But now, GCC with LTO is 
reliable. I suggest to enable it by default in Python 3.11.

Or did I miss a reason to not do that?

--
components: Build
messages: 403209
nosy: vstinner
priority: normal
severity: normal
status: open
title: ./configure --enable-optimizations should enable LTO
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



[issue45373] ./configure --enable-optimizations should enable LTO

2021-10-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

IIRC activating lto is specially annoying on MacOS due to the need of some llvm 
components that are a bit hard to get. Let me dig a bit to see if I reproduce 
the problem

--
nosy: +pablogsal

___
Python tracker 

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



[issue45373] ./configure --enable-optimizations should enable LTO

2021-10-05 Thread STINNER Victor


STINNER Victor  added the comment:

Pablo:
> IIRC activating lto is specially annoying on MacOS due to the need of some 
> llvm components that are a bit hard to get. Let me dig a bit to see if I 
> reproduce the problem

Ah, I guess that you are referring to this requirement:
"The C compiler Clang requires llvm-ar for LTO (ar on macOS), as well as an 
LTO-aware linker (ld.gold or lld)."
https://docs.python.org/dev/using/configure.html#cmdoption-with-lto

Maybe configure can enable LTO on all platforms but macOS.

--

___
Python tracker 

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



[issue45371] distutil's runtime_library_dir (rpath) option doesn't work with clang

2021-10-05 Thread Chris Hills


Chris Hills  added the comment:

I tested this both with and without LDFLAGS="-Wl,-rpath 
-Wl,/home/chaz/.local/local/python3.10.0/lib", and in both cases this patch 
works as expected. Thank you!

--
nosy: +chaz6

___
Python tracker 

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



[issue45371] distutil's runtime_library_dir (rpath) option doesn't work with clang

2021-10-05 Thread miss-islington


miss-islington  added the comment:


New changeset ef6196028f966f22d82930b66e1371e75c5df2f7 by Christian Heimes in 
branch 'main':
bpo-45371: Fix distutils' rpath support for clang (GH-28732)
https://github.com/python/cpython/commit/ef6196028f966f22d82930b66e1371e75c5df2f7


--
nosy: +miss-islington

___
Python tracker 

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



[issue45371] distutil's runtime_library_dir (rpath) option doesn't work with clang

2021-10-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27081
pull_request: https://github.com/python/cpython/pull/28733

___
Python tracker 

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



[issue45371] distutil's runtime_library_dir (rpath) option doesn't work with clang

2021-10-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27082
pull_request: https://github.com/python/cpython/pull/28734

___
Python tracker 

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



[issue45374] sqlite3: Add configure option to set or auto-detect rpath to sqlite3 libs

2021-10-05 Thread Chris Hills


New submission from Chris Hills :

Similar to https://bugs.python.org/issue43466 for openssl, please add a 
configure option to set rpath for sqlite3.

--with-sqlite-rpath=

Ideally, when any dpeendency is discovered with pkg-config, the correct rpath 
should be set, but this would be a breaking change.

--
assignee: docs@python
components: Documentation, Installation
messages: 403214
nosy: chaz6, docs@python
priority: normal
severity: normal
status: open
title: sqlite3: Add configure option to set or auto-detect rpath to sqlite3 libs
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



[issue45374] sqlite3: Add configure option to set or auto-detect rpath to sqlite3 libs

2021-10-05 Thread Christian Heimes


Change by Christian Heimes :


--
components: +Build -Documentation
type:  -> enhancement
versions: +Python 3.11 -Python 3.10

___
Python tracker 

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



[issue33125] Windows 10 ARM64 platform support

2021-10-05 Thread Niyas Sait


Niyas Sait  added the comment:

Python buildbot worker for woa is up and running as well

https://buildbot.python.org/all/#/workers/45

Would be great to see official support and installer added for woa

--

___
Python tracker 

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



[issue45372] Unwarranted "certificate has expired" when urlopen-ing R3 sites

2021-10-05 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Are you sure that all updates on the failing machine have been correctly
installed ? It's possible that the list of CA root certs is not up to date
on the machine.

You can use certmgr.msc to check the list of installed CA root certs.

--
nosy: +lemburg

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-10-05 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset bd627eb7ed08a891dd1356756feb1ce2600358e4 by Mark Shannon in 
branch 'main':
bpo-43760: Check for tracing using 'bitwise or' instead of branch in dispatch. 
(GH-28723)
https://github.com/python/cpython/commit/bd627eb7ed08a891dd1356756feb1ce2600358e4


--

___
Python tracker 

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



[issue45163] Haiku build fix

2021-10-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 0af08f343a7b792f527b78e2a35d9453039940c2 by Ned Deily in branch 
'main':
bpo-45163: Restrict added libnetwork check to builds on Haiku. (GH-28729)
https://github.com/python/cpython/commit/0af08f343a7b792f527b78e2a35d9453039940c2


--

___
Python tracker 

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



[issue45163] Haiku build fix

2021-10-05 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue45371] distutil's runtime_library_dir (rpath) option doesn't work with clang

2021-10-05 Thread miss-islington


miss-islington  added the comment:


New changeset 3733dddecaa332966e200718d4993545f8e52247 by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-45371: Fix distutils' rpath support for clang (GH-28732) (GH-28733)
https://github.com/python/cpython/commit/3733dddecaa332966e200718d4993545f8e52247


--

___
Python tracker 

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



[issue45371] distutil's runtime_library_dir (rpath) option doesn't work with clang

2021-10-05 Thread miss-islington


miss-islington  added the comment:


New changeset 3ce5e07e9a4b78302b69f898527396ff7b5fd448 by Miss Islington (bot) 
in branch '3.9':
bpo-45371: Fix distutils' rpath support for clang (GH-28732)
https://github.com/python/cpython/commit/3ce5e07e9a4b78302b69f898527396ff7b5fd448


--

___
Python tracker 

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



[issue45371] distutil's runtime_library_dir (rpath) option doesn't work with clang

2021-10-05 Thread Christian Heimes


Christian Heimes  added the comment:

Thanks for confirming that the fix works for you. The fix will be in 3.10.1, 
which should be released in early December.

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



[issue45370] Typo in pep-0636 page

2021-10-05 Thread Raúl Cumplido

Raúl Cumplido  added the comment:

Thanks! I have created a PR for it on the peps repo.
https://github.com/python/peps/pull/2101
I can't seem to be able to link the Github PR correctly. Probably because it's 
not on the cpython repo.

--
nosy: +raulcd

___
Python tracker 

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



[issue45372] Unwarranted "certificate has expired" when urlopen-ing R3 sites

2021-10-05 Thread Aivar Annamaa


Aivar Annamaa  added the comment:

I can list the root certs with certmgr, but I'm not sure which piece to 
investigate further. 

Even if there is problem with installed certs, it's interesting, why doesn't it 
bother the browsers and requests? Maybe this is opportunity to make something 
better in urllib?

--

___
Python tracker 

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



[issue45370] Typo in pep-0636 page

2021-10-05 Thread Raúl Cumplido

Raúl Cumplido  added the comment:

This has been merged on the peps repo and can be closed.

--

___
Python tracker 

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



[issue42914] pprint numbers with underscore

2021-10-05 Thread Stéphane Blondon

Stéphane Blondon  added the comment:

Python 3.10 has now been released with the underscore_numbers parameter.
I wonder which release could enable the parameter by default (so it would break 
the previous behavior):
 - the next release (3.11) is probably too short.
 - the safest strategy is to wait until 3.9 will be end-of-life (2025-10 
according to [1]). In such case, it could be integrated in 3.14.

Could it be accepted before (like 3.12 or 3.13)?

If there is no reply, I will create a new issue and PR for 3.14 inclusion ( = 
safest strategy).


1: https://devguide.python.org/#status-of-python-branches

--

___
Python tracker 

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



[issue42914] pprint numbers with underscore

2021-10-05 Thread Eric V. Smith


Eric V. Smith  added the comment:

The safest thing to do is never make it the default. It would always be an 
opt-in behavior.

--

___
Python tracker 

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



[issue45372] Unwarranted "certificate has expired" when urlopen-ing R3 sites

2021-10-05 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

On 05.10.2021 12:48, Aivar Annamaa wrote:
> 
> I can list the root certs with certmgr, but I'm not sure which piece to 
> investigate further. 

Check the certs in the LE chain as listed on the page you quoted
and compare them to the working installation.

> Even if there is problem with installed certs, it's interesting, why doesn't 
> it bother the browsers and requests? Maybe this is opportunity to make 
> something better in urllib?

Browsers and requests use their own list of trusted CAs.

--

___
Python tracker 

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



[issue45370] Typo in pep-0636 page

2021-10-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the report and fix. Closing it as third party since PEPs are 
maintained in different repo using GitHub issues.

--
nosy: +xtreak
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue45375] Windows assertion in out-of-tree debug build

2021-10-05 Thread Steve Dower


New submission from Steve Dower :

As seen in the release build for 3.11a1, an assertion is raised when attempting 
to launch the debug build out of tree.

   _RegenTestFrozenmain:
 Regenerate test_frozenmain.h
 D:\a\1\b\bin\amd64\python_d.exe Programs\freeze_test_frozenmain.py 
Programs/test_frozenmain.h
 Assertion failed: stdlibdir[wcslen(prefix)] == SEP, file 
D:\a\1\s\PC\getpathp.c, line 300

This causes the release to fail.

--
assignee: steve.dower
components: Windows
messages: 403229
nosy: pablogsal, paul.moore, steve.dower, tim.golden, zach.ware
priority: release blocker
severity: normal
status: open
title: Windows assertion in out-of-tree debug build
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



[issue45375] Windows assertion in out-of-tree debug build

2021-10-05 Thread Steve Dower


Steve Dower  added the comment:

I believe this is because getpath has hit its final fallback case of looking in 
".\DLLs" and ".\Lib" for the standard library, and has not performed proper 
normalisation on these paths. So after removing the last segment, the result is 
"." which does not end in SEP.

So at least in this case, we can probably just ignore the assertion. However, 
I'm concerned that this would open up other cases where search paths may be 
added that are otherwise unintended.

The expected behaviour when the stdlib can't be found is a detailed error 
message, not a debug assertion/crash.

--

___
Python tracker 

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



[issue15870] PyType_FromSpec should take metaclass as an argument

2021-10-05 Thread Petr Viktorin


Petr Viktorin  added the comment:

> I am slightly surprised we actually care about static C-definitions?

And I'm surprised that you're surprised :)
AFAIK, supporting dynamically allocated specs/slots was an afterthought. I do 
agree they should be supported, though! Thanks for filing bpo-45315, and please 
file any more bugs your find.

But I'd still say that best practice is to make specs static if possible. (And 
I have some plans to make static specs useful in type checking, since we can 
assume that types made from the same spec share the memory layout.)


> My patch tries to address the first (the class creator has to take care that 
> this is reasonable for the metaclass).  I had hoped the `slot` mechanism can 
> avoid the API discussion for the second one, but I guess not.

Whoa, I missed the patch completely --  2021 looks too much like 2012, I'm used 
to patches being old since we use pull requests now, and the conversation 
turned to slots too quickly... but missing that you mentioned it is completely 
on me. Sorry!

Do you want to go through with the patch yourself, or should I take over? It 
still needs:
- opening a PR on GitHub
- tests
- documentation & a What's New entry
- probably separate bug as well, since it doesn't fix this one

--

___
Python tracker 

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



[issue45375] Windows assertion in out-of-tree debug build

2021-10-05 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue45376] Run Windows release docs build on regular CI

2021-10-05 Thread Steve Dower


New submission from Steve Dower :

Currently the release build of the CHM file runs on my dedicated build machine, 
which means there's no way to do a test run without starting the machine 
(normally clearing the code signing and PGO properties allows a build without 
needing it).

Originally the issue was that the docs build was taking >10minutes on CI, but 
not on my machine, which is why I moved it.

Should try moving it back, or at least enabling a skip option for it so that 
test runs can be done purely on free CI, rather than needing my account.

--
assignee: steve.dower
components: Windows
messages: 403232
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Run Windows release docs build on regular CI

___
Python tracker 

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



[issue45354] test_winconsoleio fails on Windows 11

2021-10-05 Thread Steve Dower


Steve Dower  added the comment:


New changeset de4052fe0633e3a053e66c8477f13677054d6ede by Jeremy Kloth in 
branch 'main':
bpo-45354: Skip obsolete device name tests on Windows 11 (GH-28712)
https://github.com/python/cpython/commit/de4052fe0633e3a053e66c8477f13677054d6ede


--

___
Python tracker 

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



[issue45354] test_winconsoleio fails on Windows 11

2021-10-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27085
pull_request: https://github.com/python/cpython/pull/28737

___
Python tracker 

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



[issue45354] test_winconsoleio fails on Windows 11

2021-10-05 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45354] test_winconsoleio fails on Windows 11

2021-10-05 Thread Steve Dower


Steve Dower  added the comment:

Thanks, Jeremy! And thanks for being on top of getting the Win11 buildbot set 
up!

--
resolution:  -> fixed
stage: patch review -> backport needed
versions: +Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue45377] Default python 3 docs still pointing to 3.9.7

2021-10-05 Thread Raúl Cumplido

New submission from Raúl Cumplido :

We are going to start the python 3.10 work on the python-docs-es and we have 
realised that when accessing: https://docs.python.org/3/
It is still redirecting to Python 3.9.7 documentation

As Python 3.10 was released yesterday shouldn't the default docs point to 
python 3.10 already?

--
assignee: docs@python
components: Documentation
messages: 403235
nosy: docs@python, mdk, raulcd
priority: normal
severity: normal
status: open
title: Default python 3 docs still pointing to 3.9.7
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



[issue45375] Windows assertion in out-of-tree debug build

2021-10-05 Thread Steve Dower


Steve Dower  added the comment:


New changeset 5146877623ebe8a2806411703b0de9c0aba179a1 by Steve Dower in branch 
'main':
bpo-45375: Fix assertion failure due to searching for stdlib in unnormalised 
paths (GH-28735)
https://github.com/python/cpython/commit/5146877623ebe8a2806411703b0de9c0aba179a1


--

___
Python tracker 

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



[issue45354] test_winconsoleio fails on Windows 11

2021-10-05 Thread Steve Dower


Steve Dower  added the comment:


New changeset d0d0909a3a0b553826d1ddbb04a676fdabb61359 by Miss Islington (bot) 
in branch '3.10':
bpo-45354: Skip obsolete device name tests on Windows 11 (GH-28712)
https://github.com/python/cpython/commit/d0d0909a3a0b553826d1ddbb04a676fdabb61359


--

___
Python tracker 

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



[issue45354] test_winconsoleio fails on Windows 11

2021-10-05 Thread Steve Dower


Change by Steve Dower :


--
stage: backport needed -> 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



[issue45354] test_winconsoleio fails on Windows 11

2021-10-05 Thread miss-islington


miss-islington  added the comment:


New changeset 63c9a6cc8b48740c88199b5150c9948b1a61756b by Miss Islington (bot) 
in branch '3.9':
bpo-45354: Skip obsolete device name tests on Windows 11 (GH-28712)
https://github.com/python/cpython/commit/63c9a6cc8b48740c88199b5150c9948b1a61756b


--

___
Python tracker 

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



[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-10-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27086
pull_request: https://github.com/python/cpython/pull/28738

___
Python tracker 

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



[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-10-05 Thread miss-islington


miss-islington  added the comment:


New changeset b9bb74871b27d9226df2dd3fce9d42bda8b43c2b by Hai Shi in branch 
'main':
bpo-44050: Extension modules can share state when they don't support 
sub-interpreters. (GH-27794)
https://github.com/python/cpython/commit/b9bb74871b27d9226df2dd3fce9d42bda8b43c2b


--
nosy: +miss-islington

___
Python tracker 

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



[issue45367] Specialize BINARY_MULTIPLY

2021-10-05 Thread Ken Jin


Ken Jin  added the comment:

> (Windows doesn't want to install greenlet for pyperformance)

I had the *exact* same issues, I eventually found a workaround for it after 
many hours spent guessing.

Initially, setuptools complained that I needed MSVC++ 14.0 or later (even after 
I had the latest one installed). I found that for some strange reason, *only* 
14.0 worked, 14.2x etc. don't. After installing MSVC 14.0, there was then some 
strange complaint about missing some .exe/.dll. Searching that entire error 
message led me to a result on StackOverflow advising copying said files from 
the Windows SDK in Visual Studio over to the MSVC 14.0 folder. This finally 
allowed greenlet to compile. I've since lost the exact SO links, but I hope 
this leads you somewhere.

Anyways, I don't recommend benchmarking on Windows for stable results (trust 
me, I've tried ;-). `pyperf system tune` doesn't work on Windows. This leads to 
very inconsistent results unless you manually disable turbo boost, set core 
affinities, etc. Also, PGO for _PyEvalFrameDefaultEx might be broken on Windows 
on the main branch (see issue45116).

Eventually I gave up and just used Linux for stable benchmarking. pyperformance 
`compile_all` also works properly there, which allows you to automate your 
benchmarks 
https://pyperformance.readthedocs.io/usage.html#compile-python-to-run-benchmarks

PS. are your numbers with PGO and LTO? If so, they're spectacular!

--
nosy: +kj

___
Python tracker 

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



[issue45362] dis does not work with the new optimized ops

2021-10-05 Thread Ken Jin


Ken Jin  added the comment:

Closing this issue as the behavior in dis module is as intended. For any 
potential issues to 3rd party packages discovered in the future, consider 
opening an issue in that package's issue tracker, or submitting a brand new 
issue to bugs.python.org.

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



[issue45367] Specialize BINARY_MULTIPLY

2021-10-05 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Hm the above was not PGO. I tried again with PGO and it is not so good:

Mean +- std dev: [nbody_main_pgo] 177 ms +- 4 ms -> [nbody_specialized_pgo] 190 
ms +- 2 ms: 1.07x slower
Mean +- std dev: [pidigits_main_pgo] 208 ms +- 1 ms -> 
[pidigits_specialized_pgo] 210 ms +- 2 ms: 1.01x slower
Mean +- std dev: [chaos_main_pgo] 106 ms +- 1 ms -> [chaos_specialized_pgo] 110 
ms +- 1 ms: 1.04x slower
Mean +- std dev: [spectral_norm_main_pgo] 169 ms +- 7 ms -> 
[spectral_norm_specialized_pgo] 167 ms +- 1 ms: 1.02x faster
Benchmark hidden because not significant (1): raytrace

--

___
Python tracker 

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



[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-10-05 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the fix. I don't understand well this code :-(

--

___
Python tracker 

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



[issue45375] Windows assertion in out-of-tree debug build

2021-10-05 Thread Steve Dower


Change by Steve Dower :


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



[issue45373] ./configure --enable-optimizations should enable LTO

2021-10-05 Thread Ned Deily


Ned Deily  added the comment:

> IIRC activating lto is specially annoying on MacOS due to the need of some 
> llvm components that are a bit hard to get

Can you say more? We are currently using --with-lto with a vanilla Apple 
Command Line Tools (or Xcode) for macOS installer builds when building on macOS 
10.15 High Sierra or higher.  Perhaps this was just an issue on older versions.

--
nosy: +ned.deily

___
Python tracker 

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



[issue45378] Can't find "map" with search on docs.python.org

2021-10-05 Thread Guido van Rossum


New submission from Guido van Rossum :

I was looking for the docs for 'map' and tried to use the search box on 
docs.python.org. This gave a lot of things whose name started with or contained 
'map', but the entry for the builtin map() function was hidden really far down 
under the heading "Builtin Functions" 
(https://docs.python.org/3.10/library/functions.html?highlight=map) rather than 
deep-linking to the entry I was looking for 
(https://docs.python.org/3.10/library/functions.html#map).

I'm sure that some tweak to the index builder could fix this, in general, for 
all builtin functions and types (many of which I imagine suffer from the effect 
-- having a short name that is used a lot as a part of other names).

--
assignee: docs@python
components: Documentation
messages: 403245
nosy: docs@python, gvanrossum
priority: normal
severity: normal
status: open
title: Can't find "map" with search on docs.python.org
type: behavior

___
Python tracker 

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



[issue45379] Improve errors related to frozen modules.

2021-10-05 Thread Eric Snow


New submission from Eric Snow :

In Python/import.c there are various situations in which an error state related 
to frozen modules might result and even lead to an exception.  In gh-28633 we 
consolidated these cases into a new "frozen_status" enum and added 
"set_frozen_error()" to set a consistent exception based on a status.

There are several deficiencies to address at this point:

* the conditions for the statuses are unclear [1][2]
* the error messages could be more helpful [3]
* maybe use a different error message for FROZEN_BAD_NAME (and perhaps 
FROZEN_DISABLED), rather than combining with FROZEN_NOT_FOUND 


[1] https://github.com/python/cpython/pull/28633#discussion_r720503665
[2] https://github.com/python/cpython/pull/28633#discussion_r720504275
[3] https://github.com/python/cpython/pull/28633#discussion_r720987412

--
components: Interpreter Core
messages: 403246
nosy: barry, brett.cannon, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Improve errors related to frozen modules.
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



[issue45378] Can't find "map" with search on docs.python.org

2021-10-05 Thread Raúl Cumplido

Change by Raúl Cumplido :


--
nosy: +raulcd

___
Python tracker 

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



[issue45324] The frozen importer should capture info in find_spec().

2021-10-05 Thread Eric Snow


Eric Snow  added the comment:


New changeset c3d9ac8b340fcbf54cee865737e67f11fcd70ed3 by Eric Snow in branch 
'main':
bpo-45324: Capture data in FrozenImporter.find_spec() to use in exec_module(). 
(gh-28633)
https://github.com/python/cpython/commit/c3d9ac8b340fcbf54cee865737e67f11fcd70ed3


--

___
Python tracker 

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



[issue45324] The frozen importer should capture info in find_spec().

2021-10-05 Thread Eric Snow


Change by Eric Snow :


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



[issue45324] The frozen importer should capture info in find_spec().

2021-10-05 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +27087
pull_request: https://github.com/python/cpython/pull/28740

___
Python tracker 

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



[issue45373] ./configure --enable-optimizations should enable LTO

2021-10-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Yeah, I had problems in the past to get llvm-ar or some other component. I 
still need time to reproduce and to see if this still happens on new versions.

--

___
Python tracker 

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



[issue45373] ./configure --enable-optimizations should enable LTO

2021-10-05 Thread Ned Deily


Ned Deily  added the comment:

I don't think you need llvm-ar anymore with the Apple Tool Chain but let me 
look into it as I have all the relevant previous macOS releases as VMs to test 
with.

--

___
Python tracker 

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



[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-10-05 Thread Łukasz Langa

Change by Łukasz Langa :


--
pull_requests: +27088
pull_request: https://github.com/python/cpython/pull/28741

___
Python tracker 

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



[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-10-05 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset d0d29655ffc43d426ad68542d8de8304f7f1346a by Miss Islington (bot) 
in branch '3.10':
bpo-44050: Extension modules can share state when they don't support 
sub-interpreters. (GH-27794) (GH-28738)
https://github.com/python/cpython/commit/d0d29655ffc43d426ad68542d8de8304f7f1346a


--

___
Python tracker 

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



[issue45378] Can't find "map" with search on docs.python.org

2021-10-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I'm surprised no one else noticed this until now.  

The doc search finds some entries such as: "sum", "min", "max", and 
"enumerate".  However, it is missing others such as: "map" and "filter".

--
nosy: +rhettinger

___
Python tracker 

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



[issue39573] [C API] Avoid accessing PyObject and PyVarObject members directly: add Py_SET_TYPE() and Py_IS_TYPE(), disallow Py_TYPE(obj)=type

2021-10-05 Thread STINNER Victor


STINNER Victor  added the comment:

I wrote an article about these changes:
https://vstinner.github.io/c-api-abstract-pyobject.html

It elaborates the rationale for making these changes.

--

___
Python tracker 

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



[issue33125] Windows 10 ARM64 platform support

2021-10-05 Thread Steve Dower


Steve Dower  added the comment:

Yeah, we're getting close. I'll reopen this issue for tracking.

We still need that pip release and it'll have to be merged into ensurepip. 
We'll also need better access to test systems than any of us currently have 
(the buildbot is great, but we need interactive systems too).

There are already binary releases at 
https://www.nuget.org/packages/pythonarm64/ that should be suitable for most 
testing. I'll probably make the ARM64 packages available through the Windows 
Store for 3.11's prereleases, and possibly as a side-loadable MSIX from 
python.org.

I'm strongly considering not offering the regular executable installer on 
ARM64, since it seems we don't have the back-compat demand right now. It would 
be a good opportunity to try and fix the issues with that installer and really 
put the focus on the MSIX as the user-friendly approach. But that's still 
future thoughts, no concrete plans yet :)

--
resolution: fixed -> 
status: closed -> open
versions: +Python 3.11 -Python 3.8, Python 3.9

___
Python tracker 

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



[issue45378] Can't find "map" with search on docs.python.org

2021-10-05 Thread Guido van Rossum


Guido van Rossum  added the comment:

> I'm surprised no one else noticed this until now.  

Most people probably just use Google and read whatever comes up. I was looking 
whether the official docs for map mentioned that map is actually an iterator 
class. (They don't.)

--

___
Python tracker 

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



[issue45020] Freeze all modules imported during startup.

2021-10-05 Thread Eric Snow


Eric Snow  added the comment:


New changeset 08285d563e64c179a56ab2f952345b3dbcdb54f3 by Eric Snow in branch 
'main':
bpo-45020: Identify which frozen modules are actually aliases. (gh-28655)
https://github.com/python/cpython/commit/08285d563e64c179a56ab2f952345b3dbcdb54f3


--

___
Python tracker 

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



[issue42327] Add PyModule_Add()

2021-10-05 Thread Łukasz Langa

Change by Łukasz Langa :


--
nosy: +lukasz.langa
nosy_count: 3.0 -> 4.0
pull_requests: +27089
pull_request: https://github.com/python/cpython/pull/28741

___
Python tracker 

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



[issue45020] Freeze all modules imported during startup.

2021-10-05 Thread Guido van Rossum


Guido van Rossum  added the comment:

Whoa. os.path is not always an alias for posixpath, is it?

--

___
Python tracker 

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



[issue15870] PyType_FromSpec should take metaclass as an argument

2021-10-05 Thread Sebastian Berg


Sebastian Berg  added the comment:

Yeah, I will try and have a look.  I had posted the patch, because the test 
looked like a bit of a larger chunk of work ;).

> And I'm surprised that you're surprised :)

:).  I am coming from a completely different angle, probably.  Just if you are 
curious, I use a from-spec like API (not public yet) in NumPy and dynamic use 
seemed natural/logical in that use-case, e.g.: 
https://github.com/numpy/numpy/blob/c92864091e5928d92bc109d1505febe35f3909f1/numpy/core/src/multiarray/convert_datatype.c#L2434

But, I am trying to understand the preference for static better.  There is 
probably something to learn or even important I am missing.


> And I have some plans to make static specs useful in type checking, since we 
> can assume that types made from the same spec share the memory layout.

(I don't understand how it is useful, unless you reuse slot structs?)
It sounds interesting, but even static does not guarantee constant unless the 
user indicates it through a flag?
Maybe you could achieve this by figuring it out by inspecting/comparing content 
rather than using the spec pointer(s)? (More complex, but also more powerful?)

--

___
Python tracker 

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



[issue45380] help() appears confused about the module of typing.Annotated

2021-10-05 Thread Alex Waygood


New submission from Alex Waygood :

`help()` appears confused about the module of `typing.Annotated`. If you call 
`help()` on a parameterised "instance" of `typing.Annotated`, it will claim 
that `Annotated` belongs to whatever module the annotated type is from. 
Additionally, `help()` appears not to know about the `__metadata__` attribute 
of `typing.Annotated`.

```
>>> from typing import Annotated, Callable
>>> t = Annotated[int | str, "Some metadata"]
>>> help(t)
Help on _AnnotatedAlias in module types:

Annotated = int | str
>>> u = Annotated[Callable[[int], str], "Some metadata"]
>>> help(u)
Help on _AnnotatedAlias in module typing:

Annotated = typing.Callable[[int], str]
>>> s = Annotated[int, "Some metadata"]
Help on _AnnotatedAlias in module builtins:

Annotated = class int(object)
 |  int([x]) -> integer
 |  int(x, base=10) -> integer

# (etc., giving the entire output of help() for `int`)
```

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 403258
nosy: AlexWaygood, docs@python
priority: normal
severity: normal
status: open
title: help() appears confused about the module of typing.Annotated
type: behavior
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue45381] IDLE cannot kill process. "interupt" ctl+c and "restart shell" freeze program.

2021-10-05 Thread A A


New submission from A A :

Idle3 with python 3.7.3 on Debian Buster and XFCE.
Attempting to run the line 'print ("Hello World" * 8**8)' from either the Idle 
shell window or Idle editor will cause Idle to hang and one CPU core runs 
100%.(allowed it to run for several minutes) 
ctl+c or menu Shell>interrupt execution simply pauses CPU processing but does 
not terminate the process nor is there an option to continue the process. 
Following this interrupt with use of menu Shell>Restart-shell causes Idle to 
fully freeze and then requires a system terminate signal to close Idle.
The same line of python used in Idle on another student's MS-Windows laptop 
required ctl-alt-del this was a fresh download with v3.9 as I recall.

When used used on the system Bash shell and python 3.7.3, the line operates 
without any trouble and finishes in 20seconds as: $ python3 -c 'print ( "Hello 
World " * 8**8)' 

Suggestion is that the ctl+c or the Interrupt menu option in Idle should 
terminate the running code rather than pause it.

--
assignee: terry.reedy
components: IDLE
messages: 403259
nosy: capsicumw, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE cannot kill process. "interupt" ctl+c and "restart shell" freeze 
program.
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue45382] platform() is not able to detect windows 11

2021-10-05 Thread Alex Zaslavskis


New submission from Alex Zaslavskis :

I am updated to windows 11 . Now I am trying to write script that will detect 
is user use windows 11 or windows 10 . 
I was using the simplest way as possible: 
import platform 
print(platform.platform())
The result I got is : Windows-10-10.0.22000-SP0
That is quite correct . The build version is correct ,but the windows version 
is still not .

--
components: Library (Lib)
messages: 403260
nosy: sahsariga111
priority: normal
severity: normal
status: open
title: platform() is not able to detect windows 11
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



[issue45382] platform() is not able to detect windows 11

2021-10-05 Thread Alex Zaslavskis


Alex Zaslavskis  added the comment:

The 
platform.win32_ver() returns same answer

--

___
Python tracker 

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



[issue45382] platform() is not able to detect windows 11

2021-10-05 Thread Alex Zaslavskis


Alex Zaslavskis  added the comment:

The bug comes from Microsoft  terminal bug : If I type there : ver it will 
return Microsoft Windows [Version 10.0.22000.194] only one patch is if that 
will check the build . 
so : 
 info = subprocess.check_output(cmd,
   stdin=subprocess.DEVNULL,
   stderr=subprocess.DEVNULL,
   text=True,
   shell=True)
if(int(info.strip(".")[2])==22000):
 return "Windows [Version 11.0.22000.194]

--

___
Python tracker 

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



[issue45382] platform() is not able to detect windows 11

2021-10-05 Thread Alex Zaslavskis


Alex Zaslavskis  added the comment:

demo.py contains dirty hack that can be used as a fix for some time before 
microsoft will not fix it.

--
Added file: https://bugs.python.org/file50327/demo.py

___
Python tracker 

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



[issue45382] platform() is not able to detect windows 11

2021-10-05 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

win32_ver() should be using the internal Windows APIs to figure out the 
version. I do wonder why those don't return the same version as the "ver" 
command line tool.

Adding our Windows experts to the noisy list.

--
nosy: +lemburg, 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



[issue45382] platform() is not able to detect windows 11

2021-10-05 Thread Steve Dower


Steve Dower  added the comment:

The version number for "Windows 11" still starts with 10.0. Just like how 
Windows 5.x and 6.x were around for a very long time each ;)

There are tables in platform module that map the specific version to the 
release name. These probably need to be updated to return "11" for versions 
10.0.22000 and greater.

--

___
Python tracker 

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



[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-10-05 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 52d9d3b75441ae6038fadead89eac5eecdd34501 by Łukasz Langa in 
branch '3.9':
[3.9] bpo-44050: Extension modules can share state when they don't support 
sub-interpreters. (GH-27794) (GH-28741)
https://github.com/python/cpython/commit/52d9d3b75441ae6038fadead89eac5eecdd34501


--

___
Python tracker 

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



[issue45382] platform() is not able to detect windows 11

2021-10-05 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

On 05.10.2021 22:30, Steve Dower wrote:
> The version number for "Windows 11" still starts with 10.0. Just like how 
> Windows 5.x and 6.x were around for a very long time each ;)
> 
> There are tables in platform module that map the specific version to the 
> release name. These probably need to be updated to return "11" for versions 
> 10.0.22000 and greater.

Hmm, but the "ver" output seems to have more information than those
APIs.

Note: The tables for mapping to releases for Windows only take the
major.minor versions as key. Unfortunately, those did not change. It's
actually the build version which provides the indicator, it seems.

Any idea, whether a patch will fix this on Windows soonish ?

--

___
Python tracker 

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



[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-10-05 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Hai Shi! ✨ 🍰 ✨

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



[issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset

2021-10-05 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> [...] if sqlite3 starts returning aware datetimes, existing code might break.

True.

> [...] perhaps this could be fixed in conjunction with changing sqlite3's API 
> to allow per-database converters and adapters

Another option could be to deprecate the current behaviour and then change it 
to being timezone aware in Python 3.13.

--

___
Python tracker 

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



[issue45374] sqlite3: Add configure option to set or auto-detect rpath to sqlite3 libs

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



[issue45343] Update bundled pip to 21.2.4 and setuptools to 58.1.0

2021-10-05 Thread Łukasz Langa

New submission from Łukasz Langa :


New changeset 4c8d543823dde5a30615da61727837a48f7ab847 by Illia Volochii in 
branch 'main':
bpo-45343: Update bundled pip to 21.2.4 and setuptools to 58.1.0 (GH-28684)
https://github.com/python/cpython/commit/4c8d543823dde5a30615da61727837a48f7ab847


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45382] platform() is not able to detect windows 11

2021-10-05 Thread Eryk Sun


Eryk Sun  added the comment:

The _WIN32_CLIENT_RELEASES table based on major.minor version number isn't 
helpful since Windows 10 and 11 have the same version number. win32_ver() needs 
a workaround to return release "11" if the build number is 22000 or greater. Is 
there any need/desire to also identify Server 2016, 2019, and 2022?

--
nosy: +eryksun

___
Python tracker 

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



[issue45343] Update bundled pip to 21.2.4 and setuptools to 58.1.0

2021-10-05 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45382] platform() is not able to detect windows 11

2021-10-05 Thread Steve Dower


Steve Dower  added the comment:

> Hmm, but the "ver" output seems to have more information than those APIs.

It's always had build numbers, which the regular APIs do not, because the 
regular APIs are meant for detecting incompatibilities rather than reporting.

Since there are some incompatibilities, I hope they'll rev the minor version 
number, but I have no idea if that's planned yet. In theory I have early access 
to the release build already, but I haven't installed it on anything.

Eventually I think we're going to need some kind of WMI call in the platform 
module to get the right data for reporting. Until then, we're making best 
guesses from heuristics.

--
nosy:  -eryksun

___
Python tracker 

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



[issue45382] platform() is not able to detect windows 11

2021-10-05 Thread Zachary Ware


Change by Zachary Ware :


--
nosy: +eryksun

___
Python tracker 

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



[issue45343] Update bundled pip to 21.2.4 and setuptools to 58.1.0

2021-10-05 Thread Łukasz Langa

Change by Łukasz Langa :


--
pull_requests: +27092
pull_request: https://github.com/python/cpython/pull/28747

___
Python tracker 

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



[issue45383] PyType_FromSpec API fails to use metaclass of bases

2021-10-05 Thread Sebastian Berg


New submission from Sebastian Berg :

The PyType_FromSpec fails to take care about MetaClasses.

 https://bugs.python.org/issue15870

Asks to create a new API to pass in the MetaClass.  This issue is only about 
"inheriting" the metaclass of the bases correctly.  Currently, Python fails to 
take into account that the bases may be MetaClass and not `PyType_Type` 
instances.

--
components: C API, Interpreter Core
messages: 403273
nosy: petr.viktorin, seberg
priority: normal
pull_requests: 27093
severity: normal
status: open
title: PyType_FromSpec API fails to use metaclass of bases
type: crash
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



[issue45343] Update bundled pip to 21.2.4 and setuptools to 58.1.0

2021-10-05 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 325e4647afffe347cc20747f3dccc6ba9e782636 by Miss Islington (bot) 
in branch '3.10':
bpo-45343: Update bundled pip to 21.2.4 and setuptools to 58.1.0 (GH-28684) 
(GH-28746)
https://github.com/python/cpython/commit/325e4647afffe347cc20747f3dccc6ba9e782636


--

___
Python tracker 

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



[issue45343] Update bundled pip to 21.2.4 and setuptools to 58.1.0

2021-10-05 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 1374459c9088725e022beab418bced96a825baad by Łukasz Langa in 
branch '3.9':
[3.9] bpo-45343: Update bundled pip to 21.2.4 and setuptools to 58.1.0 
(GH-28684) (GH-28747)
https://github.com/python/cpython/commit/1374459c9088725e022beab418bced96a825baad


--

___
Python tracker 

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



  1   2   >