summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-110138: Improve grammar in idiomatic usage of ``__main__.py`` (#110142)Quentin Agren2023-10-011-3/+3
|
* gh-101100: Fix sphinx warnings in `library/site.rst` (#110144)Nikita Sobolev2023-10-013-13/+25
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* build(deps): bump hypothesis from 6.84.0 to 6.87.1 in /Tools (#110174)dependabot[bot]2023-10-011-1/+1
| | | | | | | | | | | | | | | Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.84.0 to 6.87.1. - [Release notes](https://github.com/HypothesisWorks/hypothesis/releases) - [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.84.0...hypothesis-python-6.87.1) --- updated-dependencies: - dependency-name: hypothesis dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* gh-110180: Remove unused `_PickleUsingNameMixin` class from `typing` (#110181)Alex Waygood2023-10-011-7/+0
|
* GH-107465: Add `pathlib.Path.from_uri()` classmethod. (#107640)Barney Gale2023-10-015-5/+120
| | | | | | | This method supports file URIs (including variants) as described in RFC 8089, such as URIs generated by `pathlib.Path.as_uri()` and `urllib.request.pathname2url()`. The method is added to `Path` rather than `PurePath` because it uses `os.fsdecode()`, and so its results vary from system to system. I intend to deprecate `PurePath.as_uri()` and move it to `Path` for the same reason. Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-110160: Fix flaky `test_find_periodic_pattern` in `string_tests` (#110170)Nikita Sobolev2023-10-011-3/+11
|
* PEG generator: bump types-setuptools from 68.1.0.1 to 68.2.0.0 (#110175)dependabot[bot]2023-10-011-1/+1
| | | | | | | | | | | | | | | | build(deps-dev): bump types-setuptools in /Tools Bumps [types-setuptools](https://github.com/python/typeshed) from 68.1.0.1 to 68.2.0.0. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-setuptools dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* gh-110150: Fix base case handling in quantiles() (gh-110151)Raymond Hettinger2023-10-014-3/+17
|
* gh-109649: Use os.process_cpu_count() (#110165)Victor Stinner2023-10-0116-16/+50
| | | | | | | | | | | | | | | | | | | | Replace os.cpu_count() with os.process_cpu_count() in modules: * compileall * concurrent.futures * multiprocessing Replace os.cpu_count() with os.process_cpu_count() in programs: * _decimal deccheck.py test * freeze.py * multissltests.py * python -m test (regrtest) * wasm_build.py Other changes: * test.pythoninfo logs os.process_cpu_count(). * regrtest gets os.process_cpu_count() / os.cpu_count() in headers.
* gh-110152: regrtest handles cross compilation and HOSTRUNNER (#110156)Victor Stinner2023-09-306-110/+125
| | | | | | | | * _add_python_opts() now handles cross compilation and HOSTRUNNER. * display_header() now tells if Python is cross-compiled, display HOSTRUNNER, and get the host platform. * Remove Tools/scripts/run_tests.py script. * Remove "make hostrunnertest": use "make buildbottest" or "make test" instead.
* gh-110014: Fix bootstrap_hash.c: remove debug code (#110161)Victor Stinner2023-09-301-3/+0
| | | Oops, I commited debug code by mistake, sorry about that.
* gh-109649: Add os.process_cpu_count() function (#109907)Victor Stinner2023-09-308-47/+125
| | | | | | | | | * Refactor os_sched_getaffinity_impl(): move variable definitions to their first assignment. * Fix test_posix.test_sched_getaffinity(): restore the old CPU mask when the test completes! * Doc: Specify that os.cpu_count() counts *logicial* CPUs. * Doc: Specify that os.sched_getaffinity(0) is related to the calling thread.
* gh-109276: regrtest: add WORKER_FAILED state (#110148)Victor Stinner2023-09-305-28/+83
| | | | | | | | | Rename WORKER_ERROR to WORKER_BUG. Add WORKER_FAILED state: it does not stop the manager, whereas WORKER_BUG does. Change also TestResults.display_result() order: display failed tests at the end, the important important information. WorkerThread now tries to get the signal name for negative exit code.
* gh-110088: Fix asyncio test_prompt_cancellation() (#110157)Victor Stinner2023-09-301-3/+0
| | | | Don't measure the CI performance: don't test the maximum elapsed time. The check failed on a slow CI.
* gh-110014: Include explicitly <unistd.h> header (#110155)Victor Stinner2023-09-3017-59/+120
| | | | | | | | | | | * Remove unused <locale.h> includes. * Remove unused <fcntl.h> include in traceback.h. * Remove redundant <assert.h> and <stddef.h> includes. They are already included by "Python.h". * Remove <object.h> include in faulthandler.c. Python.h already includes it. * Add missing <stdbool.h> in pycore_pythread.h if HAVE_PTHREAD_STUBS is defined. * Fix also warnings in pthread_stubs.h: don't redefine macros if they are already defined, like the __NEED_pthread_t macro.
* gh-109748: Fix again venv test_zippath_from_non_installed_posix() (#110149)Victor Stinner2023-09-303-3/+7
| | | | | | | Call also copy_python_src_ignore() on listdir() names. shutil.copytree(): replace set() with an empty tuple. An empty tuple becomes a constant in the compiler and checking if an item is in an empty tuple is cheap.
* gh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage (#110139)Victor Stinner2023-09-3013-58/+73
| | | | | | | | | | | | | | | | * pycore_pythread.h is now the central place to make sure that _POSIX_THREADS and _POSIX_SEMAPHORES macros are defined if available. * Make sure that pycore_pythread.h is included when _POSIX_THREADS and _POSIX_SEMAPHORES macros are tested. * PY_TIMEOUT_MAX is now defined as a constant, since its value depends on _POSIX_THREADS, instead of being defined as a macro. * Prevent integer overflow in the preprocessor when computing PY_TIMEOUT_MAX_VALUE on Windows: replace "0xFFFFFFFELL * 1000 < LLONG_MAX" with "0xFFFFFFFELL < LLONG_MAX / 1000". * Document the change and give hints how to fix affected code. * Add an exception for PY_TIMEOUT_MAX name to smelly.py * Add PY_TIMEOUT_MAX to the stable ABI
* gh-107954: Refactor initconfig.c: add CONFIG_SPEC (#110146)Victor Stinner2023-09-303-320/+262
| | | Add a specification of the PyConfig structure to factorize the code.
* GH-89812: Add `pathlib._PathBase` (#106337)Barney Gale2023-09-303-161/+687
| | | | | Add private `pathlib._PathBase` class. This will be used by an experimental PyPI package to incubate a `tarfile.TarPath` class. Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* GH-101100: Fix reference warnings for ``gettext`` (#110115)Adam Turner2023-09-301-29/+26
|
* GH-101100: Fix reference warnings for ``namedtuple`` (#110113)Adam Turner2023-09-302-4/+4
|
* Add example for linear_regression() with proportional=True. (gh-110133)Raymond Hettinger2023-09-301-0/+19
|
* gh-107888: Fix test_mmap PROT_EXEC comment (#110125)Victor Stinner2023-09-291-1/+1
|
* gh-110119: Temporarily skip test_cppext on --disable-gil builds. (#110123)Sam Gross2023-09-291-0/+4
| | | | The current version of pip does not support "t" in the ABI flags. Skip the test in `--disable-gil` builds until we can update pip.
* gh-109566: regrtest --fast-ci no longer enables --nowindows (#110121)Victor Stinner2023-09-292-7/+1
| | | | The --nowindows option is deprecated and does nothing but logs a warning.
* gh-109566: Remove make testall (#110122)Victor Stinner2023-09-293-19/+7
| | | Remove "make testall" target: use "make buildbottest" instead.
* gh-109047: concurrent.futures catches PythonFinalizationError (#109810)Victor Stinner2023-09-294-22/+88
| | | | | | | | | | | | | | | | | | | | | | | | | concurrent.futures: The *executor manager thread* now catches exceptions when adding an item to the *call queue*. During Python finalization, creating a new thread can now raise RuntimeError. Catch the exception and call terminate_broken() in this case. Add test_python_finalization_error() to test_concurrent_futures. concurrent.futures._ExecutorManagerThread changes: * terminate_broken() no longer calls shutdown_workers() since the call queue is no longer working anymore (read and write ends of the queue pipe are closed). * terminate_broken() now terminates child processes, not only wait until they complete. * _ExecutorManagerThread.terminate_broken() now holds shutdown_lock to prevent race conditons with ProcessPoolExecutor.submit(). multiprocessing.Queue changes: * Add _terminate_broken() method. * _start_thread() sets _thread to None on exception to prevent leaking "dangling threads" even if the thread was not started yet.
* gh-109566: PCbuild/rt.bat now uses --fast-ci (#110120)Victor Stinner2023-09-291-1/+1
| | | | | | Replace "--fail-env-changed --fail-rerun" with "--fast-ci". Tools/buildbot/test.bat pass --slow-ci which has the priority over --fast-ci.
* gh-66143: Allow copying and pickling of CodecInfo object (GH-109235)Furkan Onder2023-09-293-0/+75
| | | Co-authored-by: Robert Lehmann <mail@robertlehmann.de>
* gh-109495: Remove unused slots from the Python implementation of datetime ↵James Hilton-Balfe2023-09-292-1/+2
| | | | (GH-109494)
* gh-109615: Look for 'Modules' as landmark for test_copy_python_src_ignore ↵Steve Dower2023-09-291-1/+3
| | | | (GH-110108)
* gh-110024: Fix Pointer Type Warnings (gh-110053)Eric Snow2023-09-291-8/+16
| | | The warnings were introduced by gh-109794 (for gh-109793).
* gh-109592: test_eintr tolerates 20 ms when comparing timings (#110102)Victor Stinner2023-09-291-7/+16
|
* gh-110031: Skip test_threading fork tests if ASAN (#110100)Victor Stinner2023-09-292-16/+27
| | | | Skip test_threading tests using thread+fork if Python is built with Address Sanitizer (ASAN).
* gh-109974: Fix more threading lock_tests race conditions (#110089)Victor Stinner2023-09-292-232/+257
| | | | | | | | | * Add context manager on Bunch class. * Bunch now catchs exceptions on executed functions and re-raise them at __exit__() as an ExceptionGroup. * Rewrite BarrierProxy.test_default_timeout(). Use a single thread. Only check that barrier.wait() blocks for at least default timeout seconds. * test_with(): inline _with() function.
* gh-105323: Update readline module to detect apple editline variant (gh-108665)Donghee Na2023-09-295-3/+38
|
* gh-110088, gh-109878: Fix test_asyncio timeouts (#110092)Victor Stinner2023-09-297-54/+19
| | | | | | Fix test_asyncio timeouts: don't measure the maximum duration, a test should not measure a CI performance. Only measure the minimum duration when a task has a timeout or delay. Add CLOCK_RES to test_asyncio.utils.
* gh-109634: Fix `:samp:` syntax (GH-110073)Jacob Coffee2023-09-293-3/+3
|
* gh-108716: make regen-global-objects no longer builds deepfreeze.c (#110078)Victor Stinner2023-09-292-11/+2
| | | Remove more references to now unused Python/deepfreeze/deepfreeze.c.
* gh-110079: Remove extern "C" { ...} in C code (#110080)Victor Stinner2023-09-2918-168/+6
|
* gh-101100: Fix references to ``URLError`` and ``HTTPError`` in ↵Yuki K2023-09-291-8/+8
| | | | | ``howto/urllib2.rst`` (#107966) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-101100: Fix Sphinx warnings in `tutorial/controlflow.rst` (#109424)Maciej Olko2023-09-292-3/+2
| | | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-109961: Use proper `module` for `copy` method docs (#110027)Nikita Sobolev2023-09-291-2/+5
| | | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-101100: Fix sphinx warnings in `library/difflib.rst` (#110074)Nikita Sobolev2023-09-292-10/+9
|
* gh-109868: Skip deepcopy memo check for empty memo (GH-109869)Pieter Eendebak2023-09-291-5/+5
|
* gh-110045: Update symtable module for PEP 695 (#110066)Jelle Zijlstra2023-09-295-5/+63
|
* gh-110052: Fix faulthandler for freed tstate (#110069)Victor Stinner2023-09-292-12/+38
| | | | faulthandler now detected freed interp and freed tstate, and no longer dereference them.
* gh-109566: regrtest _add_python_opts() handles KeyboardInterrupt (#110062)Victor Stinner2023-09-294-14/+33
| | | | | | | | | | In the subprocess code path, wait until the child process completes with a timeout of EXIT_TIMEOUT seconds. Fix create_worker_process() regression: use start_new_session=True if USE_PROCESS_GROUP is true. WorkerThread.wait_stopped() uses a timeout of 60 seconds, instead of 30 seconds.
* gh-110036: multiprocessing Popen.terminate() catches PermissionError (#110037)Victor Stinner2023-09-293-4/+17
| | | | | | On Windows, multiprocessing Popen.terminate() now catchs PermissionError and get the process exit code. If the process is still running, raise again the PermissionError. Otherwise, the process terminated as expected: store its exit code.
* gh-109974: Fix threading lock_tests race conditions (#110057)Victor Stinner2023-09-292-124/+226
| | | | | | | | | | | | | | | | | | | Fix race conditions in test_threading lock tests. Wait until a condition is met rather than using time.sleep() with a hardcoded number of seconds. * Replace sleeping loops with support.sleeping_retry() which raises an exception on timeout. * Add wait_threads_blocked(nthread) which computes a sleep depending on the number of threads. Remove _wait() function. * test_set_and_clear(): use a way longer Event.wait() timeout. * BarrierTests.test_repr(): wait until the 2 threads are waiting for the barrier. Use a way longer timeout for Barrier.wait() timeout. * test_thread_leak() no longer needs to count len(threading.enumerate()): Bunch uses threading_helper.wait_threads_exit() internally which does it in wait_for_finished(). * Add BaseLockTests.wait_phase() which implements a timeout. test_reacquire() and test_recursion_count() use wait_phase().