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.
Summary
This adds the 3.13 package classifier, and updates dependencies where needed (see below). Unlike 3.12, 3.13 doesn't really require a whole lot of code changes.
CI
This does not add 3.13 to the CI matrix, as some dependency updates, namely pycares (through aiodns) and libcst, have already dropped Python 3.8 support in the versions that add prebuilt 3.13 wheels, which results in PDM refusing to resolve dependencies.
While the current dependency versions technically all run fine on 3.13, the lack of prebuilt wheels means each CI job would spend a solid minute just building libcst and pycares, which should definitely not be necessary.
Once we update PDM, https://pdm-project.org/en/latest/usage/lock-targets/ can likely solve this.
audioop
3.13 removed audioop, which is used in
PCMVolumeTransformer
.Re-implementing this in pure Python is certainly doable, but given that it's somewhat performance-critical and ultimately just number crunching, even an optimized implementation is not particularly fast compared to the native implementation.
To put this into perspective, have some (rough) pyperf benchmarks of a couple different attempts:
`bytes_lookup`
Long story short,
disnake[voice]
now addsaudioop-lts
on 3.13, see 11e87cc for rationale. In the long term, I would prefer getting rid of audioop entirely by no longer shippingPCMVolumeTransformer
in the library.Checklist
pdm lint
pdm pyright