beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.57k stars 1.8k forks source link

Replace `py3_path` and `cpu_count` implementations with builtins #5227

Closed snejus closed 2 weeks ago

snejus commented 1 month ago

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 commented 1 month ago

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

snejus commented 1 month ago

The changelog update workflow is failing for some reason

image

snejus commented 2 weeks ago

Removed the commit which replaced bytestring_path. Leaving this to be tackled together with syspath later.

Serene-Arc commented 2 weeks ago

Otherwise the tests seem to pass, so hopefully this means that the database is getting and giving the correct paths too, so I don't see a reason this shouldn't be merged. I'll need to rebase my pathlib PR on it but that should be easy.

snejus commented 2 weeks ago

What does this do when the parameter is already a string?

It indeed just passes it through. 🙂