Commit Graph

605 Commits

Author SHA1 Message Date
Neil Schemenauer 5741c45acf
bpo-35903: Use autoconfig to probe for shm_open() and shm_unlink(). (#11765)
Use autoconfig to probe for shm_open() and shm_unlink().  Set SHM_NEEDS_LIBRT if we must
link with librt to get the shm_* functions.  Change setup.py to use the autoconfig defines.  These
changes should make it more likely that _multiprocessing/posixshmem.c gets built correctly on
different platforms.
2019-02-08 10:48:46 -08:00
Davin Potts e5ef45b8f5
bpo-35813: Added shared_memory submodule of multiprocessing. (#11664)
Added shared_memory submodule to multiprocessing in time for first alpha with cross-platform tests soon to follow.
2019-02-01 22:52:23 -06:00
stratakis cf10a750f4 bpo-35257: Avoid leaking LTO linker flags into distutils (GH-10900)
When compiling 3rd party C extensions, the linker flags used by the
compiler for the interpreter and the stdlib modules, will get
leaked into distutils. In order to avoid that, the PY_CORE_LDFLAGS
and PY_LDFLAGS_NODIST are introduced to keep those flags separated.
2018-12-19 18:19:01 +01:00
Victor Stinner 130893debf
bpo-35081: Internal headers require Py_BUILD_CORE (GH-10363)
* All internal header files now require Py_BUILD_CORE or
  Py_BUILD_CORE_BUILTIN to be defined.
* _json.c is now compiled with Py_BUILD_CORE_BUILTIN to access
  pycore_accu.h header.
* Add an example to Modules/Setup to show how to build _json
  as a built-in module; it requires non trivial compiler options.
2018-11-09 13:03:37 +01:00
Chih-Hsuan Yen 09b2bece78 bpo-29442: Replace optparse with argparse in setup.py (GH-139) 2018-07-11 17:48:43 +09:00
Brett Cannon a8c342465b
bpo-25427: Remove pyvenv (GH-5962) 2018-04-20 14:15:40 -07:00
Christian Heimes 5bb9692575
bpo-32647: Link ctypes extension with libdl. (#5550)
The ctypes module used to depend on indirect linking for dlopen. The shared
extension is now explicitly linked against libdl on platforms with dl.

Signed-off-by: Christian Heimes <christian@python.org>
2018-02-25 10:22:14 +01:00
Ivan Levkivskyi 03e3c340a0
bpo-31333: Re-implement ABCMeta in C (#5273)
This adds C versions of methods used by ABCMeta that
improve performance of various ABC operations.
2018-02-18 12:41:58 +00:00
Eric Snow 7f8bfc9b9a
bpo-32604: Expose the subinterpreters C-API in a "private" stdlib module. (gh-1748)
The module is primarily intended for internal use in the test suite.  Building the module under Windows will come in a follow-up PR.
2018-01-29 18:23:44 -07:00
Christian Heimes 61d478c71c
bpo-31399: Let OpenSSL verify hostname and IP address (#3462)
bpo-31399: Let OpenSSL verify hostname and IP

The ssl module now uses OpenSSL's X509_VERIFY_PARAM_set1_host() and
X509_VERIFY_PARAM_set1_ip() API to verify hostname and IP addresses.

* Remove match_hostname calls
* Check for libssl with set1_host, libssl must provide X509_VERIFY_PARAM_set1_host()
* Add documentation for OpenSSL 1.0.2 requirement
* Don't support OpenSSL special mode with a leading dot, e.g. ".example.org" matches "www.example.org". It's not standard conform.
* Add hostname_checks_common_name

Signed-off-by: Christian Heimes <christian@python.org>
2018-01-27 15:51:38 +01:00
Christian Heimes 29a7df7827
bpo-32521: nis libnsl (#5190)
The nismodule is now compatible with new libnsl and headers location

Signed-off-by: Christian Heimes <christian@python.org>
2018-01-26 23:28:46 +01:00
Yury Selivanov f23746a934
bpo-32436: Implement PEP 567 (#5027) 2018-01-22 19:11:18 -05:00
Victor Stinner 13ff24582c
bpo-32593: Drop FreeBSD 9 and older support (#5232)
Drop support of FreeBSD 9 and older.
2018-01-22 18:32:50 +01:00
Christian Heimes ff5be6e810
bpo-32598: Use autoconf to detect usable OpenSSL (#5242)
Add https://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
to auto-detect compiler flags, linker flags and libraries to compile
OpenSSL extensions. The M4 macro uses pkg-config and falls back to
manual detection.

Add autoconf magic to detect usable X509_VERIFY_PARAM_set1_host()
and related functions.

Refactor setup.py to use new config vars to compile _ssl and _hashlib
modules.

Signed-off-by: Christian Heimes <christian@python.org>
2018-01-20 13:19:21 +01:00
Antoine Pitrou 94e1696d04
bpo-14976: Reentrant simple queue (#3346)
Add a queue.SimpleQueue class, an unbounded FIFO queue with a reentrant C implementation of put().
2018-01-16 00:27:16 +01:00
Christian Heimes f3031b8a7a
bpo-32521: nis libtirpc (#5137)
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module

Signed-off-by: Christian Heimes <christian@python.org>
2018-01-12 15:26:32 +01:00
Mike 53f7a7c281 bpo-32297: Few misspellings found in Python source code comments. (#4803)
* Fix multiple typos in code comments

* Add spacing in comments (test_logging.py, test_math.py)

* Fix spaces at the beginning of comments in test_logging.py
2017-12-14 13:04:53 +02:00
Stefan Krah bd4ed77f73
bpo-32233: Fix build with --with-system-libmpdec. (#4739) 2017-12-06 18:24:17 +01:00
Nick Coghlan 53efbf3977
bpo-11063: Handle uuid.h being in default include path (GH-4565)
find_file() returns an empty list if it finds the requested
header on the standard include path, so header existence
checks need to be explicitly against "is not None".
2017-11-26 13:04:46 +10:00
xdegaye 77f5139954
bpo-32059: setup.py now also searches the sysroot paths (GH-4452)
detect_modules() in setup.py now also searches the sysroot paths when
cross-compiling.
2017-11-25 17:25:30 +01:00
Benjamin Peterson 8acaa31eec
remove detect_math_libs (#4383)
Darwin may not require libm, but it doesn't hurt to link it and simplifies configuration logic.
2017-11-12 20:53:39 -08:00
Victor Stinner 8c663fd60e
Replace KB unit with KiB (#4293)
kB (*kilo* byte) unit means 1000 bytes, whereas KiB ("kibibyte")
means 1024 bytes. KB was misused: replace kB or KB with KiB when
appropriate.

Same change for MB and GB which become MiB and GiB.

Change the output of Tools/iobench/iobench.py.

Round also the size of the documentation from 5.5 MB to 5 MiB.
2017-11-08 14:44:44 -08:00
Michał Górny 1aa00ff383 fixes bpo-31834: Use optimized code for BLAKE2 only with SSSE3+ (#4066)
Rework the code choosing BLAKE2 code paths from using the optimized
variant on all x86_64 machines to using it when SSSE3 or better
supported instructions sets are available.

Firstly, this solves the problem of using pure SSE2 code path on x86_64
machines. As reported in the bug, this code is slower than the reference
code on all tested x86_64 machines. Furthermore, on Athlon64 that lacks
SSSE3, it is even 2.5 times slower than the reference code! Checking
for SSSE3 therefore ensures that the optimized implementation will only
be used when it has a chance of performing better.

Secondly, this makes it possible to use SSSE3+ optimizations on 32-bit
x86 systems. This allows for even 2 times speed gain on modern 32-bit
x86 systems (tested in a 32-bit chroot).
2017-10-23 23:54:19 -07:00
Benjamin Peterson edc05c5d88 remove comment about long-gone SGI modules (#3850) 2017-10-01 23:37:57 -07:00
Antoine Pitrou a106aec2ed bpo-11063, bpo-20519: avoid ctypes and improve import time for uuid (#3796)
bpo-11063, bpo-20519: avoid ctypes and improve import time for uuid.
2017-09-28 23:03:06 +02:00
Antoine Pitrou a6a4dc816d bpo-31370: Remove support for threads-less builds (#3385)
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
2017-09-07 18:56:24 +02:00
Shlomi Fish 6d51b87612 bpo-30912: Don't check the content of ffi.h (GH-2687)
Various platforms have various methods of handling multiarch libffi which probably won't match the previously looked-for defines.  Now we just make sure that ffi.h is available.
2017-09-06 13:19:19 -07:00
Devin Jeanpierre c5bace2bf7 bpo-29505: Add fuzz tests for float(str), int(str), unicode(str) (#2878)
Add basic fuzz tests for a few common builtin functions.

This is an easy place to start, and these functions are probably safe.
We'll want to add more fuzz tests later.  Lets bootstrap using these.

While the fuzz tests are included in CPython and compiled / tested on a
very basic level inside CPython itself, the actual fuzzing happens as
part of oss-fuzz (https://github.com/google/oss-fuzz). The reason to
include the tests in CPython is to make sure that they're maintained
as part of the CPython project, especially when (as some eventually
will) they use internal implementation details in the test.

(This will be necessary sometimes because e.g. the fuzz test should
never enter Python's interpreter loop, whereas some APIs only expose
themselves publicly as Python functions.)

This particular set of changes is part of testing Python's builtins,
tracked internally at Google by b/37562550.

The _xxtestfuzz module that this change adds need not be shipped with binary distributions of Python.
2017-09-06 11:15:35 -07:00
Stefan Krah 9e1e6f528f bpo-30923: Silence fall-through warnings in libexpat build. (#3205) 2017-08-25 14:07:50 +02:00
Victor Stinner 93d0cb58b4 bpo-30947: Update libexpat from 2.2.1 to 2.2.3 (#3106)
* bpo-30947: Update libexpat from 2.2.1 to 2.2.3

* Add NEWS entry

* Add new loadlibrary.c

* expat_external.h: restore include "pyexpatns.h"

* PCbuild: add expat/loadlibrary.c

* Define XML_POOR_ENTROPY to compile expat
2017-08-18 23:43:54 +02:00
Stefan Krah f0202bb349 Issue #30923: Revert flag that is not recognized by an obsolete gcc version. (#3132) 2017-08-18 13:55:45 +02:00
Stefan Krah 72b543308e bpo-30923: Suppress fall-through warnings in libmpdec. (#2698) 2017-07-13 20:54:20 +02:00
xdegaye c0364fc7c2 bpo-20210: Support the *disabled* marker in Setup files (GH-132)
Extension modules listed after the *disabled* marker are not built at all,
neither by the Makefile nor by setup.py.
2017-05-27 18:25:03 +02:00
Neil Schemenauer 6c991bdee7 Check that Python is 64-bit before enabling BLAKE2_USE_SSE. (#1332) 2017-04-28 09:56:48 -07:00
Stefan Krah 26581785f3 Merge 3.6. 2017-02-04 14:59:11 +01:00
Stefan Krah 75c0d4f6bb Issue29439: _decimal on Android requires linking with libm.
Patch by Chi Hsuan Yen.
2017-02-04 14:58:50 +01:00
Xavier de Gaye e43edaad7e Issue #20211: Merge 3.6. 2016-12-14 11:16:06 +01:00
Xavier de Gaye 1351c31aa9 Issue #20211: Do not add the directory for installing C header files and
the directory for installing object code libraries to the cross compilation
search paths.
2016-12-14 11:14:33 +01:00
Xavier de Gaye f191a9e8e4 Issue #28190: Merge 3.6. 2016-12-13 16:05:15 +01:00
Xavier de Gaye e13c3201fb Issue #28190: Cross compiling the _curses module does not use anymore
/usr/include/ncursesw as a headers search path.
2016-12-13 16:04:14 +01:00
Xavier de Gaye c1a26a2e47 Issue #28918: Merge 3.6. 2016-12-10 16:48:07 +01:00
Xavier de Gaye 13f1c331a5 Issue #28918: Fix the cross compilation of xxlimited when Python
has been built with Py_DEBUG defined.
2016-12-10 16:45:53 +01:00
Xavier de Gaye 0eacef3ecf Issue #28444: Merge with 3.5. 2016-10-29 16:59:32 +02:00
Xavier de Gaye 84968b74c8 Issue #28444: Fix missing extensions modules when cross compiling. 2016-10-29 16:57:20 +02:00
Xavier de Gaye 0af10ac472 Issue #28444: Merge with 3.6. 2016-10-29 17:01:07 +02:00
INADA Naoki fa8b8847e2 Issue #28428: Rename _futures module to _asyncio. (merge from 3.6)
It will have more speedup functions or classes other than asyncio.Future.
2016-10-15 15:41:05 +09:00
INADA Naoki 9f2ce25481 Issue #28428: Rename _futures module to _asyncio.
It will have more speedup functions or classes other than asyncio.Future.
2016-10-15 15:39:19 +09:00
INADA Naoki ca2f0d06f1 Issue #26801: Added C implementation of asyncio.Future.
Original patch by Yury Selivanov.
2016-10-09 14:51:36 +09:00
INADA Naoki 9e4e38ecd2 Issue #26801: Added C implementation of asyncio.Future.
Original patch by Yury Selivanov.
2016-10-09 14:44:47 +09:00
Christian Heimes aa630e051b Issue #26661: setup.py now detects system libffi with multiarch wrapper. 2016-09-18 14:35:39 +02:00