pypa / twine

Utilities for interacting with PyPI
https://twine.readthedocs.io/
Apache License 2.0
1.59k stars 306 forks source link

settings: remove old mypy workarounds #1029

Closed woodruffw closed 9 months ago

woodruffw commented 10 months ago

These workarounds are no longer necessary on recent versions of mypy, and are causing CI failures (due to redundant casts).

woodruffw commented 10 months ago

Ah, this is a bit of a pain: the workaround is no longer needed on newer versions of mypy with newer Python versions. Looking into this more.

woodruffw commented 10 months ago

Looks like this is the snarl: the version of mypy needed (1.7.0) supports only Python 3.8 and higher, but twine still supports Python 3.7.

Some options here:

sigmavirus24 commented 10 months ago

We aren't deliberately trying to keep 3.7 alive, just like we aren't deliberately not testing on 3.11 or 3.12,so I think we can drop 3.7

woodruffw commented 10 months ago

We aren't deliberately trying to keep 3.7 alive, just like we aren't deliberately not testing on 3.11 or 3.12,so I think we can drop 3.7

Sounds good. I can drop 3.7 and add 3.{11,12} in this PR.

woodruffw commented 10 months ago

Docs error looks like a re-manifestation of https://github.com/pypa/twine/pull/838:

WARNING: error while formatting arguments for twine.package.Hexdigest.__new__: Handler <function update_defvalue at 0x7f1e066c7b80> for event 'autodoc-before-process-signature' threw an exception (exception: )
WARNING: error while formatting arguments for twine.utils.get_cacert: Handler <function update_defvalue at 0x7f1e066c7b80> for event 'autodoc-before-process-signature' threw an exception (exception: )
WARNING: error while formatting arguments for twine.utils.get_clientcert: Handler <function update_defvalue at 0x7f1e066c7b80> for event 'autodoc-before-process-signature' threw an exception (exception: )
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... copying static files... done
copying extra files... done
woodruffw commented 10 months ago

The last lingering failure here is in the integration suite; TestPyPI is returning 503s. That doesn't look localized to this PR, so I think that will just need to wait (or be ignored) 🙂

sigmavirus24 commented 10 months ago

Odd I could have sworn we were using devpi for a server local to that test

woodruffw commented 10 months ago

Odd I could have sworn we were using devpi for a server local to that test

Looks like there's test_devpi_upload and also test_pypi_upload, and only the former uses a local devpi instance.

woodruffw commented 10 months ago

Another oddity: TestPyPI returned 503, but the dist is present: https://test.pypi.org/project/twine-sampleproject/3.0.0.post20231123223830060228/

sigmavirus24 commented 10 months ago

Very odd. I think I'm going to merge this despite that

sigmavirus24 commented 10 months ago

Ah, guess I can't force merge this.

woodruffw commented 9 months ago

Post-hoc triage: the 503 in the integration tests here was caused by https://github.com/pypi/warehouse/issues/14928. I'll fix that.