typeshed-internal / stub_uploader

Scripts and actions to auto-upload typeshed stubs to PyPI
Apache License 2.0
21 stars 16 forks source link

Run tests using Python 3.12 in CI #134

Closed AlexWaygood closed 5 months ago

AlexWaygood commented 5 months ago

And fix a tarfile DeprecationWarning that's new in Python 3.12, and has been showing up when the stub_uploader tests are run in typeshed's CI.

The tarfile extraction filters were backported to all security branches as part of PEP 706. Nonetheless, I used the method the docs advise to ensure backwards compatibility with versions of Python that don't have these extraction filters (e.g. if you're running with Python 3.11.4, the feature exists, but if you're running with Python 3.11.3, it doesn't). See https://docs.python.org/3.12/library/tarfile.html#supporting-older-python-versions.

AlexWaygood commented 5 months ago

I didn't bump Python to 3.12 in the workflows that actually push stubs to PyPI. That felt slightly riskier than just bumping the version used to run the tests? Or at least, it felt like it deserved its own PR.