Backblaze / boardwalk

A linear remote execution workflow engine built on top of Ansible
Other
11 stars 0 forks source link

Reimplement strtobool for Python 3.12 compatibility (SVRENG-267) #68

Closed asullivan-blze closed 5 months ago

asullivan-blze commented 5 months ago

What and why?

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:

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