* Drop Python 3.5
Less than 0.5% of our downloads are 3.5 and it allows us to simplify A LOT of code.
Fixes#965
Signed-off-by: Hynek Schlawack <hs@ox.cx>
* Run 3.6 under coverage
* Add newsfragment
* Probably don't need 3.7 for coverage
* Everything is ordered!
* pre-commit autoupdate, add yesqa
* Add support for Python 3.11
Co-authored-by: Tin Tvrtković <tinchester@gmail.com>
* Tin/py311 (#973)
* Fix test_slots::TestPickle::test_no_getstate_setstate_for_dict_classes
* Fix annotations
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Tweak tests for 3.10
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Tweak tests some more
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tin Tvrtković <tinchester@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Drop Python 2.7
The tooling situation around Python 2 has deteriorate to such a degree that
upholding compatibility is not tenable anymore for a volunteer-run project.
Signed-off-by: Hynek Schlawack <hs@ox.cx>
* Add newsfragment
* Run Python 3.5 under coverage to make up for Python 2.7
* Wait for py35 in parallel
* Remove fullmatch kludge
* Remove Python 2-specific code
* Revert empty slot test
Also disable pyupgrade on that file.
Signed-off-by: Hynek Schlawack <hs@ox.cx>
* We DO run under 3.5
* Remove __qualname__ workarounds
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update changelog.d/936.breaking.rst
Co-authored-by: Tin Tvrtković <tinchester@gmail.com>
* Compare methods using is
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tin Tvrtković <tinchester@gmail.com>
* Do not require cloudpickle for PyPy
The cloudpickle package relies on CPython implementation details,
and does not even import on PyPy:
```
ImportError while importing test module '/tmp/attrs/tests/test_3rd_party.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/pypy3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_3rd_party.py:7: in <module>
import cloudpickle
.tox/pypy3/lib/pypy3.8/site-packages/cloudpickle/__init__.py:4: in <module>
from cloudpickle.cloudpickle import * # noqa
.tox/pypy3/lib/pypy3.8/site-packages/cloudpickle/cloudpickle.py:57: in <module>
from .compat import pickle
.tox/pypy3/lib/pypy3.8/site-packages/cloudpickle/compat.py:13: in <module>
from _pickle import Pickler # noqa: F401
E ModuleNotFoundError: No module named '_pickle'
```
Disable the dependency for PyPy and make the test handle missing
cloudpickle gracefully.
* Enable testing on pypy-3.8
* add a news entry
Co-authored-by: Hynek Schlawack <hs@ox.cx>
* Add Python 3.10 support
Python 3.10 has string types everywhere and that has unmasked a bunch of
bugs/edge cases in our code.
Especially the hooks code need a resolving helper for string types. I'm leaving
that for a separate PR.
Fixes#716
* More robust quote handling
* Use resolve_types decorator where possible
* Use a helper for __init__ annotations
* Add test for various ClassVars
* Add attr.auto/mutable/frozen
Prepare for import attrs y'all!
Signed-off-by: Hynek Schlawack <hs@ox.cx>
* Try combining coverage using 3.8, always
* Add tests for overriding of auto_attribs
* Clarifications
* Add newsfragment
* s/auto/define
This is going be the next-gen name anyways, so no need to introduce new names.
Signed-off-by: Hynek Schlawack <hs@ox.cx>
* Missed two
* Add type stubs
* Beg for patience
* Explain second setup-python action
* fix comment