diff options
Diffstat (limited to 'dev-python/Babel')
-rw-r--r-- | dev-python/Babel/Babel-2.12.1.ebuild | 4 | ||||
-rw-r--r-- | dev-python/Babel/Manifest | 3 | ||||
-rw-r--r-- | dev-python/Babel/files/Babel-2.12.1-dst-test.patch | 46 |
3 files changed, 52 insertions, 1 deletions
diff --git a/dev-python/Babel/Babel-2.12.1.ebuild b/dev-python/Babel/Babel-2.12.1.ebuild index 818272ef77fa..943a3ce6af7f 100644 --- a/dev-python/Babel/Babel-2.12.1.ebuild +++ b/dev-python/Babel/Babel-2.12.1.ebuild @@ -44,6 +44,10 @@ distutils_enable_sphinx docs distutils_enable_tests pytest src_prepare() { + local PATCHES=( + "${FILESDIR}/${P}-dst-test.patch" + ) + rm babel/locale-data/*.dat || die rm babel/global.dat || die distutils-r1_src_prepare diff --git a/dev-python/Babel/Manifest b/dev-python/Babel/Manifest index 0447d02cf525..72c95dd60e71 100644 --- a/dev-python/Babel/Manifest +++ b/dev-python/Babel/Manifest @@ -1,8 +1,9 @@ AUX Babel-2.11.0-sphinx-6.patch 983 BLAKE2B abd902e9b37f4c67a2697a6405a9559b0b2e0f19a3f1439e1460d11343974000b35e4519b6180c8e2f9d45cd8141f9a5e93c451ab32207573cf87b7163066221 SHA512 9b428ac9f53b420d3081cc7eb560fb24f9ebc2db4eff2fd12fe7e51626dc95f449173cfbf51096d442dc0f0983f086d3430ab21202560bb084d6fa0c62e20e2b +AUX Babel-2.12.1-dst-test.patch 1853 BLAKE2B 6438546ad48083839b8c3da4ff1a3af1dca97aa8fa80f5bcb97fe5e582d74d0766c3d2eb7b239fc558d872d3ce1aac64db7adee88ce5989452ff55962399bb35 SHA512 83018914dcb8a36cbc27bf4f698d72541627c17a5a162094e8aeaac970ac588b161938bed7c12a15f926b59b63cd1ea6985da82bb8827ac18c6a47d16f2f67a2 DIST Babel-2.11.0.tar.gz 9346097 BLAKE2B 99ae97e4dc16e1757ae6f054f9f346c6728d087bbfba33786d59211ac4b6c12bf861c79ac7c12a3efd89539220126ea1ea9a3578a9008daaa464aed315102b60 SHA512 526368dc5e44f2d93c52f2fcb544130eea6c6b7c78325bd56c6d9a6706890a4cd9daa1498d639aab65059801d87977da626e64585083c58c4b328001991eea0b DIST Babel-2.12.1.tar.gz 9906735 BLAKE2B d78838f9a2032eae998f1d751ad803fec81c03be498db934e34e0702d28e0815a7848e55af73ea4dff45e3cf063b9e45ab06c749b8d3f15b7742e209bf3d06ef SHA512 93c4bf343d99a1f47f43f8b828eb79098cb429bac1034d58b5aa49adff68116e458067f3784d997f34515828a7432fd18f7abbaeee59b47a4ee8ea744908b33b DIST cldr-common-41.0.zip 29364494 BLAKE2B 1960e860017c3e5f31d935d66a1ff551720975dca0af459adc72b8dc54100938fbd2d2ef00eb457f3fd04d4f1e90a4783229c350b125029dcda5c1e6903f9a54 SHA512 c64f3338e292962817b043dd11e9c47f533c9b70d432f83e80654e20f4937c72b37e66a60485df43f734b1ff94ebf0452547a063076917889303c9653b4d6ce5 DIST cldr-common-42.0.zip 30178050 BLAKE2B 076e3eca12534feff8e0e54bdc1fa38fc0db0f78cac8b4e35b343763a8ac6787745aa36be165684f4d6dda423409c4431a8e4941c53ae7d340ead0b35edbca30 SHA512 315448fe6a9ac2d5a6a7fd1a27b38c5db30fed053654a803d50e3a8d06aa08ad153e8e57089fa094c561f41a54f37eecda0701b47a1813879902be71945aa38a EBUILD Babel-2.11.0.ebuild 1412 BLAKE2B 2848c8cbe3ee7373d29be5d58f7e4de2a11bf1d31b11617c8c7b1185a4e59e2379c3bbc9136870dfd143e9b7e8639e28fbea5fd1c29d68f64d5ae93c8100457e SHA512 676b287df6475892a20057b108d16c660c998e102b1ec821b2d62bd77012f00f63591d4b0a8aa6895931ef1f7ed8dc748dbedbbaec35b6e0bf334039448d32ba -EBUILD Babel-2.12.1.ebuild 1320 BLAKE2B 801afa7de5be408c19ac57a20bc7b41a96588028606a770c830a7e202a61e1d42efb1944514dc599082a286b15bdc9229390a3f735c311b681c20747cb9acf81 SHA512 680f3a8e3fc4851c91f11042b72ae21c7270150ba554c5b535ec970ab5022090580d957568df6b0feeb33d146cceff73f79560a713693c30eb7ed9230eb06c1f +EBUILD Babel-2.12.1.ebuild 1377 BLAKE2B c7bc6c3d2daf10e254425195365e97148534c9c4b8440f093f487413782b064880cf1344cfbd2181b6711e0ff68ab087f3bdfa692993f47e37ec013ab69d9564 SHA512 ba7e601a3d32e9915d01d5b7a6a974b47c95bf707692b0e0b2157ff680ed6e8f2d451c8c8ca71a062cf7d24429e6af9b60e852bc31c3ec179a3d1277cc4e8080 MISC metadata.xml 840 BLAKE2B b0f46186ca0a319d3e4e1a658007b2cc59fe3a3ea9ede567af5084593f907e88dbe714d2b70c6a882ec95a5f90d4c0e3620ea0a939ad6e52650e770de88a45ba SHA512 621b66293259fd20c94a62ecf64673f7afcd714c18f054c8c0afe2d14e6e98c8abbdf6b4c5cc0043b5d30e513acab292d85c5587a02a9ae99ca007a28720c921 diff --git a/dev-python/Babel/files/Babel-2.12.1-dst-test.patch b/dev-python/Babel/files/Babel-2.12.1-dst-test.patch new file mode 100644 index 000000000000..2a732854e7b1 --- /dev/null +++ b/dev-python/Babel/files/Babel-2.12.1-dst-test.patch @@ -0,0 +1,46 @@ +From 641f58c9951d9f5746cd63743dd337f1340d7bff Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Fri, 7 Apr 2023 14:51:10 +0000 +Subject: [PATCH] Freeze format_time() tests to a specific date to fix test + failures + +Freeze the date when performing the tests for format_time() with +a timezone specified. Since the time object does not specify a date, +the formatter uses the format string specific to the current date. +As a result, if the current DST state is different than when the test +was last updated, it failed. + +This fix covers only regular tests. I have no idea how to do the same +for doctests. + +Issue #988 +--- + tests/test_dates.py | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/tests/test_dates.py b/tests/test_dates.py +index b94c710..3f1fc3f 100644 +--- a/tests/test_dates.py ++++ b/tests/test_dates.py +@@ -601,12 +601,13 @@ def test_format_time(timezone_getter): + custom = dates.format_time(t, "hh 'o''clock' a, zzzz", tzinfo=eastern, locale='en') + assert custom == "09 o'clock AM, Eastern Daylight Time" + +- t = time(15, 30) +- paris = dates.format_time(t, format='full', tzinfo=paris, locale='fr_FR') +- assert paris == '15:30:00 heure normale d’Europe centrale' ++ with freezegun.freeze_time("2023-01-01"): ++ t = time(15, 30) ++ paris = dates.format_time(t, format='full', tzinfo=paris, locale='fr_FR') ++ assert paris == '15:30:00 heure normale d’Europe centrale' + +- us_east = dates.format_time(t, format='full', tzinfo=eastern, locale='en_US') +- assert us_east == '3:30:00\u202fPM Eastern Standard Time' ++ us_east = dates.format_time(t, format='full', tzinfo=eastern, locale='en_US') ++ assert us_east == '3:30:00\u202fPM Eastern Standard Time' + + + def test_format_skeleton(timezone_getter): +-- +2.40.0 + |