This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Remove Python 2 compatibility code from pathlib
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.10
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: brandtbucher, brett.cannon, cool-RR, pitrou, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2020-05-24 08:51 by cool-RR, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 20349 closed cool-RR, 2020-05-24 08:54
Messages (7)
msg369770 - (view) Author: Ram Rachum (cool-RR) * Date: 2020-05-24 08:51
No need to inherit from object. I'm writing the patch now.
msg369772 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-05-24 09:37
This code is valid in Python 3. We usually do not accept such pure cosmetic changes.
msg369776 - (view) Author: Ram Rachum (cool-RR) * Date: 2020-05-24 10:15
"We usually do not accept such pure cosmetic changes." Is this an axiom or is the reasoning written down somewhere? I'd think we all like to remove cruft that's no longer necessary.
msg369788 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-05-24 11:18
Similar cleanup (and many many others) was proposed when pathlib was initially added to the stdlib. They were rejected, so now we need a new discussion to revise the old decision. See issue20002.
msg369905 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2020-05-25 18:20
> Is this an axiom or is the reasoning written down somewhere?

It should be written down in the devguide at

I agree with Serhiy that this isn't really adding anything by making the code that much more readable, idiomatic, or faster to warrant the overhead of this issue or the PR.

While I appreciate the effort, Ram, I'm closing this issue as rejected and the related PR.
msg369907 - (view) Author: Ram Rachum (cool-RR) * Date: 2020-05-25 18:59
Brett: Oh well, I understand. Looking at the devguide, I can't find where this is written. I'm interested in seeing how it's phrased, because I do think that tiny, incremental changes are important. I would want to know why, for example, my change was accepted and this one wasn't. Or maybe there isn't a clear cut rule, and it's somewhat random?
msg370019 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2020-05-26 16:58
If you can't find the guidance then please either open an issue or submit a PR to update the devguide with the info.

As for why your other PR was accepted, that was fixing an actual bug in the docstring. This one has absolutely no semantic change to Python; it's the equivalent of changing some whitespace just because it isn't quite in line with PEP 8. It simply isn't worth the overhead of the PR review or the churn on the file as now the `git blame` info is off for who last made a semantic change to that line.
Date User Action Args
2022-04-11 14:59:31adminsetgithub: 84930
2020-05-26 16:58:30brett.cannonsetmessages: + msg370019
2020-05-25 18:59:24cool-RRsetmessages: + msg369907
2020-05-25 18:20:59brett.cannonsetstatus: open -> closed

nosy: + brett.cannon
messages: + msg369905

resolution: rejected
stage: patch review -> resolved
2020-05-24 11:18:59serhiy.storchakasetmessages: + msg369788
2020-05-24 11:10:39serhiy.storchakasetnosy: + pitrou
2020-05-24 10:22:33cool-RRsetnosy: + brandtbucher
2020-05-24 10:15:12cool-RRsetmessages: + msg369776
2020-05-24 09:37:14serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg369772
2020-05-24 08:54:06cool-RRsetkeywords: + patch
stage: patch review
pull_requests: + pull_request19612
2020-05-24 08:51:45cool-RRcreate