linkedin / shiv

shiv is a command line utility for building fully self contained Python zipapps as outlined in PEP 441, but with all their dependencies included.
BSD 2-Clause "Simplified" License
1.76k stars 99 forks source link

Regression in support for Python 3.6 as well as 3.7 in 1.0.7 release #257

Open nkaminski opened 3 weeks ago

nkaminski commented 3 weeks ago

As of the latest release on PyPi, I have observed that this package indicates support for Python >=3.6 in its package metadata, however is presently only compatible with Python versions 3.8 or later after the introduction of commit https://github.com/linkedin/shiv/commit/377c70db139a7e1fc5070a2a294d1fcd731dfc55

Therefore, would it be possible to either:

rillbert commented 2 weeks ago

Maybe I'm missing someting in my setup but it doesn't work in my 3.8 setup either.

The type hints in the environment.py file from the commit indicated in the previous comment makes it impossible for me to run shiv at all.

A possible work-around (it works in my, so-far limited, testing) is to add the line: from __future__ import annotations as the first code line in environment.py.

(as mentioned here: https://stackoverflow.com/a/75317316)

f-ewald commented 1 week ago

Thank you for reporting this. I have a PR for fixing the types which changes dict to Dict.

In subsequent PR's I am also planning to address the incorrect >= 3.6 and change it to >= 3.8 to be consistent with the tests that are provided.

Finally, I am planning to add the CI pipeline to PRs so that the validation is done earlier in the process and issues can be found.

f-ewald commented 1 week ago

Version https://github.com/linkedin/shiv/releases/tag/1.0.8 has been released which should fix the regression for Python 3.8.