-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Use builtin pathlib on Python 3 #5022
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5022 +/- ##
==========================================
+ Coverage 95.98% 95.98% +<.01%
==========================================
Files 114 114
Lines 25496 25505 +9
Branches 2474 2475 +1
==========================================
+ Hits 24473 24482 +9
Misses 718 718
Partials 305 305
Continue to review full report at Codecov.
|
|
This is a breaking change since it drops supported cappabilities in python 3.5, it requires a major release |
|
@RonnyPfannschmidt oh you are absolutely right, thanks for catching that. I will mark this as WIP and schedule it for 5.0. 👍 |
|
Related maybe: #4521 |
|
Sorry, I've meant #4721 (in terms of conflicts mostly I guess). |
856c99e to
0c803cb
Compare
|
Updated/rebased. 👍 |
4109b1c to
e503c8c
Compare
e2b5448 to
0542bef
Compare
0542bef to
e4940c1
Compare
|
Fixed finally. 👍 Reviews are welcome. |
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.
otherwise looks good!
| res = self._cachedir.joinpath("d", name) | ||
| res.mkdir(exist_ok=True, parents=True) | ||
| if not res.is_dir(): | ||
| os.makedirs(str(res)) |
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.
os.makedirs(..., exist_ok=True) I believe is less prone to race conditions
|
i still think we should rather limit python versions than land this breaking api change |
like drop python3.5? :D |
|
@asottile yep 🙈 🙊 🙉 |
You guys really think this is a good idea? I mean, we had not released long term plans regarding Python 3.5... |
|
From https://www.python.org/dev/peps/pep-0478/:
|
|
I suspect we can't drop python3.5 just yet, given debian stable and ubuntu xenial are very popular still as much as it would be nice to start using f-strings 😆 |
|
@nicoddemus i'd much rather document that the pathlib on python 3.4 is pathlib2 than breaking the api and massiviely degrading cappabilities |
This is already documented though: https://docs.pytest.org/en/latest/reference.html#_pytest.tmpdir.tmp_path. Should we close this and #5017 as "won't fix then"? |
|
@RonnyPfannschmidt @asottile gentle ping. |
|
im in favor of close + wontfix |
Fix #5017