From 40c41dbf0388f1f34ca547b93adfb2dfaa6b1ac0 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 17 Jul 2023 07:10:41 +0000 Subject: [PATCH] dev-python/pydantic: Sync with Gentoo It's from Gentoo commit 849695dd0798c020bf73db6a1e1d1949173cb3a0. --- .../dev-python/pydantic/Manifest | 5 +- .../pydantic/pydantic-1.10.11.ebuild | 91 +++++++++++++++++++ ...2.0_beta3.ebuild => pydantic-2.0.1.ebuild} | 9 +- .../dev-python/pydantic/pydantic-2.0.2.ebuild | 57 ++++++++++++ .../dev-python/pydantic/pydantic-2.0.3.ebuild | 65 +++++++++++++ 5 files changed, 220 insertions(+), 7 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-1.10.11.ebuild rename sdk_container/src/third_party/portage-stable/dev-python/pydantic/{pydantic-2.0_beta3.ebuild => pydantic-2.0.1.ebuild} (82%) create mode 100644 sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-2.0.2.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-2.0.3.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pydantic/Manifest b/sdk_container/src/third_party/portage-stable/dev-python/pydantic/Manifest index 3d7b80e8fb..4a9b032989 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/pydantic/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-python/pydantic/Manifest @@ -1,3 +1,6 @@ +DIST pydantic-1.10.11.gh.tar.gz 766203 BLAKE2B 5ab426a805a471baac409c82d5a0cdaa9eae0bc46c0c0643ab653db68ccd5bd6db2c2e6aa12113f513e35d590b291986d463e776515f495991e9818541ab2553 SHA512 494e692781dd8fe3980e06ba975fa0c86ad32e36bffead8c836e1680ff3c43de458ef5a344182950060fc3616208d82ad77fd9098811384208f25a9b72c0fe42 DIST pydantic-1.10.9.gh.tar.gz 765868 BLAKE2B 802c542d75b41ff2926215bf4f6bd68a906d581db7b08ed85577f9021d259717f3ef8dbacfe381723aa042aab8720ad182c57fee188f2436b33d21164e24ba23 SHA512 d376a302eac3427cdc8da0ed2fab01c0b5e7a059447777a53c394a60dac5fa0066488be8553022bb5aa89367d5a2e80e5d6e3cb39d9272843718dd07f6acd11e +DIST pydantic-2.0.1.tar.gz 578758 BLAKE2B 1f330806462cfbb60d4c7dac0a682e191fcdb8e4c75b36603ec7acd8115b625123cf2806248b41e1b9ac5395ca412801180db3cea7a64239ea91c59db19c71dd SHA512 cec0ab3fbe1120806e8821296b65e35c3b8711b4bb2b1d45bcf506964678b6087c5f463ad2332b19ab554f0b04ee7b4fc11f9caa6d292442fe40cdc19dfb4053 +DIST pydantic-2.0.2.tar.gz 580114 BLAKE2B 2e2f29c104889f1e38d229077b4d51d1c2498d61e92591a2ccec58b04a64464cfd7c018e9514117a820fe4b7403d599127a6ef1c1fbda6a5326af3773abd6ad7 SHA512 af06ecc5cc2fc26e6b251cdeb18ad90e15ed9ec11ce83f4d39b8f7f18adc29e3cec83f25227caa24920a9c54d0e5c4b744087dc5a8359540bba1bef7a95c67d5 +DIST pydantic-2.0.3.tar.gz 593215 BLAKE2B eff4de5d45e623e91df43eb89c3d350fdbb22adc1e05417cbb65c0dc3d58475d5e77bad046498d403a1663f7327ca6e5db517fd00f59d554532a53f4f1bbbbb6 SHA512 081f47e8948178a9cc5cf4aa17f0fb1f45d4fab28f5b89e2a56f5812c38a87ab97fb6758236fb64fc44553230807d51a9c7451c2bdbb8b77a9b0fc9083385391 DIST pydantic-2.0.tar.gz 572748 BLAKE2B 611bb31065c1016d18137c0b5bfb0c7730243f727c1ffa3e3264f78fe750f31832d7388c177f59e0a676fa1eca7fc102e425fef59f97dc852c17b400723efc63 SHA512 830f5379f623e128f23f6d0672f0005a8b184b646e162be67fc08008f75dff53012c1576f0530ef9f6723ac664cfd662432de8f35cbcf98963ed8a680d697ce9 -DIST pydantic-2.0b3.tar.gz 543489 BLAKE2B 89faa3ca4187840ad2fa8025bfef8fba265eaf88e31a75751aa619e1235af08e33aa3b7a713da9e69119a43316da893b02e669d3e704781f77fe94598db40410 SHA512 db6690d15f91b635f0a4002f81cb9ba15e625ece4172bd355e5aef7058f6f385d0b3d1f7e2cab3e25aa6a5f48f6455965a1adaa18fc5a2ca5845c09804c9a3dd diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-1.10.11.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-1.10.11.ebuild new file mode 100644 index 0000000000..742af7f9f9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-1.10.11.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( pypy3 python3_{10..12} ) + +inherit distutils-r1 + +MY_P=${P/_beta/b} +DESCRIPTION="Data parsing and validation using Python type hints" +HOMEPAGE=" + https://github.com/pydantic/pydantic/ + https://pypi.org/project/pydantic/ +" +SRC_URI=" + https://github.com/pydantic/pydantic/archive/v${PV/_beta/b}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S=${WORKDIR}/${MY_P} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="native-extensions" + +RDEPEND=" + >=dev-python/typing-extensions-4.1.0[${PYTHON_USEDEP}] +" +BDEPEND=" + native-extensions? ( + =dev-python/email-validator-1.2.1[${PYTHON_USEDEP}] + dev-python/hypothesis[${PYTHON_USEDEP}] + dev-python/pytest-mock[${PYTHON_USEDEP}] + dev-python/python-dotenv[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +src_prepare() { + sed -i -e '/CFLAGS/d' setup.py || die + distutils-r1_src_prepare +} + +python_compile() { + if [[ ${EPYTHON} == pypy3 ]] || ! use native-extensions; then + # do not build extensions on PyPy to workaround + # https://github.com/cython/cython/issues/4763 + local -x SKIP_CYTHON=1 + fi + distutils-r1_python_compile +} + +python_test() { + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + local -x PYTEST_PLUGINS=pytest_mock + + local EPYTEST_DESELECT=( + # flaky test, known upstream + tests/test_hypothesis_plugin.py::test_can_construct_models_with_all_fields + # mypy linting causes regressions with new mypy versions + tests/mypy + ) + case ${EPYTHON} in + pypy3) + EPYTEST_DESELECT+=( + tests/test_private_attributes.py::test_private_attribute + tests/test_private_attributes.py::test_private_attribute_annotation + tests/test_private_attributes.py::test_private_attribute_factory + tests/test_private_attributes.py::test_private_attribute_multiple_inheritance + tests/test_private_attributes.py::test_underscore_attrs_are_private + ) + ;; + python3.12) + EPYTEST_DESELECT+=( + tests/test_abc.py::test_model_subclassing_abstract_base_classes_without_implementation_raises_exception + tests/test_generics.py::test_partial_specification_name + tests/test_generics.py::test_parse_generic_json + tests/test_types.py::test_secretfield + ) + ;; + esac + rm -rf pydantic || die + epytest +} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-2.0_beta3.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-2.0.1.ebuild similarity index 82% rename from sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-2.0_beta3.ebuild rename to sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-2.0.1.ebuild index 02674668bc..89ea9f054c 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-2.0_beta3.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-2.0.1.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=hatchling -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..11} ) inherit distutils-r1 pypi @@ -20,7 +20,7 @@ KEYWORDS="" RDEPEND=" >=dev-python/annotated-types-0.4.0[${PYTHON_USEDEP}] - ~dev-python/pydantic-core-0.39.0[${PYTHON_USEDEP}] + ~dev-python/pydantic-core-2.0.2[${PYTHON_USEDEP}] >=dev-python/typing-extensions-4.6.1[${PYTHON_USEDEP}] " BDEPEND=" @@ -35,10 +35,7 @@ BDEPEND=" distutils_enable_tests pytest python_test() { - local EPYTEST_DESELECT=( - # expect -Werror - tests/test_deprecated.py::test_extra_used_as_enum - ) + local EPYTEST_DESELECT=() local EPYTEST_IGNORE=( # require pytest-examples tests/test_docs.py diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-2.0.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-2.0.2.ebuild new file mode 100644 index 0000000000..ad8c181a72 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-2.0.2.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=hatchling +PYTHON_COMPAT=( python3_{10..12} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Data parsing and validation using Python type hints" +HOMEPAGE=" + https://github.com/pydantic/pydantic/ + https://pypi.org/project/pydantic/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~riscv ~x86" + +RDEPEND=" + >=dev-python/annotated-types-0.4.0[${PYTHON_USEDEP}] + ~dev-python/pydantic-core-2.1.2[${PYTHON_USEDEP}] + >=dev-python/typing-extensions-4.6.1[${PYTHON_USEDEP}] +" +BDEPEND=" + >=dev-python/hatch-fancy-pypi-readme-22.5.0[${PYTHON_USEDEP}] + test? ( + dev-python/dirty-equals[${PYTHON_USEDEP}] + >=dev-python/email-validator-2.0.0[${PYTHON_USEDEP}] + dev-python/pytest-mock[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +python_test() { + local EPYTEST_DESELECT=() + local EPYTEST_IGNORE=( + # require pytest-examples + tests/test_docs.py + ) + case ${EPYTHON} in + python3.12) + EPYTEST_DESELECT+=( + tests/test_abc.py::test_model_subclassing_abstract_base_classes_without_implementation_raises_exception + tests/test_computed_fields.py::test_abstractmethod_missing + tests/test_edge_cases.py::test_abstractmethod_missing_for_all_decorators + tests/test_generics.py::test_partial_specification_name + tests/test_model_signature.py::test_annotated_field + ) + ;; + esac + + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + epytest -p pytest_mock +} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-2.0.3.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-2.0.3.ebuild new file mode 100644 index 0000000000..38f6d29f7c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-python/pydantic/pydantic-2.0.3.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=hatchling +PYTHON_COMPAT=( python3_{10..12} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Data parsing and validation using Python type hints" +HOMEPAGE=" + https://github.com/pydantic/pydantic/ + https://pypi.org/project/pydantic/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + >=dev-python/annotated-types-0.4.0[${PYTHON_USEDEP}] + ~dev-python/pydantic-core-2.3.0[${PYTHON_USEDEP}] + >=dev-python/typing-extensions-4.6.1[${PYTHON_USEDEP}] +" +BDEPEND=" + >=dev-python/hatch-fancy-pypi-readme-22.5.0[${PYTHON_USEDEP}] + test? ( + 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/pytest-mock[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +src_prepare() { + sed -i -e '/benchmark/d' pyproject.toml || die + distutils-r1_src_prepare +} + +python_test() { + local EPYTEST_DESELECT=() + local EPYTEST_IGNORE=( + # require pytest-examples + tests/test_docs.py + # benchmarks + tests/benchmarks + ) + case ${EPYTHON} in + python3.12) + EPYTEST_DESELECT+=( + tests/test_abc.py::test_model_subclassing_abstract_base_classes_without_implementation_raises_exception + tests/test_computed_fields.py::test_abstractmethod_missing + tests/test_edge_cases.py::test_abstractmethod_missing_for_all_decorators + tests/test_generics.py::test_partial_specification_name + tests/test_model_signature.py::test_annotated_field + ) + ;; + esac + + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + epytest -p pytest_mock +}