Commit graph

119162 commits

Author SHA1 Message Date
Victor Stinner
b1aebf1e65
gh-109565: Fix concurrent.futures test_future_times_out() (#109949)
as_completed() uses a timeout of 100 ms instead of 10 ms. Windows
monotonic clock resolution is around 15.6 ms.
2023-09-27 08:51:44 +00:00
Victor Stinner
1512d6c6ee
gh-109615: Fix test_tools.test_freeze SRCDIR (#109935)
Fix copy_source_tree() function of test_tools.test_freeze:

* Don't copy SRC_DIR/build/ anymore. This directory is modified by
  other tests running in parallel.
* Add test.support.copy_python_src_ignore().
* Use sysconfig to get the source directory.
* Use sysconfig.get_config_var() to get CONFIG_ARGS variable.
2023-09-27 08:18:39 +00:00
Adam Turner
0e28d0f7a1
GH-109190: Copyedit 3.12 What's New: Deprecations (`os` fix) (#109927)
Merge the two ``os`` entries
2023-09-27 07:59:42 +03:00
Tom Gillespie
e721f7a951
Remove loop from docstring for asyncio.streams.open_connection (#108528) 2023-09-26 20:34:15 -07:00
Victor Stinner
3538930d87
gh-101100: Fix Sphinx warnings in Doc/using/configure.rst (#109931) 2023-09-27 02:01:48 +02:00
Ammar Askar
a829356f86
gh-109098: Fuzz re module instead of internal sre (#109911)
* gh-109098: Fuzz re module instead of internal sre
* Fix c-analyzer globals test failure
* Put globals exception in ignored.tsv
2023-09-26 15:35:49 -07:00
Victor Stinner
9dbfe2dc8e
gh-107888: Fix test_mmap.test_access_parameter() on macOS 14 (#109928) 2023-09-27 00:26:34 +02:00
Victor Stinner
9abba715e3
gh-109566: Fix regrtest code adding Python options (#109926)
* On Windows, use subprocess.run() instead of os.execv().
* Only add needed options
* Rename reexec parameter to _add_python_opts.
* Rename --no-reexec option to --dont-add-python-opts.
2023-09-26 21:59:11 +00:00
Adam Turner
87ddfa74e2
GH-109190: Copyedit 3.12 What's New: Deprecations (#109766) 2023-09-27 00:24:44 +03:00
OmniTroid
4390c13148
Fix argument ordering of embuilder command documented in Tools/wasm/README.md (GH-109863) 2023-09-26 13:22:00 -07:00
Serhiy Storchaka
2ef2fffe3b
gh-109845: Make test_ftplib more stable under load (GH-109912)
recv() can return partial data cut in the middle of a multibyte
character. Test raw binary data instead of data incorrectly decoded by parts.
2023-09-26 22:58:46 +03:00
Victor Stinner
b1e4f6e83e
gh-109276, gh-109508: Fix libregrtest stdout (#109903)
Remove replace_stdout(): call sys.stdout.reconfigure() instead of set
the error handler to backslashreplace.

display_header() logs an empty line and flush stdout.

Remove encoding workaround in display_header() since stdout error
handler is now set to backslashreplace earlier.
2023-09-26 21:34:50 +02:00
Victor Stinner
ae1d99c2ed
Remove concurrent.futures deadcode: process_result_item() (#109906)
process_result_item() cannot be called with an int anymore, the
protocol changed.
2023-09-26 21:33:59 +02:00
Victor Stinner
fbfec5642e
gh-109566: regrtest reexecutes the process (#109909)
When --fast-ci or --slow-ci option is used, regrtest now replaces the
current process with a new process to add "-u -W default -bb -E"
options to Python.

Changes:

* PCbuild/rt.bat and Tools/scripts/run_tests.py no longer need to add
  "-u -W default -bb -E" options to Python: it's now done by
  regrtest.
* Fix Tools/scripts/run_tests.py: flush stdout before replacing the
  process. Previously, buffered messages were lost.
2023-09-26 20:46:52 +02:00
Barney Gale
ecd813f054
GH-109187: Improve symlink loop handling in pathlib.Path.resolve() (GH-109192)
Treat symlink loops like other errors: in strict mode, raise `OSError`, and
in non-strict mode, do not raise any exception.
2023-09-26 17:57:17 +01:00
Victor Stinner
859618c8cd
gh-109566, regrtest: Add --fast-ci and --slow-ci options (#109570)
* Add --fast-ci and --slow-ci options to libregrtest:

  * --fast-ci uses a default timeout of 10 minutes and "-u all,-cpu"
    (skip slowest tests).
  * --slow-ci uses a default timeout of 20 minues and "-u all" (run
    all tests).

* regrtest header now lists test resources.
* Makefile changes:

  * "make test", "make hostrunnertest" and "make coverage-report" now
    use --fast-ci option and TESTTIMEOUT variable.
  * "make buildbottest" now uses "--slow-ci". Remove options which
    became redundant with "--slow-ci".
  * "make testall" and "make testuniversal" now use --slow-ci option
    and TESTTIMEOUT variable.
  * "make testall" now uses "find -exec rm ..." instead of
    "find ... -print|xargs rm ...", same as "make clean".

* GitHub Actions workflow:

  * Ubuntu and Address Sanitizer jobs now use "make test". Remove
    options which became redundant with "--fast-ci".
  * Windows jobs now use --fast-ci option.
  * Use -j0 to detect the number of CPUs.

* Set Makefile TESTTIMEOUT default to an empty string, since
  --slow-ci and --fast-ci use different default timeout. It's now
  accepted to pass "--timeout=" to regrtest: treated as not timeout.
* Tools/scripts/run_tests.py now uses --fast-ci option.
* Tools/buildbot/test.bat now uses --slow-ci option. Remove
  --timeout=1200 option, redundant with --slow-ci.
2023-09-26 17:22:50 +02:00
Raymond Hettinger
19bf398695
More informative docstrings in the random module (gh-109745) 2023-09-26 08:20:17 -05:00
lohaswinner
8100612bac
no-issue: Fix a typo in the parameter name of random.expovariate. (gh-109902) 2023-09-26 22:12:32 +09:00
Antoine Pitrou
0eb98837b6
gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (#109629)
---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-09-26 13:57:25 +02:00
Victor Stinner
2897142d2e
gh-109832: concurrent.futures test_deadlock restores sys.stderr (#109887)
test_error_at_task_unpickle() and
test_error_during_result_unpickle_in_result_handler() now restore
sys.stderr which is overriden by _raise_error_ignore_stderr().
2023-09-26 12:43:45 +02:00
Serhiy Storchaka
8ac2085b80
gh-109631: Allow interruption of short repeated regex matches (GH-109867)
Counting for signal checking now continues in new match from the point where
it ended in the previous match instead of starting from 0.
2023-09-26 10:56:33 +03:00
Nikita Sobolev
7c61a361fc
gh-101100: Fix Sphinx warnings in Doc/library/weakref.rst (#109881) 2023-09-26 10:46:09 +03:00
Serhiy Storchaka
0b4e090422
gh-109370: Fix unexpected traceback output in test_concurrent_futures (GH-109780)
Follow-up of gh-107219.

* Only close the connection writer on Windows.
* Also use existing constant _winapi.ERROR_OPERATION_ABORTED instead of
  WSA_OPERATION_ABORTED.
2023-09-26 10:06:07 +03:00
Victor Stinner
4091deba88
gh-109739: regrtest disables load tracker if refleak (#109871)
regrtest: Fix reference leak check on Windows. Disable the load
tracker on Windows in the reference leak check mode (-R option).
2023-09-26 01:05:07 +00:00
Victor Stinner
e5186c3de4
gh-109401: Fix threading barrier test_default_timeout() (#109875)
Increase timeouts. Barrier default timeout should be long enough to
spawn 4 threads on a slow CI.
2023-09-26 00:07:12 +00:00
Jason R. Coombs
e9791ba351
gh-88233: zipfile: refactor _strip_extra (#102084)
* Refactor zipfile._strip_extra to use higher level abstractions for extras instead of a heavy-state loop.

* Add blurb

* Remove _strip_extra and use _Extra.strip directly.

* Use memoryview to avoid unnecessary copies while splitting Extras.
2023-09-25 19:46:58 -04:00
Victor Stinner
25bb266fc8
gh-109748: Fix venv test_zippath_from_non_installed_posix() (#109872)
Fix test_zippath_from_non_installed_posix() of test_venv: don't copy
__pycache__/ sub-directories, because they can be modified by other
Python tests running in parallel.
2023-09-25 23:16:30 +00:00
Irit Katriel
d73c12b88c
gh-109823: Adjust labels in compiler when removing an empty basic block which is a jump target (#109839) 2023-09-25 18:25:05 +00:00
Antoine Pitrou
88a6137cdb
gh-109599: Add types.CapsuleType (#109600)
---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-09-25 19:50:39 +02:00
Victor Stinner
bc06743533
gh-89363: Skip threading test_is_alive_after_fork() if ASAN (#109835)
Skip test_is_alive_after_fork() of test_threading if Python is built
with Address Sanitizer (ASAN).
2023-09-25 16:02:04 +00:00
Radislav Chugunov
1b8f2366b3
gh-109795: _thread.start_new_thread: allocate thread bootstate using raw memory allocator (#109808) 2023-09-25 17:38:06 +02:00
Hugo van Kemenade
f19416534a
Code: Update Donghee Na's name (#109744) 2023-09-25 18:17:34 +03:00
Victor Stinner
eeb9070437
gh-109723: Fix build of _testclinic_limited on WASM (#109842)
Make sure that the Py_BUILD_CORE macro is not defined.
2023-09-25 14:43:54 +00:00
Adam Turner
86e7c611ac
GH-109190: Copyedit 3.12 What's New: Sort Other Language Changes (#109836) 2023-09-25 17:42:03 +03:00
Victor Stinner
72fb39c965
gh-109276: regrtest re-runs "env changed" tests (#109831)
When a test fails with "env changed" and --rerun option is used, the
test is now re-run in verbose mode in a fresh process.
2023-09-25 16:21:01 +02:00
Adam Turner
64ab9f7d5c
GH-109190: Copyedit 3.12 What's New: Synchronise C API deprecations with the 3.12 branch (#109844) 2023-09-25 17:04:36 +03:00
Victor Stinner
faebed4a67
gh-109276: Enhance libregrtest results (#109828)
* Factorize code listing "bad / env changed / ..." tests.
* Add TestResults.is_all_good() method.
* Move "All 400 tests OK." to the end
* Move "Test suite interrupted by signal SIGINT." to the end.
2023-09-25 13:50:15 +00:00
Victor Stinner
f29bc9c9a0
gh-109833: Fix asyncio test_wait_for() (#109834)
Expect the test to be "short" but don't measure the exact performance
of the CI. SHORT_TIMEOUT is about 30 seconds whereas the cancelled
coroutine takes around 1 hour.
2023-09-25 13:27:36 +00:00
Adam Turner
bccc1b7800
GH-109190: Copyedit 3.12 What's New: Improve the C-API deprecations section (#109751)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-09-25 12:38:07 +00:00
DongWoo Son
2302fa17cf
no-issue: Capitalise 'PhotoImage' (gh-108958) 2023-09-25 21:37:40 +09:00
Adam Turner
4e478534d7
GH-109190: Copyedit 3.12 What's New: Use the present tense (#109754) 2023-09-25 15:18:22 +03:00
Adam Turner
f08772cfd8
GH-109190: Copyedit 3.12 What's New: Trivia (#109760) 2023-09-25 15:11:37 +03:00
Adam Turner
7495a93e0f
GH-109190: Copyedit 3.12 What's New: Prefer GitHub issues links (#109753) 2023-09-25 15:11:06 +03:00
Victor Stinner
8c521f090e
gh-104469: Convert _testcapi/vectorcall_limited.c to use AC (#109691)
Co-authored-by: nahyeon <55136494+nahyeon-an@users.noreply.github.com>
2023-09-25 13:24:19 +02:00
Nikita Sobolev
f2eaa92b0c
gh-101100: Fix sphinx warnings in Doc/library/__future__.rst (#109814) 2023-09-25 00:31:56 -06:00
Adam Turner
7b8bfe1644
GH-109190: Copyedit 3.12 What's New: Update the `imp` porting guidance (#109755) 2023-09-25 00:24:02 -06:00
Adam Turner
09a73d50f6
GH-109190: Copyedit 3.12 What's New: Increase the prominence of the setuptools removal (#109768) 2023-09-25 00:22:00 -06:00
Gregory P. Smith
e81bd3fa16
Sync whatsnew with the edit I made in the 3.12 backport PR. (#109807)
A post main merge edit to the text was added in the 3.12 backport PR.
  e38d7104b8

This includes that in main.  It's a minor edit over #109767 to resolve the comment there.
2023-09-24 17:27:24 +00:00
Alex Waygood
40d1de7581
gh-109653: Avoid a top-level import of types in functools (#109804) 2023-09-24 17:18:27 +01:00
Adam Turner
8d365b60ba
GH-109190: Copyedit 3.12 What's New: Use the `:file:` role (#109756)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-24 16:05:57 +00:00