commit:     b031aa31015287af7828fbb85a66a566138c8afa
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  3 10:28:12 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Dec  3 10:50:25 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b031aa31

dev-python/Babel: Bump to 2.9.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/Babel/Babel-2.9.0.ebuild            | 37 ++++++++++++++++++++++++++
 dev-python/Babel/Manifest                      |  1 +
 dev-python/Babel/files/Babel-2.9.0-pypy3.patch | 33 +++++++++++++++++++++++
 3 files changed, 71 insertions(+)

diff --git a/dev-python/Babel/Babel-2.9.0.ebuild 
b/dev-python/Babel/Babel-2.9.0.ebuild
new file mode 100644
index 00000000000..b10743d637c
--- /dev/null
+++ b/dev-python/Babel/Babel-2.9.0.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( pypy3 python3_{6..9} )
+PYTHON_REQ_USE="threads(+)"
+DISTUTILS_USE_SETUPTOOLS=rdepend
+
+inherit distutils-r1
+
+DESCRIPTION="Collection of tools for internationalizing Python applications"
+HOMEPAGE="https://babel.pocoo.org/ https://pypi.org/project/Babel/";
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-python/pytz[${PYTHON_USEDEP}]
+       $(python_gen_cond_dep '
+               dev-python/backports-zoneinfo[${PYTHON_USEDEP}]
+       ' python3_{6..8} pypy3)"
+DEPEND="${DEPEND}
+       test? ( dev-python/freezegun[${PYTHON_USEDEP}] )"
+
+distutils_enable_sphinx docs
+distutils_enable_tests pytest
+
+PATCHES=(
+       "${FILESDIR}"/Babel-2.9.0-pypy3.patch
+)
+
+src_test() {
+       local -x TZ=UTC
+       distutils-r1_src_test
+}

diff --git a/dev-python/Babel/Manifest b/dev-python/Babel/Manifest
index 3239a74c302..53cefd9bb2b 100644
--- a/dev-python/Babel/Manifest
+++ b/dev-python/Babel/Manifest
@@ -1,2 +1,3 @@
 DIST Babel-2.8.0.tar.gz 8444381 BLAKE2B 
ea3757182464770f47d3253e77bece7b64c84558e7a19fc55759198bfa55c6d8156d27e9de7b796b62eefd93e458c7e00b2014dd23e4ed7383f5bc9785d1a332
 SHA512 
f9687b36176c146a8ace073197111463d24fca343bb1dbee8b0e37a7f37b68b4cd77ffbe3bf14a20f8f64c701aa860e0b5e6076658a95dbee2556f0688d68d91
 DIST Babel-2.8.1.tar.gz 8471453 BLAKE2B 
bc2e66a3c1c77e5b190cdb3f53d149268b6f49adde3040cbe6a3dd8eb98f6caffb3988232e76083e606186a87b9ee6b2b5352de89b7bc43d4f72905f1f594127
 SHA512 
ed39ad01b873d40d0bc611739761d412ff442b2df3d4c2363ec24501547da678cb752f640a02470c8513073a76c468c27fc16248820c779ef7adbe14d0f07199
+DIST Babel-2.9.0.tar.gz 8682986 BLAKE2B 
0e1e8fe647fdd27230ee9c97f0994772bd5877f262f9cd00eb450445c5780b278249f87d50f98c5ca3fa5eca287c6b4fc74c5e082c522c250d640912f0ebc581
 SHA512 
250d1a19741eb0d1bda9d6b862f2d4779b6c67f10b8e045f450a271a16587e30f26f35ccccfea8ca13bb519582d2ef83569fa4381d0590fb9b61bf3ebf67e5f6

diff --git a/dev-python/Babel/files/Babel-2.9.0-pypy3.patch 
b/dev-python/Babel/files/Babel-2.9.0-pypy3.patch
new file mode 100644
index 00000000000..45d50f5ff0b
--- /dev/null
+++ b/dev-python/Babel/files/Babel-2.9.0-pypy3.patch
@@ -0,0 +1,33 @@
+From a291ee5da29fb9767ce8dc5f94e3fa19908f2596 Mon Sep 17 00:00:00 2001
+From: Keri Volans <[email protected]>
+Date: Sun, 10 May 2020 18:43:58 +0100
+Subject: [PATCH] tests/test_dates.py: Fix broken test
+
+datetime was being incorrectly patched, so the unittest was failing
+
+Closes https://github.com/python-babel/babel/issues/675
+---
+ tests/test_dates.py | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/tests/test_dates.py b/tests/test_dates.py
+index 5be0d16a..3cd70d3e 100644
+--- a/tests/test_dates.py
++++ b/tests/test_dates.py
+@@ -761,7 +761,6 @@ def test_zh_TW_format():
+ 
+ 
+ def test_format_current_moment(monkeypatch):
+-    import datetime as datetime_module
+     frozen_instant = datetime.utcnow()
+ 
+     class frozen_datetime(datetime):
+@@ -771,7 +770,7 @@ def utcnow(cls):
+             return frozen_instant
+ 
+     # Freeze time! Well, some of it anyway.
+-    monkeypatch.setattr(datetime_module, "datetime", frozen_datetime)
++    monkeypatch.setattr(dates, "datetime_", frozen_datetime)
+     assert dates.format_datetime(locale="en_US") == 
dates.format_datetime(frozen_instant, locale="en_US")
+ 
+ 

Reply via email to