[issue45548] Update Modules/Setup

2021-10-26 Thread Christian Heimes


Christian Heimes  added the comment:

Brett removed a lot of stuff in 01cf4fb9c1aa567484c2ffb1b11f9b3fe9949b05 to 
make the file more readable. I removed unnecessary -D, -I, and -L to make the 
file even more readable. You can pass custom flags to ./configure.

Setup should not be edited by hand. Customizations go to Setup.local.

--

___
Python tracker 
<https://bugs.python.org/issue45548>
___
___
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-26 Thread Christian Heimes


Christian Heimes  added the comment:

Typo, the last line should read "@HAVE_SCPROXY_FALSE@_scproxy"

--

___
Python tracker 
<https://bugs.python.org/issue45548>
___
___
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-26 Thread Christian Heimes


Christian Heimes  added the comment:

Brett, we can use AM_CONDITIONAL() to conditionally enable/disable a feature 
and AC_CONFIG_FILES() to create a Modules/Setup from a template:

Example:

The conditional

AM_CONDITIONAL([HAVE_SCPROXY], [test "$ac_sys_system" = "Darwin"])

sets HAVE_SCPROXY_FALSE and HAVE_NIS_SCPROXY based on the check.

On macOS:

HAVE_SCPROXY_FALSE='#'
HAVE_SCPROXY_TRUE=''

On Linux:

HAVE_SCPROXY_FALSE=''
HAVE_SCPROXY_TRUE='#'

We can either do something like:

*shared*
@HAVE_SCPROXY_TRUE@_scproxy _scproxy.c -framework SystemConfiguration 
-framework CoreFoundation

or:

*disabled*
@HAVE_SCPROXY_FALSE*_scproxy

--

___
Python tracker 
<https://bugs.python.org/issue45548>
___
___
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-26 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset b5ee79494b2e0d484b7cf59f6746010e22567702 by Christian Heimes in 
branch 'main':
bpo-45548: makesetup improvements (GH-29225)
https://github.com/python/cpython/commit/b5ee79494b2e0d484b7cf59f6746010e22567702


--

___
Python tracker 
<https://bugs.python.org/issue45548>
___
___
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-26 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +27489
pull_request: https://github.com/python/cpython/pull/29225

___
Python tracker 
<https://bugs.python.org/issue45548>
___
___
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-25 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 2b8677a3cd855eb3a579894c64588eab0e006269 by Christian Heimes in 
branch 'main':
bpo-45548: FreeBSD doesn't like auto vars in makesetup (GH-29216)
https://github.com/python/cpython/commit/2b8677a3cd855eb3a579894c64588eab0e006269


--

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



[issue45595] [Build] Make extensions depend on header files

2021-10-25 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 
<https://bugs.python.org/issue45595>
___
___
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-25 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +27478
pull_request: https://github.com/python/cpython/pull/29216

___
Python tracker 
<https://bugs.python.org/issue45548>
___
___
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-25 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset ece916e92ce76cfdbfd208605a6fc827db0fbd52 by Christian Heimes in 
branch 'main':
bpo-45548: Add missing extensions to Modules/Setup (GH-29199)
https://github.com/python/cpython/commit/ece916e92ce76cfdbfd208605a6fc827db0fbd52


--

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



[issue45595] [Build] Make extensions depend on header files

2021-10-25 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 81669d1b7bd668d1bd0fab92836e8b5e7976e362 by Christian Heimes in 
branch 'main':
bpo-45595: Make extensions depend on header files (GH-29198)
https://github.com/python/cpython/commit/81669d1b7bd668d1bd0fab92836e8b5e7976e362


--

___
Python tracker 
<https://bugs.python.org/issue45595>
___
___
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-25 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 77e3f224d6ae6d38e5fc899fb5eaadf2b7c255a1 by Christian Heimes in 
branch 'main':
bpo-45548: Remove checks for finite and gamma (GH-29206)
https://github.com/python/cpython/commit/77e3f224d6ae6d38e5fc899fb5eaadf2b7c255a1


--

___
Python tracker 
<https://bugs.python.org/issue45548>
___
___
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-25 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +27474
pull_request: https://github.com/python/cpython/pull/29206

___
Python tracker 
<https://bugs.python.org/issue45548>
___
___
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-24 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +27468
pull_request: https://github.com/python/cpython/pull/29199

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



[issue45598] setup.py grep_headers_for() is broken by design

2021-10-24 Thread Christian Heimes


Christian Heimes  added the comment:

If we remove grep_headers_for(), then we can also close bpo-42325

--

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



[issue45598] setup.py grep_headers_for() is broken by design

2021-10-24 Thread Christian Heimes


New submission from Christian Heimes :

The setup.py helper function grep_headers_for() is used by ctypes build step to 
search header files for functions. The function kinda works on most platforms, 
but only by accident. On my system it opens all header files that match 
/usr/include/*.h and returns true if any (!) header file contains the string 
(!) "ffi_prep_cif_var". The check would also match "ffi_prep_cif_var" in a 
comment of an unrelated header file.

We cannot limit the search to "ffi.h" only, because that would break multiarch 
builds with a header file like this:

#if defined(__i386__)
#include "ffi-i386.h"
#elif defined(__powerpc64__)
#include "ffi-ppc64.h"
...

Solutions:

1) Use "AC_EGREP_HEADER" autoconf macro. It runs a header file through the C 
preprocessor
2) Use AC_LINK_IFELSE autoconf macro. This macro compiles and links code to 
detect if a library exports a function.
3) Re-implement any of the macros in pure Python (ugh!)
4) Just assume that libffi supports ffi_prep_cif_var, ffi_prep_closure_loc, and 
ffi_closure_alloc on our target platforms. According to [1] the functions have 
been around for over a decade.

I favor (4).

Ned, what about USING_APPLE_OS_LIBFFI? Is it still relevant?

[1] 
https://github.com/libffi/libffi/blame/48bdb02867edb7e9f3785ccb4bdff1087fb44246/include/ffi.h.in#L309

--
components: Build, ctypes
messages: 404926
nosy: amaury.forgeotdarc, belopolsky, christian.heimes, meador.inge, ned.deily
priority: normal
severity: normal
status: open
title: setup.py grep_headers_for() is broken by design
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

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



[issue45595] [Build] Make extensions depend on header files

2021-10-24 Thread Christian Heimes


Change by Christian Heimes :


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

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



[issue45595] [Build] Make extensions depend on header files

2021-10-24 Thread Christian Heimes


New submission from Christian Heimes :

Any change to a Python header file triggers a rebuild of Python core objects. 
The extension modules are not automatically rebuild in several cases. This is 
slightly annoying for core development because it forces me to do ``make 
clean`` too often.

* setup.py adds dependencies on Includes/*.h but not on header files in 
"internal" and "cpython" subdirectory
* Modules/Setup and makesetup do not add a dependency on PYTHON_HEADERS
* Modules/Setup is also missing dependencies on module-specific headers, e.g. 
_sre.o should depend on sre.h.

--
assignee: christian.heimes
components: Build
messages: 404921
nosy: brett.cannon, christian.heimes
priority: normal
severity: normal
status: open
title: [Build] Make extensions depend on header files
type: enhancement
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue45595>
___
___
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-23 Thread Christian Heimes


Christian Heimes  added the comment:

The trick would move the math function back into the core. Mark moved the math 
functions out of the core on purpose, see bpo-7518.

--

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



[issue45590] distutils: Upload failed (400): Invalid value for blake2_256_digest

2021-10-23 Thread Christian Heimes


Christian Heimes  added the comment:

Distutils is deprecated and should no longer be used. Please use twine to 
upload software to PyPI, 
https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html

--

___
Python tracker 
<https://bugs.python.org/issue45590>
___
___
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-23 Thread Christian Heimes


Christian Heimes  added the comment:

PR GH-29179 or GH-29181 address the issue with _math.o

PR GH-29164 adds the missing modules and also introduces pkg-config lookups for 
dependencies.

Brett and I discussed that we have to introduce conditionals to Modules/Setup 
to make use of the AM_CONDITIONALs from PR GH-29164. We also have to figure out 
how to deal with system-libmpdec and system-cffi.

--

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



[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

2021-10-23 Thread Christian Heimes


Christian Heimes  added the comment:

> Given that some essential third party modules are not going down this path, 
> it is unlikely that general users would ever see any benefit.

I disagree with your statement. It does not reflect my experience, too.

Heap types are a prerequisite for abi3 wheels. In order to get abi3 binary 
wheels, extensions must use the limited API, which means they must use heap 
types. Stable ABI wheels are a great benefit for extension authors, because it 
reduces their build matrix substantially. For instance cryptography's stable 
abi3 wheels work with any Python version >=3.6,<4.

Heap types and stable abi3 are also a major benefit for general users. Once 
Cython and the NumPy stack supports limited API and stable ABI, users no longer 
have to wait on builds for a new Python release. Every new minor release we get 
several bug reports on BPO about NumPy not working on latest release. This will 
go away.

--
nosy: +christian.heimes

___
Python tracker 
<https://bugs.python.org/issue45113>
___
___
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-23 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +27459
pull_request: https://github.com/python/cpython/pull/29188

___
Python tracker 
<https://bugs.python.org/issue45548>
___
___
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-23 Thread Christian Heimes


Christian Heimes  added the comment:

I ran into another problem. In shared mode, Modules/Setup places the shared 
modules in ./Modules/ instead of the build directory ./build/lib.something/. 
The ./Modules/ directory is not on sys.path. getpath.c only adds the build dir 
to sys.path. It takes the value from ./pybuilddir.txt. The file is generated by 
sysconfig.py.

$ make
...
*** WARNING: renaming "_asyncio" since importing it failed: No module named 
'math'

The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc  cmath math   
pwd   time

$ find -name 'math*.so'
./Modules/math.cpython-311-x86_64-linux-gnu.so

--

___
Python tracker 
<https://bugs.python.org/issue45548>
___
___
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-22 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +27453
pull_request: https://github.com/python/cpython/pull/29179

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



[issue45571] Modules/makesetup uses wrong CFLAGS for *shared*

2021-10-22 Thread Christian Heimes


Change by Christian Heimes :


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

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



[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2021-10-22 Thread Christian Heimes


Christian Heimes  added the comment:

We no longer accept patches. Contributors have to create a PR on GitHub, so we 
can record contributions and verify the contributor license agreement.

--

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



[issue45571] Modules/makesetup uses wrong CFLAGS for *shared*

2021-10-22 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset f6e8b80d20159596cf641305bad3a833bedd2f4f by Christian Heimes in 
branch 'main':
bpo-45571: use PY_CFLAGS_NODIST for shared Modules/Setup (GH-29161)
https://github.com/python/cpython/commit/f6e8b80d20159596cf641305bad3a833bedd2f4f


--

___
Python tracker 
<https://bugs.python.org/issue45571>
___
___
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-22 Thread Christian Heimes


Christian Heimes  added the comment:

I added several missing module definitions in 
https://github.com/python/cpython/pull/29164

math/cmath conflict when _math.c is included twice.

--

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



[issue45570] Simplify setup macros for pyexpat and _elementtree

2021-10-22 Thread Christian Heimes


Change by Christian Heimes :


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

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



[issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup

2021-10-22 Thread Christian Heimes


Christian Heimes  added the comment:

$ find build/lib.linux-x86_64-3.11/ -name '*.so' | sort
build/lib.linux-x86_64-3.11/_ctypes.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_ctypes_test.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_dbm.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_decimal.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_gdbm.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_multiprocessing.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_posixshmem.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_sqlite3.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_testcapi.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_tkinter.cpython-311-x86_64-linux-gnu.so
build/lib.linux-x86_64-3.11/_uuid.cpython-311-x86_64-linux-gnu.so

--

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



[issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup

2021-10-22 Thread Christian Heimes


Christian Heimes  added the comment:

I added some whitespace to Modules/Setup. All lines starting with ``#([a-z_])`` 
compile cleanly on Fedora 34 with all dependencies available. dbm, tkinter, and 
sqlite are missing or untested.


$ sed -E -i 's/^#([a-z_])/\1/g' Modules/Setup
$ make
...
The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc   _asyncio   _bisect 
_blake2_bz2   _codecs_cn  
_codecs_hk _codecs_iso2022_codecs_jp  
_codecs_kr _codecs_tw _contextvars
_crypt _csv   _curses 
_curses_panel  _datetime  _elementtree
_hashlib   _heapq _json   
_lsprof_lzma  _md5
_multibytecodec_opcode_pickle 
_posixsubprocess   _queue _random 
_sha1  _sha256_sha3   
_sha512_socket_ssl
_statistics_struct_testbuffer 
_testimportmultiple   _testinternalcapi   _testmultiphase 
_typing_xxsubinterpreters   _xxtestfuzz 
_zoneinfo  array  audioop 
binascii   cmath  fcntl   
grpmath   mmap
nisossaudiodevpwd 
pyexpatreadline   resource
select spwd   syslog  
termiostime   unicodedata 
xxlimited  xxlimited_35   zlib   

$  ./python -c "import sys; print(sys.builtin_module_names)"
('_abc', '_ast', '_asyncio', '_bisect', '_blake2', '_bz2', '_codecs', 
'_codecs_cn', '_codecs_hk', '_codecs_iso2022', '_codecs_jp', '_codecs_kr', 
'_codecs_tw', '_collections', '_contextvars', '_crypt', '_csv', '_curses', 
'_curses_panel', '_datetime', '_elementtree', '_functools', '_hashlib', 
'_heapq', '_imp', '_io', '_json', '_locale', '_lsprof', '_lzma', '_md5', 
'_multibytecodec', '_opcode', '_operator', '_pickle', '_posixsubprocess', 
'_queue', '_random', '_sha1', '_sha256', '_sha3', '_sha512', '_signal', 
'_socket', '_sre', '_ssl', '_stat', '_statistics', '_string', '_struct', 
'_symtable', '_testbuffer', '_testimportmultiple', '_testinternalcapi', 
'_testmultiphase', '_thread', '_tokenize', '_tracemalloc', '_typing', 
'_warnings', '_weakref', '_xxsubinterpreters', '_xxtestfuzz', '_zoneinfo', 
'array', 'atexit', 'audioop', 'binascii', 'builtins', 'cmath', 'errno', 
'faulthandler', 'fcntl', 'gc', 'grp', 'itertools', 'marshal', 'math', 'mmap', 
'nis', 'ossaudiodev', 'posix', 'pwd', 'pyexpat'
 , 'readline', 'resource', 'select', 'spwd', 'sys', 'syslog', 'termios', 
'time', 'unicodedata', 'xx', 'xxlimited', 'xxlimited_35', 'xxsubtype', 'zlib')
$ ldd python
linux-vdso.so.1 (0x7fffa1f4)
libpthread.so.0 => /lib64/libpthread.so.0 (0x7f6032fe2000)
libdl.so.2 => /lib64/libdl.so.2 (0x7f6032fdb000)
libutil.so.1 => /lib64/libutil.so.1 (0x7f6032fd6000)
libm.so.6 => /lib64/libm.so.6 (0x7f6032e92000)
libcrypt.so.2 => /lib64/libcrypt.so.2 (0x7f6032e58000)
libnsl.so.2 => /lib64/libnsl.so.2 (0x7f6032e3c000)
libtirpc.so.3 => /lib64/libtirpc.so.3 (0x7f6032e0a000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x7f6032df7000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x7f6032dcb000)
libz.so.1 => /lib64/libz.so.1 (0x7f6032db1000)
libreadline.so.8 => /lib64/libreadline.so.8 (0x7f6032d59000)
libssl.so.1.1 => /lib64/libssl.so.1.1 (0x7f6032cbc000)
libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x7f60329cc000)
libncursesw.so.6 => /lib64/libncursesw.so.6 (0x7f603298d000)
libtinfo.so.6 => /lib64/libtinfo.so.6 (0x7f603295e000)
libpanel.so.6 => /lib64/libpanel.so.6 (0x7f6032958000)
libc.so.6 => /lib64/libc.so.6 (0x7f6032789000)
/lib64/ld-linux-x86-64.so.2 (0x7f6033029000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x7f6032732000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x7f6032652000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x7f603263a000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x7f6032633000)
libncurses.so.6 => /lib64/libncurses.so.6 (0x7f6032606000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x7f60325f5000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x7f60325ec000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x7f60325d2000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x7f60325a6000)
libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x7f603250f000)

--
nosy: +brett.cannon,

[issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup

2021-10-22 Thread Christian Heimes


Change by Christian Heimes :


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

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



[issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup

2021-10-22 Thread Christian Heimes


New submission from Christian Heimes :

pkg-config [1] is a standard tool on Linux and other platforms to detect 
presence of dependencies as well as to figure out which compiler and linker 
flags they require. Development packages provide a .pc file, e.g. ncurses 
provides a ncursesw.pc file.

$ pkg-config --libs --cflags ncursesw
-D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -lncursesw -ltinfo

I propose to use a modified version of pkg-config's 
PKG_HAVE_DEFINE_WITH_MODULES macro in our configure script. On succss the 
modified macro defines:

* HAVE_FOO=1
* FOO_CFLAGS="some compile flags"
* FOO_LIBS="some library flags for linker"

On error, it sets nothing and does not cause configure to stop with an error.

The macro also allows users to override flags by setting FOO_CFLAGS and 
FOO_LIBS env vars. HAVE_FOO is added to pyconfig.h. The FOO_CFLAGS/LIBS are 
added to Makefile, from where it can be consumed by Modules/Setup.

Eventually Python could use the flags in setup.py, too. For now I would like to 
start with Modules/Setup. It is only used by some power users and has less risk 
of breaking the setup of beginners.

[1] https://www.freedesktop.org/wiki/Software/pkg-config/

--
assignee: christian.heimes
components: Build
messages: 404781
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: Use pkg-config autoconf macros to detect flags for Modules/Setup
type: enhancement
versions: Python 3.11

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



[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2021-10-22 Thread Christian Heimes


Christian Heimes  added the comment:

Could you or somebody else please create a PR with patch and a test case?

--
versions: +Python 3.11 -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 
3.6, Python 3.7, Python 3.8

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



[issue43974] Define Py_BUILD_CORE_MODULE in extensions instead of setup.py and Modules/Setup

2021-10-22 Thread Christian Heimes


Change by Christian Heimes :


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

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



[issue43974] Define Py_BUILD_CORE_MODULE in extensions instead of setup.py and Modules/Setup

2021-10-22 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 03e9f5dc751b8c441a85f428abc3f432ffe46345 by Christian Heimes in 
branch 'main':
bpo-43974: Move Py_BUILD_CORE_MODULE into module code (GH-29157)
https://github.com/python/cpython/commit/03e9f5dc751b8c441a85f428abc3f432ffe46345


--

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



[issue45571] Modules/makesetup uses wrong CFLAGS for *shared*

2021-10-22 Thread Christian Heimes


Change by Christian Heimes :


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

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



[issue45571] Modules/makesetup uses wrong CFLAGS for *shared*

2021-10-22 Thread Christian Heimes


New submission from Christian Heimes :

I think that makesetup uses the wrong CFLAGS variable for shared modules. The 
script uses PY_CFLAGS:

no) cc="$cc \$(CCSHARED) \$(PY_CFLAGS) \$(PY_CPPFLAGS)";;

while setup.py uses PY_CFLAGS_NODIST:

set_compiler_flags('CFLAGS', 'PY_CFLAGS_NODIST')

The flags are similar but not equal. Amongst others PY_CFLAGS does not include 
Include/internal while PY_CFLAGS_NODIST has -I./Include/internal.

--
components: Build
messages: 404766
nosy: brett.cannon, christian.heimes, twouters, vstinner
priority: normal
severity: normal
status: open
title: Modules/makesetup uses wrong CFLAGS for *shared*
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

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



[issue45570] Simplify setup macros for pyexpat and _elementtree

2021-10-22 Thread Christian Heimes


Change by Christian Heimes :


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

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



[issue45570] Simplify setup macros for pyexpat and _elementtree

2021-10-22 Thread Christian Heimes


New submission from Christian Heimes :

setup.py and Modules/Setup define a couple of macros for pyexpat and 
_elementtree. The macros are no longer needed or should be moved to our 
expat_config.h copy.

* HAVE_EXPAT_CONFIG_H is not used by our code and not used by system-wide expat 
header files
* USE_PYEXPAT_CAPI is no longer used by our code
* XML_POOR_ENTROPY should be defined in expat_config.h

--
assignee: christian.heimes
components: Build
messages: 404761
nosy: brett.cannon, christian.heimes, vstinner
priority: normal
severity: normal
status: open
title: Simplify setup macros for pyexpat and _elementtree
type: enhancement
versions: Python 3.11

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



[issue43974] Define Py_BUILD_CORE_MODULE in extensions instead of setup.py and Modules/Setup

2021-10-22 Thread Christian Heimes


Change by Christian Heimes :


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

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



[issue43974] Define Py_BUILD_CORE_MODULE in extensions instead of setup.py and Modules/Setup

2021-10-22 Thread Christian Heimes


Christian Heimes  added the comment:

The proposal is related to Brett's ticket bpo-45548. I no longer think that we 
should define Py_BUILD_CORE_MODULE unconditionally. Instead I propose to move 
the defines into each C module. This avoids duplication of macros in setup.py 
and Modules/Setup.

--
components: +Extension Modules
nosy: +brett.cannon
title: setup.py should set Py_BUILD_CORE_MODULE as defined macro -> Define 
Py_BUILD_CORE_MODULE in extensions instead of setup.py and Modules/Setup
versions:  -Python 3.10

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



[issue45567] Support TLS Encrypted ClientHello (ECH)

2021-10-22 Thread Christian Heimes


Christian Heimes  added the comment:

Thanks for filing this feature request!

The DNS lookup part is out of scope for the ssl module. I don't want to get 
into the DNS business. At $WORK I work on BIND, DNSSEC and DNS over TLS. Secure 
DNS (and DNS in general) is already complicated when you control the entire 
stack and only have to deal with one family of Linux distros. AFAIK there isn't 
even a platform-independent way to perform lookups with abitrary RRTYPEs. 
res_nquery() is only available on some platforms and doesn't work reliable with 
some libcs. I have had issues with EDNS0 on musl in the past. KRB5KDC SRV looks 
with large responses where unreliable. Let's offload the DNS part of consumers 
of the ssl module. They can use python-dns or c-ares.

The ECH part and callback look sensible, though. I'll include the APIs as soon 
as OpenSSL support them.

--

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



[issue6529] get{pw,gr}{nam,[ug]id}() calls are not re-entrant

2021-10-22 Thread Christian Heimes


Christian Heimes  added the comment:

The problem was fixed a couple of years ago. Python uses the reentrant 
functions since commit 23e65b25557f957af840cf8fe68e80659ce28629 / GH-7081.

--
nosy: +christian.heimes
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
superseder:  -> Release GIL for grp.getgr{nam,gid} and pwd.getpw{nam,uid}
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.10, Python 3.11, Python 
3.9

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



[issue45528] mmap: constants not listed in the documentation

2021-10-22 Thread Christian Heimes


Change by Christian Heimes :


--
type:  -> enhancement
versions:  -Python 3.6, Python 3.7, Python 3.8

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



[issue42413] Replace custom exceptions for timeouts with TimeoutError

2021-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

Andrew, could you please rebase your PR and get it submitted?

--
assignee: christian.heimes -> asvetlov
versions: +Python 3.11 -Python 3.10

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



[issue18276] posixpath.c:_fd_converter() should use PyObject_AsFileDescriptor()

2021-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

Fine with me! Thanks for your feedback.

--
resolution:  -> rejected
stage: needs patch -> resolved
status: open -> closed

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



[issue20952] OpenSSL and RDRAND

2021-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

Thankfully RDRAND is no longer a concern for us. All OpenSSL versions in 
official Python.org installers and supported by recent Python versions have a 
strong and fork-safe RNG.

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

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



[issue17181] SSLContext.set_servername_callback should be able to set argument

2021-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

As Antoine said, you can use a partial function, closure, or an instance method 
as a callable.

Besides nobody else has requested an additional argument in the past eight 
years. I see this as a strong indication that an argument is not required.

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

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



[issue45556] uuid.uuid4() fast optimization

2021-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

We use os.urandom() because it is backed by a cryptographicly secure random 
number generator. The random module uses a non-secure RNG. While RFC 4122 does 
not mandate a CSRPNG, application often rely on unpredictable UUIDs. 
Correctness and security is more important here than performance.

If you need a faster uuid4 implementation, then you can role your own with a 
couple of lines of code:

import random
from uuid import UUID

def uuid4_fast():
return UUID(int=random.getrandbits(128), version=4)

--
nosy: +christian.heimes
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45556>
___
___
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-21 Thread Christian Heimes


Christian Heimes  added the comment:

I started 
https://github.com/python/cpython/compare/main...tiran:configure_pkgconfig?expand=1
 to integrate pkg-config with configure. The patchset also contains examples 
how to pass flags from configure into Makefile and Modules/Setup.

--
nosy: +christian.heimes

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



[issue44319] setup openssl faild on linux (ubuntu 20.04)

2021-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

I need more information to assist you. Could you please provide:

- the steps how you compiled and install your custom OpenSSL installation
- the output of "ls /usr/lib64/openssl"
- your config.log file (please upload)
- the output of "make -j1" for the steps "building '_ssl' extension" and 
"building '_hashlib' extension"

--

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



[issue45522] Allow to build Python without freelists

2021-10-21 Thread Christian Heimes


Change by Christian Heimes :


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

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



[issue26834] Add truncated SHA512/224 and SHA512/256

2021-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

OpenSSL 1.1.1 comes with sha512_256 and sha512_224. I propose that we use the 
OpenSSL implementation and don't add the variants to our _sha512 module.

>>> hashlib.new("sha512_256").hexdigest()
'c672b8d1ef56ed28ab87c3622c5114069bdd3ad7b8f9737498d0c01ecef0967a'
>>> hashlib.new("sha512_224").hexdigest()
'6ed0dd02806fa89e25de060c19d3ac86cabb87d6a0ddd05c333b84f4'

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
versions: +Python 3.11 -Python 3.8

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



[issue17924] Deprecate stat.S_IF* integer constants

2021-10-21 Thread Christian Heimes


Change by Christian Heimes :


--
versions: +Python 3.11 -Python 3.4

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



[issue28134] socket.socket(fileno=fd) does not work as documented

2021-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

Yes, the fix works well enough.

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

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



[issue29343] sock.close() raises OSError EBADF when socket's fd is closed

2021-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

Yury, I don't remember how I found the issue.

It's still an issue in 3.9 and newer.

--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6, Python 3.7

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



[issue19899] No test for thread.interrupt_main()

2021-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

Tests have been added as part of GH-24755.

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

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



[issue27816] sock.proto does not reflect actual protocol

2021-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

I can still reproduce the issue with Python 3.9 and newer.

>>> import socket
>>> socket.socket(socket.AF_INET, socket.SOCK_STREAM).proto
0

--
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 
3.6

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



[issue18276] posixpath.c:_fd_converter() should use PyObject_AsFileDescriptor()

2021-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

Victor, do we want to support "with open("somefile") as f: os.chmod(f, 0o644)"? 
The feature request has been languishing for 8 years.

--
status: open -> pending
versions: +Python 3.11 -Python 3.4

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



[issue37505] Early auditing broken

2021-10-20 Thread Christian Heimes


Change by Christian Heimes :


--
versions: +Python 3.10, Python 3.11 -Python 3.8

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



[issue17405] Add _Py_memset_s() to securely clear memory

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

There haven't been any activity on this feature request for eight years. I'm no 
longer interested to implement my feature request. Closing...

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

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



[issue27292] Warn users that os.urandom() prior to 3.6 can return insecure values

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

2.7 and 3.5 are no longer supported

--
nosy: +christian.heimes
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

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



[issue19259] Provide Python implementation of operator.compare_digest()

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

There is no agreement where to put the function. In the past seven years nobody 
else has requested a pure Python implementation, too. I'm closing my feature 
request as rejected.

--
resolution:  -> rejected
stage: needs patch -> resolved
status: open -> closed

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



[issue18737] Get virtual subclasses of an ABC

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

My feature request has been around for 8 years without any progress. I don't 
even recall why I needed the feature in the first place.

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

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



[issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) <= sizeof(long)

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

The issue has been languishing for 8 years. I'm closing it as "fixed".

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

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



[issue45536] Verify OpenSSL APIs in configure script

2021-10-20 Thread Christian Heimes


Change by Christian Heimes :


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

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



[issue45536] Verify OpenSSL APIs in configure script

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 81520fe677d15cc7f9af5140bc5f9eca8409ad90 by Christian Heimes in 
branch 'main':
bpo-45536: Check OpenSSL APIs in configure (GH-29088)
https://github.com/python/cpython/commit/81520fe677d15cc7f9af5140bc5f9eca8409ad90


--

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



[issue40645] Use OpenSSL's HMAC API

2021-10-20 Thread Christian Heimes


Change by Christian Heimes :


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

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

One of your optimization flags breaks the AX_C_FLOAT_WORDS_BIGENDIAN macro. The 
optimized object file does not have seesnoon in its data section.

$ objdump -x conftest.o conftest_unoptimized.o 

conftest.o: file format elf64-x86-64
conftest.o
architecture: i386:x86-64, flags 0x0011:
HAS_RELOC, HAS_SYMS
start address 0x

Sections:
Idx Name  Size  VMA   LMA   File off  Algn
  0 __ildata  04eb      0118  2**0
  CONTENTS, READONLY, EXCLUDE
  1 .data 0008      0608  2**3
  CONTENTS, ALLOC, LOAD, RELOC, DATA
  2 .note.GNU-stack       0610  2**0
  CONTENTS, READONLY
SYMBOL TABLE:
 ldf *ABS*   conftest.c
 ld  __ildata    __ildata
 ld  .data   .data
 ld  .note.GNU-stack .note.GNU-stack
 g O .data  0008 d
 *UND*   
__must_be_linked_with_icc_or_xild


RELOCATION RECORDS FOR [.data]:
OFFSET   TYPE  VALUE 
 R_X86_64_64   __must_be_linked_with_icc_or_xild



conftest_unoptimized.o: file format elf64-x86-64
conftest_unoptimized.o
architecture: i386:x86-64, flags 0x0010:
HAS_SYMS
start address 0x

Sections:
Idx Name  Size  VMA   LMA   File off  Algn
  0 .data 0008      00f8  2**3
  CONTENTS, ALLOC, LOAD, DATA
  1 .bss        0100  2**2
  ALLOC
  2 .text       0100  2**4
  CONTENTS, ALLOC, LOAD, READONLY, CODE
  3 .note.GNU-stack       0100  2**0
  CONTENTS, READONLY
SYMBOL TABLE:
 ldf *ABS*   conftest.c
 ld  .data   .data
 ld  .bss    .bss
 ld  .text   .text
 ld  .note.GNU-stack .note.GNU-stack
 g O .data  0008 d



$ readelf -x .data conftest.o conftest_unoptimized.o 

File: conftest.o

Hex dump of section '.data':
 NOTE: This section has relocations against it, but these have NOT been applied 
to this dump.
  0x     


File: conftest_unoptimized.o

Hex dump of section '.data':
  0x 73656573 6e6f6f6e   seesnoon

--

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

Your conftest.o does not contain the magic string "seesnoon". Either ICC uses a 
different serialization format or your CFLAGS optimize the value away.

Please run 

   icc -c -o conftest_unoptimized.o conftest.c

and upload "conftest_unoptimized.o".

--

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

Please upload and attach the .o file to this bug. I need to see the content of 
the file.

--

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



[issue14527] How to link with a non-system libffi?

2021-10-20 Thread Christian Heimes


Change by Christian Heimes :


--
type:  -> enhancement
versions: +Python 3.10, Python 3.11

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



[issue18100] socket.sendall() cannot send buffers of 2GB or more

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

The issue is fixed in Python 3 by commit 
f72006f4429975a9d221e046e43dabd4f41eda23

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

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



[issue1760357] ZipFile.write fails with bad modification time

2021-10-20 Thread Christian Heimes


Change by Christian Heimes :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.6, Python 2.7, Python 
3.1, Python 3.2

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



[issue17318] xml.sax and xml.dom fetch DTDs by default

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

I'm closing this as duplicate.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> XML vulnerabilities in Python

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



[issue7938] makesetup interprets macros -DA=B as a Make variable definition

2021-10-20 Thread Christian Heimes


Change by Christian Heimes :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.6

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



[issue7406] int arithmetic relies on C signed overflow behaviour

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

Python 2 is no longer supported. Python 3's _PyLong_Add() function doesn't rely 
on overflow.

--
nosy: +christian.heimes
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed

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



[issue7757] sys.path is incorrect when prefix is ""

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

This is a very old bug report. Python has changed a lot in the past decade. 
Please reopen the bug if you still can reproduce the issue with Python 3.9 or 
newer.

--
nosy: +christian.heimes
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

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



[issue5993] python produces zombie in webbrowser.open

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

Are Python 3.9 to 3.11 still affected by the issue?

The webbrowser module now uses subprocess.Popen() to start browsers. The 
subprocess module calls wait() and performs additional cleanup to prevent 
zombies.

--
nosy: +christian.heimes
status: open -> pending
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.6, Python 2.7, Python 
3.1, Python 3.2

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



[issue1566331] Bad behaviour in .obuf*

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

Does the issue still affect supported Python and Linux versions? Majority of 
distros are using pipewire or pulseaudio these days.

--
nosy: +christian.heimes
status: open -> pending
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.6

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



[issue45536] Verify OpenSSL APIs in configure script

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

Example output:

$ ./configure
checking whether compiling and linking against OpenSSL works... yes
checking for --with-openssl-rpath... 
checking whether OpenSSL provides required APIs... yes

$ ./configure --with-openssl=/home/heimes/dev/python/multissl/openssl/3.0.0
checking for openssl/ssl.h in /home/heimes/dev/python/multissl/openssl/3.0.0... 
yes
checking whether compiling and linking against OpenSSL works... yes
checking for --with-openssl-rpath... 
checking whether OpenSSL provides required APIs... yes

$ ./configure --with-openssl=/home/heimes/dev/python/multissl/openssl/1.0.2u
checking for openssl/ssl.h in 
/home/heimes/dev/python/multissl/openssl/1.0.2u... yes
checking whether compiling and linking against OpenSSL works... yes
checking for --with-openssl-rpath... 
checking whether OpenSSL provides required APIs... no

--

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



[issue45536] Verify OpenSSL APIs in configure script

2021-10-20 Thread Christian Heimes


Change by Christian Heimes :


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

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



[issue45536] Verify OpenSSL APIs in configure script

2021-10-20 Thread Christian Heimes


New submission from Christian Heimes :

In thread [1] Robin Becker requested to check for working OpenSSL in configure 
script. With reasonable effort it is possible to probe for basic APIs such as 
minimum SSL and EVP interface.

[1] 
https://mail.python.org/archives/list/python-...@python.org/thread/IIFABHN7DOTCXMRQ72SLJSU4VDWRM2HB/

--
assignee: christian.heimes
components: Build, SSL
messages: 404422
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: Verify OpenSSL APIs in configure script
type: enhancement
versions: Python 3.10, Python 3.11

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



[issue45459] Limited API support for Py_buffer

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

CPython internals can still use allocation on the stack. Only stable ABI 
extensions have to use allocation on the heap.

--

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



[issue45459] Limited API support for Py_buffer

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

A consumer will use the APIs:

---
Py_buffer *view;
int ndim;
const char *format;
const Py_ssize_t *shape, *strides, *suboffsets;
void *buf;

view = PyBuffer_New();
PyObject_GetBuffer(obj, view, flags);
ndim = PyBuffer_GetLayout(, , , );
buf = PyBuffer_GetPointer(view, [...]);
PyBuffer_Free(view); // also calls PyBuffer_Release()
---


The API functions PyBuffer_FillInfo(), PyBuffer_FillInfoEx(), and 
PyBuffer_GetInternal() are for exporters (producers)-only. The exporter uses 
the PyBuffer_FillInfo*() in its Py_bf_getbuffer function to fill the view. It 
may use PyBuffer_GetInternal() in its Py_bf_releasebuffer function to access 
the internal field and to release additional resources.

--

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



[issue45459] Limited API support for Py_buffer

2021-10-20 Thread Christian Heimes


Christian Heimes  added the comment:

All memory is owned by the exporter object. The exporter (aka producer) is the 
Python type that implements Py_bf_getbuffer and Py_bf_releasebuffer. In 
majority of cases the exporter doesn't have to set shape, strides, and 
suboffsets. They are used in special cases, e.g. multidimensional arrays with 
custom layout. For example they can be used to convert TIFF images from strides 
big endian format to a NumPy array in little endian format.

It's up to the exporter's Py_bf_getbuffer to decide how it fills shape, 
strides, and suboffsets, too. For example an exporter could allocate format, 
shape, strides, and suboffsets on the heap and assign pointers in its getbuffer 
function and store a hint in the ``internal`` field of Py_buffer. Its 
releasebuffer function then checks ``internal`` field and performs 
de-allocations. We must not copy fields. This would break the API.

It would be a bad idea to return copies in PyBuffer_GetLayout(). Consumers have 
to get the layout every time they access a specific item in the buffer in order 
to calculate the offset. I'd rather define the arguments as "const". The 
documentation already states that e.g. "The shape array is read-only for the 
consumer.".

It is highly unlikely that we will ever have to extend the Py_buffer interface. 
It is already extremely versatile and can encode complex formats. You can even 
express the layout of a TIFF image of float32 CMYK in planar configuration (one 
array of 32bit floats cyan, followed by an array of magenta, then an array of 
yellow, and finally an array of contrast).

PS: I have removed PyBuffer_NewEx() function. It did not make sense any sense.

--

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



[issue45522] Allow to build Python without freelists

2021-10-20 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +27352
pull_request: https://github.com/python/cpython/pull/29086

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



[issue45522] Allow to build Python without freelists

2021-10-19 Thread Christian Heimes


Change by Christian Heimes :


--
keywords: +patch
pull_requests: +27327
pull_request: https://github.com/python/cpython/pull/29056

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



[issue45522] Allow to build Python without freelists

2021-10-19 Thread Christian Heimes


New submission from Christian Heimes :

Freelists are an optimization trick to avoid allocation and deallocation of 
commonly used structures. Currently Python has freelists for frame, tuple, 
float, list, dict, async generators, and context objects. Small ints are also 
cached.

For experimentation with alternative memory allocators such as mimalloc, I 
would like to introduce a way to disable freelists. Tuples's _Py_tuple_state 
struct has a conditional check on #if PyTuple_MAXSAVESIZE > 0. I propose to add 
same logic to all other structs.

--
assignee: christian.heimes
components: C API
messages: 404289
nosy: christian.heimes
priority: normal
severity: normal
stage: patch review
status: open
title: Allow to build Python without freelists
type: enhancement
versions: Python 3.11

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



[issue45459] Limited API support for Py_buffer

2021-10-18 Thread Christian Heimes


Christian Heimes  added the comment:

CC Antoine for his expertise of the buffer protocol

Opaque Py_Buffer and PyObject structs will require a different approach and 
prevent some optimizations. The consumer will have to malloc() a Py_buffer 
struct on the heap. In non-trivial cases the producer (exporter) may have to 
malloc() another blob and store it in Py_buffer.internal [1]. I'm not 
particularly worried about the performance of malloc here.

[1] 
https://docs.python.org/3/c-api/buffer.html?highlight=pybuffer#c.Py_buffer.internal

--
nosy: +pitrou

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



[issue45459] Limited API support for Py_buffer

2021-10-18 Thread Christian Heimes


Change by Christian Heimes :


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

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-17 Thread Christian Heimes


Christian Heimes  added the comment:

Please build conftest.o with compiler flags 

icc -c -O3 -fPIC -fp-model strict -fp-model source -axCORE-AVX512,CORE-AVX2 
-xAVX -ipo -prec-div -prec-sqrt 

and attach the file.

--

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



[issue45477] configure script cannot detect float word ordering on linux

2021-10-15 Thread Christian Heimes


Christian Heimes  added the comment:

Python uses the AX_C_FLOAT_WORDS_BIGENDIAN macro from autoconf-archive to 
detect byte order of floats. You can find the code at 
https://www.gnu.org/software/autoconf-archive/ax_c_float_words_bigendian.html .

Please attach your config.log file and the conftest.o output file of the follow 
command:

$ cat > conftest.c << EOF
double d = 
9090423496703681033747047890550501147621169273561563201479712084405348886581669527372346909785805625751702019124748742951693213050356065000232756451757077848023672452514052012137173920149654013264010999420565776568942592.0;
EOF
$ icc -c conftest.c

--
nosy: +christian.heimes

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



[issue45468] Add support for preloading a Python script

2021-10-14 Thread Christian Heimes


Christian Heimes  added the comment:

We generally prefer to have only way way to accomplish a goal. If PEP 648 gets 
accepted then your proposal won't be accepted. In case the PEP is rejected, 
then your proposal may still be rejected or may require a new PEP. Preloading 
has some complicated edge cases, e.g. how it behaves in regards of import 
errors, subinterpreters, various security flags and startup options.

--

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



[issue45468] Add support for preloading a Python script

2021-10-14 Thread Christian Heimes


Christian Heimes  added the comment:

There is also https://www.python.org/dev/peps/pep-0648/

--
nosy: +christian.heimes

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



[issue45404] Undefined I_* macros of stropts.h when building Python 3.10 on Ubuntu: fail to build the fcntl module

2021-10-14 Thread Christian Heimes


Christian Heimes  added the comment:

I'm glad you figured out the problem and fixed your system.

Python uses autoconf (configure) to detect the presence of features. It's a 
standard approach. Since you had a stropts.h in your include directory, 
configure declared HAVE_STROPTS_H. The system can't deal with incompatible 
stropts.h.

We could add more checks and workaround. IMHO it's not worth the effort and 
time. We assume standard behavior and APIs in lots of places.

--
nosy: +christian.heimes
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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



[issue45464] TypeError when inheriting from both OSError and AttributeError

2021-10-14 Thread Christian Heimes


Christian Heimes  added the comment:

You are correct. To be more precise, it's caused by GH-16856. The commit 
introduced PyAttributeErrorObject struct. Since AttributeError and OSError now 
have an incompatible memory layout, it is no longer possible to create a 
subclass that has AttributeError and OSError as parent classes.

--
keywords: +3.10regression
nosy: +christian.heimes
versions: +Python 3.11

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



[issue45469] lambda issue in for-loop

2021-10-14 Thread Christian Heimes


Christian Heimes  added the comment:

You are running in a typical scope issue. The local and global scope of a 
lambda work differently than you expect. You can work around the issue by 
making fun a local variable:

for name, fun in namefun:
name2fun[name] = lambda x, fun=fun: fun(x)

--
nosy: +christian.heimes
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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



[issue45448] PIP package installation failure for multiple packages

2021-10-14 Thread Christian Heimes


Christian Heimes  added the comment:

This is not a problem that we can fix. Third party packages like numpy and 
tensorflow have not build and publish builds for Python 3.10 for all platforms 
yet.

--
nosy: +christian.heimes
resolution:  -> third party
status: open -> closed

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



<    3   4   5   6   7   8   9   10   11   12   >