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.
(cherry picked from commit cf10a750f4)
"dll" would leak if an error occurred in _validate_paramflags() or
GenericPyCData_new().
(cherry picked from commit d77d97c9a1)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Fixed some errors in refcounts.dat, remove functions removed in
Python 3, and add more entries for documented functions. This will
add several automatically generated notes about return values.
(cherry picked from commit 83dd4e87a6)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Makes the documentation more comprehensive in terms of indicating
whether or not a function returns a new reference.
Also fixes some errors and adds missing functions.
(cherry picked from commit b2f642ccd2)
Co-authored-by: Mat M <mathew1800@gmail.com>
Fix test_multiprocessing_main_handling: use multiprocessing.Pool with
a context manager and then explicitly join the pool.
(cherry picked from commit 6cdce3ddef)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Fix a race condition in check_interrupted_write() of test_io:
create directly the thread with SIGALRM signal blocked,
rather than blocking the signal later from the thread. Previously, it
was possible that the thread gets the signal before the signal is
blocked.
(cherry picked from commit 05c9d31eb6)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
check_environ() of distutils.utils now catchs KeyError on calling
pwd.getpwuid(): don't create the HOME environment variable in this
case.
(cherry picked from commit 17d0c0595e)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Rename test.bisect module to test.bisect_cmd to avoid conflict with
bisect module when running directly a test like
"./python Lib/test/test_xmlrpc.py".
(cherry picked from commit 1dd035954b)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
bpo-23451, bpo-22117: Python 3.5 requires Windows Vista or newer,
time.monotonic() is now always system-wide.
(cherry picked from commit 3ab064e80a)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
TextTestRunner of unittest.runner now uses time.perf_counter() rather
than time.time() to measure the execution time of a test: time.time()
can go backwards, whereas time.perf_counter() is monotonic.
Similar change made in libregrtest, pprint and random.
(cherry picked from commit 8db5b54463)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Replace time.time() with time.monotonic() in tests to measure time
delta.
test_zipfile64: display progress every minute (60 secs) rather than
every 5 minutes (5*60 seconds).
(cherry picked from commit 2cf4c202ff)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
"make profile-opt" no longer replaces CFLAGS_NODIST with CFLAGS. It
now adds profile-guided optimization (PGO) flags to CFLAGS_NODIST,
existing CFLAGS_NODIST flags are kept.
(cherry picked from commit 640ed520dd)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
bpo-34279, bpo-35412: support.run_unittest() no longer raises
TestDidNotRun if a test result contains skipped tests. The
exception is now only raised if no test have been run and no test
have been skipped.
(cherry picked from commit 3a8f4fef4a)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
* Fix partial and partial method signatures in mock
* Add more calls
* Add NEWS entry
* Use assertEquals and fix markup in NEWS
* Refactor branching and add markup reference for functools
* Revert partial object related changes and fix pr comments
(cherry picked from commit f7fa62ef44)
Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
Forkserver and fork are not available on Windows and therefore these test must be skipped.
(cherry picked from commit a932d0b496)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
The test only except SIGUSR1Exception inside wait_signal(), but the signal can be sent during subprocess_send_signal() call.
(cherry picked from commit 2ab2afd387)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>