1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= python-deprecation
7 SDESC[py310]= Library to handle automated deprecations (3.10)
8 SDESC[v11]= Library to handle automated deprecations (3.11)
9 HOMEPAGE= https://deprecation.readthedocs.io/
10 CONTACT= Python_Automaton[python@ironwolf.systems]
13 SITES[main]= PYPIWHL/02/c3/253a89ee03fc9b9682f1541728eb66db7db22148cd94f89ab22528cd1e1b
14 DISTFILE[1]= deprecation-2.1.0-py2.py3-none-any.whl:main
19 OPTIONS_AVAILABLE= PY310 PY311
20 OPTIONS_STANDARD= none
21 VOPTS[py310]= PY310=ON PY311=OFF
22 VOPTS[v11]= PY310=OFF PY311=ON
24 DISTNAME= deprecation-2.1.0.dist-info
28 [PY310].RUN_DEPENDS_ON= python-packaging:single:py310
29 [PY310].USES_ON= python:py310,wheel
31 [PY311].RUN_DEPENDS_ON= python-packaging:single:v11
32 [PY311].USES_ON= python:v11,wheel
34 [FILE:2783:descriptions/desc.single]
38 :alt: Documentation Status
40 The deprecation library provides a deprecated decorator and a
41 fail_if_not_removed decorator for your tests. Together, the two
42 enable the automation of several things:
44 1. The docstring of a deprecated method gets the deprecation details
45 appended to the end of it. If you generate your API docs direct
46 from your source, you don't need to worry about writing your own
47 notification. You also don't need to worry about forgetting to
48 write it. It's done for you.
49 2. Rather than having code live on forever because you only deprecated
50 it but never actually moved on from it, you can have your tests
51 tell you when it's time to remove the code. The ``@deprecated``
52 decorator can be told when it's time to entirely remove the code,
53 which causes ``@fail_if_not_removed to raise an AssertionError``,
54 causing either your unittest or py.test tests to fail.
56 See http://deprecation.readthedocs.io/ for the full documentation.
63 pip install deprecation
72 @deprecation.deprecated(deprecated_in="1.0", removed_in="2.0",
73 current_version=__version__,
74 details="Use the bar function instead")
79 ...but doesn't Python ignore DeprecationWarning?
80 ====================================================
82 Yes, by default since 2.7—and for good reason [#]_ —and this works fine
85 1. It often makes sense for you to run your tests with a ``-W flag or
86 the PYTHONWARNINGS`` environment variable so you catch warnings
87 in development and handle them appropriately. The warnings raised by
88 this library show up there, as they're subclasses of the built-in
89 DeprecationWarning. See the [Command Line
91 and [Environment Variable
93 documentation for more details.
94 2. Even if you don't enable those things, the behavior of this library
95 remains the same. The docstrings will still be updated and the tests
96 will still fail when they need to. You'll get the benefits regardless
97 of what Python cares about DeprecationWarning.
101 .. [#] Exposing application users to DeprecationWarning\s that are
102 emitted by lower-level code needlessly involves end-users in
103 "how things are done." It often leads to users raising issues
104 about warnings they're presented, which on one hand is done
105 rightfully so, as it's been presented to them as some sort of
106 issue to resolve. However, at the same time, the warning could
107 be well known and planned for. From either side, loud
108 DeprecationWarning\s can be seen as noise that isn't
109 necessary outside of development.
113 a10811591210e1fb0e768a8c25517cabeabcba6f0bf96564f8ff45189f90b14a 11178 deprecation-2.1.0-py2.py3-none-any.whl