summaryrefslogtreecommitdiff
path: root/dev-python/pydantic
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pydantic')
-rw-r--r--dev-python/pydantic/Manifest4
-rw-r--r--dev-python/pydantic/metadata.xml2
-rw-r--r--dev-python/pydantic/pydantic-2.13.4.ebuild233
3 files changed, 238 insertions, 1 deletions
diff --git a/dev-python/pydantic/Manifest b/dev-python/pydantic/Manifest
index 6964867b3cb6..7c43f32242e9 100644
--- a/dev-python/pydantic/Manifest
+++ b/dev-python/pydantic/Manifest
@@ -40,6 +40,7 @@ DIST lexical-parse-float-1.0.5.crate 186731 BLAKE2B 145c7cda05e7f1c949a693e77df9
DIST lexical-parse-integer-1.0.5.crate 36912 BLAKE2B de63a3241c79a79b12fcc7ac515812bcd17cbd74c10bf0e2d329f4630218001118424b7016918cdfcbe27d5cbb77caf7f6c759883dea4e957d28e44437427cb7 SHA512 3239abf7200d3c480f19848d197168dea36428b1edfa565e21a568642400a32136020b2308a81f55aeaee9f8c7db448d913b1971eab4f146ef2c1a7e29cc9715
DIST lexical-util-1.0.6.crate 106117 BLAKE2B 751538c250e353a28b56c3881ee1ea10dda53847cf75fe0be7023d08dbf189f7f2e765033f5d08a272adaf59264355679075f18db7db24a265629fb0e397986c SHA512 6df0a49097809351fb798cffe783173b357bdd420de035a4eff34ee7b4e8f350d8ef7de976e3393c0e00df1cb6809212a5e0630a7915e9cf937ec532e9faeae6
DIST libc-0.2.155.crate 743539 BLAKE2B 42cdcf8d4a187383548b1f09d404474f168916d626d614463fe10a1fd886e972e1caf6297e75445214af3f31fe631d0927e54ec1cdc63e20082b3587e38dce16 SHA512 05354bba532b8338bda1f88f12c7f3893429734a06e33925fca2b99d49548ae5216e2cd84e782d2368a2dfef20b0e035e2dcad8dd13ede7119462a8c639b2807
+DIST libc-0.2.185.crate 821775 BLAKE2B e0e93466a29c9d19f7d9ab3581b491908d06873a9c57a96b0cae2eed0f0d1cb184ebe80bc61e36d5ab316ab35dca529a322b29e6895f7f339e72c79cca7f8ca2 SHA512 c8dbcaaf2e5d8377a4d1003af4a7210fbfe4f9b1e8497f07d88a231a8d5c9f67014e650a5e18e913e7b4d6a1835c4cbc9c31ce0cd224ea28acbdbb39034a300e
DIST litemap-0.7.3.crate 28728 BLAKE2B 00a04ca0e4e774b317218ab990da4c6ca1f342bbf229957db51801f8ec36339b665133bfe3847ca68a40d901d78d87e0041e09f0740898ac38ea3c8504309c31 SHA512 2c3bc6c4cbf6609f3cc2d986e701d23b73f5bac55995887c90aed01bf4392a42c718a69c0050296fa635a46f7cc9ef3dd6c6a2a505d3cccc690899aa345455a8
DIST log-0.4.27.crate 48120 BLAKE2B 09a2159032baaff7eede480062da30ffec1c1d4c77e76288467941dc13722ab1566742c1821326ca5f8c2f9f7597099e235213ecbf883fd93daf5ae9ad5ee981 SHA512 8d57219b76c8a25bae193e4d16d4d03bf0b8523e1ed3bdc80a692cabe00fc0359ae9bc3be989f04476ecda7187f27e4ad23fe260a96fcefc819af00fe12a1151
DIST lru-0.16.3.crate 16743 BLAKE2B 0574e82714425293593e399930903da1004062ce84e5b90126c66d004e872ac580c6f474f7c39e1a8eafc9f78c6fe7a3049b50f248e8f3a9ecd03e9f04133b9b SHA512 5092b87dfbb7666e224dc6d8ed01fb8276929a2d1a31173034155afadb90e0762dbe6d5ce263bbf0353c079bb249027eff71dcac87228514a5406ef67dd06c15
@@ -56,8 +57,11 @@ DIST pydantic-2.12.5.tar.gz 821591 BLAKE2B 7b139db92fc103cc5e0e5820a3541af8ffaa8
DIST pydantic-2.12.5.tar.gz.provenance 9274 BLAKE2B 9796b665fbb38345b99cbe1ca5890c14a1bbdc2f1995f69685aab53590aaabdc841544d4cacb0e723414bfc8cc18b0368ae958d486b84bfdd201537c78eab3a4 SHA512 e95f64e35c6fbc35d3d6fee2b1104b0a48df5fc0376d95dc4102961f957eed6ebbcb51903cd51e7a61dbd97e6f0e0b5c1d50e26a352018e4a1079169e34a249a
DIST pydantic-2.13.3.tar.gz 844068 BLAKE2B 9ac95faf9b902b2f2ed89e1095ffdd8b1d091c89f3e3bb34c5956ab0c0efc19ee9c2eec5cd81b7e94d7b2dc1aa4d345ed6dbc2cfc24049944bbc396ddecc16a4 SHA512 fb807b94eec1ac603e515e11e99d1b4c19d31c0008d2ae02f4798eab8ad524202b38a71211f1667b476f38385f7e13f7e16b38a5912081eb5df22402020f618a
DIST pydantic-2.13.3.tar.gz.provenance 9147 BLAKE2B 104db25bf29dcb8a766959d75f4fde3b6f64f6af4c2691a61625a95d14f308ab2ffbbbebf9b7956bca4d3bf7fcb9eea382587160e58140566fd940c866fd1b48 SHA512 6126eff0d22b51d976440c75827e953928aad9e47ec7409c61167e9d923c63c9baf31dad1fa1ffa7c8af91b2505146f3e33b40f3e2caa993cd3c358cf7f907f4
+DIST pydantic-2.13.4.tar.gz 844775 BLAKE2B 67bc75e8c5582a4e4704c56f1b93fa9f1a9fb4daae8eb087351d8c14a1bb0be2e6671e7a3b80b8d4dc7aac9aba1a8c639406f3dd6605ebeac21c87d7108be5b9 SHA512 c1cd883a44e3664cccf5f8c7a10cfd8d27748af0dc50cbc0bf76d2c591d3b19dd247d8b12ab2f494fd144e80e5a4aeaf94632ef6577c5bee2aadaacd07915249
+DIST pydantic-2.13.4.tar.gz.provenance 9347 BLAKE2B 226b939cf131b7eabc7dfc8d2564a2190b4807cd15c5ee44118874b6b59dcd5478adffa97b68c1ead59cdbb905ff57484c265ab6e98fc3651057d65e27eb9bbe SHA512 fa3d57b0b1f1d5aa688ae3cd330d8e604fdb34d7e911cd350e91cb476228a29af084d9d3f060c14b35c3a594c68944fce6791676460c4c8d34e37b6df6dea6a9
DIST pydantic_core-2.41.5.tar.gz 460952 BLAKE2B dd7d45acdc5f3093668cb57813c0c4e40e5916d04f75ef8f06308ec00243c9b0469cba5ffd2eb8449e11279d28c12ccc039dc03ed108cdb879da675d9f61aebe SHA512 1447f257efdbad0f70b490569c073696f8bdcdbd0baccac40e843520eb3cabfd23d499dca31afdc67581dd6a690cc138b882f393a91f57afcc309c800b9620c3
DIST pydantic_core-2.46.3.tar.gz 471412 BLAKE2B e9d0efa96b0e3bfee66ca77dcca2d35e178b318c99daf66eca613c287c8be7750580e9e049b21af583ef0161174f1a0a3304b654567f5e4a5e501d8d239fa874 SHA512 3c41c963ea85dc4b43395fbfccb1b65bbafc35dd7450581688ff228fda9b336e980a18f6acc3f8beddf468f760d367ef754d52a45637e3c300489e2a20133f35
+DIST pydantic_core-2.46.4.tar.gz 471464 BLAKE2B af359fd74700d806189578a0c401bc76263cc86ca039a854379d65d0e7e4d94bb48819f75656b66f8e9cd3cffa54e319a85faebde2c3dc61baf20572e1ee4be2 SHA512 828573e575da201f486bd02d0a4a95bced6b8e7594cad7a2bdcce372a8e7d389bcb85ac5be10594d2b5847c93e00e3443a9c6d081110ca47d2ce931b90ad2973
DIST pyo3-0.26.0.crate 1151579 BLAKE2B bcc8236785502928bf4a0b7a320e0a8f3d6140c562de4351a52d015aaebb8dd6b4d68fe607c8ea13ec66941c8f01d2c18c4249adfacb521355d4bf158667f3a3 SHA512 e073a4d893f88aa0301ef0ead78048137515edd93c490e6dccbc301ff65a208534c65c1d216b04639d4b1ec1e4b69bc87bd34974e5d0659134c28dcce589c194
DIST pyo3-0.28.3.crate 1204476 BLAKE2B 8540a1c51bac4fbe04ea34d5ce38471c13d5a3f0759e60cf21d67e846b00feb8316e70f32cb8dc6b74d09f0901ffc83d5f41b1a06da6d34790ef13e4cefcad45 SHA512 f955957eec4b95cc9337d331bba3bba52b4754b301cf86cd974601e64eb20c2424023b19be89a224661fe2e185de646cd3d0d00705b6b5cbd139856c9443a247
DIST pyo3-build-config-0.26.0.crate 34309 BLAKE2B 5ea8b51da2f425674cd3bfcc1090ffdd08da01d2161dc66b08995c20cc859422f9f84077c545e5a0580182910aeb9dbba97838915148a82b86948d1cca3c8722 SHA512 a982d0a0baa4af58c2cef7c0c4b2671e3f559ca7f30586eda9fbd05e842efa2bfea0089ddbc729225b848871f6a25f85e86576e1dff519192ba289cd92c6aa8b
diff --git a/dev-python/pydantic/metadata.xml b/dev-python/pydantic/metadata.xml
index ade6ba5aeeb3..1ee82beefc56 100644
--- a/dev-python/pydantic/metadata.xml
+++ b/dev-python/pydantic/metadata.xml
@@ -8,7 +8,7 @@
<upstream>
<remote-id type="cpe">cpe:/a:pydantic_project:pydantic</remote-id>
<bugs-to>https://github.com/pydantic/pydantic/issues</bugs-to>
- <doc>https://docs.pydantic.dev/latest/</doc>
+ <doc>https://pydantic.dev/docs/validation/latest/get-started/</doc>
</upstream>
<origin>gentoo-staging</origin>
</pkgmetadata> \ No newline at end of file
diff --git a/dev-python/pydantic/pydantic-2.13.4.ebuild b/dev-python/pydantic/pydantic-2.13.4.ebuild
new file mode 100644
index 000000000000..6a947516cf53
--- /dev/null
+++ b/dev-python/pydantic/pydantic-2.13.4.ebuild
@@ -0,0 +1,233 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=hatchling
+# no provenance for pydantic-core:
+# https://github.com/pydantic/pydantic-core/issues/1842
+PYPI_VERIFY_REPO=https://github.com/pydantic/pydantic
+PYTHON_COMPAT=( python3_{10..14} )
+
+PYDANTIC_CORE_PV=2.46.${PV##*.}
+RUST_MIN_VER="1.88.0"
+CRATES="
+ ahash@0.8.12
+ aho-corasick@1.1.3
+ allocator-api2@0.2.21
+ autocfg@1.3.0
+ base64@0.22.1
+ bitflags@2.9.1
+ bitvec@1.0.1
+ bumpalo@3.19.0
+ cc@1.0.101
+ cfg-if@1.0.0
+ displaydoc@0.2.5
+ enum_dispatch@0.3.13
+ equivalent@1.0.2
+ foldhash@0.2.0
+ form_urlencoded@1.2.2
+ funty@2.0.0
+ getrandom@0.3.3
+ hashbrown@0.16.1
+ heck@0.5.0
+ hex@0.4.3
+ icu_collections@1.5.0
+ icu_locid@1.5.0
+ icu_locid_transform@1.5.0
+ icu_locid_transform_data@1.5.0
+ icu_normalizer@1.5.0
+ icu_normalizer_data@1.5.0
+ icu_properties@1.5.1
+ icu_properties_data@1.5.0
+ icu_provider@1.5.0
+ icu_provider_macros@1.5.0
+ idna@1.1.0
+ idna_adapter@1.2.0
+ itoa@1.0.11
+ jiter@0.14.0
+ js-sys@0.3.77
+ lexical-parse-float@1.0.5
+ lexical-parse-integer@1.0.5
+ lexical-util@1.0.6
+ libc@0.2.185
+ litemap@0.7.3
+ log@0.4.27
+ lru@0.16.3
+ memchr@2.7.4
+ num-bigint@0.4.6
+ num-integer@0.1.46
+ num-traits@0.2.19
+ once_cell@1.21.3
+ percent-encoding@2.3.2
+ portable-atomic@1.6.0
+ proc-macro2@1.0.86
+ pyo3-build-config@0.28.3
+ pyo3-ffi@0.28.3
+ pyo3-macros-backend@0.28.3
+ pyo3-macros@0.28.3
+ pyo3@0.28.3
+ python3-dll-a@0.2.14
+ quote@1.0.44
+ r-efi@5.2.0
+ radium@0.7.0
+ regex-automata@0.4.13
+ regex-syntax@0.8.5
+ regex@1.12.3
+ rustversion@1.0.17
+ serde@1.0.228
+ serde_core@1.0.228
+ serde_derive@1.0.228
+ serde_json@1.0.149
+ smallvec@1.15.1
+ speedate@0.17.0
+ stable_deref_trait@1.2.0
+ static_assertions@1.1.0
+ strum@0.27.2
+ strum_macros@0.27.2
+ syn@2.0.82
+ synstructure@0.13.1
+ tap@1.0.1
+ target-lexicon@0.13.4
+ tinystr@0.7.6
+ unicode-ident@1.0.12
+ url@2.5.8
+ utf16_iter@1.0.5
+ utf8_iter@1.0.4
+ uuid@1.23.0
+ version_check@0.9.5
+ wasi@0.14.2+wasi-0.2.4
+ wasm-bindgen-backend@0.2.100
+ wasm-bindgen-macro-support@0.2.100
+ wasm-bindgen-macro@0.2.100
+ wasm-bindgen-shared@0.2.100
+ wasm-bindgen@0.2.100
+ wit-bindgen-rt@0.39.0
+ write16@1.0.0
+ writeable@0.5.5
+ wyz@0.5.1
+ yoke-derive@0.7.4
+ yoke@0.7.4
+ zerocopy-derive@0.8.25
+ zerocopy@0.8.25
+ zerofrom-derive@0.1.4
+ zerofrom@0.1.4
+ zerovec-derive@0.10.3
+ zerovec@0.10.4
+ zmij@1.0.6
+"
+
+inherit cargo distutils-r1 pypi
+
+DESCRIPTION="Data parsing and validation using Python type hints"
+HOMEPAGE="
+ https://github.com/pydantic/pydantic/
+ https://pypi.org/project/pydantic/
+"
+# pydantic-core & pydantic have a perfect circular test dep now
+SRC_URI+="
+ $(pypi_sdist_url pydantic_core "${PYDANTIC_CORE_PV}")
+ ${CARGO_CRATE_URIS}
+"
+PYDANTIC_CORE_S=${WORKDIR}/pydantic_core-${PYDANTIC_CORE_PV}
+
+LICENSE="MIT"
+# Dependent crate licenses
+LICENSE+="
+ Apache-2.0-with-LLVM-exceptions MIT Unicode-3.0 Unicode-DFS-2016
+ ZLIB
+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+RDEPEND="
+ >=dev-python/annotated-types-0.6.0[${PYTHON_USEDEP}]
+ >=dev-python/typing-extensions-4.14.1[${PYTHON_USEDEP}]
+ >=dev-python/typing-inspection-0.4.2[${PYTHON_USEDEP}]
+ dev-python/tzdata[${PYTHON_USEDEP}]
+ !dev-python/pydantic-core
+"
+BDEPEND="
+ >=dev-python/hatch-fancy-pypi-readme-22.5.0[${PYTHON_USEDEP}]
+ dev-util/maturin[${PYTHON_USEDEP}]
+ test? (
+ $(python_gen_cond_dep '
+ dev-python/cloudpickle[${PYTHON_USEDEP}]
+ ' 'python3*')
+ dev-python/dirty-equals[${PYTHON_USEDEP}]
+ >=dev-python/email-validator-2.0.0[${PYTHON_USEDEP}]
+ >=dev-python/faker-18.13.0[${PYTHON_USEDEP}]
+ >=dev-python/jsonschema-4.23.0[${PYTHON_USEDEP}]
+ dev-python/pytz[${PYTHON_USEDEP}]
+ dev-python/rich[${PYTHON_USEDEP}]
+ )
+"
+# pydantic-core
+BDEPEND+="
+ test? (
+ >=dev-python/dirty-equals-0.5.0[${PYTHON_USEDEP}]
+ >=dev-python/inline-snapshot-0.13.3[${PYTHON_USEDEP}]
+ >=dev-python/typing-inspection-0.4.1[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_PLUGINS=( hypothesis pytest-mock )
+distutils_enable_tests pytest
+
+QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/pydantic_core/_pydantic_core.*.so"
+
+src_unpack() {
+ pypi_src_unpack
+ cargo_src_unpack
+}
+
+src_prepare() {
+ sed -i -e '/benchmark/d' {.,"${PYDANTIC_CORE_S}"}/pyproject.toml || die
+ sed -i -e '/^strip/d' "${PYDANTIC_CORE_S}"/Cargo.toml || die
+ distutils-r1_src_prepare
+}
+
+python_compile() {
+ distutils-r1_python_compile
+
+ local DISTUTILS_USE_PEP517=maturin
+ local DISTUTILS_UPSTREAM_PEP517=maturin
+ cd "${PYDANTIC_CORE_S}" || die
+ distutils-r1_python_compile
+ cd - >/dev/null || die
+}
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # == pydantic ==
+ # -Werror, sigh
+ tests/test_types_typeddict.py::test_readonly_qualifier_warning
+
+ # == pydantic-core ==
+ # TODO: recursion till segfault
+ tests/serializers/test_functions.py::test_recursive_call
+ )
+ local EPYTEST_IGNORE=(
+ # require pytest-examples (pydantic)
+ tests/test_docs.py
+ # benchmarks (both)
+ tests/benchmarks
+ )
+
+ if ! has_version "dev-python/cloudpickle[${PYTHON_USEDEP}]"; then
+ EPYTEST_IGNORE+=(
+ # (pydantic)
+ tests/test_pickle.py
+ )
+ fi
+
+ cd "${PYDANTIC_CORE_S}" || die
+ rm -rf pydantic_core || die
+ # tests link to libpython, so they fail to link on pypy3
+ [[ ${EPYTHON} != pypy3* ]] && cargo_src_test
+ epytest -o xfail_strict=False -o addopts=
+ cd - 2>/dev/null || die
+
+ epytest
+}