-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update python-Babel to version 2.12.1 / rev 40 via SR 1085498
https://build.opensuse.org/request/show/1085498 by user dgarcia + dimstar_suse - Add fix-tests.patch to make tests work with EST/EDT swap, gh#python-babel/babel#988 - Update to 2.12.1: * Include py.typed file in wheels by @AlexWaygood in #975 * Become 2.12.1 by @akx in #976 - 2.12.0: * docs(changes): Fix broken issue links by @DenverCoder1 in #922 * Update docs build configuration by @akx in #924 * feat: Adds Format.compact_decimal utility by @DenverCoder1 in #921 * Remove vestigial Python 2 long check by @akx in #925 * feat: Support for short compact currency formats by @DenverCoder1 in #926 * Drop support for EOL Python 3.6 by @akx in #919 * Cast number to Decimal in _get_compact_format by @DenverCoder1 in #930 * Replace %/.format/concatenation with f-strings where feasible by @akx in #927 * ci: Fix testing dependencies by @DenverCoder1 in #9
- Loading branch information
1 parent
f6488a9
commit 3fc200a
Showing
7 changed files
with
144 additions
and
4 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/ipfs/bafybeibxxzxtptb45fycdzymp3vis54hipovwp4kuv7oiy72ia6fe6sdpq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
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(-) | ||
|
||
Index: Babel-2.12.1/tests/test_dates.py | ||
=================================================================== | ||
--- Babel-2.12.1.orig/tests/test_dates.py | ||
+++ Babel-2.12.1/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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters