Build docs on 3.12
This commit is contained in:
parent
1fcd29f864
commit
0d1be891df
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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=<State.ON: 'on'>, val=1)
|
||||
>>> C("on", 1)
|
||||
>>> C("On", 1)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
ValueError: 'state' must be in <enum 'State'> (got 'on'), Attribute(name='state', default=NOTHING, validator=<in_ validator with options <enum 'State'>>, 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), <enum 'State'>, 'on')
|
||||
ValueError: 'state' must be in <enum 'State'> (got 'On'), Attribute(name='state', default=NOTHING, validator=<in_ validator with options <enum 'State'>>, 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), <enum 'State'>, '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")
|
||||
|
|
Loading…
Reference in New Issue