From 59c2499e0c9720169c9d5a02168c51c807a21467 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 14 May 2024 00:01:24 +0100 Subject: gentoo auto-resync : 14:05:2024 - 00:01:24 --- dev-python/tomlkit/Manifest | 4 +- .../tomlkit/files/tomlkit-0.12.5-py313.patch | 71 ++++++++++++++++++++++ dev-python/tomlkit/metadata.xml | 2 +- dev-python/tomlkit/tomlkit-0.12.5-r1.ebuild | 53 ++++++++++++++++ 4 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 dev-python/tomlkit/files/tomlkit-0.12.5-py313.patch create mode 100644 dev-python/tomlkit/tomlkit-0.12.5-r1.ebuild (limited to 'dev-python/tomlkit') diff --git a/dev-python/tomlkit/Manifest b/dev-python/tomlkit/Manifest index edeafff7834f..70e1f9cb6bf5 100644 --- a/dev-python/tomlkit/Manifest +++ b/dev-python/tomlkit/Manifest @@ -1,5 +1,7 @@ +AUX tomlkit-0.12.5-py313.patch 2155 BLAKE2B b7e58a1d24f69a03a9d96a6351079cda82f95eb427103b6d268f2791507925b040b06f33a547644a07a0bb60c89420cf9b332c744dfa4af931b59f6d237216fe SHA512 df4c7f7f46baa75bf0872e0358e56b151db0bc7c61520f2087f589fa38a276f19c006a57520fa0ee145098339cbde4cfc7dd71a5c6c640fcd86814e01649685b DIST tomlkit-0.12.4.tar.gz 191162 BLAKE2B 3a5f8f01c7965a6d445fa96d0253d0dad55414bf9cae875fe9d9bc670d5b0a20a76fbf655695396ea188cddcea7ad034a38eed05d85f48c47301a3f23a9c7ded SHA512 b6b1cbb954202a256411388eea46852964bbdd02026086a42eab9107c55b961718398ec504f0289560894e9b46cf1c2f4b7e943267454509f6212e899e161d05 DIST tomlkit-0.12.5.tar.gz 191420 BLAKE2B 3175f2932db1da3aca439581c7a11fd2dce01dff3c9d21b07577bdf38138515105939bc864510dce1f98e28caa222b6ba94a0d0906b515e7b677c405b90bf77c SHA512 85fba0018059c72f483251e53c039ede4ed630dd31afc58a1555705281a42c090aee2d8c25234b8700ff5f3a766313d7c9c716d7224f608f22f836c9e701c251 EBUILD tomlkit-0.12.4.ebuild 971 BLAKE2B cde0302c2500820b0f1e9308686706f867b45e22f59c6106b453a363d571e91687b65cdf9f29c1da3b2b296fc294726d12f067c418fc0e80c3d3062f8c0cff5e SHA512 11ec5bc0edb4d67a6d859d6a3561f63093226f159cd4c4284520da927d204c2128f8dec528fb4f1a796dd7ce0557d49c6bde95c7d4356275a63db754105f148d +EBUILD tomlkit-0.12.5-r1.ebuild 1152 BLAKE2B 9b9ec4089fca448cc40bebfc52f3198d2cc894a73592deb52b95c85d11eebe3a31b623e3a1fa7299244174c159cc4b5a786810d68dc9229145f9c97cba5690b4 SHA512 61de898c4a0136a0c6df737cb65e07926d4312dbe3f7c979c8c3fa352cb342eb829f087e615148f36ae12985fdb741460e4b472e5c0293cc1e879f6d1903d6e5 EBUILD tomlkit-0.12.5.ebuild 979 BLAKE2B 8172ccd3cc70d7e7a7c91e90bcc4458e824f0bdf7c0aaf51cd13a01055696620a40bdac681abfe145b7e79470004b5be7df30ad12b0ee271fd55c07ccc1c641f SHA512 7ded503e0f8947f1f18f9f4ada5f3f4965c1dcc4440cea7fdfdc19eb9b2110311c28693a5b485cd61bfdc9ddbc1104e1e4779819893e0bab9e1ef2923282fed5 -MISC metadata.xml 525 BLAKE2B 663169c851817eb7368c49d678119f1f2dfebe642325d3dbc59498f60b452710a257ca5cd5173a4fc8391d33038cce079b3fba112ad7e9c0caf0c1872ee43f13 SHA512 5a6cf412fc06854557d001ae4a6f654b36d351c8c0b4bc08c1a7c40f49d8dceba931598f5eed6c75e1d7797570fcf8fb7799f5f035931f80d05b1e9bd0d258c0 +MISC metadata.xml 529 BLAKE2B 313663d81102b8124a7ebbe11e18003c4714e26daf97ce180c1690b147d750bebfe23af9d894f87ae218148cfb59c3405b25b1736d65fef16bcff4466e026e76 SHA512 f2bab5270eb7346e5de28ed96fb51ded6956ed57724d2ffba6f94b288699ef8107b78155c7c350321e11955c05967d6320444005725c3beedb711cc585f8fa41 diff --git a/dev-python/tomlkit/files/tomlkit-0.12.5-py313.patch b/dev-python/tomlkit/files/tomlkit-0.12.5-py313.patch new file mode 100644 index 000000000000..bc6201d42101 --- /dev/null +++ b/dev-python/tomlkit/files/tomlkit-0.12.5-py313.patch @@ -0,0 +1,71 @@ +From 05d9be1c2b2a95a4eb3a53d999f1483dd7abae5a Mon Sep 17 00:00:00 2001 +From: Frost Ming +Date: Mon, 13 May 2024 10:44:28 +0800 +Subject: [PATCH] fix: Test failures with Python 3.13.0a4: + test_dates_behave_like_dates and test_times_behave_like_times (#349) + +Fixes #333 + +Signed-off-by: Frost Ming +--- + tests/test_items.py | 4 ++-- + tomlkit/items.py | 15 ++++++++++----- + 4 files changed, 20 insertions(+), 8 deletions(-) + +diff --git a/tests/test_items.py b/tests/test_items.py +index 1a71b04..3d2de68 100644 +--- a/tests/test_items.py ++++ b/tests/test_items.py +@@ -689,7 +689,7 @@ def test_dates_behave_like_dates(): + assert i.as_string() == "2018-07-22" + + i += timedelta(days=1) +- assert i == datetime(2018, 7, 23) ++ assert i == date(2018, 7, 23) + assert i.as_string() == "2018-07-23" + + i -= timedelta(days=2) +@@ -697,7 +697,7 @@ def test_dates_behave_like_dates(): + assert i.as_string() == "2018-07-21" + + i = i.replace(year=2019) +- assert i == datetime(2019, 7, 21) ++ assert i == date(2019, 7, 21) + assert i.as_string() == "2019-07-21" + + doc = parse("dt = 2018-07-22 # Comment") +diff --git a/tomlkit/items.py b/tomlkit/items.py +index ef40a15..661e09c 100644 +--- a/tomlkit/items.py ++++ b/tomlkit/items.py +@@ -958,9 +958,14 @@ def __new__(cls, year: int, month: int, day: int, *_: Any) -> date: + return date.__new__(cls, year, month, day) + + def __init__( +- self, year: int, month: int, day: int, trivia: Trivia, raw: str ++ self, ++ year: int, ++ month: int, ++ day: int, ++ trivia: Trivia | None = None, ++ raw: str = "", + ) -> None: +- super().__init__(trivia) ++ super().__init__(trivia or Trivia()) + + self._raw = raw + +@@ -1033,10 +1038,10 @@ def __init__( + second: int, + microsecond: int, + tzinfo: tzinfo | None, +- trivia: Trivia, +- raw: str, ++ trivia: Trivia | None = None, ++ raw: str = "", + ) -> None: +- super().__init__(trivia) ++ super().__init__(trivia or Trivia()) + + self._raw = raw + diff --git a/dev-python/tomlkit/metadata.xml b/dev-python/tomlkit/metadata.xml index 1a938ee652b2..0464c4b95333 100644 --- a/dev-python/tomlkit/metadata.xml +++ b/dev-python/tomlkit/metadata.xml @@ -12,6 +12,6 @@ tomlkit - sdispater/tomlkit + python-poetry/tomlkit diff --git a/dev-python/tomlkit/tomlkit-0.12.5-r1.ebuild b/dev-python/tomlkit/tomlkit-0.12.5-r1.ebuild new file mode 100644 index 000000000000..78a304867d74 --- /dev/null +++ b/dev-python/tomlkit/tomlkit-0.12.5-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=flit +PYTHON_COMPAT=( pypy3 python3_{10..13} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Style preserving TOML library" +HOMEPAGE=" + https://github.com/python-poetry/tomlkit/ + https://pypi.org/project/tomlkit/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + +BDEPEND=" + test? ( + dev-python/pyyaml[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +PATCHES=( + # https://github.com/python-poetry/tomlkit/pull/349 + "${FILESDIR}/${P}-py313.patch" +) + +src_configure() { + grep -q 'build-backend = "poetry' pyproject.toml || + die "Upstream changed build-backend, recheck" + # write a custom pyproject.toml to ease setuptools bootstrap + cat > pyproject.toml <<-EOF || die + [build-system] + requires = ["flit_core >=3.2,<4"] + build-backend = "flit_core.buildapi" + + [project] + name = "tomlkit" + version = "${PV}" + description = "Style preserving TOML library" + EOF +} + +python_test() { + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + epytest +} -- cgit v1.2.3