diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-08-12 18:08:24 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-08-12 18:08:24 +0100 |
commit | 8a60ccc0bb618fc402bc140a5cee6cf89addec51 (patch) | |
tree | 65afd2233c6a32062b2b52a4a901abf4f801c12d /dev-python/cattrs | |
parent | 78f20b3ec2b822f4add309f60998356f403cf879 (diff) |
gentoo auto-resync : 12:08:2023 - 18:08:23
Diffstat (limited to 'dev-python/cattrs')
-rw-r--r-- | dev-python/cattrs/Manifest | 3 | ||||
-rw-r--r-- | dev-python/cattrs/cattrs-23.1.2.ebuild | 7 | ||||
-rw-r--r-- | dev-python/cattrs/files/cattrs-23.1.2-32bit-time_t.patch | 38 |
3 files changed, 46 insertions, 2 deletions
diff --git a/dev-python/cattrs/Manifest b/dev-python/cattrs/Manifest index f89701e3f20b..d588d39ddd1a 100644 --- a/dev-python/cattrs/Manifest +++ b/dev-python/cattrs/Manifest @@ -1,7 +1,8 @@ +AUX cattrs-23.1.2-32bit-time_t.patch 1491 BLAKE2B 59138249b6c46a6a79346ba886f829c3685ae427308fc5bb5b7045ac60a2cdb73c24643acdcc890cf352aa2a75fdb21fe4bc9e511b10725ff5ce43c0da3c6ded SHA512 dc371c99d32668ecfdcb7a6514cfca50c7d2ac139219e7dae72991441065653aff81cec377f61f20f535d1836d3a7c267c0b846ee377946c3053546831cef3a7 DIST cattrs-22.2.0.gh.tar.gz 117001 BLAKE2B 34601cf48c582da2d9aa8d741a08919b5f06043bc6ba6b072d8b0934e90e781349b1325ced478ca0b42b50db1f7fe2a6d3cd16ac29609efd72c9aa894debfe9e SHA512 d198864402f56d4e9403c61ee3d9d109c5eac3350908afa1e244dbe31e4bc986271fcb4c72bde9cdaa9ee865c6a8b81de68ec0d51490ed658b410714e1fc550c DIST cattrs-23.1.1.gh.tar.gz 602294 BLAKE2B c0be7dc8979919c4d29f9bd51203d219b9d65bbaa271a38f4d1d6c705121a5c9747c3b8a29431de8ea6769baeae67323b8bd6f133f9fd6c80aa1f3bbf969b4d2 SHA512 8a048ce214ed1aa4b138164e3cd7e39fec84ee3d46f167dda402e3de0041fb0548b2e75051c63694a5baf59c78705823247e4204408f5d0b410a9aabdc68c7e3 DIST cattrs-23.1.2.gh.tar.gz 602336 BLAKE2B f39ff3c1525ea14789edd137d82343a9447de0a41f65a71ee85754a15f8fdc929137125043b23c6cd088c8b2d2e9da18577c3b6dbbb6e9a33bdf6789f117bc46 SHA512 d05c8a5d4c5dc0b69ccdf33164d44c35a37a871199a35d1c2c25f9fbd8ee53d48da8e9d9bec49cde2baf901b524d5e8ff1ade175928908ea81f94e8398224488 EBUILD cattrs-22.2.0.ebuild 1265 BLAKE2B 611c0e7707d709e4b7f68e5c5d13c225efb555e69013879ff2414c0a74ac78c76678fd3e8ebf32c980a220eefeb38dddc715a2135d32c2413ba3c32827238a79 SHA512 804d75159dfce03ab9484a8bcf44c7cc1cacce112d0c697f0513c6af4d278f74da209a8fc6ab853d425dc18f07b41bc26ff01d08ccb6d75c55067197ece86b65 EBUILD cattrs-23.1.1.ebuild 1272 BLAKE2B 3d866fd0ef5bc3f2e1ef2a399a794354be9aa3d0c055c7355cca4f00098ce87bf8dd969f6bed436ec61c6c58206163ccf32af4c6fe05e8997147fe202ae3d457 SHA512 bd327c2521f6770d79d975dab8da6a1973474215a1325b5cb440c5d2ee0e2d9f059cb9289532cd9911f7b5b3115fa6ac3d748a7fe1d2e8b6159fd6690408462e -EBUILD cattrs-23.1.2.ebuild 1791 BLAKE2B e41225638dcd2b1806c89b94f258be4054b6570bd72e26d6858a018b7b4c9253d283d0f154cd5b89ec22bb9592c93fd2e23b48996290fc51545e2f74f937e2dc SHA512 3ebe799278d9c5d1876a36e117a5406ea3de181734718b6eb75873eb2143fd0ee913fa707d34d547dc5dd808e76fdfb19140a3fbf8b9036a31c51238e7653d19 +EBUILD cattrs-23.1.2.ebuild 1903 BLAKE2B 808575b63a556c311d2838f62f3056a20ac094d479f93d8cdc0d07eff9314e10586c0abf627c5b01f72727fe6d60028ef9bdbeeb4fcb7e773801d1e775b776aa SHA512 10ea705fe314fc618919e8280d5cc08e09c3bab1b97b48e81689656e0c147d79524c4e2a819b9b3d742a3d895294f00c8e67cbc75e5326cca96353dc5a036ee5 MISC metadata.xml 347 BLAKE2B 94165f2a8e62f3dc7e195f872944300ffff5ba23b9a7e6c30c18d61bc469ea8ff9b70e516f854bfc52d55a0fd27daff0df58145e34bfe26dbcde8070b8a22630 SHA512 5bb37b39b9574256358a623cff942a95162f5f9dcb32ddf28bd167504c7619be54488fae10044a5c765291f8fa28a5aa346973365dcca867be0eef4e232a4999 diff --git a/dev-python/cattrs/cattrs-23.1.2.ebuild b/dev-python/cattrs/cattrs-23.1.2.ebuild index 73ac1770e24c..1d859d02cd96 100644 --- a/dev-python/cattrs/cattrs-23.1.2.ebuild +++ b/dev-python/cattrs/cattrs-23.1.2.ebuild @@ -20,7 +20,7 @@ SRC_URI=" LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~arm64" +KEYWORDS="amd64 ~arm64" IUSE="test-rust" RDEPEND=" @@ -50,6 +50,11 @@ BDEPEND=" distutils_enable_tests pytest src_prepare() { + local PATCHES=( + # https://github.com/python-attrs/cattrs/pull/415 + "${FILESDIR}/${P}-32bit-time_t.patch" + ) + sed -e 's:--benchmark.*::' \ -e '/addopts/d' \ -i pyproject.toml || die diff --git a/dev-python/cattrs/files/cattrs-23.1.2-32bit-time_t.patch b/dev-python/cattrs/files/cattrs-23.1.2-32bit-time_t.patch new file mode 100644 index 000000000000..68d1606c7b31 --- /dev/null +++ b/dev-python/cattrs/files/cattrs-23.1.2-32bit-time_t.patch @@ -0,0 +1,38 @@ +From 1b001c30090876dd9cefa3aefac8218ad78222c0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Sat, 12 Aug 2023 18:04:07 +0200 +Subject: [PATCH] Fix typeddict tests on systems with 32-bit time_t + +Reduce the range of generated `datetime` instances to values valid +for 32-bit `time_t` range, as otherwise multiple tests fail with errors +such as: + + FAILED tests/test_typeddicts.py::test_simple_roundtrip - OverflowError: timestamp out of range for platform time_t + +This is based on an earlier fix for `test_preconf.py`, +see a0e56f43f061c43814d6f938833d1c325ed61525 +and c58028789454fc7a9b459b94c214cab2ab1acb81. + +Originally reported as https://bugs.gentoo.org/912187. +--- + tests/typeddicts.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/tests/typeddicts.py b/tests/typeddicts.py +index d7f8141..4f7804d 100644 +--- a/tests/typeddicts.py ++++ b/tests/typeddicts.py +@@ -59,7 +59,9 @@ def int_attributes( + def datetime_attributes( + draw: DrawFn, total: bool = True, not_required: bool = False + ) -> Tuple[datetime, SearchStrategy, SearchStrategy]: +- success_strat = datetimes().map(lambda dt: dt.replace(microsecond=0)) ++ success_strat = datetimes( ++ min_value=datetime(1970, 1, 1), max_value=datetime(2038, 1, 1) ++ ).map(lambda dt: dt.replace(microsecond=0)) + type = datetime + strat = success_strat if total else success_strat | just(NOTHING) + if not_required and draw(booleans()): +-- +2.41.0 + |