-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-117587: Add C implementation of os.path.abspath
#117855
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
2475af9
Speedup `posixpath.abspath()` for relative paths
nineteendo 807b494
Fix cwd length for byte paths & bus error
nineteendo aa3ed0c
Merge branch 'python:main' into speedup-posixpath.abspath
nineteendo fa50a4c
📜🤖 Added by blurb_it.
blurb-it[bot] f502dd1
Merge branch 'main' into speedup-posixpath.abspath
nineteendo 716f594
Fix `_Py_normpath_and_size` when `size=-1`
nineteendo cc3a59c
Update Modules/posixmodule.c
nineteendo f5f2c7b
Update Python/fileutils.c
nineteendo a1bc125
fastcall & unicode type
nineteendo ae2c040
Revert changes to `os__path_normpath_impl`
nineteendo 95773d9
simply `os.fsdecode(os.getcwdb())`
nineteendo b77a15d
1st attempt at full C implementation
nineteendo f39ab83
Merge branch 'speedup-posixpath.abspath' of https://github.com/ninete…
nineteendo c63518b
Update Modules/posixmodule.c
nineteendo 94b12c2
2nd attempt at full C implementation
nineteendo c6c62d2
Merge branch 'speedup-posixpath.abspath' of https://github.com/ninete…
nineteendo 51c9541
3rd attempt at full C implementation
nineteendo ea0b4d1
Fix tests
nineteendo 8d435d6
Fix tests attempt 2
nineteendo 7057f3b
special case for '' & '.'
nineteendo fff561e
follow pep 7
nineteendo 15c8f0d
check type with argument clinic
nineteendo 34858a8
Fix memory leak & variable names
nineteendo 21cd24a
Use `PyMem_RawFree`
nineteendo 1113ec3
Update Modules/posixmodule.c
nineteendo 7cca80e
Update Modules/posixmodule.c
nineteendo 0f1f28b
Merge branch 'main' into speedup-posixpath.abspath
eryksun 1313ceb
Merge branch 'main' into speedup-posixpath.abspath
nineteendo 7b6727c
Update Modules/posixmodule.c
nineteendo 97516f6
narrow scoping
nineteendo 7e87ccd
Free `cwd_buf` for all exits
nineteendo 60c99be
Merge branch 'main' into speedup-posixpath.abspath
nineteendo c06d34f
rename `start` to `prefix_len`
nineteendo ba14b7d
Merge branch 'main' into speedup-posixpath.abspath
nineteendo 3d2836e
test different cache key
nineteendo 9fcedb5
Merge branch 'main' into speedup-posixpath.abspath
hugovk 111df43
Add C implementation of `ntpath.abspath()`
nineteendo a538218
Replace with `nt._path_abspath`
nineteendo d36379d
Update Lib/posixpath.py
nineteendo 6e645f1
Remove fallback
nineteendo 8fd2984
Update Modules/posixmodule.c
nineteendo 4d8eb1d
Follow pep 7
nineteendo c470123
Check for embedded null characters
nineteendo 3a9af3f
Stricter check for embedded null characters
nineteendo 329692b
Merge branch 'main' into speedup-os.path
nineteendo 9fbc62e
Support qualified referencing
nineteendo d83a580
Add additional test
nineteendo 08b9674
null in cwd?
nineteendo 6eb1442
Add Windows 11 check
nineteendo b7f9df6
Add additional test
nineteendo b127f05
Merge branch 'main' into speedup-posixpath.abspath
nineteendo 3ad0d7f
Fix drive relative paths
nineteendo 549fa4e
Handle all qualified referencing
nineteendo a768039
Fix ambiguous operation
nineteendo 3339c19
Special case for '.'
nineteendo 0a40599
Handle drive relative paths
nineteendo 2315bbb
Add tests
nineteendo bbbba83
Merge branch 'main' into speedup-posixpath.abspath
nineteendo 6bac80e
Merge branch 'main' into speedup-posixpath.abspath
nineteendo b3d04ac
Direct C call for `nt.isdevdrive()`
nineteendo 415f831
Merge branch 'main' into speedup-posixpath.abspath
nineteendo 9c55537
Revert "Direct C call for `nt.isdevdrive()`"
nineteendo 2bf2cd3
Revert "Revert "Direct C call for `nt.isdevdrive()`""
nineteendo 824f0d2
Restore lost code
nineteendo 5850c3b
Zero-valued flag enum has no name
nineteendo eb26e22
Revert "Zero-valued flag enum has no name"
nineteendo bfb235c
Merge branch 'main' into speedup-posixpath.abspath
nineteendo d89e875
Direct C call for `posixpath.abspath()`
nineteendo 66c057f
Optimisation
nineteendo 8c1e11c
Use root directory for other drives
nineteendo 50f5882
Fix drive relative paths
nineteendo 74d7431
Simplify implementation
nineteendo 807f83f
Update Lib/ntpath.py
nineteendo b19bbeb
Improve readability
nineteendo f934977
Check embedded null manually
nineteendo cf01b90
Revert fallback code on POSIX
nineteendo 29f9cfc
Update Lib/ntpath.py
nineteendo 374a39e
Update Lib/test/test_ntpath.py
nineteendo adc708d
Apply suggestions from code review
nineteendo 4d0289a
Narrow scope
nineteendo fcffc53
Improve comments
nineteendo 1ebe5f4
Just check if path is absolute
nineteendo e047f03
Narrow scope of `cwd_buf`
nineteendo 625fc79
Update Python/fileutils.c
nineteendo fc3f227
Free memory before calling the `PyErr` APIs
nineteendo 54c7021
Apply suggestions from code review
nineteendo dc66ef9
Use explicit return values
nineteendo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Merge branch 'main' into speedup-posixpath.abspath
- Loading branch information
commit 415f831c60e0cf802b162df6d2adc1ef92f6f519
There are no files selected for viewing
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
Oops, something went wrong.
You are viewing a condensed version of this merge commit. You can view the full changes here.
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.
Uh oh!
There was an error while loading. Please reload this page.