From 0d1be891df91a30ce912227c261000cff47d24a2 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Tue, 28 Nov 2023 13:16:17 +0100 Subject: [PATCH] Build docs on 3.12 --- .github/workflows/ci.yml | 2 +- .readthedocs.yaml | 2 +- docs/api.rst | 6 +++--- tox.ini | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bb9e552..ca816aa6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,7 +120,7 @@ jobs: - uses: actions/setup-python@v4 with: # Keep in sync with tox/docs and .readthedocs.yaml. - python-version: "3.11" + python-version: "3.12" cache: pip - run: python -Im pip install tox diff --git a/.readthedocs.yaml b/.readthedocs.yaml index c8b3e982..53bc38f7 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,7 +5,7 @@ build: os: ubuntu-22.04 tools: # Keep version in sync with tox.ini/docs and ci.yml/docs. - python: "3.11" + python: "3.12" python: install: diff --git a/docs/api.rst b/docs/api.rst index 1f87e019..d55f2539 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -442,10 +442,10 @@ All objects from ``attrs.validators`` are also available from ``attr.validators` ... val = field(validator=attrs.validators.in_([1, 2, 3])) >>> C(State.ON, 1) C(state=, val=1) - >>> C("on", 1) + >>> C("On", 1) Traceback (most recent call last): ... - ValueError: 'state' must be in (got 'on'), Attribute(name='state', default=NOTHING, validator=>, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False, inherited=False, on_setattr=None), , 'on') + ValueError: 'state' must be in (got 'On'), Attribute(name='state', default=NOTHING, validator=>, repr=True, eq=True, eq_key=None, order=True, order_key=None, hash=None, init=True, metadata=mappingproxy({}), type=None, converter=None, kw_only=False, inherited=False, on_setattr=None), , 'on') >>> C(State.ON, 4) Traceback (most recent call last): ... @@ -536,7 +536,7 @@ All objects from ``attrs.validators`` are also available from ``attr.validators` >>> @define ... class User: ... email = field(validator=attrs.validators.matches_re( - ... "(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)")) + ... r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)")) >>> User(email="user@example.com") User(email='user@example.com') >>> User(email="user@example.com@test.com") diff --git a/tox.ini b/tox.ini index ef24c03a..d251e763 100644 --- a/tox.ini +++ b/tox.ini @@ -54,7 +54,7 @@ commands = [testenv:docs] # Keep base_python in-sync with ci.yml/docs and .readthedocs.yaml. -base_python = py311 +base_python = py312 extras = docs commands = sphinx-build -n -T -W -b html -d {envtmpdir}/doctrees docs docs/_build/html