Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
.. image:: https://readthedocs.org/projects/deprecation/badge/?version=latest :target: http://deprecation.readthedocs.io/en/latest/ :alt: Documentation Status
.. image:: https://travis-ci.org/briancurtin/deprecation.svg?branch=master :target: https://travis-ci.org/briancurtin/deprecation
.. image:: https://codecov.io/gh/briancurtin/deprecation/branch/master/graph/badge.svg :target: https://codecov.io/gh/briancurtin/deprecation
The deprecation
library provides a deprecated
decorator and a
fail_if_not_removed
decorator for your tests. Together, the two
enable the automation of several things:
@deprecated
decorator can be told when it's time to entirely remove the code,
which causes @fail_if_not_removed
to raise an AssertionError
,
causing either your unittest or py.test tests to fail.See http://deprecation.readthedocs.io/ for the full documentation.
::
pip install deprecation
::
import deprecation
@deprecation.deprecated(deprecated_in="1.0", removed_in="2.0",
current_version=__version__,
details="Use the bar function instead")
def foo():
"""Do some stuff"""
return 1
DeprecationWarning
?Yes, by default since 2.7—and for good reason [#]_ —and this works fine with that.
-W
flag or
the PYTHONWARNINGS
environment variable so you catch warnings
in development and handle them appropriately. The warnings raised by
this library show up there, as they're subclasses of the built-in
DeprecationWarning
. See the Command Line <https://docs.python.org/2/using/cmdline.html#cmdoption-W>
_
and Environment Variable <https://docs.python.org/2/using/cmdline.html#envvar-PYTHONWARNINGS>
_
documentation for more details.DeprecationWarning
... [#] Exposing application users to DeprecationWarning
\s that are
emitted by lower-level code needlessly involves end-users in
"how things are done." It often leads to users raising issues
about warnings they're presented, which on one hand is done
rightfully so, as it's been presented to them as some sort of
issue to resolve. However, at the same time, the warning could
be well known and planned for. From either side, loud
DeprecationWarning
\s can be seen as noise that isn't
necessary outside of development.
FAQs
A library to handle automated deprecations
We found that deprecation demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.