vrcmarcos / python-deprecated Goto Github PK
View Code? Open in Web Editor NEWPython @deprecated decorator to deprecate old python functions
Home Page: https://pypi.python.org/pypi/Python-Deprecated
License: MIT License
Python @deprecated decorator to deprecate old python functions
Home Page: https://pypi.python.org/pypi/Python-Deprecated
License: MIT License
Your library should be tagged.
Could you, please, add the tag "v1.0.0" ?
Subclass a class that is marked as deprecated shouldn't raises an error.
Subclassing a class that's deprecated raises a TypeError
>>> from deprecated import deprecated
>>> @deprecated
... class MyClass: pass
...
>>> class MyOtherClass(MyClass): pass
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: function() argument 1 must be code, not str
>>>
Solution: use a class decorator when applied to a class ?
Hi, I was exploring available options for a deprecation decorator in Python and found these (among others):
It seems both are pretty much the same.
As far as I understand "Deprecated" started as copy-paste of the code of "Python-Deprecated" in a new git repo (around Nov 2017).
If that is the case: wouldn't it be better to explicitly mark "Python-Deprecated" as deprecated (lol) and forward potential users to "Deprecated", both on github (e.g. in README) and on Pypi?
Hi Marcos,
Could you release the v1.1.0 on PyPi?
First, update your local repository:
git fetch origin master
git reset --hard v1.1.0
Release and push to PyPi
python setup.py release upload
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.