Can't deploy to PyPI anymore: pkg_resources.ContextualVersionConflict: importlib-metadata 0.18

Hey everybody,

I face this issue on .com. Did anyone ported / deployed the fix to .com?

Here is the broken build https://travis-ci.com/github/ets-labs/python-dependency-injector/jobs/455057934. Fails on last command even thus it’s green.

If anyone still faces the issue and looks for the fix, you can install twine with next options:

python -m pip install --upgrade --upgrade-strategy eager twine

As state above, it will will resolve the dependencies proper way.

@rmk135 The fix is for the stock PyPI deployer. You are not using it but rather deploying things yourself.

@native-api, got it, thanks. So it’s not Travis issue, but more pip / twine / keyring problem, correct?

@rmk135 Pip problem. It doesn’t properly update a dependency when it’s installed but some of the other packages requires a newer version. Apart from --upgrade-strategy eager, using the new resolver may help (with --use-feature=2020-resolver or by using Pip 20.3+).