Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/upstream/main' into valida…
Browse files Browse the repository at this point in the history
…te-base64
  • Loading branch information
josh-newman committed Jul 6, 2024
2 parents 5870e0b + 0e6b377 commit c5b4f7f
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 60 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ jobs:
version: '3.1.46'
actions-cache-folder: emsdk-cache

- run: pip install 'maturin>=1,<2' 'ruff==0.1.3' typing_extensions
- run: pip install 'maturin>=1,<2' 'ruff==0.5.0' typing_extensions

- name: build wheels
run: make build-wasm
Expand Down Expand Up @@ -475,7 +475,7 @@ jobs:
python-version: '3.11'
architecture: ${{ matrix.python-architecture || 'x64' }}

- run: pip install -U twine 'ruff==0.1.3' typing_extensions
- run: pip install -U twine 'ruff==0.5.0' typing_extensions

# generate self-schema now, so we don't have to do so inside docker in maturin build
- run: python generate_self_schema.py
Expand Down Expand Up @@ -539,7 +539,7 @@ jobs:
with:
components: llvm-tools

- run: pip install -U 'ruff==0.1.3' typing_extensions
- run: pip install -U 'ruff==0.5.0' typing_extensions

# generate self-schema now, so we don't have to do so inside docker in maturin build
- run: python generate_self_schema.py
Expand Down
59 changes: 19 additions & 40 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pydantic-core"
version = "2.20.0"
version = "2.20.1"
edition = "2021"
license = "MIT"
homepage = "https://github.com/pydantic/pydantic-core"
Expand Down Expand Up @@ -31,21 +31,21 @@ rust-version = "1.75"
# but needs a bit of work to make sure it's not used in the codebase
pyo3 = { version = "0.22.0", features = ["generate-import-lib", "num-bigint", "py-clone"] }
regex = "1.10.4"
strum = { version = "0.25.0", features = ["derive"] }
strum_macros = "0.26.1"
strum = { version = "0.26.3", features = ["derive"] }
strum_macros = "0.26.4"
serde_json = {version = "1.0.116", features = ["arbitrary_precision", "preserve_order"]}
enum_dispatch = "0.3.13"
serde = { version = "1.0.203", features = ["derive"] }
speedate = "0.14.0"
speedate = "0.14.4"
smallvec = "1.13.2"
ahash = "0.8.10"
url = "2.5.0"
# idna is already required by url, added here to be explicit
idna = "0.5.0"
base64 = "0.21.7"
num-bigint = "0.4.4"
num-bigint = "0.4.6"
python3-dll-a = "0.2.10"
uuid = "1.8.0"
uuid = "1.9.1"
jiter = { version = "0.5", features = ["python"] }
hex = "0.4.3"

Expand Down
8 changes: 4 additions & 4 deletions tests/requirements-linting.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
griffe==0.45.2
pyright==1.1.365
ruff==0.4.7
mypy==1.10.0
griffe==0.47.0
pyright==1.1.369
ruff==0.5.0
mypy==1.10.1
8 changes: 4 additions & 4 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
backports.zoneinfo==0.2.1;python_version<"3.9"
coverage==7.5.3
coverage==7.5.4
dirty-equals==0.7.1.post0
hypothesis==6.103.0
hypothesis==6.104.2
# pandas doesn't offer prebuilt wheels for all versions and platforms we test in CI e.g. aarch64 musllinux
pandas==2.1.3; python_version >= "3.9" and python_version < "3.13" and implementation_name == "cpython" and platform_machine == 'x86_64'
pytest==8.2.1
pytest==8.2.2
# we run codspeed benchmarks on x86_64 CPython (i.e. native github actions architecture)
pytest-codspeed~=2.2.1; implementation_name == "cpython" and platform_machine == 'x86_64'
# pytest-examples currently depends on aiohttp via black; we don't want to build
# it on platforms like aarch64 musllinux in CI
pytest-examples==0.0.10; implementation_name == "cpython" and platform_machine == 'x86_64'
pytest-examples==0.0.12; implementation_name == "cpython" and platform_machine == 'x86_64'
pytest-speed==0.3.5
pytest-mock==3.14.0
pytest-pretty==1.2.0
Expand Down
2 changes: 1 addition & 1 deletion tests/validators/test_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_list_strict():

def test_list_no_copy():
v = SchemaValidator({'type': 'list'})
assert v.validate_python([1, 2, 3]) is not [1, 2, 3]
assert v.validate_python([1, 2, 3]) is not [1, 2, 3] # noqa: F632


def gen_ints():
Expand Down
10 changes: 8 additions & 2 deletions tests/validators/test_timedelta.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,16 @@ def test_timedelta_kwargs_strict():


def test_invalid_constraint():
with pytest.raises(SchemaError, match='timedelta.gt\n Input should be a valid timedelta, invalid digit in'):
with pytest.raises(
SchemaError,
match='Invalid Schema:\ntimedelta.gt\n Input should be a valid timedelta, invalid character in hour',
):
validate_core_schema({'type': 'timedelta', 'gt': 'foobar'})

with pytest.raises(SchemaError, match='timedelta.le\n Input should be a valid timedelta, invalid digit in'):
with pytest.raises(
SchemaError,
match='Invalid Schema:\ntimedelta.le\n Input should be a valid timedelta, invalid character in hour',
):
validate_core_schema({'type': 'timedelta', 'le': 'foobar'})


Expand Down

0 comments on commit c5b4f7f

Please sign in to comment.