distutils was removed in Python 3.12, which means distutils.util.strtobool got removed along with it. The guidance from PEP-632--which laid the foundation to deprecate distutils--was to reimplement the strtobool (or other functions not directly addressed by the text of the PEP.
This PR does just that, using CPython 3.11's distutils as a reference, and uses the implementation of strtobool along with its test to form the basis for the function within a utility module.
Additionally, this PR:
Adds Ruff import ordering. This was missed from #66, since the isort-like behavior is only enabled if the I set of rules is enabled; here, we simply extend the default set via lint.extend-select.
Adds pytest as a dev dependency, and adds pytest into the Makefile and GitHub Actions workflows as appropriate.
Finally, the version is bumped to 0.8.16, so we can have a clear marker of which version supports Python 3.12. That said, 0.8.15 is still compatible on CLI workers with boardwalkd running 0.8.16.
Resolves #67.
Backblaze internal tracking: SVRENG-267
How was this tested?
make test; using the ShouldSucceedTestWorkspace and ShouldFailTestWorkspace against the local development server and both test workspaces functioned as they are intended.
Checklist
[x] Have you updated the VERSION file (if applicable)?
What and why?
distutils
was removed in Python 3.12, which meansdistutils.util.strtobool
got removed along with it. The guidance from PEP-632--which laid the foundation to deprecatedistutils
--was to reimplement thestrtobool
(or other functions not directly addressed by the text of the PEP.This PR does just that, using CPython 3.11's
distutils
as a reference, and uses the implementation ofstrtobool
along with its test to form the basis for the function within a utility module.Additionally, this PR:
I
set of rules is enabled; here, we simply extend the default set vialint.extend-select
.pytest
as a dev dependency, and adds pytest into the Makefile and GitHub Actions workflows as appropriate.Finally, the version is bumped to 0.8.16, so we can have a clear marker of which version supports Python 3.12. That said, 0.8.15 is still compatible on CLI workers with boardwalkd running 0.8.16.
Resolves #67.
Backblaze internal tracking: SVRENG-267
How was this tested?
make test
; using theShouldSucceedTestWorkspace
andShouldFailTestWorkspace
against the local development server and both test workspaces functioned as they are intended.Checklist