From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] python3-Babel: update to 2.12.1.
Date: Mon, 17 Apr 2023 20:23:52 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43497@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1946 bytes --]
There is a new pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages python3-Babel
https://github.com/void-linux/void-packages/pull/43497
python3-Babel: update to 2.12.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
Using sphinx with current version of `python3-Babel` gives the following deprecation warning :
```
$ python -Wonce -c 'import sphinx.application'
/usr/lib/python3.11/site-packages/babel/messages/catalog.py:13: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
from cgi import parse_header
```
The update fixes this. I had to include https://github.com/python-babel/babel/pull/998 so tests pass, since it only touches test code I think its safe to include.
I found this while doctesting sagemath. A bunch of tests fail because of this deprecation warning, and after this update everything passes.
Cc: @sgn, since this affects `python3-Sphinx`.
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/43497.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-python3-Babel-43497.patch --]
[-- Type: text/x-diff, Size: 3398 bytes --]
From c13114023863a1ab1803f5721820fdd4260fa8b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
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?= <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 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
next reply other threads:[~2023-04-17 18:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 18:23 tornaria [this message]
2023-04-24 0:32 ` tornaria
2023-04-25 13:13 ` tornaria
2023-04-25 15:37 ` sgn
2023-04-25 15:53 ` [PR PATCH] [Updated] " tornaria
2023-04-25 15:54 ` tornaria
2023-04-25 21:23 ` [PR PATCH] [Updated] " tornaria
2023-04-27 2:37 ` tornaria
2023-04-28 20:28 ` tornaria
2023-04-28 21:39 ` [PR PATCH] [Merged]: " sgn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43497@inbox.vuxu.org \
--to=tornaria@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).