public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/freezegun/, dev-python/freezegun/files/
@ 2019-11-22  0:20 Patrick McLean
  0 siblings, 0 replies; 5+ messages in thread
From: Patrick McLean @ 2019-11-22  0:20 UTC (permalink / raw
  To: gentoo-commits

commit:     01360803571fe4a544dd2d0778e8d1f5c1147d1f
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Thu Nov 21 23:51:12 2019 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Thu Nov 21 23:55:12 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01360803

dev-python/freezegun: Version bump to 0.3.12, add py38

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-python/freezegun/Manifest                      |   1 +
 .../freezegun/files/freezegun-0.3.12-py38.patch    | 122 +++++++++++++++++++++
 .../freezegun/files/freezegun-0.3.12-tests.patch   |  13 +++
 dev-python/freezegun/freezegun-0.3.12.ebuild       |  46 ++++++++
 4 files changed, 182 insertions(+)

diff --git a/dev-python/freezegun/Manifest b/dev-python/freezegun/Manifest
index 42cafd7ad32..6810f911570 100644
--- a/dev-python/freezegun/Manifest
+++ b/dev-python/freezegun/Manifest
@@ -1,2 +1,3 @@
 DIST freezegun-0.3.10.tar.gz 20398 BLAKE2B 971f4f3de565878b8a1e4671160f41cc7c558f5c848f5c79dfc48e3f3e3cb71ff9c71090705167d4252edbfee040ef52a7eafd33073011c07337311a7e0ec366 SHA512 64364459dc72484e2124a20a0a84d2b88617efd0578fba687adb51635d578a1e36a00cb119998082610c608e7b6c3589bff5424e38845bad026e85449c8065a5
 DIST freezegun-0.3.11.tar.gz 23382 BLAKE2B 759cc0355c8600fc46124dfb73b46a771de5cae4e66f5826c175295da96190920d7ff45b6457a061276c0c698bd448e294f29f3b89a0ed8fe76db58e1180b080 SHA512 e8b392176641d52f6ed795c9af5fbc0a62892aeedf32b42375b56ab44a9ad7a5ecd3bb81363ed0ae65204aff2ef894cd7f2e17f42be72f31d3409b2bffa59ab8
+DIST freezegun-0.3.12.tar.gz 24346 BLAKE2B 09d7c662a82d7b7fa6ae56c09bff0d73e2b63fba2b492620cd8e68ee06a15129a7e901418d1881e65b440babcfe0d014ad3574ab8dd2c7eab8486b3d868273ac SHA512 f7d98ea84735b24380fa53e1e62622fe91be5a35cb75221ca4cb02418add9b0a4add9b2f691242be75acbc45d4745fef82ffe3c89890dcdffa4405940e527af4

diff --git a/dev-python/freezegun/files/freezegun-0.3.12-py38.patch b/dev-python/freezegun/files/freezegun-0.3.12-py38.patch
new file mode 100644
index 00000000000..d35303bf9fe
--- /dev/null
+++ b/dev-python/freezegun/files/freezegun-0.3.12-py38.patch
@@ -0,0 +1,122 @@
+commit 4d998c9d6b130ed4e2d54cb96b010fec749a9c59
+Author: xtreak <tir.karthi@gmail.com>
+Date:   Wed Jun 19 14:54:22 2019 +0000
+
+    Patch time.time_ns to support Python 3.8
+
+diff --git a/CHANGELOG b/CHANGELOG
+index efac4d3..14d96be 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -11,6 +11,7 @@ Latest
+ * Ignore Selenium
+ * Move to pytest
+ * Conditionally patch time.clock
++* Patch time.time_ns added in Python 3.7
+ 
+ 0.3.11
+ ------
+@@ -57,4 +58,4 @@ Latest
+ 
+ * Add `tick` argument to allow time to move forward
+ * Performance improvements
+-* Fix timezone example in README
+\ No newline at end of file
++* Fix timezone example in README
+diff --git a/freezegun/api.py b/freezegun/api.py
+index 5e7d7fa..bc61270 100644
+--- a/freezegun/api.py
++++ b/freezegun/api.py
+@@ -20,6 +20,7 @@ try:
+ except ImportError:
+     MayaDT = None
+ 
++_TIME_NS_PRESENT = hasattr(time, 'time_ns')
+ 
+ real_time = time.time
+ real_localtime = time.localtime
+@@ -28,6 +29,11 @@ real_strftime = time.strftime
+ real_date = datetime.date
+ real_datetime = datetime.datetime
+ real_date_objects = [real_time, real_localtime, real_gmtime, real_strftime, real_date, real_datetime]
++
++if _TIME_NS_PRESENT:
++    real_time_ns = time.time_ns
++    real_date_objects.append(real_time_ns)
++
+ _real_time_object_ids = set(id(obj) for obj in real_date_objects)
+ 
+ # time.clock is deprecated and was removed in Python 3.8
+@@ -175,6 +181,12 @@ def fake_time():
+     current_time = get_current_time()
+     return calendar.timegm(current_time.timetuple()) + current_time.microsecond / 1000000.0
+ 
++if _TIME_NS_PRESENT:
++    def fake_time_ns():
++        if _should_use_real_time():
++            return real_time_ns()
++        return int(int(fake_time()) * 1e9)
++
+ 
+ def fake_localtime(t=None):
+     if t is not None:
+@@ -331,7 +343,7 @@ class FakeDatetime(with_metaclass(FakeDatetimeMeta, real_datetime, FakeDate)):
+ 
+     def date(self):
+         return date_to_fakedate(self)
+-    
++
+     @property
+     def nanosecond(self):
+         try:
+@@ -599,6 +611,10 @@ class _freeze_time(object):
+             ('real_time', real_time, fake_time),
+         ]
+ 
++        if _TIME_NS_PRESENT:
++            time.time_ns = fake_time_ns
++            to_patch.append(('real_time_ns', real_time_ns, fake_time_ns))
++
+         if real_clock is not None:
+             # time.clock is deprecated and was removed in Python 3.8
+             time.clock = fake_clock
+@@ -741,7 +757,7 @@ def freeze_time(time_to_freeze=None, tz_offset=0, ignore=None, tick=False, as_ar
+     ignore.append('selenium')
+     ignore.append('_pytest.terminal.')
+     ignore.append('_pytest.runner.')
+-    
++
+     return _freeze_time(time_to_freeze, tz_offset, ignore, tick, as_arg, auto_tick_seconds)
+ 
+ 
+diff --git a/tests/test_datetimes.py b/tests/test_datetimes.py
+index cfef4a1..688fdce 100644
+--- a/tests/test_datetimes.py
++++ b/tests/test_datetimes.py
+@@ -19,6 +19,7 @@ except ImportError:
+ 
+ # time.clock was removed in Python 3.8
+ HAS_CLOCK = hasattr(time, 'clock')
++HAS_TIME_NS = hasattr(time, 'time_ns')
+ 
+ class temp_locale(object):
+     """Temporarily change the locale."""
+@@ -656,3 +657,18 @@ def test_should_use_real_time():
+         assert time.gmtime() != expected_frozen_gmt
+         if HAS_CLOCK:
+             assert time.clock() != expected_clock
++
++
++@pytest.mark.skipif(not HAS_TIME_NS,
++                    reason="time.time_ns is present only on 3.7 and above")
++def test_time_ns():
++    freezer = freeze_time("2012-01-14")
++    local_time = datetime.datetime(2012, 1, 14)
++    utc_time = local_time - datetime.timedelta(seconds=time.timezone)
++    expected_timestamp = time.mktime(utc_time.timetuple())
++
++    freezer.start()
++    assert time.time() == expected_timestamp
++    assert time.time_ns() == expected_timestamp * 1e9
++    freezer.stop()
++    assert time.time() != expected_timestamp

diff --git a/dev-python/freezegun/files/freezegun-0.3.12-tests.patch b/dev-python/freezegun/files/freezegun-0.3.12-tests.patch
new file mode 100644
index 00000000000..08543fc7d59
--- /dev/null
+++ b/dev-python/freezegun/files/freezegun-0.3.12-tests.patch
@@ -0,0 +1,13 @@
+diff --git a/tests/test_datetimes.py b/tests/test_datetimes.py
+index 688fdce..a61484d 100644
+--- a/tests/test_datetimes.py
++++ b/tests/test_datetimes.py
+@@ -18,7 +18,7 @@ except ImportError:
+     maya = None
+ 
+ # time.clock was removed in Python 3.8
+-HAS_CLOCK = hasattr(time, 'clock')
++HAS_CLOCK = hasattr(time, 'clock') and getattr(time, 'clock') is not None
+ HAS_TIME_NS = hasattr(time, 'time_ns')
+ 
+ class temp_locale(object):

diff --git a/dev-python/freezegun/freezegun-0.3.12.ebuild b/dev-python/freezegun/freezegun-0.3.12.ebuild
new file mode 100644
index 00000000000..d33a914e745
--- /dev/null
+++ b/dev-python/freezegun/freezegun-0.3.12.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python{2_7,3_{5,6,7,8}} pypy{,3} )
+
+inherit distutils-r1
+
+DESCRIPTION="Let your Python tests travel through time"
+HOMEPAGE="https://github.com/spulec/freezegun"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="test"
+
+RDEPEND="
+	>dev-python/python-dateutil-2.0[${PYTHON_USEDEP}]
+	dev-python/six[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}
+	dev-python/setuptools[${PYTHON_USEDEP}]
+	test? (
+		$(python_gen_impl_dep sqlite)
+		dev-python/mock[${PYTHON_USEDEP}]
+		dev-python/nose[${PYTHON_USEDEP}]
+	)
+"
+
+PATCHES=(
+	# pulled from upstream git, will be in next release
+	"${FILESDIR}/freezegun-0.3.12-py38.patch"
+
+	# test fixes
+	"${FILESDIR}/freezegun-0.3.12-tests.patch"
+)
+
+distutils_enable_tests pytest
+
+python_prepare() {
+	# optional and only works with python3
+	if ! python_is_python3; then
+		rm ${PN}/_async.py || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/freezegun/, dev-python/freezegun/files/
@ 2020-03-04 12:33 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2020-03-04 12:33 UTC (permalink / raw
  To: gentoo-commits

commit:     20cfdf92b93178d461ca1fe158cf1edaf24473c1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  4 12:28:31 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Mar  4 12:28:31 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20cfdf92

dev-python/freezegun: Remove redundant versions

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

 dev-python/freezegun/Manifest                      |  3 --
 .../freezegun/files/freezegun-0.3.10-py37.patch    | 58 ----------------------
 dev-python/freezegun/freezegun-0.3.10.ebuild       | 38 --------------
 dev-python/freezegun/freezegun-0.3.13.ebuild       | 46 -----------------
 dev-python/freezegun/freezegun-0.3.14.ebuild       | 46 -----------------
 5 files changed, 191 deletions(-)

diff --git a/dev-python/freezegun/Manifest b/dev-python/freezegun/Manifest
index 46381f191d1..6445e30d280 100644
--- a/dev-python/freezegun/Manifest
+++ b/dev-python/freezegun/Manifest
@@ -1,5 +1,2 @@
-DIST freezegun-0.3.10.tar.gz 20398 BLAKE2B 971f4f3de565878b8a1e4671160f41cc7c558f5c848f5c79dfc48e3f3e3cb71ff9c71090705167d4252edbfee040ef52a7eafd33073011c07337311a7e0ec366 SHA512 64364459dc72484e2124a20a0a84d2b88617efd0578fba687adb51635d578a1e36a00cb119998082610c608e7b6c3589bff5424e38845bad026e85449c8065a5
 DIST freezegun-0.3.12.tar.gz 24346 BLAKE2B 09d7c662a82d7b7fa6ae56c09bff0d73e2b63fba2b492620cd8e68ee06a15129a7e901418d1881e65b440babcfe0d014ad3574ab8dd2c7eab8486b3d868273ac SHA512 f7d98ea84735b24380fa53e1e62622fe91be5a35cb75221ca4cb02418add9b0a4add9b2f691242be75acbc45d4745fef82ffe3c89890dcdffa4405940e527af4
-DIST freezegun-0.3.13.tar.gz 25419 BLAKE2B 8334f921609463bcb18779b61b234bb80406924578ccd43ca1f4a10c65eddf87f399fa7fb285453808988c6f74331345a373cbdcb29f3bd412f3a9e472fce43c SHA512 682f689c475ee574e7a466bfa102b96545cd8b7f095c4b5bdfda496ef667c712248db414d66c9f17fdb1a492c0deeb87a07d8b2a4128d7fdd771f89d5ea8277f
-DIST freezegun-0.3.14.tar.gz 25327 BLAKE2B d96dd84e73e1cd0fdcb8846d97901260aeab80b8ee1d1cc35715073df9693238b8b4e8b8163c6b70daf828f0f7f9e13e202ff99f3325871faca3c4a4331d63cb SHA512 960e63206622bbbc378a64a62c9c849cda1380c63c148588a10347c1bc6414aebffbbbca6c53e734c8651824688c38b47aa71192d94edaac0422caebf4b1cb8c
 DIST freezegun-0.3.15.tar.gz 25530 BLAKE2B 866736cfe556da50f8edba55b0b84c7365e6a1bf32d88e84dfcee6046474b30a9ea15522c3356c5ca30f9a8b79096ba17fdaab240f20e4ef1f91b25ec8262716 SHA512 9f3836f8c9f207d9bccbcaec3f1af977b26aa3699ad5f792d052e105a0de530c6dda1641480c9cd551627186bf0c65d92bf39a6f4a61f458f762d8aa999180ba

diff --git a/dev-python/freezegun/files/freezegun-0.3.10-py37.patch b/dev-python/freezegun/files/freezegun-0.3.10-py37.patch
deleted file mode 100644
index aa3bd536e09..00000000000
--- a/dev-python/freezegun/files/freezegun-0.3.10-py37.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 4fdad69659f15a9e62cf4f6c15c9f319276cf9b0 Mon Sep 17 00:00:00 2001
-From: Jonas Obrist <jonas.obrist@hde.co.jp>
-Date: Tue, 6 Mar 2018 12:21:38 +0900
-Subject: [PATCH] add support for Python 3.7 uuid module changes
-
-Python 3.7 removed uuid._uuid_generate_time. It now has
-uuid._load_system_functions and uuid._generate_time_safe.
-_generate_time_safe is set by calling _load_system_functions (subsequent
-calls to that function are no-op). This change detects the missing
-uuid._uuid_generate_time attribute and uses the new attribute/function
-if they're missing.
----
- freezegun/api.py | 14 +++++++++++---
- 1 file changed, 11 insertions(+), 3 deletions(-)
-
-diff --git a/freezegun/api.py b/freezegun/api.py
-index eb09932..a88a392 100644
---- a/freezegun/api.py
-+++ b/freezegun/api.py
-@@ -27,8 +27,14 @@ _real_time_object_ids = set(id(obj) for obj in real_date_objects)
- 
- try:
-     real_uuid_generate_time = uuid._uuid_generate_time
--except (AttributeError, ImportError):
-+    uuid_generate_time_attr = '_uuid_generate_time'
-+except AttributeError:
-+    uuid._load_system_functions()
-+    real_uuid_generate_time = uuid._generate_time_safe
-+    uuid_generate_time_attr = '_generate_time_safe'
-+except ImportError:
-     real_uuid_generate_time = None
-+    uuid_generate_time_attr = None
- 
- try:
-     real_uuid_create = uuid._UuidCreate
-@@ -482,7 +488,8 @@ class _freeze_time(object):
-         time.localtime = fake_localtime
-         time.gmtime = fake_gmtime
-         time.strftime = fake_strftime
--        uuid._uuid_generate_time = None
-+        if uuid_generate_time_attr:
-+            setattr(uuid, uuid_generate_time_attr, None)
-         uuid._UuidCreate = None
-         uuid._last_timestamp = None
- 
-@@ -573,7 +580,8 @@ class _freeze_time(object):
-         time.localtime = time.localtime.previous_localtime_function
-         time.strftime = time.strftime.previous_strftime_function
- 
--        uuid._uuid_generate_time = real_uuid_generate_time
-+        if uuid_generate_time_attr:
-+            setattr(uuid, uuid_generate_time_attr, real_uuid_generate_time)
-         uuid._UuidCreate = real_uuid_create
-         uuid._last_timestamp = None
- 
--- 
-2.18.0
-

diff --git a/dev-python/freezegun/freezegun-0.3.10.ebuild b/dev-python/freezegun/freezegun-0.3.10.ebuild
deleted file mode 100644
index d4902c62699..00000000000
--- a/dev-python/freezegun/freezegun-0.3.10.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python{2_7,3_6,3_7} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Let your Python tests travel through time"
-HOMEPAGE="https://github.com/spulec/freezegun"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	>dev-python/python-dateutil-2.0[${PYTHON_USEDEP}]
-	dev-python/six[${PYTHON_USEDEP}]
-"
-DEPEND="${RDEPEND}
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? (
-		$(python_gen_impl_dep sqlite)
-		dev-python/mock[${PYTHON_USEDEP}]
-		dev-python/nose[${PYTHON_USEDEP}]
-	)
-"
-
-PATCHES=(
-	"${FILESDIR}"/freezegun-0.3.10-py37.patch
-)
-
-python_test() {
-	nosetests -v || die "Tests fail with ${EPYTHON}"
-}

diff --git a/dev-python/freezegun/freezegun-0.3.13.ebuild b/dev-python/freezegun/freezegun-0.3.13.ebuild
deleted file mode 100644
index c069ad36b75..00000000000
--- a/dev-python/freezegun/freezegun-0.3.13.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python{2_7,3_{6,7,8}} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Let your Python tests travel through time"
-HOMEPAGE="https://github.com/spulec/freezegun"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-
-RDEPEND="
-	>dev-python/python-dateutil-2.0[${PYTHON_USEDEP}]
-	dev-python/six[${PYTHON_USEDEP}]
-"
-DEPEND="${RDEPEND}
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? (
-		$(python_gen_impl_dep sqlite)
-		dev-python/mock[${PYTHON_USEDEP}]
-		dev-python/nose[${PYTHON_USEDEP}]
-	)
-"
-
-distutils_enable_tests pytest
-
-python_prepare_all() {
-	sed -r \
-		-e 's:(python-dateutil)>=2.0:\1:' \
-		-e "s:'(python-dateutil)>=[0-9.]+,.+':'\1':" \
-		-i setup.py
-
-	distutils-r1_python_prepare_all
-}
-
-python_prepare() {
-	# optional and only works with python3
-	if ! python_is_python3; then
-		rm freezegun/_async*.py || die
-	fi
-}

diff --git a/dev-python/freezegun/freezegun-0.3.14.ebuild b/dev-python/freezegun/freezegun-0.3.14.ebuild
deleted file mode 100644
index c069ad36b75..00000000000
--- a/dev-python/freezegun/freezegun-0.3.14.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python{2_7,3_{6,7,8}} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Let your Python tests travel through time"
-HOMEPAGE="https://github.com/spulec/freezegun"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-
-RDEPEND="
-	>dev-python/python-dateutil-2.0[${PYTHON_USEDEP}]
-	dev-python/six[${PYTHON_USEDEP}]
-"
-DEPEND="${RDEPEND}
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? (
-		$(python_gen_impl_dep sqlite)
-		dev-python/mock[${PYTHON_USEDEP}]
-		dev-python/nose[${PYTHON_USEDEP}]
-	)
-"
-
-distutils_enable_tests pytest
-
-python_prepare_all() {
-	sed -r \
-		-e 's:(python-dateutil)>=2.0:\1:' \
-		-e "s:'(python-dateutil)>=[0-9.]+,.+':'\1':" \
-		-i setup.py
-
-	distutils-r1_python_prepare_all
-}
-
-python_prepare() {
-	# optional and only works with python3
-	if ! python_is_python3; then
-		rm freezegun/_async*.py || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/freezegun/, dev-python/freezegun/files/
@ 2020-03-19 21:56 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2020-03-19 21:56 UTC (permalink / raw
  To: gentoo-commits

commit:     8f29fe578854be07adb222f92f02b13992a96c8d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 19 21:52:36 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Mar 19 21:56:27 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f29fe57

dev-python/freezegun: Remove old

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

 dev-python/freezegun/Manifest                      |   1 -
 .../freezegun/files/freezegun-0.3.12-py38.patch    | 122 ---------------------
 .../freezegun/files/freezegun-0.3.12-tests.patch   |  13 ---
 dev-python/freezegun/freezegun-0.3.12-r1.ebuild    |  55 ----------
 4 files changed, 191 deletions(-)

diff --git a/dev-python/freezegun/Manifest b/dev-python/freezegun/Manifest
index 6445e30d280..72507499306 100644
--- a/dev-python/freezegun/Manifest
+++ b/dev-python/freezegun/Manifest
@@ -1,2 +1 @@
-DIST freezegun-0.3.12.tar.gz 24346 BLAKE2B 09d7c662a82d7b7fa6ae56c09bff0d73e2b63fba2b492620cd8e68ee06a15129a7e901418d1881e65b440babcfe0d014ad3574ab8dd2c7eab8486b3d868273ac SHA512 f7d98ea84735b24380fa53e1e62622fe91be5a35cb75221ca4cb02418add9b0a4add9b2f691242be75acbc45d4745fef82ffe3c89890dcdffa4405940e527af4
 DIST freezegun-0.3.15.tar.gz 25530 BLAKE2B 866736cfe556da50f8edba55b0b84c7365e6a1bf32d88e84dfcee6046474b30a9ea15522c3356c5ca30f9a8b79096ba17fdaab240f20e4ef1f91b25ec8262716 SHA512 9f3836f8c9f207d9bccbcaec3f1af977b26aa3699ad5f792d052e105a0de530c6dda1641480c9cd551627186bf0c65d92bf39a6f4a61f458f762d8aa999180ba

diff --git a/dev-python/freezegun/files/freezegun-0.3.12-py38.patch b/dev-python/freezegun/files/freezegun-0.3.12-py38.patch
deleted file mode 100644
index d35303bf9fe..00000000000
--- a/dev-python/freezegun/files/freezegun-0.3.12-py38.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-commit 4d998c9d6b130ed4e2d54cb96b010fec749a9c59
-Author: xtreak <tir.karthi@gmail.com>
-Date:   Wed Jun 19 14:54:22 2019 +0000
-
-    Patch time.time_ns to support Python 3.8
-
-diff --git a/CHANGELOG b/CHANGELOG
-index efac4d3..14d96be 100644
---- a/CHANGELOG
-+++ b/CHANGELOG
-@@ -11,6 +11,7 @@ Latest
- * Ignore Selenium
- * Move to pytest
- * Conditionally patch time.clock
-+* Patch time.time_ns added in Python 3.7
- 
- 0.3.11
- ------
-@@ -57,4 +58,4 @@ Latest
- 
- * Add `tick` argument to allow time to move forward
- * Performance improvements
--* Fix timezone example in README
-\ No newline at end of file
-+* Fix timezone example in README
-diff --git a/freezegun/api.py b/freezegun/api.py
-index 5e7d7fa..bc61270 100644
---- a/freezegun/api.py
-+++ b/freezegun/api.py
-@@ -20,6 +20,7 @@ try:
- except ImportError:
-     MayaDT = None
- 
-+_TIME_NS_PRESENT = hasattr(time, 'time_ns')
- 
- real_time = time.time
- real_localtime = time.localtime
-@@ -28,6 +29,11 @@ real_strftime = time.strftime
- real_date = datetime.date
- real_datetime = datetime.datetime
- real_date_objects = [real_time, real_localtime, real_gmtime, real_strftime, real_date, real_datetime]
-+
-+if _TIME_NS_PRESENT:
-+    real_time_ns = time.time_ns
-+    real_date_objects.append(real_time_ns)
-+
- _real_time_object_ids = set(id(obj) for obj in real_date_objects)
- 
- # time.clock is deprecated and was removed in Python 3.8
-@@ -175,6 +181,12 @@ def fake_time():
-     current_time = get_current_time()
-     return calendar.timegm(current_time.timetuple()) + current_time.microsecond / 1000000.0
- 
-+if _TIME_NS_PRESENT:
-+    def fake_time_ns():
-+        if _should_use_real_time():
-+            return real_time_ns()
-+        return int(int(fake_time()) * 1e9)
-+
- 
- def fake_localtime(t=None):
-     if t is not None:
-@@ -331,7 +343,7 @@ class FakeDatetime(with_metaclass(FakeDatetimeMeta, real_datetime, FakeDate)):
- 
-     def date(self):
-         return date_to_fakedate(self)
--    
-+
-     @property
-     def nanosecond(self):
-         try:
-@@ -599,6 +611,10 @@ class _freeze_time(object):
-             ('real_time', real_time, fake_time),
-         ]
- 
-+        if _TIME_NS_PRESENT:
-+            time.time_ns = fake_time_ns
-+            to_patch.append(('real_time_ns', real_time_ns, fake_time_ns))
-+
-         if real_clock is not None:
-             # time.clock is deprecated and was removed in Python 3.8
-             time.clock = fake_clock
-@@ -741,7 +757,7 @@ def freeze_time(time_to_freeze=None, tz_offset=0, ignore=None, tick=False, as_ar
-     ignore.append('selenium')
-     ignore.append('_pytest.terminal.')
-     ignore.append('_pytest.runner.')
--    
-+
-     return _freeze_time(time_to_freeze, tz_offset, ignore, tick, as_arg, auto_tick_seconds)
- 
- 
-diff --git a/tests/test_datetimes.py b/tests/test_datetimes.py
-index cfef4a1..688fdce 100644
---- a/tests/test_datetimes.py
-+++ b/tests/test_datetimes.py
-@@ -19,6 +19,7 @@ except ImportError:
- 
- # time.clock was removed in Python 3.8
- HAS_CLOCK = hasattr(time, 'clock')
-+HAS_TIME_NS = hasattr(time, 'time_ns')
- 
- class temp_locale(object):
-     """Temporarily change the locale."""
-@@ -656,3 +657,18 @@ def test_should_use_real_time():
-         assert time.gmtime() != expected_frozen_gmt
-         if HAS_CLOCK:
-             assert time.clock() != expected_clock
-+
-+
-+@pytest.mark.skipif(not HAS_TIME_NS,
-+                    reason="time.time_ns is present only on 3.7 and above")
-+def test_time_ns():
-+    freezer = freeze_time("2012-01-14")
-+    local_time = datetime.datetime(2012, 1, 14)
-+    utc_time = local_time - datetime.timedelta(seconds=time.timezone)
-+    expected_timestamp = time.mktime(utc_time.timetuple())
-+
-+    freezer.start()
-+    assert time.time() == expected_timestamp
-+    assert time.time_ns() == expected_timestamp * 1e9
-+    freezer.stop()
-+    assert time.time() != expected_timestamp

diff --git a/dev-python/freezegun/files/freezegun-0.3.12-tests.patch b/dev-python/freezegun/files/freezegun-0.3.12-tests.patch
deleted file mode 100644
index 08543fc7d59..00000000000
--- a/dev-python/freezegun/files/freezegun-0.3.12-tests.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/tests/test_datetimes.py b/tests/test_datetimes.py
-index 688fdce..a61484d 100644
---- a/tests/test_datetimes.py
-+++ b/tests/test_datetimes.py
-@@ -18,7 +18,7 @@ except ImportError:
-     maya = None
- 
- # time.clock was removed in Python 3.8
--HAS_CLOCK = hasattr(time, 'clock')
-+HAS_CLOCK = hasattr(time, 'clock') and getattr(time, 'clock') is not None
- HAS_TIME_NS = hasattr(time, 'time_ns')
- 
- class temp_locale(object):

diff --git a/dev-python/freezegun/freezegun-0.3.12-r1.ebuild b/dev-python/freezegun/freezegun-0.3.12-r1.ebuild
deleted file mode 100644
index 05c8f8311e2..00000000000
--- a/dev-python/freezegun/freezegun-0.3.12-r1.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python{2_7,3_{6,7,8}} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Let your Python tests travel through time"
-HOMEPAGE="https://github.com/spulec/freezegun"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="test"
-
-RDEPEND="
-	>dev-python/python-dateutil-2.0[${PYTHON_USEDEP}]
-	dev-python/six[${PYTHON_USEDEP}]
-"
-DEPEND="${RDEPEND}
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? (
-		$(python_gen_impl_dep sqlite)
-		dev-python/mock[${PYTHON_USEDEP}]
-		dev-python/nose[${PYTHON_USEDEP}]
-	)
-"
-
-PATCHES=(
-	# pulled from upstream git, will be in next release
-	"${FILESDIR}/freezegun-0.3.12-py38.patch"
-
-	# test fixes
-	"${FILESDIR}/freezegun-0.3.12-tests.patch"
-)
-
-distutils_enable_tests pytest
-
-python_prepare_all() {
-	sed -r \
-		-e 's:(python-dateutil)>=2.0:\1:' \
-		-e "s:'(python-dateutil)>=[0-9.]+,.+':'\1':" \
-		-i setup.py
-
-	distutils-r1_python_prepare_all
-}
-
-python_prepare() {
-	# optional and only works with python3
-	if ! python_is_python3; then
-		rm ${PN}/_async.py || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/freezegun/, dev-python/freezegun/files/
@ 2021-05-07 22:22 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2021-05-07 22:22 UTC (permalink / raw
  To: gentoo-commits

commit:     d030418412529d09801fc2fda2201e525c25ad2d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri May  7 20:54:23 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri May  7 22:22:30 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0304184

dev-python/freezegun: Enable python3.10

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

 .../freezegun/files/freezegun-1.1.0-py310.patch    | 30 +++++++++++++++++++++
 dev-python/freezegun/freezegun-1.1.0-r1.ebuild     | 31 ++++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/dev-python/freezegun/files/freezegun-1.1.0-py310.patch b/dev-python/freezegun/files/freezegun-1.1.0-py310.patch
new file mode 100644
index 00000000000..41bd7bc2712
--- /dev/null
+++ b/dev-python/freezegun/files/freezegun-1.1.0-py310.patch
@@ -0,0 +1,30 @@
+From 57d024e4ce2516c55c715448296b9099db68343c Mon Sep 17 00:00:00 2001
+From: Karthikeyan Singaravelan <tir.karthi@gmail.com>
+Date: Fri, 7 May 2021 15:51:33 +0000
+Subject: [PATCH] Fix decorate_class for Python 3.10 where staticmethod is
+ callable.
+
+(edited by mgorny for more readable indent)
+---
+ freezegun/api.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/freezegun/api.py b/freezegun/api.py
+index cab9ebe..eb3a931 100644
+--- a/freezegun/api.py
++++ b/freezegun/api.py
+@@ -598,7 +598,10 @@ class _freeze_time(object):
+                         continue
+                     seen.add(attr)
+ 
+-                    if not callable(attr_value) or inspect.isclass(attr_value):
++                    # staticmethods are callable from Python 3.10 . Hence skip them from decoration
++                    if (not callable(attr_value)
++                            or inspect.isclass(attr_value)
++                            or isinstance(attr_value, staticmethod)):
+                         continue
+ 
+                     try:
+-- 
+2.31.1
+

diff --git a/dev-python/freezegun/freezegun-1.1.0-r1.ebuild b/dev-python/freezegun/freezegun-1.1.0-r1.ebuild
new file mode 100644
index 00000000000..499c86ab148
--- /dev/null
+++ b/dev-python/freezegun/freezegun-1.1.0-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{7..10} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="Let your Python tests travel through time"
+HOMEPAGE="https://github.com/spulec/freezegun"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+
+RDEPEND="
+	>dev-python/python-dateutil-2.7[${PYTHON_USEDEP}]
+"
+BDEPEND="
+	test? (
+		$(python_gen_impl_dep sqlite)
+		dev-python/nose[${PYTHON_USEDEP}]
+	)
+"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+	"${FILESDIR}"/${P}-py310.patch
+)


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/freezegun/, dev-python/freezegun/files/
@ 2023-12-20 16:00 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2023-12-20 16:00 UTC (permalink / raw
  To: gentoo-commits

commit:     f9bc0f6b86c668549692341590ee22784ee15ab3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 20 15:59:43 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Dec 20 15:59:43 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9bc0f6b

dev-python/freezegun: Remove old

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

 dev-python/freezegun/Manifest                      |  2 --
 .../freezegun/files/freezegun-1.1.0-py310.patch    | 30 ------------------
 dev-python/freezegun/freezegun-1.2.2.ebuild        | 36 ----------------------
 dev-python/freezegun/freezegun-1.3.0.ebuild        | 35 ---------------------
 4 files changed, 103 deletions(-)

diff --git a/dev-python/freezegun/Manifest b/dev-python/freezegun/Manifest
index f211d528d444..930bbf4a0088 100644
--- a/dev-python/freezegun/Manifest
+++ b/dev-python/freezegun/Manifest
@@ -1,4 +1,2 @@
-DIST freezegun-1.2.2.tar.gz 30670 BLAKE2B 88941ccd9694c842e4999da47e1a8fbe9b82c1fa512467de174715e627c213167cf3c7f943b35d039ff118bae9d1bca4b64ceaa5683db818727cd9ad2533a827 SHA512 c6dc3da66a2d3063f819a104b6bc98eb3d4b772b8edb06bde130a6e355d96e1861e650c44eb691be892223150a652a528fda4237bd77b1bdcee1fcfad74f307c
-DIST freezegun-1.3.0.tar.gz 31165 BLAKE2B 69341b4b7fe52e0aa2ad7c70e6a1b9e4bcb5cdac88ac48e85a968b2159260a9aee4196fc9622a153d1d5ebfee3b081f568b01a5cd59ff388e7bf5a6900bb45f6 SHA512 a0de4f2827696ea0bc1e5ff89aae9dfc36e013e03212bc7d8c3a93addb55e408fe03744fb0638d5ca0758322e2f3e0acb503fbdecfa14dd128d0399c9a60edf1
 DIST freezegun-1.3.1.tar.gz 31535 BLAKE2B 5601f7359668dac186b8d76d203b7b5844af3f3171133fe25eba3182793dd68eeb14a1485d42ab50da316bf710e42d9fb4b6ebfc7afe9f86e6f4e5f3354997e8 SHA512 7524c85ad4d49fdf86d132085845ec9c67d06600cfa25e0d650cc0a565d1830f9f83315930fd6516ae924c2395721473a04c1ecfeb1735ee31e894370267ef95
 DIST freezegun-1.4.0.tar.gz 31748 BLAKE2B a7ea433ea8e5f0137fc5d88a5375e3fc0e2f307a04684ab5b844168ed214fd9dd1d1ed2a0e0c91ed20ee1fc32c8e3e75fb9dc73de64723efe881e843a38269a1 SHA512 bbdad19b7fc2da9a2851d6b4c14427ccda1f2e06617993cf7173ded65cced9b98d36e1da05a2718b70653a69986cd81d84317003271eda2075177ccf63495b7a

diff --git a/dev-python/freezegun/files/freezegun-1.1.0-py310.patch b/dev-python/freezegun/files/freezegun-1.1.0-py310.patch
deleted file mode 100644
index 41bd7bc2712b..000000000000
--- a/dev-python/freezegun/files/freezegun-1.1.0-py310.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 57d024e4ce2516c55c715448296b9099db68343c Mon Sep 17 00:00:00 2001
-From: Karthikeyan Singaravelan <tir.karthi@gmail.com>
-Date: Fri, 7 May 2021 15:51:33 +0000
-Subject: [PATCH] Fix decorate_class for Python 3.10 where staticmethod is
- callable.
-
-(edited by mgorny for more readable indent)
----
- freezegun/api.py | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/freezegun/api.py b/freezegun/api.py
-index cab9ebe..eb3a931 100644
---- a/freezegun/api.py
-+++ b/freezegun/api.py
-@@ -598,7 +598,10 @@ class _freeze_time(object):
-                         continue
-                     seen.add(attr)
- 
--                    if not callable(attr_value) or inspect.isclass(attr_value):
-+                    # staticmethods are callable from Python 3.10 . Hence skip them from decoration
-+                    if (not callable(attr_value)
-+                            or inspect.isclass(attr_value)
-+                            or isinstance(attr_value, staticmethod)):
-                         continue
- 
-                     try:
--- 
-2.31.1
-

diff --git a/dev-python/freezegun/freezegun-1.2.2.ebuild b/dev-python/freezegun/freezegun-1.2.2.ebuild
deleted file mode 100644
index a22769775121..000000000000
--- a/dev-python/freezegun/freezegun-1.2.2.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
-
-inherit distutils-r1 pypi
-
-DESCRIPTION="Let your Python tests travel through time"
-HOMEPAGE="
-	https://github.com/spulec/freezegun/
-	https://pypi.org/project/freezegun/
-"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
-
-RDEPEND="
-	>dev-python/python-dateutil-2.7[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	test? (
-		$(python_gen_impl_dep sqlite)
-	)
-"
-
-distutils_enable_tests pytest
-
-PATCHES=(
-	# https://github.com/spulec/freezegun/issues/396
-	# https://github.com/spulec/freezegun/pull/397
-	"${FILESDIR}"/${PN}-1.1.0-py310.patch
-)

diff --git a/dev-python/freezegun/freezegun-1.3.0.ebuild b/dev-python/freezegun/freezegun-1.3.0.ebuild
deleted file mode 100644
index 52f4b81dc5b8..000000000000
--- a/dev-python/freezegun/freezegun-1.3.0.ebuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
-
-inherit distutils-r1 pypi
-
-DESCRIPTION="Let your Python tests travel through time"
-HOMEPAGE="
-	https://github.com/spulec/freezegun/
-	https://pypi.org/project/freezegun/
-"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
-
-RDEPEND="
-	>dev-python/python-dateutil-2.7[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	test? (
-		$(python_gen_impl_dep sqlite)
-	)
-"
-
-distutils_enable_tests pytest
-
-python_test() {
-	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-	epytest
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-12-20 16:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-04 12:33 [gentoo-commits] repo/gentoo:master commit in: dev-python/freezegun/, dev-python/freezegun/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2023-12-20 16:00 Michał Górny
2021-05-07 22:22 Michał Górny
2020-03-19 21:56 Michał Górny
2019-11-22  0:20 Patrick McLean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox