summaryrefslogtreecommitdiff
path: root/test/test_deprecation.py
Commit message (Collapse)AuthorAgeFilesLines
* feat: add tests to ensure that warnings target the correct lineLaurent Peuch2020-10-091-1/+212
|
* feat(deprecation): add structured informations to deprecation warningsLaurent Peuch2020-08-251-7/+234
|
* fix(deprecation): stacked decorators breaks getting the real callable ↵Laurent Peuch2020-08-261-0/+25
| | | | __name__ attribute
* [deprecation/fix] implement lazy_wraps, a lazy version of functools.wraps ↵Laurent Peuch2020-05-201-0/+15
| | | | | | | | | | | for LazyObject functools.wraps was breaking the behavior of LazyObject because it tried to access attributes of the LazyObject that triggers an import which could sometime fails in this situation where some modules are marked as deprecated but aren't imported yet. For example see https://forge.extranet.logilab.fr/cubicweb/cubicweb/blob/3.24.0/cubicweb/schemas/__init__.py#L51
* [fix] metaclass conflict for class_deprecatedLaurent Peuch2020-05-071-0/+11
| | | | Actually the old compatibility code actually prevented this bug so back it up.
* black && flake8Laurent Peuch2020-05-061-0/+2
|
* [deprecation/fix] correctly automatically get the module in which ↵Laurent Peuch2020-05-061-30/+66
| | | | | | | | | | | | deprecation utils are called There was a missmatched combination of: * the frame wasn't always correctly grabbed * grabbing the frame in the situation of a decorator didn't make any sens, so switch to func.__module__ * the tests were bad and expected "[logilab.common]" while it should have been "[test_deprecation]" because it was there that the depreciation was declared
* [tox] move to pytestLaurent Peuch2020-03-201-0/+167