10 Commits

Author SHA256 Message Date
8d5b01e19e Accepting request 1295860 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1295860
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Babel?expand=0&rev=48
2025-07-27 14:26:16 +00:00
d504784754 Accepting request 1295211 from home:bmwiedemann:reproducible:test
Add reproducible.patch to normalize date in .po (boo#1047218)

not sure how easy it is to get upstream.
There is some poor interaction of this variable with freeze_gun tests.

OBS-URL: https://build.opensuse.org/request/show/1295211
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Babel?expand=0&rev=91
2025-07-26 05:15:02 +00:00
5783ae3640 Accepting request 1242836 from devel:languages:python
- update to 2.17.0:
  * CLDR: Babel now uses CLDR 46, by @tomasr8 in :gh:`1145`
  * Dates: Allow specifying an explicit format in
    parse_date/parse_time by @tomasr8 in :gh:`1131`
  * Dates: More alternate characters are now supported by
    format_skeleton. By @tomasr8 in :gh:`1122`
  * Dates: Support short and narrow formats for format_timedelta
    when using add_direction, by @akx in :gh:`1163`
  * Messages: .po files now enclose white spaces in filenames
    like GNU gettext does. By @Dunedan in :gh:`1105`, and
    @tomasr8 in :gh:`1120`
  * Messages: Initial support for Message.python_brace_format, by
    @tomasr8 in :gh:`1169`
  * Numbers: LC_MONETARY is now preferred when formatting
    currencies, by @akx in :gh:`1173`
  * Dates: Make seconds optional in parse_time time formats by
    @tomasr8 in :gh:`1141`
  * Dates: Replace str.index with str.find by @tomasr8 in
    :gh:`1130`
  * Dates: Strip extra leading slashes in /etc/localtime by @akx
    in :gh:`1165`
  * Dates: Week numbering and formatting of dates with week
    numbers was repaired by @jun66j5 in :gh:`1179`
  * General: Improve handling for locale=None by @akx in
    :gh:`1164`
  * General: Remove redundant assignment in Catalog.__setitem__
    by @tomasr8 in :gh:`1167`
  * Messages: Fix extracted lineno with nested calls, by
    @dylankiss in :gh:`1126`
  * Messages: Fix of list index out of range when translations is

OBS-URL: https://build.opensuse.org/request/show/1242836
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Babel?expand=0&rev=47
2025-02-04 17:10:02 +00:00
c6f5e22a27 - update to 2.17.0:
* CLDR: Babel now uses CLDR 46, by @tomasr8 in :gh:`1145`
  * Dates: Allow specifying an explicit format in
    parse_date/parse_time by @tomasr8 in :gh:`1131`
  * Dates: More alternate characters are now supported by
    format_skeleton. By @tomasr8 in :gh:`1122`
  * Dates: Support short and narrow formats for format_timedelta
    when using add_direction, by @akx in :gh:`1163`
  * Messages: .po files now enclose white spaces in filenames
    like GNU gettext does. By @Dunedan in :gh:`1105`, and
    @tomasr8 in :gh:`1120`
  * Messages: Initial support for Message.python_brace_format, by
    @tomasr8 in :gh:`1169`
  * Numbers: LC_MONETARY is now preferred when formatting
    currencies, by @akx in :gh:`1173`
  * Dates: Make seconds optional in parse_time time formats by
    @tomasr8 in :gh:`1141`
  * Dates: Replace str.index with str.find by @tomasr8 in
    :gh:`1130`
  * Dates: Strip extra leading slashes in /etc/localtime by @akx
    in :gh:`1165`
  * Dates: Week numbering and formatting of dates with week
    numbers was repaired by @jun66j5 in :gh:`1179`
  * General: Improve handling for locale=None by @akx in
    :gh:`1164`
  * General: Remove redundant assignment in Catalog.__setitem__
    by @tomasr8 in :gh:`1167`
  * Messages: Fix extracted lineno with nested calls, by
    @dylankiss in :gh:`1126`
  * Messages: Fix of list index out of range when translations is

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Babel?expand=0&rev=89
2025-02-03 13:39:23 +00:00
c30051da8b Accepting request 1208529 from devel:languages:python
- Clean up {Build,}Requires to match reality.

OBS-URL: https://build.opensuse.org/request/show/1208529
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Babel?expand=0&rev=46
2024-10-18 13:52:51 +00:00
717f8c4638 - Clean up {Build,}Requires to match reality.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Babel?expand=0&rev=87
2024-10-17 04:20:17 +00:00
8961826167 Accepting request 1206128 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1206128
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Babel?expand=0&rev=45
2024-10-08 15:22:58 +00:00
a2f49edfa1 Accepting request 1206071 from home:glaubitz:branches:devel:languages:python
- Update to 2.16.0
  * CLDR: Upgrade to CLDR 45
  * Lists: Support list format fallbacks
  * Messages: Initial support for reading mapping configuration as TOML
  * CLDR: Do not allow substituting alternates or drafts in derived locales
  * Core: Allow falling back to modifier-less locale data
  * Core: Allow use of importlib.metadata for finding entrypoints
  * Dates: Avoid crashing on importing localtime when TZ is malformed
  * Messages: Allow parsing .po files that have an extant but empty Language header
  * Messages: Fix ``--ignore-dirs`` being incorrectly read
  * Messages: Make pgettext search plurals when translation is not found
  * Replace deprecated `ast.Str` with `ast.Constant`
  * CI fixes
  * Test on Python 3.13 beta releases
  * Normalize package name to lower-case in setup.py
  * Add a mention to the docs that `format_skeleton(..., fuzzy=True)` may raise
  * Two hyperlinks (to CLDR) and some typos
- Adjust filename for dist file in %files section

OBS-URL: https://build.opensuse.org/request/show/1206071
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Babel?expand=0&rev=85
2024-10-07 14:47:21 +00:00
4879e2caa8 Accepting request 1187612 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1187612
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Babel?expand=0&rev=44
2024-07-16 20:02:23 +00:00
659db6ab17 Accepting request 1187543 from home:glaubitz:branches:devel:languages:python
- Update to 2.15.0
  * Babel 2.15.0 will require Python 3.8 or newer
  * CLDR: Upgrade to CLDR 44
  * Dates: Support for the "fall back to short format"
    logic for time delta formatting
  * Message: More versatile .po IO functions
  * Numbers: Improved support for alternate spaces
    when parsing numbers
  * Upgrade GitHub Actions
  * The Unicode license is now included in `locale-data`
    and in the documentation
- Adjust upstream source name in spec file

OBS-URL: https://build.opensuse.org/request/show/1187543
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Babel?expand=0&rev=83
2024-07-15 18:42:17 +00:00
3 changed files with 31 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jul 23 06:34:38 UTC 2025 - Bernhard Wiedemann <bwiedemann@suse.de>
- Add reproducible.patch to normalize date in .po (boo#1047218)
-------------------------------------------------------------------
Mon Feb 3 13:38:56 UTC 2025 - Dirk Müller <dmueller@suse.com>

View File

@@ -32,6 +32,7 @@ Summary: Internationalization utilities
License: BSD-3-Clause
URL: https://babel.pocoo.org/
Source: https://files.pythonhosted.org/packages/source/b/babel/babel-%{version}.tar.gz
Patch0: reproducible.patch
BuildRequires: %{python_module freezegun >= 1.0}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest >= 6.0}
@@ -73,6 +74,7 @@ A collection of tools for internationalizing Python applications.
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
unset SOURCE_DATE_EPOCH
%pytest
%pre

24
reproducible.patch Normal file
View File

@@ -0,0 +1,24 @@
diff --git a/babel/messages/catalog.py b/babel/messages/catalog.py
index f84a5bd..786d1a4 100644
--- a/babel/messages/catalog.py
+++ b/babel/messages/catalog.py
@@ -11,6 +11,8 @@ from __future__ import annotations
import datetime
import re
+import time
+import os
from collections.abc import Iterable, Iterator
from copy import copy
from difflib import SequenceMatcher
@@ -385,7 +387,9 @@ class Catalog:
self.charset = charset or 'utf-8'
if creation_date is None:
- creation_date = datetime.datetime.now(LOCALTZ)
+ creation_date = datetime.datetime.utcfromtimestamp(
+ int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))
+ )
elif isinstance(creation_date, datetime.datetime) and not creation_date.tzinfo:
creation_date = creation_date.replace(tzinfo=LOCALTZ)
self.creation_date = creation_date