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

Replace py3_path, bytestring_path, cpu_count implementations with builtins #5227

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

snejus
Copy link
Member

@snejus snejus commented May 6, 2024

  • Replace py3_path by standard os.fsdecode
  • Use native os.cpu_count
  • Replace bytestring_path with os.fsencode

Description

These functions had been written before builtins achieving the same have been made available (in
Python 3.2 and 3.4).

Now that they are available though, this PR updates the codebase to use builtin implementations rather than the custom ones.

snejus added 3 commits May 6, 2024 08:47
`os.fsdecode` has only been available since Python 3.2.
os.cpu_count has only been available since Python 3.4
Same `os.fsdecode`, this has only been available since Python 3.2 which
was after this code was written.
@snejus snejus self-assigned this May 6, 2024
@snejus snejus requested a review from wisp3rwind May 6, 2024 07:56
@snejus
Copy link
Member Author

snejus commented May 6, 2024

Tip: consider using git diff --color-words="[[:alnum:]_]+|[^[:alnum:]_.[:space:]]+" master.. to go through the changes in this PR

@snejus
Copy link
Member Author

snejus commented May 7, 2024

The changelog update workflow is failing for some reason

image

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.

None yet

1 participant