Open H4rryK4ne opened 5 months ago
I personally don't use typing so I don't mind its absence.
However, if you or someone else wants to contribute, I'd merge it provided that it won't be too much hassle for me to maintain in the future.
I wanted to start now with type annotations.
Currently you support python down to version 3.4. How important is this to you?
The typing module is part of the standard packages from 3.5. Type annotations became actually usable with 3.9+.
There a two approaches we could use:
In October this year Python 3.8 will be end-of-live ... (https://devguide.python.org/versions/), so I personally would go with option 1.
Which approach would you prefer?
The minimum I can go right now is Python 3.6.
Here are some estimated download stats for django-jsonform:
Python version | Downloads |
---|---|
3.6 | ~100/mo |
3.7 | ~2,000/mo |
3.8 | ~7,000/mo |
So, I don't think it would be wise to just drop everything below 3.9 without doing a major release.
I'm planning a major v3 (in a couple of months). So maybe then we can drop support for Python < 3.9.
I think for the time being, you should create a third party package for the stubs and we might merge it in v3.
Until then I can mention your library in the Docs and the Readme for people looking for typing support.
CON: harder to maintain, as every change to the original code needs to be mirrored in the stub package
The backend code rarely changes in django-jsonform. I don't think that would be too much work between updates.
I created a repo with the stub files ... I have not yet published a package yet ...
Did you ever consider adding type annotations or creating stubs for type checking?