diff --git a/freezegun-1.2.2.tar.gz b/freezegun-1.2.2.tar.gz deleted file mode 100644 index a9e6830..0000000 --- a/freezegun-1.2.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cd22d1ba06941384410cd967d8a99d5ae2442f57dfafeff2fda5de8dc5c05446 -size 30670 diff --git a/freezegun-1.5.1.tar.gz b/freezegun-1.5.1.tar.gz new file mode 100644 index 0000000..a2ff71c --- /dev/null +++ b/freezegun-1.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b29dedfcda6d5e8e083ce71b2b542753ad48cfec44037b3fc79702e2980a89e9 +size 33697 diff --git a/py313-support.patch b/py313-support.patch new file mode 100644 index 0000000..cc63bd3 --- /dev/null +++ b/py313-support.patch @@ -0,0 +1,33 @@ +From 1777174bb97c0b514033a09b820078b0d117f4a8 Mon Sep 17 00:00:00 2001 +From: Bert Blommers +Date: Fri, 28 Jun 2024 19:21:04 +0000 +Subject: [PATCH] Admin: Support Python 3.13 + +--- + .github/workflows/ci.yaml | 9 ++++++--- + tests/test_datetimes.py | 6 +++--- + 2 files changed, 9 insertions(+), 6 deletions(-) + +--- a/tests/test_datetimes.py ++++ b/tests/test_datetimes.py +@@ -534,17 +534,17 @@ def test_method_decorator_works_on_unittest(self) -> None: + @freeze_time('2013-04-09', as_kwarg='frozen_time') + def test_method_decorator_works_on_unittest_kwarg_frozen_time(self, frozen_time: Any) -> None: + self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today()) +- self.assertEqual(datetime.date(2013, 4, 9), frozen_time.time_to_freeze.today()) ++ assert frozen_time.time_to_freeze.today().strftime('%Y-%m-%d') == "2013-04-09" + + @freeze_time('2013-04-09', as_kwarg='hello') + def test_method_decorator_works_on_unittest_kwarg_hello(self, **kwargs: Any) -> None: + self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today()) +- self.assertEqual(datetime.date(2013, 4, 9), kwargs.get('hello').time_to_freeze.today()) # type: ignore ++ assert kwargs.get("hello").time_to_freeze.today().strftime('%Y-%m-%d') == "2013-04-09" # type: ignore + + @freeze_time(lambda: datetime.date(year=2013, month=4, day=9), as_kwarg='frozen_time') + def test_method_decorator_works_on_unittest_kwarg_frozen_time_with_func(self, frozen_time: Any) -> None: + self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today()) +- self.assertEqual(datetime.date(2013, 4, 9), frozen_time.time_to_freeze.today()) ++ assert frozen_time.time_to_freeze.today().strftime('%Y-%m-%d') == "2013-04-09" + + + @freeze_time('2013-04-09') diff --git a/python-freezegun.changes b/python-freezegun.changes index 89edc05..631ffcb 100644 --- a/python-freezegun.changes +++ b/python-freezegun.changes @@ -1,3 +1,45 @@ +------------------------------------------------------------------- +Sun Jun 30 21:22:02 UTC 2024 - Dirk Müller + +- add py313-support.patch to fix build with python 3.13 + +------------------------------------------------------------------- +Wed Jun 12 09:20:35 UTC 2024 - Dirk Müller + +- update to 1.5.1: + * Fix the typing of the `tick()` method, and improve it's + behaviour. + +------------------------------------------------------------------- +Fri May 3 07:25:54 UTC 2024 - Dirk Müller + +- update to 1.5.0: + * The default ignore list now contains the `queue`-package + * Added a missing `move_to`-function when calling + `freeze_time(tick=True)` + * Fixes a rounding error in `time.time_ns()` + * Fixed a bug where the default ignore list could not be empty + (`configure(default_ignore_list=[])`) + * All `tick()` methods now return the new datetime (instead of + None) + * Type improvements + +------------------------------------------------------------------- +Fri Dec 29 13:00:06 UTC 2023 - Dirk Müller + +- update to 1.4.0: + * `asyncio`-support from 1.3.x introduced quite a few bugs, so + that functionality is now hidden behind a flag: + `with freeze_time('1970-01-02', real_asyncio=True):` + +------------------------------------------------------------------- +Thu Dec 7 21:33:09 UTC 2023 - Dirk Müller + +- update to 1.3.1: + * Fixed `asyncio` support to avoid `await asyncio.sleep(1)` + hanging forever. + * Added support for Python 3.12 + ------------------------------------------------------------------- Fri Apr 21 12:25:27 UTC 2023 - Dirk Müller @@ -16,7 +58,7 @@ Sat Sep 17 15:53:33 UTC 2022 - Dirk Müller * Improved static typing definitions * Don't freeze pytest timings. This avoids class-level decorator usage * messing with pytest timings. Pass through all setUp and tearDown arguments - + ------------------------------------------------------------------- Sat Jun 4 14:46:30 UTC 2022 - Dirk Müller @@ -48,7 +90,7 @@ Tue Oct 20 01:42:22 UTC 2020 - Steve Kowalik - Update to 1.0.0: * Dropped Py2 support * Added as_kwarg argument in order to have the frozen time object passed - with the name provided in as_kwarg argument + with the name provided in as_kwarg argument - Drop denose.patch - Drop python-six from {Build,}Requires - Update version of python-dateutil in {Build,}Requires @@ -119,7 +161,7 @@ Tue Sep 4 16:32:05 UTC 2018 - Matěj Cepl ------------------------------------------------------------------- Sun Jul 15 20:55:20 UTC 2018 - mimi.vx@gmail.com -- update to 0.3.10 +- update to 0.3.10 - add _u_p37_tests.patch * Performance improvements * Coroutine support diff --git a/python-freezegun.spec b/python-freezegun.spec index c46a290..7845326 100644 --- a/python-freezegun.spec +++ b/python-freezegun.spec @@ -1,7 +1,7 @@ # # spec file for package python-freezegun # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,19 +16,22 @@ # -%{?!python_module:%define python_module() python3-%{**}} %{?sle15_python_module_pythons} Name: python-freezegun -Version: 1.2.2 +Version: 1.5.1 Release: 0 Summary: Mock time date for Python License: Apache-2.0 URL: https://github.com/spulec/freezegun Source: https://files.pythonhosted.org/packages/source/f/freezegun/freezegun-%{version}.tar.gz +# PATCH-FIX-UPSTREAM: https://github.com/spulec/freezegun/commit/1777174bb97c0b514033a09b820078b0d117f4a8 +Patch1: py313-support.patch BuildRequires: %{python_module base >= 3.7} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-dateutil > 2.7} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: %{pythons} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -42,14 +45,13 @@ FreezeGun is a library that allows your python tests to travel through time by mocking the datetime module. %prep -%setup -q -n freezegun-%{version} -%autopatch -p1 +%autosetup -p1 -n freezegun-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -59,6 +61,6 @@ time by mocking the datetime module. %license LICENSE %doc README.rst %{python_sitelib}/freezegun -%{python_sitelib}/freezegun-%{version}*-info +%{python_sitelib}/freezegun-%{version}.dist-info %changelog