GH-74033: Drop deprecated `pathlib.Path` keyword arguments
Remove support for supplying keyword arguments to pathlib.Path(). This has been deprecated since Python 3.12.
- Issue: gh-74033
📚 Documentation preview 📚: https://cpython-previews--118793.org.readthedocs.build/
Depends on #118780 to remove the other usages of warnings in _local.py.
@pablogsal this undoes a change to the IO tests that you made in 90a1b285. I don't quite understand what's going on here :upside_down_face: but the removal of import warnings in pathlib/_local.py seems to be key.
It looks like test_check_encoding_warning now produces different warnings depending on whether it's run from PyMiscIOTest or CMiscIOTest. Hmmm.
I've logged #119049 for the warnings weirdness.
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot AMD64 Ubuntu NoGIL 3.x has failed when building commit 7d8725ac6f3304677d71dabdb7c184e98a62d864.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1225/builds/2268) and take a look at the build logs.
- Check if the failure is related to this commit (7d8725ac6f3304677d71dabdb7c184e98a62d864) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/all/#builders/1225/builds/2268
Failed tests:
- worker>
- <regrtest
Failed subtests:
- test_flock - main.FNTLEINTRTest.test_flock
- test_all - test.test_eintr.EINTRTests.test_all
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/test_eintr.py", line 17, in test_all
script_helper.run_test_script(script)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/support/script_helper.py", line 316, in run_test_script
raise AssertionError(f"{name} failed")
AssertionError: script _test_eintr.py failed
Traceback (most recent call last):
Warning -- File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/support/__init__.py", line 199, in _force_run
Warning -- return func(*args)
Warning -- OSError: [Errno 39] Directory not empty: '/tmp/test_python_mxvb_rox/tmpga7ggg02'
Warning --
Warning -- During handling of the above exception, another exception occurred:
Warning --
Warning -- Traceback (most recent call last):
Warning -- File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/libregrtest/run_workers.py", line 393, in run
Warning -- mp_result = self._runtest(test_name)
Warning -- File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/libregrtest/run_workers.py", line 353, in _runtest
Warning -- retcode, tmp_files = self.run_tmp_files(worker_runtests,
Warning -- ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
Warning -- stdout_file.fileno())
Warning -- ^^^^^^^^^^^^^^^^^^^^^
Warning -- File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/libregrtest/run_workers.py", line 293, in run_tmp_files
Warning -- os_helper.rmtree(tmp_dir)
Warning -- ~~~~~~~~~~~~~~~~^^^^^^^^^
Warning -- File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/support/os_helper.py", line 465, in rmtree
Warning -- _rmtree(path)
Warning -- ~~~~~~~^^^^^^
Warning -- File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/support/os_helper.py", line 449, in _rmtree
Warning -- _rmtree_inner(path)
Warning -- ~~~~~~~~~~~~~^^^^^^
Warning -- File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/support/os_helper.py", line 446, in _rmtree_inner
Warning -- _force_run(path, os.rmdir, fullname)
Warning -- ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning -- File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/support/__init__.py", line 210, in _force_run
Warning -- return func(*args)
Warning -- OSError: [Errno 39] Directory not empty: '/tmp/test_python_mxvb_rox/tmpga7ggg02'
Kill <WorkerThread #1 running test=test_math pid=3525254 time=23 min 52 sec> process group
Kill <WorkerThread #2 running test=test.test_asyncio.test_events pid=3555559 time=16.8 sec> process group
Kill <WorkerThread #3 running test=test.test_asyncio.test_sslproto pid=3556371 time=5.2 sec> process group
Kill <WorkerThread #4 running test=test_compileall pid=3546937 time=7 min 11 sec> process group
Kill <WorkerThread #5 running test=test_embed pid=3554374 time=1 min 51 sec> process group
Kill <WorkerThread #6 running test=test_json pid=3554517 time=1 min 37 sec> process group
Kill <WorkerThread #8 running test=test_regrtest pid=3545029 time=10 min 7 sec> process group
Kill <WorkerThread #9 running test=test.test_multiprocessing_forkserver.test_processes pid=3551926 time=4 min 41 sec> process group
Kill <WorkerThread #10 running test=test_statistics pid=3545131 time=10 min 3 sec> process group
Traceback (most recent call last):
File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/libregrtest/single.py", line 178, in _runtest_env_changed_exc
_load_run_test(result, runtests)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/libregrtest/single.py", line 125, in _load_run_test
test_mod = importlib.import_module(module_name)
File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/importlib/__init__.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'test.<regrtest worker>'
Traceback (most recent call last):
File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/_test_eintr.py", line 535, in test_flock
self._lock(fcntl.flock, "flock")
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/_test_eintr.py", line 517, in _lock
raise Exception("failed to sync child in %.1f sec" % dt)
Exception: failed to sync child in 300.5 sec
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot AMD64 Ubuntu NoGIL Refleaks 3.x has failed when building commit 7d8725ac6f3304677d71dabdb7c184e98a62d864.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1226/builds/1869) and take a look at the build logs.
- Check if the failure is related to this commit (7d8725ac6f3304677d71dabdb7c184e98a62d864) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/all/#builders/1226/builds/1869
Failed subtests:
- test_check_output_timeout - test.test_subprocess.RunFuncTestCase.test_check_output_timeout
- test_lockf - main.FNTLEINTRTest.test_lockf
- test_all - test.test_eintr.EINTRTests.test_all
Summary of the results of the build (if available):
Click to see traceback logs
Traceback (most recent call last):
File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.refleak.nogil/build/Lib/test/test_eintr.py", line 17, in test_all
script_helper.run_test_script(script)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.refleak.nogil/build/Lib/test/support/script_helper.py", line 316, in run_test_script
raise AssertionError(f"{name} failed")
AssertionError: script _test_eintr.py failed
Traceback (most recent call last):
File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.refleak.nogil/build/Lib/test/test_subprocess.py", line 1710, in test_check_output_timeout
self.assertEqual(c.exception.output, b'BDFL')
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: None != b'BDFL'
Traceback (most recent call last):
File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.refleak.nogil/build/Lib/test/_test_eintr.py", line 532, in test_lockf
self._lock(fcntl.lockf, "lockf")
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.refleak.nogil/build/Lib/test/_test_eintr.py", line 517, in _lock
raise Exception("failed to sync child in %.1f sec" % dt)
Exception: failed to sync child in 300.2 sec