GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-74033: Drop deprecated `pathlib.Path` keyword arguments by barneygale · Pull Request #118793 · python/cpython

Conversation

@barneygale

@barneygale barneygale commented May 8, 2024 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Remove support for supplying keyword arguments to pathlib.Path(). This has been deprecated since Python 3.12.

  • Issue: Path takes and ignores **kwargs #74033

📚 Documentation preview 📚: https://cpython-previews--118793.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@barneygale
pythonGH-74033: Drop deprecated pathlib.Path() keyword arguments
2468f33
Remove support for supplying keyword arguments to `pathlib.Path()`. This
has been deprecated since Python 3.12.
@barneygale barneygale added the topic-pathlib label May 8, 2024
@bedevere-app bedevere-app Bot mentioned this pull request May 8, 2024
Path takes and ignores **kwargs #74033
Closed
@barneygale
Merge branch 'main' into pythongh-74033-remove
85eb732
@barneygale barneygale changed the title GH-74033: Drop deprecated pathlib.Path() keyword arguments GH-74033: Drop deprecated pathlib.Path keyword arguments May 8, 2024
@barneygale

barneygale commented May 8, 2024

Copy link
Copy Markdown
Contributor Author

Depends on #118780 to remove the other usages of warnings in _local.py.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@barneygale
Merge branch 'main' into pythongh-74033-remove
92cbfd0
@barneygale
barneygale marked this pull request as ready for review May 10, 2024 16:41
@bedevere-app bedevere-app Bot added the awaiting core review label May 10, 2024
@barneygale
barneygale requested a review from brettcannon May 10, 2024 16:42
@barneygale
Fix encoding warnings test
53783e4
@barneygale
barneygale requested a review from pablogsal May 10, 2024 17:06
@barneygale

barneygale commented May 10, 2024

Copy link
Copy Markdown
Contributor Author

@pablogsal this undoes a change to the IO tests that you made in 90a1b28. I don't quite understand what's going on here 🙃 but the removal of import warnings in pathlib/_local.py seems to be key.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@barneygale

barneygale commented May 10, 2024

Copy link
Copy Markdown
Contributor Author

It looks like test_check_encoding_warning now produces different warnings depending on whether it's run from PyMiscIOTest or CMiscIOTest. Hmmm.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

barneygale added 3 commits May 14, 2024 20:46
@barneygale
Undo deferred import
aa6056a
@barneygale
Re-introduce test
36194a2
@barneygale
Merge branch 'main' into pythongh-74033-remove
36bb885
@barneygale
barneygale enabled auto-merge (squash) May 14, 2024 19:51
@barneygale barneygale mentioned this pull request May 14, 2024
Defer import warnings in pathlib #119049
Closed
@barneygale

barneygale commented May 14, 2024

Copy link
Copy Markdown
Contributor Author

I've logged #119049 for the warnings weirdness.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@barneygale
barneygale merged commit 7d8725a into python:main May 14, 2024
@bedevere-app bedevere-app Bot removed the awaiting core review label May 14, 2024
@bedevere-bot

bedevere-bot commented May 14, 2024

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Ubuntu NoGIL 3.x has failed when building commit 7d8725a.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. 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.
  4. Check if the failure is related to this commit (7d8725a) or if it is a false positive.
  5. 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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented May 15, 2024

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Ubuntu NoGIL Refleaks 3.x has failed when building commit 7d8725a.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. 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.
  4. Check if the failure is related to this commit (7d8725a) or if it is a false positive.
  5. 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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
@barneygale @estyxx
pythonGH-74033: Drop deprecated pathlib.Path keyword arguments (pyt…
3fee9e3
…hon#118793)

Remove support for supplying keyword arguments to `pathlib.Path()`. This
has been deprecated since Python 3.12.
@izmalk izmalk mentioned this pull request Aug 28, 2026
Global TOC nav menu update canonical/ulwazi#140
Merged
izmalk added a commit to canonical/ulwazi that referenced this pull request Aug 28, 2026
@izmalk
Fix TypeError in SCSS test
261ddbb
Fix a TypeError bug appeared due to change in the 3.14 Python.
python/cpython#118793
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@brettcannon brettcannon Awaiting requested review from brettcannon
@pablogsal pablogsal Awaiting requested review from pablogsal

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

topic-pathlib

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@barneygale @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.