pypa / twine

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

fix: KeyError: 'home-page' #1127

Closed JohnVillalovos closed 4 months ago

JohnVillalovos commented 4 months ago

This is the simplest fix to move forward on resolving the issue a KeyError occurring.

Error seen is like this: $ python -m twine check dist/* Traceback (most recent call last): File "/py/lib/python3.8/runpy.py", line 185, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/py/lib/python3.8/runpy.py", line 144, in _get_module_details return _get_module_details(pkg_main_name, error) File "/py/lib/python3.8/runpy.py", line 111, in _get_module_details import(pkg_name) File "/venv/lib/python3.8/site-packages/twine/init.py", line 40, in uri = metadata["home-page"] File "/venv/lib/python3.8/site-packages/importlib_metadata/_adapters.py", line 54, in getitem raise KeyError(item) KeyError: 'home-page'

Related: #977

JohnVillalovos commented 4 months ago

Simplistic alternative to #1124 and #1126

henryiii commented 4 months ago

The fix in https://github.com/pypa/twine/pull/1126 works fine, you can see the docs job passing. There are other changes needed to get the CI passing.

JohnVillalovos commented 4 months ago

Looks like #1126 is working. Closing this.