GeezerVison is showing github.com — GH-83863: Drop support for using `pathlib.Path` objects as context managers by barneygale · Pull Request #104807 · python/cpython
Conversation
barneygale
commented
May 23, 2023
•
edited by bedevere-bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
In Python 3.8 and prior, pathlib.Path.__exit__() marked a path as closed; some subsequent attempts to perform I/O would raise an IOError. This functionality was never documented, and had the effect of making Path objects mutable, contrary to PEP 428. In Python 3.9 we made __exit__() a no-op, and in 3.11 __enter__() began raising deprecation warnings. Here we remove both methods.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…ext managers
In Python 3.8 and prior, `pathlib.Path.__exit__()` marked a path as closed;
some subsequent attempts to perform I/O would raise an IOError. This
functionality was never documented, and had the effect of making `Path`
objects mutable, contrary to PEP 428. In Python 3.9 we made `__exit__()` a
no-op, and in 3.11 `__enter__()` began raising deprecation warnings. Here
we remove both methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hooray! Maybe worth an entry in "what's new in 3.13"?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
barneygale reacted with thumbs up emoji
AlexWaygood reacted with rocket emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot s390x SLES 3.x has failed when building commit 6b1510c.
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/540/builds/5391) and take a look at the build logs.
- Check if the failure is related to this commit (6b1510c) 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/540/builds/5391
Failed tests:
Summary of the results of the build (if available):
== Tests result: FAILURE then ENV CHANGED ==
445 tests OK.
10 slowest tests:
- test_concurrent_futures: 2 min 24 sec
- test_tools: 2 min 10 sec
- test_multiprocessing_spawn: 1 min 59 sec
- test_math: 1 min 30 sec
- test_multiprocessing_forkserver: 1 min 22 sec
- test_signal: 1 min 11 sec
- test_multiprocessing_fork: 1 min 5 sec
- test_capi: 1 min 1 sec
- test_gdb: 43.2 sec
- test_io: 36.8 sec
1 test altered the execution environment:
test_socketserver
19 tests skipped:
test.test_asyncio.test_windows_events
test.test_asyncio.test_windows_utils test_devpoll test_ioctl
test_kqueue test_launcher test_msilib test_nis test_peg_generator
test_perf_profiler test_startfile test_tix test_tkinter test_ttk
test_winconsoleio test_winreg test_winsound test_wmi
test_zipfile64
1 re-run test:
test_threading
Total duration: 6 min 41 sec
Click to see traceback logs
remote: Enumerating objects: 26, done.
remote: Counting objects: 3% (1/26)
remote: Counting objects: 7% (2/26)
remote: Counting objects: 11% (3/26)
remote: Counting objects: 15% (4/26)
remote: Counting objects: 19% (5/26)
remote: Counting objects: 23% (6/26)
remote: Counting objects: 26% (7/26)
remote: Counting objects: 30% (8/26)
remote: Counting objects: 34% (9/26)
remote: Counting objects: 38% (10/26)
remote: Counting objects: 42% (11/26)
remote: Counting objects: 46% (12/26)
remote: Counting objects: 50% (13/26)
remote: Counting objects: 53% (14/26)
remote: Counting objects: 57% (15/26)
remote: Counting objects: 61% (16/26)
remote: Counting objects: 65% (17/26)
remote: Counting objects: 69% (18/26)
remote: Counting objects: 73% (19/26)
remote: Counting objects: 76% (20/26)
remote: Counting objects: 80% (21/26)
remote: Counting objects: 84% (22/26)
remote: Counting objects: 88% (23/26)
remote: Counting objects: 92% (24/26)
remote: Counting objects: 96% (25/26)
remote: Counting objects: 100% (26/26)
remote: Counting objects: 100% (26/26), done.
remote: Compressing objects: 10% (1/10)
remote: Compressing objects: 20% (2/10)
remote: Compressing objects: 30% (3/10)
remote: Compressing objects: 40% (4/10)
remote: Compressing objects: 50% (5/10)
remote: Compressing objects: 60% (6/10)
remote: Compressing objects: 70% (7/10)
remote: Compressing objects: 80% (8/10)
remote: Compressing objects: 90% (9/10)
remote: Compressing objects: 100% (10/10)
remote: Compressing objects: 100% (10/10), done.
remote: Total 14 (delta 12), reused 5 (delta 4), pack-reused 0
From https://github.com/python/cpython
* branch main -> FETCH_HEAD
Note: switching to '6b1510cf11c16c8e4381810c15ceeda6f89e79f4'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 6b1510cf11 GH-83863: Drop support for using `pathlib.Path` objects as context managers (GH-104807)
Switched to and reset branch 'main'
./configure: line 8401: -reorder-blocks=ext-tsp: command not found
make: *** [Makefile:2008: buildbottest] Error 3
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
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.
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.
|