laurent-laporte-pro / deprecated

Python @deprecated decorator to deprecate old python classes, functions or methods.
MIT License
303 stars 34 forks source link

Type Annotations? #63

Open alanhdu opened 1 year ago

alanhdu commented 1 year ago

I was wondering whether you'd be open to lifting the typestubs from typeshed (https://github.com/python/typeshed/tree/main/stubs/Deprecated/deprecated) directly into this repository. That would make the types easier to maintain (since they live with the code) and make it easier for users to consume (since they can get them directly when installing deprecated instead of having to install the separate types-deprecated module.

If you're open to this, I'd be happy to spend some time doing the port!

tantale commented 1 year ago

Hi Alan,

Sorry for the late reply. Yes, I agree with adding the typestubs to Deprecated.

However, please make sure that this does not lead to regression with Python 2.7 as I want it to remain compatible (we still have users using this old version).

The best thing to do is to make a PR (on the develop branch) to prepare for this.