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-118507 : Refactor `nt._path_is*` by nineteendo · Pull Request #118755 · python/cpython

Conversation

@nineteendo

@nineteendo nineteendo commented May 8, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • Issue: Refactor nt._path_is* & nt._path_[l]exists #118507

Sorry, something went wrong.

Uh oh!

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

All reactions
nineteendo and others added 10 commits April 13, 2024 12:03
@nineteendo @eryksun
Speedup ntpath.exists
ab76c06
Co-authored-by: Eryk Sun <[email protected]>
@nineteendo
Update comment
1c5350d
@blurb-it
📜🤖 Added by blurb_it.
d7017ac
@nineteendo @eryksun
Improve nt_exists()
2963338
Co-authored-by: Eryk Sun <[email protected]>
@nineteendo @serhiy-storchaka
Apply suggestions from code review
e833f04
Co-authored-by: Serhiy Storchaka <[email protected]>
@nineteendo
Revert helper functions
d0493c2
@nineteendo
Update argument clinic
4403f4a
@nineteendo
Update 2024-04-13-11-30-09.gh-issue-117841.eW4w_y.rst
7a9038f
@nineteendo
Merge branch 'main' into speedup-ntpath.lexists
a6ec86d
@nineteendo @eryksun
Refactor nt._path_is*
30603f0
Co-authored-by: Eryk Sun <[email protected]>
@bedevere-app bedevere-app Bot mentioned this pull request May 8, 2024
Refactor nt._path_is* & nt._path_[l]exists #118507
Closed
nineteendo added 3 commits May 8, 2024 12:05
@nineteendo
Add nt._path_isjunction
cd7c6d0
@nineteendo
Fix bug & further refactoring
168d299
@nineteendo
Fix attribute name
e00df4c
nineteendo
nineteendo commented May 8, 2024
View reviewed changes
Comment thread Modules/posixmodule.c Resolved

Uh oh!

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

@nineteendo

This comment was marked as resolved.

Sign in to view
nineteendo and others added 3 commits May 8, 2024 19:44
@nineteendo
Add test for pipe
b31a252
@nineteendo
Skip unless os.pipe is available
59e1407
@blurb-it
📜🤖 Added by blurb_it.
76acc0d
@nineteendo

This comment was marked as resolved.

Sign in to view
@eryksun

This comment was marked as resolved.

Sign in to view
nineteendo
nineteendo commented May 9, 2024
View reviewed changes
Comment thread Modules/posixmodule.c Resolved

Uh oh!

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

@nineteendo
Update Modules/posixmodule.c
2c8e464
eryksun
eryksun reviewed May 9, 2024
View reviewed changes
Comment thread Modules/posixmodule.c Resolved

Uh oh!

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

nineteendo
nineteendo commented May 9, 2024
View reviewed changes
Comment thread Modules/posixmodule.c Resolved

Uh oh!

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

@nineteendo
Update Modules/posixmodule.c
a8bc5f2
eryksun
eryksun reviewed May 9, 2024
View reviewed changes
Comment thread Modules/posixmodule.c Resolved

Uh oh!

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

eryksun
eryksun reviewed May 9, 2024
View reviewed changes
Comment thread Lib/test/test_ntpath.py Resolved

Uh oh!

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

nineteendo and others added 2 commits May 9, 2024 12:41
@nineteendo @eryksun
Update Lib/test/test_ntpath.py
55b6b80
Co-authored-by: Eryk Sun <[email protected]>
@nineteendo
Fix compilation errors
61a62ce
@nineteendo

nineteendo commented May 20, 2024

Copy link
Copy Markdown
Contributor Author

@zooba, I added the test Eryk requested.

All reactions

Sorry, something went wrong.

Uh oh!

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

@nineteendo

This comment was marked as spam.

Sign in to view
@erlend-aasland

erlend-aasland commented May 21, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

You already have two extremely competent reviewers for this PR: Eryk and Steve. Why are you keeping pinging other core devs? This only creates unneeded noise; please stop it.

All reactions

Sorry, something went wrong.

Uh oh!

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

@nineteendo

nineteendo commented May 21, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

OK, but I'm not sure what Steve is waiting for. I thought we were done here. Could you react with eyes if you saw this?
I don't want to wait till June 8th before pinging the issue and another week before I can ask on Discourse.

All reactions

Sorry, something went wrong.

Uh oh!

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

@eryksun eryksun assigned zooba May 21, 2024
@zooba

zooba commented May 21, 2024

Copy link
Copy Markdown
Member

Mostly I was waiting for enough free time to give it a proper review - while I get work time to work on Python, it's not strictly my job, so I can't always prioritise reviews over other things.

This looks good now. Since we need an additional change for 3.12, we'll need a manual backport for that

All reactions

Sorry, something went wrong.

Uh oh!

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

@zooba
zooba merged commit b641825 into python:main May 21, 2024
@miss-islington-app

miss-islington-app Bot commented May 21, 2024

Copy link
Copy Markdown

Thanks @nineteendo for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting core review label May 21, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 21, 2024
@nineteendo @miss-islington
pythongh-118507 : Refactor nt._path_is* to improve applicability fo…
4f46562
…r other cases (pythonGH-118755)

(cherry picked from commit b641825)

Co-authored-by: Nice Zombies <[email protected]>
@miss-islington-app

miss-islington-app Bot commented May 21, 2024

Copy link
Copy Markdown

Sorry, @nineteendo and @zooba, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker b64182550f73e556344bd754d32e3be5d22a74e1 3.12
All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app

bedevere-app Bot commented May 21, 2024

Copy link
Copy Markdown

GH-119360 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label May 21, 2024
zooba pushed a commit that referenced this pull request May 22, 2024
@miss-islington @nineteendo
gh-118507 : Refactor nt._path_is* to improve applicability for othe…
f15fbe9
…r cases (GH-118755)

(cherry picked from commit b641825)

Co-authored-by: Nice Zombies <[email protected]>
@nineteendo
nineteendo deleted the refactor-nt._path_is branch May 22, 2024 04:59
nineteendo added a commit to nineteendo/cpython that referenced this pull request May 22, 2024
@nineteendo
pythongh-118507 : Refactor nt._path_is* to improve applicability fo…
2fb9812
…r other cases (pythonGH-118755)
@bedevere-app

bedevere-app Bot commented May 22, 2024

Copy link
Copy Markdown

GH-119381 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label May 22, 2024
@bedevere-app

bedevere-app Bot commented May 22, 2024

Copy link
Copy Markdown

GH-119381 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@nineteendo

nineteendo commented May 22, 2024

Copy link
Copy Markdown
Contributor Author

Note that it's not a full backport, as the C implementation of ntpath.isjunction() & ntpath.lexists() isn't included yet to minimise the risk of changed behaviour. We can consider backporting them later once we're more confident.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app

bedevere-app Bot commented May 22, 2024

Copy link
Copy Markdown

GH-119420 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

1 similar comment
@bedevere-app

bedevere-app Bot commented May 27, 2024

Copy link
Copy Markdown

GH-119420 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@JelleZijlstra JelleZijlstra mentioned this pull request May 28, 2024
backport a9a74da 3.13 #119642
Closed
@nineteendo nineteendo mentioned this pull request Jun 12, 2024
gh-120417: Remove unused imports in the stdlib #120420
Merged
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
@nineteendo @estyxx
pythongh-118507 : Refactor nt._path_is* to improve applicability fo…
03a3b57
…r other cases (pythonGH-118755)
@socal-nerdtastic

socal-nerdtastic commented Aug 23, 2024

Copy link
Copy Markdown
Contributor

Do you guys realize this breaks using path as a kwarg? You may want to update the docs.

os.path.exists(path=".")

TypeError: nt._path_exists() takes no keyword arguments
nineteendo 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.

@nineteendo

nineteendo commented Aug 26, 2024

Copy link
Copy Markdown
Contributor Author

@zooba, should this be fixed?

diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index f02b6d1779827f..2a65752d9431fe 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -5385,7 +5385,6 @@ _testFileType(path_t *path, int testedType)
 os._path_exists -> bool
 
     path: path_t(allow_fd=True, suppress_value_error=True)
-    /
 
 Test whether a path exists.  Returns False for broken symbolic links.
 
@@ -5403,7 +5402,6 @@ os__path_exists_impl(PyObject *module, path_t *path)
 os._path_lexists -> bool
 
     path: path_t(allow_fd=True, suppress_value_error=True)
-    /
 
 Test whether a path exists.  Returns True for broken symbolic links.
All reactions

Sorry, something went wrong.

Uh oh!

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

@nineteendo

nineteendo commented Sep 24, 2024

Copy link
Copy Markdown
Contributor Author

@sobolevn is this a problem?

All reactions

Sorry, something went wrong.

Uh oh!

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

@JelleZijlstra JelleZijlstra mentioned this pull request Oct 3, 2024
os.path.exists and lexists no longer allow a keyword argument on Windows #124917
Closed
JelleZijlstra added a commit to JelleZijlstra/cpython that referenced this pull request Oct 3, 2024
@JelleZijlstra
pythongh-118755: Allow keyword args to os.path.exists/lexists on Windows
5a23449
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@graingert graingert graingert left review comments
@zooba zooba zooba left review comments
@eryksun eryksun eryksun approved these changes

Uh oh!

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

Assignees

@zooba zooba

Labels

3.12 only security fixes 3.13 only security fixes 3.14 bugs and security fixes

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.

6 participants

@nineteendo @eryksun @zooba @erlend-aasland @socal-nerdtastic @graingert
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.