Skip to content

Commit afed325

Browse files
committed
Merge branch 'new-alias-api' of https://github.com/pydantic/pydantic-core into new-alias-api
2 parents f6cde33 + 5e2a102 commit afed325

File tree

5 files changed

+27
-25
lines changed

5 files changed

+27
-25
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,12 @@ jobs:
315315
- uses: actions/checkout@v4
316316

317317
- name: install rust nightly
318-
uses: dtolnay/rust-toolchain@nightly
318+
uses: dtolnay/rust-toolchain@master
319319
with:
320320
components: rust-src
321321
targets: wasm32-unknown-emscripten
322+
# might be able to unpin when pydodide uses emscripten 4, see below
323+
toolchain: nightly-2025-02-17
322324

323325
- name: cache rust
324326
uses: Swatinem/rust-cache@v2
@@ -420,7 +422,7 @@ jobs:
420422
- os: linux
421423
manylinux: auto
422424
target: x86_64
423-
interpreter: pypy3.9 pypy3.10
425+
interpreter: pypy3.9 pypy3.10 pypy3.11
424426

425427
# musllinux
426428
- os: linux
@@ -440,15 +442,15 @@ jobs:
440442
target: x86_64
441443
- os: macos
442444
target: aarch64
443-
interpreter: 3.9 pypy3.9 pypy3.10
445+
interpreter: 3.9 pypy3.9 pypy3.10 pypy3.11
444446

445447
# windows;
446448
# x86_64 pypy builds are not PGO optimized
447449
# i686 not supported by pypy
448450
# aarch64 only 3.11 and up, also not PGO optimized
449451
- os: windows
450452
target: x86_64
451-
interpreter: pypy3.9 pypy3.10
453+
interpreter: pypy3.9 pypy3.10 pypy3.11
452454
- os: windows
453455
target: i686
454456
python-architecture: x86
@@ -482,7 +484,7 @@ jobs:
482484
with:
483485
target: ${{ matrix.target }}
484486
manylinux: ${{ matrix.manylinux }}
485-
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10' }}
487+
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10 pypy3.11' }}
486488
rust-toolchain: stable
487489
docker-options: -e CI
488490

Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ rust-version = "1.75"
2929
[dependencies]
3030
# TODO it would be very nice to remove the "py-clone" feature as it can panic,
3131
# but needs a bit of work to make sure it's not used in the codebase
32-
pyo3 = { version = "0.23.4", features = ["generate-import-lib", "num-bigint", "py-clone"] }
32+
pyo3 = { version = "0.23.5", features = ["generate-import-lib", "num-bigint", "py-clone"] }
3333
regex = "1.11.1"
3434
strum = { version = "0.26.3", features = ["derive"] }
3535
strum_macros = "0.26.4"
@@ -73,12 +73,12 @@ debug = true
7373
strip = false
7474

7575
[dev-dependencies]
76-
pyo3 = { version = "0.23.3", features = ["auto-initialize"] }
76+
pyo3 = { version = "0.23.5", features = ["auto-initialize"] }
7777

7878
[build-dependencies]
7979
version_check = "0.9.5"
8080
# used where logic has to be version/distribution specific, e.g. pypy
81-
pyo3-build-config = { version = "0.23.3" }
81+
pyo3-build-config = { version = "0.23.5" }
8282

8383
[lints.clippy]
8484
dbg_macro = "warn"

python/pydantic_core/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,16 @@ class ErrorDetails(_TypedDict):
8989
Values which are required to render the error message, and could hence be useful in rendering custom error messages.
9090
Also useful for passing custom error data forward.
9191
"""
92+
url: _NotRequired[str]
93+
"""
94+
The documentation URL giving information about the error. No URL is available if
95+
a [`PydanticCustomError`][pydantic_core.PydanticCustomError] is used.
96+
"""
9297

9398

9499
class InitErrorDetails(_TypedDict):
95100
type: str | PydanticCustomError
96-
"""The type of error that occurred, this should a "slug" identifier that changes rarely or never."""
101+
"""The type of error that occurred, this should be a "slug" identifier that changes rarely or never."""
97102
loc: _NotRequired[tuple[int | str, ...]]
98103
"""Tuple of strings and ints identifying where in the schema the error occurred."""
99104
input: _Any

src/argument_markers.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,7 @@ use pyo3::types::{PyDict, PyTuple};
55

66
use crate::tools::safe_repr;
77

8-
// see https://github.com/PyO3/pyo3/issues/4894 - freelist is currently unsound with GIL disabled
9-
#[cfg_attr(
10-
not(Py_GIL_DISABLED),
11-
pyclass(module = "pydantic_core._pydantic_core", get_all, frozen, freelist = 100)
12-
)]
13-
#[cfg_attr(Py_GIL_DISABLED, pyclass(module = "pydantic_core._pydantic_core", get_all, frozen))]
8+
#[pyclass(module = "pydantic_core._pydantic_core", get_all, frozen, freelist = 100)]
149
#[derive(Debug, Clone)]
1510
pub struct ArgsKwargs {
1611
pub(crate) args: Py<PyTuple>,

0 commit comments

Comments
 (0)