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-104484: Add parameter @case_sensitive to pathlib.PurePath.match() function by thirumurugan-git · Pull Request #104565 · python/cpython

Conversation

@thirumurugan-git

@thirumurugan-git thirumurugan-git commented May 16, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • Issue: Add case_sensitive argument to pathlib.PurePath.match() #104484

Sorry, something went wrong.

Uh oh!

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

arhadthedev reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@thirumurugan-git @thirumurugan-ka-15679
Add parameter @case_sensitive to pathlib.PurePath.match() function
473eeaf
@thirumurugan-git
thirumurugan-git requested a review from barneygale as a code owner May 16, 2023 21:33
@bedevere-bot bedevere-bot added the awaiting review label May 16, 2023
@bedevere-bot bedevere-bot mentioned this pull request May 16, 2023
Add case_sensitive argument to pathlib.PurePath.match() #104484
Closed
@bedevere-bot

bedevere-bot commented May 16, 2023

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ghost

ghost commented May 16, 2023 •
edited by ghost
Loading

Uh oh!

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

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

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

thirumurugan-git added 2 commits May 17, 2023 03:15
@thirumurugan-git @thirumurugan-ka-15679
Add NEWS entry
17e721f
@thirumurugan-git @thirumurugan-ka-15679
Refactor case sensitive check
73907a6
@barneygale

barneygale commented May 17, 2023

Copy link
Copy Markdown
Contributor

Thanks for looking at this! The default value of case_sensitive should be None, which means "use platform-specific rules", i.e. case-sensitive on Posix and case-insensitive on Windows. See the implementation in glob().

Could you also add tests please? I think they'll show that your current patch doesn't enable case-sensitive matching on Windows, because the implementation is still working with the case-normalized parts.

thirumurugan-git reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@thirumurugan-git @thirumurugan-ka-15679
Handle platform specific case sensitivity and add test cases
8c3f4a4
barneygale
barneygale requested changes May 17, 2023
View reviewed changes

@barneygale barneygale left a comment

Copy link
Copy Markdown
Contributor

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.

Looking better! Could you also document the new argument in pathlib.rst? Thanks!

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Lib/test/test_pathlib.py Resolved

Uh oh!

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

Comment thread Lib/test/test_pathlib.py Resolved

Uh oh!

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

Comment thread Lib/pathlib.py Resolved

Uh oh!

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

Comment thread Lib/pathlib.py Resolved

Uh oh!

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

Comment thread Lib/pathlib.py Resolved

Uh oh!

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

@bedevere-bot bedevere-bot added awaiting changes and removed awaiting review labels May 17, 2023
@bedevere-bot

bedevere-bot commented May 17, 2023

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.

All reactions

Sorry, something went wrong.

Uh oh!

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

@thirumurugan-git @thirumurugan-ka-15679
Code formatting
1e638fe
@thirumurugan-git

thirumurugan-git commented May 17, 2023

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot added awaiting change review and removed awaiting changes labels May 17, 2023
@bedevere-bot

bedevere-bot commented May 17, 2023

Copy link
Copy Markdown

Thanks for making the requested changes!

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot
bedevere-bot requested a review from barneygale May 17, 2023 21:31
barneygale
barneygale requested changes May 17, 2023
View reviewed changes

@barneygale barneygale left a comment

Copy link
Copy Markdown
Contributor

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.

Nice! Pretty close now. Could you add an entry to the 3.12 "What's New" document? Apparently I forgot to add a paragraph there for the addition of case_sensitive to glob() and rglob() - if you could mention all three in a single bullet point I'd be much obliged!

Sorry, something went wrong.

Uh oh!

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

thirumurugan-git reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Doc/library/pathlib.rst Resolved

Uh oh!

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

Comment thread Lib/pathlib.py Resolved

Uh oh!

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

Comment thread Lib/pathlib.py Resolved

Uh oh!

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

Comment thread Lib/pathlib.py Resolved

Uh oh!

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

Comment thread Lib/test/test_pathlib.py Resolved

Uh oh!

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

@bedevere-bot bedevere-bot added awaiting changes and removed awaiting change review labels May 17, 2023
@bedevere-bot

bedevere-bot commented May 17, 2023

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.

And if you don't make the requested changes, you will be poked with soft cushions!

All reactions

Sorry, something went wrong.

Uh oh!

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

@thirumurugan-git @thirumurugan-ka-15679
Resolve threads
53e0bb8
@thirumurugan-git

thirumurugan-git commented May 17, 2023

Copy link
Copy Markdown
Contributor Author

the requested changes; please review again.

All reactions

Sorry, something went wrong.

Uh oh!

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

barneygale
barneygale requested changes May 18, 2023
View reviewed changes
Comment thread Doc/library/pathlib.rst Resolved

Uh oh!

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

Comment thread Doc/whatsnew/3.12.rst Resolved

Uh oh!

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

Comment thread Lib/pathlib.py Resolved

Uh oh!

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

Comment thread Misc/NEWS.d/next/Library/2023-05-17-03-14-07.gh-issue-104484.y6KxL6.rst Resolved

Uh oh!

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

thirumurugan-git and others added 3 commits May 18, 2023 07:44
@thirumurugan-git @barneygale
Update Doc/whatsnew/3.12.rst
90ed5c6
Co-authored-by: Barney Gale <[email protected]>
@thirumurugan-git @barneygale
Update Misc/NEWS.d/next/Library/2023-05-17-03-14-07.gh-issue-104484.y…
563172c
…6KxL6.rst

Co-authored-by: Barney Gale <[email protected]>
@thirumurugan-git @barneygale
Update Lib/pathlib.py
be06795
Co-authored-by: Barney Gale <[email protected]>
@thirumurugan-git @thirumurugan-ka-15679
Update document
466abc2
@thirumurugan-git

thirumurugan-git commented May 18, 2023

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot added awaiting change review and removed awaiting changes labels May 18, 2023
@bedevere-bot

bedevere-bot commented May 18, 2023

Copy link
Copy Markdown

Thanks for making the requested changes!

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot
bedevere-bot requested a review from barneygale May 18, 2023 02:34
barneygale
barneygale requested changes May 18, 2023
View reviewed changes

@barneygale barneygale left a comment

Copy link
Copy Markdown
Contributor

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.

One last thing, otherwise LGTM.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Lib/pathlib.py Resolved

Uh oh!

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

@bedevere-bot bedevere-bot added awaiting changes and removed awaiting change review labels May 18, 2023
@bedevere-bot

bedevere-bot commented May 18, 2023

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.

All reactions

Sorry, something went wrong.

Uh oh!

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

@thirumurugan-git @thirumurugan-ka-15679
Update pathlib.py
afee333
@thirumurugan-git

thirumurugan-git commented May 18, 2023

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot added awaiting change review and removed awaiting changes labels May 18, 2023
@bedevere-bot

bedevere-bot commented May 18, 2023

Copy link
Copy Markdown

Thanks for making the requested changes!

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot
bedevere-bot requested a review from barneygale May 18, 2023 07:47
barneygale
barneygale approved these changes May 18, 2023
View reviewed changes

@barneygale barneygale left a comment

Copy link
Copy Markdown
Contributor

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.

LGTM! Thanks for working on this.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting change review labels May 18, 2023
@barneygale
barneygale merged commit dcdc90d into python:main May 18, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label May 18, 2023
@barneygale barneygale mentioned this pull request May 18, 2023
Path.rglob performance issues in deeply nested directories compared to glob.glob(recursive=True) #102613
Closed
carljm added a commit to carljm/cpython that referenced this pull request May 18, 2023
@carljm
Merge branch 'main' into nestedcomps
54095f0
* main:
  pythongh-74690: Don't set special protocol attributes on non-protocol subclasses of protocols (python#104622)
  pythongh-104623: Update Windows installer to use SQLite 3.42.0 (python#104625)
  pythongh-104050: Add more type annotations to Argument Clinic (python#104628)
  pythongh-104629: Don't skip test_clinic if _testclinic is missing (python#104630)
  pythongh-104549: Set __module__ on TypeAliasType (python#104550)
  pythongh-104050: Improve some typing around `default`s and sentinel values (python#104626)
  pythongh-104146: Remove unused vars from Argument Clinic (python#104627)
  pythongh-104615: don't make unsafe swaps in apply_static_swaps (python#104620)
  pythonGH-104484: Add case_sensitive argument to `pathlib.PurePath.match()` (pythonGH-104565)
  pythonGH-96803: Document and test new unstable internal frame API functions (pythonGH-104211)
  pythonGH-104580: Don't cache eval breaker in interpreter (pythonGH-104581)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@barneygale barneygale barneygale approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

3 participants

@thirumurugan-git @bedevere-bot @barneygale
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.