aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* bpo-13501: allow choosing between readline and libedit (GH-24189)Roland Hieber2021-02-081-123/+143
| | | | | | | | | | | | | | | | | | | | | | | In contrast to macOS, libedit is available as its own include file and library on Linux systems to prevent file name clashes. So if both libraries are available on the system, readline is currently chosen by default; and if only libedit is available, it is not found at all. This patch adds a way to link against libedit by adding the following arguments to configure: --with-readline link against libreadline (the default) --with-readline=editline link against libeditline --with-readline=no disable building the readline module --without-readline (same) The runtime detection of libedit vs. readline was already done in commit 7105319ada2e66365902 (2019-12-04, serge-sans-paille: "bpo-38634: Allow non-apple build to cope with libedit (GH-16986)"). Fixes: GH-12076 ("bpo-13501 Build or disable readline with Editline") Fixes: bpo-13501 ("Make libedit support more generic; port readline / libedit to FreeBSD") Co-authored-by: Enji Cooper (ngie-eign) Co-authored-by: Martin Panter (vadmium) Co-authored-by: Robert Marshall (kellinm)
* bpo-43031: Set a timeout when running tests in PGO build (GH-24339)Victor Stinner2021-01-271-1/+1
| | | | Pass --timeout=$(TESTTIMEOUT) option to the default profile task "./python -m test --pgo" command.
* bpo-42856: Add --with-wheel-pkg-dir=PATH configure option (GH-24210)Victor Stinner2021-01-201-0/+28
| | | | | | | | | | | | | Add --with-wheel-pkg-dir=PATH option to the ./configure script. If specified, the ensurepip module looks for setuptools and pip wheel packages in this directory: if both are present, these wheel packages are used instead of ensurepip bundled wheel packages. Some Linux distribution packaging policies recommend against bundling dependencies. For example, Fedora installs wheel packages in the /usr/share/python-wheels/ directory and don't install the ensurepip._bundled package. ensurepip: Remove unused runpy import.
* bpo-42874: Remove grep -qE options for Solaris 10 compatibility (GH-24200)Paul Ganssle2021-01-121-1/+1
| | | | | | | | According to [bpo-42874](), some versions of grep do not support the `-q` and `-E` options. Although both options are used elsewhere in the configure script, this particular bit of validation can be achieved without them, so there's no real harm in using a grep call with no flags. Would be good to get some people taking advantage of the `--with-tzpath` arguments in the wild to try this out.. Local testing seems to indicate that this does the same thing, but I don't know that we have any buildbots using this option. Maybe @pablogsal? [bpo-42874]():
* bpo-27640: Add --disable-test-modules configure option (GH-23886)pxinwr2020-12-301-1/+23
| | | | | | | | | Added --disable-test-modules option to the configure script: don't build nor install test modules. Patch by Xavier de Gaye, Thomas Petazzoni and Peixing Xin. Co-Authored-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
* bpo-39465: Add pycore_atomic_funcs.h header (GH-20766)Victor Stinner2020-12-231-5/+7
| | | | | | Add pycore_atomic_funcs.h internal header file: similar to pycore_atomic.h but don't require to declare variables as atomic. Add _Py_atomic_size_get() and _Py_atomic_size_set() functions.
* bpo-42604: always set EXT_SUFFIX=${SOABI}${SHLIB_SUFFIX} when using ↵Matti Picus2020-12-201-7/+1
| | | | | | | | | | configure (GH-23708) Now all platforms use a value for the "EXT_SUFFIX" build variable derived from SOABI (for instance in FreeBSD, "EXT_SUFFIX" is now ".cpython-310d.so" instead of ".so"). Previously only Linux, Mac and VxWorks were using a value for "EXT_SUFFIX" that included "SOABI". Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* bpo-31904: Enable libpython3.so shared library for VxWorks (GH-23741)pxinwr2020-12-141-2/+2
|
* bpo-42598: Fix implicit function declarations in configure (GH-23690)Joshua Root2020-12-131-6/+7
| | | | | | This is invalid in C99 and later and is an error with some compilers (e.g. clang in Xcode 12), and can thus cause configure checks to produce incorrect results.
* bpo-38443: Check that the specified universal architectures work (GH-22910)Ronald Oussoren2020-11-211-0/+25
| | | As [bpo-38443]() says the error message from configure when specifying --enable-universalsdk with a set of architectures that is not supported by the compiler is not very helpful. This PR explicitly checks if the compiler works and bails out if it doesn't.
* bpo-41625: Expose the splice() system call in the os module (GH-21947)Pablo Galindo2020-11-171-1/+1
|
* bpo-42087: Remove support for AIX 5.3 and below (GH-22830)Kevin Adler2020-11-161-15/+2
| | | | | | As AIX 5.3 and below do not support thread_cputime, it was decided in https://bugs.python.org/issue40680 to require AIX 6.1 and above. This commit removes workarounds for — and references to — older, unsupported AIX versions.
* bpo-41001: Add os.eventfd() (#20930)Christian Heimes2020-11-131-1/+32
| | | Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* bpo-41100: Support macOS 11 and Apple Silicon (GH-22855)Ronald Oussoren2020-11-081-6/+39
| | | | | | | | | | | Co-authored-by: Lawrence D’Anna <lawrence_danna@apple.com> * Add support for macOS 11 and Apple Silicon (aka arm64) As a side effect of this work use the system copy of libffi on macOS, and remove the vendored copy * Support building on recent versions of macOS while deploying to older versions This allows building installers on macOS 11 while still supporting macOS 10.9.
* bpo-35823: subprocess: Use vfork() instead of fork() on Linux when safe ↵Alexey Izbyshev2020-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-11671) * bpo-35823: subprocess: Use vfork() instead of fork() on Linux when safe When used to run a new executable image, fork() is not a good choice for process creation, especially if the parent has a large working set: fork() needs to copy page tables, which is slow, and may fail on systems where overcommit is disabled, despite that the child is not going to touch most of its address space. Currently, subprocess is capable of using posix_spawn() instead, which normally provides much better performance. However, posix_spawn() does not support many of child setup operations exposed by subprocess.Popen(). Most notably, it's not possible to express `close_fds=True`, which happens to be the default, via posix_spawn(). As a result, most users can't benefit from faster process creation, at least not without changing their code. However, Linux provides vfork() system call, which creates a new process without copying the address space of the parent, and which is actually used by C libraries to efficiently implement posix_spawn(). Due to sharing of the address space and even the stack with the parent, extreme care is required to use vfork(). At least the following restrictions must hold: * No signal handlers must execute in the child process. Otherwise, they might clobber memory shared with the parent, potentially confusing it. * Any library function called after vfork() in the child must be async-signal-safe (as for fork()), but it must also not interact with any library state in a way that might break due to address space sharing and/or lack of any preparations performed by libraries on normal fork(). POSIX.1 permits to call only execve() and _exit(), and later revisions remove vfork() specification entirely. In practice, however, almost all operations needed by subprocess.Popen() can be safely implemented on Linux. * Due to sharing of the stack with the parent, the child must be careful not to clobber local variables that are alive across vfork() call. Compilers are normally aware of this and take extra care with vfork() (and setjmp(), which has a similar problem). * In case the parent is privileged, special attention must be paid to vfork() use, because sharing an address space across different privilege domains is insecure[1]. This patch adds support for using vfork() instead of fork() on Linux when it's possible to do safely given the above. In particular: * vfork() is not used if credential switch is requested. The reverse case (simple subprocess.Popen() but another application thread switches credentials concurrently) is not possible for pure-Python apps because subprocess.Popen() and functions like os.setuid() are mutually excluded via GIL. We might also consider to add a way to opt-out of vfork() (and posix_spawn() on platforms where it might be implemented via vfork()) in a future PR. * vfork() is not used if `preexec_fn != None`. With this change, subprocess will still use posix_spawn() if possible, but will fallback to vfork() on Linux in most cases, and, failing that, to fork(). [1] https://ewontfix.com/7 Co-authored-by: Gregory P. Smith [Google LLC] <gps@google.com>
* bpo-38980: Only apply -fno-semantic-interposition if available (GH-22892)Petr Viktorin2020-10-221-0/+36
|
* bpo-38980: Add -fno-semantic-interposition when building with optimizations ↵Pablo Galindo2020-10-211-0/+8
| | | | (GH-22862)
* closes bpo-42030: Remove legacy AIX dynload support (GH-22717)Kevin Adler2020-10-161-6/+0
| | | | | | | | Since c19c5a6, AIX builds have defaulted to using dynload_shlib over dynload_aix when dlopen is available. This function has been available since AIX 4.3, which went out of support in 2003, the same year the previously referenced commit was made. It has been nearly 20 years since a version of AIX has been supported which has not used dynload_shlib so there's no reason to keep this legacy code around.
* bpo-40423: Optimization: use close_range(2) if available (GH-22651)Kyle Evans2020-10-111-2/+2
| | | | | | | close_range(2) should be preferred at all times if it's available, otherwise we'll use closefrom(2) if available with a fallback to fdwalk(3) or plain old loop over fd range in order of most efficient to least. [note that this version does check for ENOSYS, but currently ignores all other errors] Automerge-Triggered-By: @pablogsal
* bpo-41721: Add xlc options (GH-22096)Stefan Krah2020-09-041-1/+4
|
* bpo-19521: Fix parallel build race condition on AIX (GH-21997)Stefan Krah2020-08-291-9/+22
| | | | Patch by Michael Haubenwallner.
* bpo-41340: Removed fallback implementation for strdup (GH-21634)wasiher2020-07-271-13/+0
|
* BPO-41100: Support macOS 11 when building (GH-21113)Ronald Oussoren2020-06-251-1/+1
|
* bpo-40939: run autoreconf to fix configure{,.ac} disparity (GH-21152)Ned Deily2020-06-251-1/+1
|
* bpo-40939: Remove the old parser (Part 2) (GH-21005)Lysandros Nikolaou2020-06-201-1/+1
| | | Remove some remaining files and Makefile targets for the old parser
* bpo-40684: Fix make install for platlibdir=lib64 (GH-20736)Victor Stinner2020-06-091-1/+7
| | | | | | "make install" now uses the PLATLIBDIR variable for the destination lib-dynload/ directory when ./configure --with-platlibdir is used. Update --with-platlibdir comment in configure.
* Python 3.10.0a0 (GH-20198)Pablo Galindo2020-05-191-10/+10
|
* Revert "bpo-26317: Support OBJC and OBJCXX configure command line variables ↵Ned Deily2020-05-181-611/+0
| | | | | | | | | (GH-20176)" (GH-20182) This reverts commit 0da546665075aefbb476e192ed64122d340164f4. The commit is causing make failures on a FreeBSD buildbot. Due to the imminent 3.9.0b1 cutoff, revert this commit for now pending further investigation.
* bpo-26317: Support OBJC and OBJCXX configure command line variables (GH-20176)Ned Deily2020-05-181-0/+611
| | | | | | Add support to the configure script for OBJC and OBJCXX command line options so that the macOS builds can use the clang compiler for the macOS-specific Objective C source files. This allows third-party compilers, like GNU gcc, to be used to build the rest of the project since some of the Objective C system header files are not compilable by GNU gcc. Co-authored-by: Jeffrey Kintscher <websurfer@surf2c.net> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-40503: PEP 615: Tests and implementation for zoneinfo (GH-19909)Paul Ganssle2020-05-161-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the initial implementation of PEP 615, the zoneinfo module, ported from the standalone reference implementation (see https://www.python.org/dev/peps/pep-0615/#reference-implementation for a link, which has a more detailed commit history). This includes (hopefully) all functional elements described in the PEP, but documentation is found in a separate PR. This includes: 1. A pure python implementation of the ZoneInfo class 2. A C accelerated implementation of the ZoneInfo class 3. Tests with 100% branch coverage for the Python code (though C code coverage is less than 100%). 4. A compile-time configuration option on Linux (though not on Windows) Differences from the reference implementation: - The module is arranged slightly differently: the accelerated module is `_zoneinfo` rather than `zoneinfo._czoneinfo`, which also necessitates some changes in the test support function. (Suggested by Victor Stinner and Steve Dower.) - The tests are arranged slightly differently and do not include the property tests. The tests live at test/test_zoneinfo/test_zoneinfo.py rather than test/test_zoneinfo.py or test/test_zoneinfo/__init__.py because we may do some refactoring in the future that would likely require this separation anyway; we may: - include the property tests - automatically run all the tests against both pure Python and C, rather than manually constructing C and Python test classes (similar to the way this works with test_datetime.py, which generates C and Python test cases from datetimetester.py). - This includes a compile-time configuration option on Linux (though not on Windows); added with much help from Thomas Wouters. - Integration into the CPython build system is obviously different from building a standalone zoneinfo module wheel. - This includes configuration to install the tzdata package as part of CI, though only on the coverage jobs. Introducing a PyPI dependency as part of the CI build was controversial, and this is seen as less of a major change, since the coverage jobs already depend on pip and PyPI. Additional changes that were introduced as part of this PR, most / all of which were backported to the reference implementation: - Fixed reference and memory leaks With much debugging help from Pablo Galindo - Added smoke tests ensuring that the C and Python modules are built The import machinery can be somewhat fragile, and the "seamlessly falls back to pure Python" nature of this module makes it so that a problem building the C extension or a failure to import the pure Python version might easily go unnoticed. - Adjustments to zoneinfo.__dir__ Suggested by Petr Viktorin. - Slight refactorings as suggested by Steve Dower. - Removed unnecessary if check on std_abbr Discovered this because of a missing line in branch coverage.
* bpo-40637: Add option to disable builtin hashes (GH-20121)Christian Heimes2020-05-151-0/+42
| | | | | Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: @tiran
* bpo-40514: Add --with-experimental-isolated-subinterpreters (GH-19926)Victor Stinner2020-05-051-0/+28
| | | | | | | Add --with-experimental-isolated-subinterpreters build option to configure: better isolate subinterpreters, experimental build mode. When used, force the usage of the libc malloc() memory allocator, since pymalloc relies on the unique global interpreter lock (GIL).
* bpo-40291: Add support for CAN_J1939 sockets (GH-19538)karl ding2020-04-291-2/+2
| | | | Add support for CAN_J1939 sockets that wrap SAE J1939 protocol functionality provided by Linux 5.4+ kernels.
* bpo-40334: Fix builds outside the source directory and regenerate autoconf ↵Pablo Galindo2020-04-231-1/+1
| | | | files (GH-19667)
* bpo-25780: Expose CAN_RAW_JOIN_FILTERS in the socket module (GH-19190)Zackery Spytz2020-04-091-0/+30
| | | Co-Authored-By: Stefan Tatschner <stefan@rumpelsepp.org>
* bpo-38527: fix configure script for Solaris (GH-16845)Arnon Yaari2020-04-011-2/+2
| | | | | On Solaris, the regular "grep" command may be an old version that fails to search a binary file. We need to use the correct command (ggrep, in our case), which is found by the configure script earlier. Automerge-Triggered-By: @pablogsal
* bpo-39761: Fix dtrace build with empty $DFLAGS (GH-18766)Petr Viktorin2020-03-111-1/+1
| | | | | | This fixes a regression introduced in bpo-38960. When DFLAGS was empty, "$DFLAGS" results in an empty argument (""). Without the quotes, an empty variable will be ignored by the shell.
* bpo-1294959: Add sys.platlibdir attribute (GH-18381)Victor Stinner2020-03-101-15/+38
| | | | | | | | | | | | | Add --with-platlibdir option to the configure script: name of the platform-specific library directory, stored in the new sys.platlitdir attribute. It is used to build the path of platform-specific dynamic libraries and the path of the standard library. It is equal to "lib" on most platforms. On Fedora and SuSE, it is equal to "lib64" on 64-bit systems. Co-Authored-By: Jan Matějek <jmatejek@suse.com> Co-Authored-By: Matěj Cepl <mcepl@cepl.eu> Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com>
* bpo-39794: Add --without-decimal-contextvar (#18702)Stefan Krah2020-02-291-0/+26
|
* closes bpo-39619 Fix os.chroot on HP-UX 11.31 (GH-18495)Ian Norton2020-02-131-1/+19
| | | | | | Setting `-D_XOPEN_SOURCE=700` on HP-UX causes system functions such as chroot to be undefined. This change stops `_XOPEN_SOURCE` begin set on HP-UX Co-authored-by: Benjamin Peterson <benjamin@python.org>
* bpo-38960: DTrace build fix for FreeBSD. (GH-17451)David Carlier2020-01-281-2/+1
| | | | | | | | DTrace build fix for FreeBSD. - allowing passing an extra flag as it need to define the arch size. - casting some probe's arguments.
* bpo-39395: putenv() and unsetenv() always available (GH-18135)Victor Stinner2020-01-241-3/+3
| | | | | | | | The os.putenv() and os.unsetenv() functions are now always available. On non-Windows platforms, Python now requires setenv() and unsetenv() functions to build. Remove putenv_dict from posixmodule.c: it's not longer needed.
* bpo-39406: Implement os.putenv() with setenv() if available (GH-18128)Victor Stinner2020-01-221-14/+3
| | | | | If setenv() C function is available, os.putenv() is now implemented with setenv() instead of putenv(), so Python doesn't have to handle the environment variable memory.
* bpo-39160 Align the verbs, grammar and defaults for `./configure --help` ↵Anthony Shaw2020-01-141-52/+74
| | | | (GH-17747)
* bpo-38021: Modify AIX platform_tag so it covers PEP 425 needs (GH-17303)Michael Felt2019-12-161-2/+15
| | | | | | | | Provides a richer platform tag for AIX that we expect to be sufficient for PEP 425 binary distribution identification. Any backports to earlier Python versions will be handled via setuptools. Patch by Michael Felt.
* closes bpo-38713: Expose P_PIDFD in os if it's defined. (GH-17071)Benjamin Peterson2019-11-051-2/+14
| | | https://bugs.python.org/issue38713
* bpo-37415: Fix stdatomic.h header check for ICC compiler (GH-16717)Victor Stinner2019-10-221-15/+6
| | | | | | | | | | | | Fix stdatomic.h header check for ICC compiler: the ICC implementation lacks atomic_uintptr_t type which is needed by Python. Test: * atomic_int and atomic_uintptr_t types * atomic_load_explicit() and atomic_store_explicit() * memory_order_relaxed and memory_order_seq_cst constants But don't test ATOMIC_VAR_INIT(): it's not used in Python.
* bpo-11410: Standardize and use symbol visibility attributes across POSIX and ↵Vinay Sajip2019-10-151-0/+41
| | | | Windows. (GH-16347)
* bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (#16446)Jesús Cea2019-09-281-0/+3
|
* Run autoreconf. (GH-16106)Benjamin Peterson2019-09-131-60/+30
|