-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·104 lines (82 loc) · 2.72 KB
/
setup.py
File metadata and controls
executable file
·104 lines (82 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/usr/bin/env python
# -*- coding: utf-8 -*-
u"""
Python-Deprecated
-----------------
Python ``@deprecated`` decorator to deprecate old python classes, functions or methods.
Deprecated is Easy to Use
`````````````````````````
If you need to mark a function or a method as deprecated,
you can use the ``@deprecated`` decorator:
Save in a hello.py:
.. code:: python
from deprecated import deprecated
@deprecated
def some_old_function(x, y):
return x + y
class SomeClass(object):
@deprecated
def some_old_method(self, x, y):
return x + y
some_old_function(12, 34)
obj = SomeClass()
obj.some_old_method(5, 8)
And Easy to Setup
`````````````````
And run it:
.. code:: bash
$ pip install Python-Deprecated
$ python hello.py
hello.py:15: DeprecationWarning: Call to deprecated function some_old_function.
some_old_function(12, 34)
hello.py:17: DeprecationWarning: Call to deprecated function some_old_method.
obj.some_old_method(5, 8)
Links
`````
* `website <https://github.com/vrcmarcos/python-deprecated>`_
* `StackOverFlow Question <http://stackoverflow.com/questions/2536307>`_
* `development version
<https://github.com/vrcmarcos/python-deprecated/zipball/master#egg=Python-Deprecated-dev>`_
"""
from setuptools import setup
setup(
name='Python-Deprecated',
version='1.1.0',
url='https://github.com/vrcmarcos/python-deprecated',
license='MIT',
author='Marcos Cardoso',
author_email='vrcmarcos@gmail.com',
description='Python @deprecated decorator to deprecate old python classes, functions or methods.',
long_description=__doc__,
keywords='deprecate,deprecated,deprecation,warning,warn,decorator',
packages=['deprecated'],
zip_safe=False,
include_package_data=True,
platforms='any',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Software Development :: Libraries :: Python Modules'
],
extras_require={
'dev': [
'pytest',
'pytest-cov',
'tox',
'bumpversion',
'sphinx',
],
},
)