Open jamesbraza opened 3 years ago
Im happy to add typing after python 2.7 is dropped
Python 2.7 will be dropped when pip does
Pip 21.0 dropped py2 support. This can be now done! 🥳
python 2 support was dropped in version 6 of setuptools_scm
i started adding some type hints, its still along way till py.typed tho
@RonnyPfannschmidt Any chance to resume on that? Even partial types could help, we don't need 100% from start.
There are some needed breaking changes after which it makes sense,
Im currently a bit stretched
type annotations are added, the 8.x series will not export them yet
More out of curiosity, why add type annotations and then not export them? Is it just to test out type annotations for some time?
As soon as they are exported,the number of actions one can take for refactoring that count as breaking change increase
The typing closure for the configuration,scm versions and version schemes is currently very fuzzy and locking it in for externals would be a major paint
Oh that makes sense, thank you for circling back! Appreciate the quick response too
That being said, i Wish I wasn't quite as stretched so I could complete the work on this timely
Just my 2 cent on this: As long as the API is stable, IMO it's fine if the type annotations change in an incompatible way. You could even see type annotation changes as fixes since the type annotation is then better as before and maybe even more correct 😄
as im rather stretched in delivering certain refactorings i am hesitant to impose possile type anotation enforced breakage on downstreams, not that there arent many of them
As I am sure the
setuptools_scm
maintainers are aware:pytest
, PyCharm, AWSI use
setuptools_scm
as part of some type checked code (viamypy
). From what I have seen,setuptools_scm
:py.typed
marker file per PEP 561tox.ini
fileThere is a similar ticket for
setuptools
: https://github.com/pypa/setuptools/issues/2345Any thoughts on adding support for type hints?
Aside: I'm not sure how one can add type hints and maintain support for Python 2.7 and 3.4.
Workaround
In the meantime, I am adding the following to my
setup.cfg
section formypy
: