hynek / characteristic

Please use attrs instead!
https://attrs.readthedocs.io/
MIT License
84 stars 19 forks source link

14.3.0: pytest warnings #41

Open kloczek opened 3 years ago

kloczek commented 3 years ago

Just normal build, install and test cycle used on building package from non-root account:

. . [ 1%] test_characteristic.py ....................................................................................... [100%]

============================================================================= warnings summary ============================================================================= test_characteristic.py::TestWithInit::test_defaults /home/tkloczko/rpmbuild/BUILD/characteristic-14.3.0/test_characteristic.py:395: DeprecationWarning: defaults has been deprecated in 14.0, please use the Attribute class instead. @with_init(["a", "b"], defaults={"b": 2})

test_characteristic.py::TestWithInit::test_defaults_conflict /home/tkloczko/rpmbuild/BUILD/characteristic-14.3.0/test_characteristic.py:414: DeprecationWarning: defaults has been deprecated in 14.0, please use the Attribute class instead. @with_init([Attribute("a")], defaults={"a": 42})

test_characteristic.py::TestAttributes::test_leaves_init_alone /home/tkloczko/rpmbuild/BUILD/characteristic-14.3.0/test_characteristic.py:586: DeprecationWarning: create_init has been deprecated in 14.0, please use apply_with_init. @attributes(["a"], create_init=False)

test_characteristic.py::TestEnsureAttributes::test_leaves_attribute_alone test_characteristic.py::TestEnsureAttributes::test_converts_rest test_characteristic.py::TestEnsureAttributes::test_defaults test_characteristic.py::TestEnsureAttributes::test_defaults_Attribute /usr/lib/python3.8/site-packages/_pytest/python.py:183: DeprecationWarning: defaults has been deprecated in 14.0, please use the Attribute class instead. result = testfunction(**testargs)

-- Docs: https://docs.pytest.org/en/stable/warnings.html ====================================================================== 88 passed, 7 warnings in 7.18s ======================================================================

kloczek commented 3 years ago

I forgot .. to use latest pytest it is necessary to fix setup.cfg:

--- a/setup.cfg~        2014-12-19 13:48:48.000000000 +0000
+++ b/setup.cfg 2021-06-15 20:25:44.907135078 +0100
@@ -1,4 +1,4 @@
-[pytest]
+[tools:pytest]
 minversion = 2.6
 strict = true
 norecursedirs = .* build dist test_data *.egg

BTW: do you have any plans to make new release?

hynek commented 3 years ago

No I don't plan on it, unless there's an actual bug in the implementation which is highly unlikely at this point. :)

hynek commented 3 years ago

Oops, I thought this was a different project (first) but same thing is true. charactersitic is unmaintained. I might push out a release iff it breaks on some new Python version, is trivially to fix, and someone asks nicely.