From c13114023863a1ab1803f5721820fdd4260fa8b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Mon, 17 Apr 2023 14:31:03 -0300 Subject: [PATCH] python3-Babel: update to 2.12.1. --- srcpkgs/python3-Babel/patches/998.patch | 43 +++++++++++++++++++++++++ srcpkgs/python3-Babel/template | 6 ++-- 2 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/python3-Babel/patches/998.patch diff --git a/srcpkgs/python3-Babel/patches/998.patch b/srcpkgs/python3-Babel/patches/998.patch new file mode 100644 index 000000000000..4779f907a9dd --- /dev/null +++ b/srcpkgs/python3-Babel/patches/998.patch @@ -0,0 +1,43 @@ +From 641f58c9951d9f5746cd63743dd337f1340d7bff Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +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 b94c710f..3f1fc3fc 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): diff --git a/srcpkgs/python3-Babel/template b/srcpkgs/python3-Babel/template index 4f2dc8425795..46530ba596e3 100644 --- a/srcpkgs/python3-Babel/template +++ b/srcpkgs/python3-Babel/template @@ -1,7 +1,7 @@ # Template file for 'python3-Babel' pkgname=python3-Babel -version=2.10.3 -revision=2 +version=2.12.1 +revision=1 build_style=python3-module hostmakedepends="python3-setuptools" depends="python3-pytz" @@ -12,7 +12,7 @@ license="BSD-3-Clause" homepage="https://babel.pocoo.org" changelog="https://raw.githubusercontent.com/python-babel/babel/master/CHANGES.rst" distfiles="${PYPI_SITE}/B/Babel/Babel-${version}.tar.gz" -checksum=7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51 +checksum=cc2d99999cd01d44420ae725a21c9e3711b3aadc7976d6147f622d8581963455 post_install() { vlicense LICENSE