FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-117201: Handle leading `//` for `posixpath.commonpath` by nineteendo · Pull Request #117202 · python/cpython · GitHub

Repository navigation

gh-117201: Handle leading // for posixpath.commonpath - #117202

Closed
nineteendo wants to merge 14 commits into
python:mainfrom
nineteendo:fix-commonpath
Closed

nineteendo wants to merge 14 commits into
python:mainfrom
nineteendo:fix-commonpath

Conversation

nineteendo commented Mar 24, 2024 •
edited
Loading

Copy link
Copy Markdown
Contributor

Tracked further here:

bedevere-app Bot commented Mar 24, 2024

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

nineteendo commented Mar 24, 2024 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

Hmm, looks like None should raise a TypeError and not a ValueError. That was unexpected.

bedevere-app Bot commented Mar 24, 2024

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

barneygale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Very tidy implementation! I'm particularly pleased you removed this head-scratcher:

isabs, = set(p[:1] == sep for p in paths)

Could you add a news blurb?

bedevere-app Bot commented Mar 26, 2024

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Copy link
Copy Markdown
Contributor Author

Barneygale, I have made the requested changes; please review again.

bedevere-app Bot commented Mar 26, 2024

Copy link
Copy Markdown

Thanks for making the requested changes!

@barneygale: please review the changes made to this pull request.

bedevere-app Bot requested a review from barneygale March 26, 2024 20:24
nineteendo marked this pull request as draft March 26, 2024 20:42
nineteendo marked this pull request as ready for review March 26, 2024 21:12

Copy link
Copy Markdown
Contributor Author

Eh, there seems to be a bug with @bedevere-app:

  • I converted this issue to a draft & back
  • bedevere-app added "awaiting review" & removed "awaiting change review".

Not entirely sure where to report that...

nineteendo marked this pull request as draft March 28, 2024 07:43
nineteendo marked this pull request as ready for review March 28, 2024 10:14
nineteendo marked this pull request as draft March 28, 2024 14:36

Copy link
Copy Markdown
Contributor

Don't worry about making commonpath() a little slower if you're fixing a bug, that's no problem. You don't need to compensate for it by speeding up other methods! Those speed-ups look nice, but I think they might be easier to review in their own PR, if that's no trouble? Thanks!

Copy link
Copy Markdown
Contributor Author

I was simply refactoring the other functions to make them more readable, while waiting for suggestions.
But, must I put the bug fixes for ntpath.commonpath & posixpath.realpath (coming up) in separate pull requests?

Copy link
Copy Markdown
Contributor

Yes please, separate PRs for separate changes makes each one easier to review.

Note that we don't accept changes that only improve readability. It causes too much churn and too many arguments. But you're welcome to improve readability as part of another change, e.g. a bugfix, enhancement or speed-up, as long as you're not introducing too much risk by tinkering with delicate code. Hope that makes sense?

nineteendo closed this Mar 28, 2024
nineteendo deleted the fix-commonpath branch March 28, 2024 18:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL