Skip to content
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

Generalize path_t for C level optimizations #118263

Closed
nineteendo opened this issue Apr 25, 2024 · 1 comment
Closed

Generalize path_t for C level optimizations #118263

nineteendo opened this issue Apr 25, 2024 · 1 comment
Labels
type-feature A feature request or enhancement

Comments

@nineteendo
Copy link
Contributor

nineteendo commented Apr 25, 2024

Feature or enhancement

Proposal:

Quoting @eryksun:

The implementation of path_t could be generalized to support fields to configure the converter to use wide regardless of platform, to allow null characters, to allow arbitrary length paths (e.g. no 32767 length limit on Windows), and a new field such as bytes_input to determine whether a path result has to be converted back to bytes. The option to always use a wide-character path is a generalization of the current behavior on Windows. Argument Clinic would be extended to support the new options. The implementations of _path_splitroot_ex(), _path_normpath(), and _path_abspath() (if adopted) would benefit, and also the _path_is*() helpers on Windows.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

Linked PRs

@nineteendo nineteendo added the type-feature A feature request or enhancement label Apr 25, 2024
@nineteendo
Copy link
Contributor Author

nineteendo commented Apr 25, 2024

cc @zooba, @serhiy-storchaka Sorry for the ping, I couldn't wait on your response, so I implemented it on my own.

miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 24, 2024
…type) in posixmodule (pythonGH-118355)

(cherry picked from commit 96b392d)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
zooba pushed a commit that referenced this issue May 24, 2024
…in posixmodule (GH-118355)

(cherry picked from commit 96b392d)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
nineteendo added a commit to nineteendo/cpython that referenced this issue May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant