Skip to content

Commit

Permalink
Merge branch 'main' into issue-1230
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek authored Mar 7, 2024
2 parents 6647cd5 + 1d9f40c commit 17fb4e3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
# - "pypy-3.7"
- "pypy-3.8"
- "pypy-3.9"
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Typing :: Typed",
Expand Down
1 change: 1 addition & 0 deletions src/attr/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
PY_3_9_PLUS = sys.version_info[:2] >= (3, 9)
PY310 = sys.version_info[:2] >= (3, 10)
PY_3_12_PLUS = sys.version_info[:2] >= (3, 12)
PY_3_13_PLUS = sys.version_info[:2] >= (3, 13)


if sys.version_info < (3, 8):
Expand Down
11 changes: 7 additions & 4 deletions tests/test_cmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
Tests for methods from `attrib._cmp`.
"""


import pytest

from attr._cmp import cmp_using
from attr._compat import PY_3_13_PLUS


# Test parameters.
Expand Down Expand Up @@ -54,6 +54,9 @@
cmp_data = eq_data + order_data
cmp_ids = eq_ids + order_ids

# Compiler strips indents from docstrings in Python 3.13+
indent = "" if PY_3_13_PLUS else " " * 8


class TestEqOrder:
"""
Expand Down Expand Up @@ -325,7 +328,7 @@ def test_ne(self):
method = self.cls.__ne__
assert method.__doc__.strip() == (
"Check equality and either forward a NotImplemented or\n"
" return the result negated."
f"{indent}return the result negated."
)
assert method.__name__ == "__ne__"

Expand Down Expand Up @@ -393,7 +396,7 @@ def test_ne(self):
method = self.cls.__ne__
assert method.__doc__.strip() == (
"Check equality and either forward a NotImplemented or\n"
" return the result negated."
f"{indent}return the result negated."
)
assert method.__name__ == "__ne__"

Expand Down Expand Up @@ -465,7 +468,7 @@ def test_ne(self):
method = self.cls.__ne__
assert method.__doc__.strip() == (
"Check equality and either forward a NotImplemented or\n"
" return the result negated."
f"{indent}return the result negated."
)
assert method.__name__ == "__ne__"

Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
min_version = 4
env_list =
pre-commit,
py3{7,8,9,10,11,12}-tests,
py3{8,9,10,11,12}-mypy,
py3{7,8,9,10,11,12,13}-tests,
py3{8,9,10,11,12,13}-mypy,
pypy3,
pyright,
docs,
Expand Down Expand Up @@ -41,7 +41,7 @@ commands = coverage run -m pytest {posargs:-n auto}
[testenv:coverage-report]
# Keep base_python in-sync with .python-version-default
base_python = py312
depends = py3{7,10,11}
depends = py3{7,10,12}
skip_install = true
deps = coverage[toml]>=5.3
commands =
Expand Down

0 comments on commit 17fb4e3

Please sign in to comment.