# # spec file for package python-freezegun # # 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 # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?sle15_python_module_pythons} Name: python-freezegun Version: 1.5.1 Release: 2.5 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 Requires: python Requires: python-python-dateutil > 2.7 BuildArch: noarch %python_subpackages %description FreezeGun is a library that allows your python tests to travel through time by mocking the datetime module. %prep %autosetup -p1 -n freezegun-%{version} %build %pyproject_wheel %install %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pyunittest %files %{python_files} %license LICENSE %doc README.rst %{python_sitelib}/freezegun %{python_sitelib}/freezegun-%{version}.dist-info %changelog * Sun Jun 30 2024 Dirk Müller - add py313-support.patch to fix build with python 3.13 * Wed Jun 12 2024 Dirk Müller - update to 1.5.1: * Fix the typing of the `tick()` method, and improve it's behaviour. * Fri May 3 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 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 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 2023 Dirk Müller - add sle15_python_module_pythons (jsc#PED-68) * Thu Apr 13 2023 Matej Cepl - Make calling of %%{sle15modernpython} optional. * Sat Sep 17 2022 Dirk Müller - update to 1.2.2: * Removes Python 3.6 support * 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 2022 Dirk Müller - update to 1.2.1: * Added missing typeshed types from distribution * Pass all arguments on recursive freeze_time calls * Add support for `time.perf_counter` (and `…_ns`) * Added typeshed types * Dropped support for python 3.5 * Fri Apr 16 2021 Benjamin Greiner - Skip python2 build. Not supported by upstream, a simple `import freezegun` already fails. Was not detected because the pyunittest runs 0 tests. * Thu Jan 28 2021 Dirk Müller - update to 1.1.0: * Add support for `time.monotonic` (and `…_ns`) * Allow to configure default ignore list, and also to just extend the default * Fixed when accessing from thread after stop() * Tue Oct 20 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 - Drop denose.patch - Drop python-six from {Build,}Requires - Update version of python-dateutil in {Build,}Requires * Tue Aug 18 2020 Matej Cepl - We can finally use %%pyunittest macro * Wed Mar 11 2020 Tomáš Chvátal - Fix build without python2 available * Wed Mar 11 2020 Dirk Mueller - update to 0.3.15: * Fix locale timestamp bug. CC #328 * Fix calendar.timegm behavior * Fix for Py3.8 * Reset time.time_ns on stop - drop remove_dependency_on_mock.patch * Thu Nov 14 2019 Matej Cepl - Add dependency on the full python (which is not pulled by setuptools anymore). Use %%{pythons} macro now. * Tue Jul 2 2019 Matej Cepl - Upgrade to 0.3.12: * Refactor classes to functions * Ignore Selenium * Move to pytest * Conditionally patch time.clock (removed in 3.8) * Patch time.time_ns added in Python 3.7 * Wed Feb 6 2019 John Vandenberg - Do not require python2 module for building python3 module * Thu Jan 10 2019 mcepl@suse.com - Update to 0.3.11: * Performance improvements * Fix nesting time.time * Add nanosecond property - Remove nose dependency by adding denose.patch - Remove _u_p37_tests.patch, which is superseeded by new release. * Tue Dec 4 2018 Matej Cepl - Remove superfluous devel dependency for noarch package * Tue Sep 4 2018 Matěj Cepl - Add remove_dependency_on_mock.patch which removes dependency on python-mock for Python 3, where it is not required. * Sun Jul 15 2018 mimi.vx@gmail.com - update to 0.3.10 - add _u_p37_tests.patch * Performance improvements * Coroutine support * Fri Feb 23 2018 tbechtold@suse.com - Drop python-sure BuildRequires. Add python-mock BuildRequires. * Mon May 22 2017 toddrme2178@gmail.com - Implement single-spec version - Fix source URL - update to version 0.3.9 * If no time to be frozen, use current time * Fix uuid1 issues * Add support for python 3.6 - Remove unused freeze_hideDeps.patch * Fri Nov 25 2016 tbechtold@suse.com update to version 0.3.8 * Improved unpatching when importing modules after freeze_time start() * Tidy up tick=True * PEP8-ify code * 0.3.7 * Add manual increment via tick method * Add @zmsmith to authors. * Clean up and speed up start(). * Globally exclude __pycache__ and py[co] from sdist * Catch TypeError when fetching attribute values * Fix bug with time.localtime not being reset. Closes #112. * Fix test to work when current timezone is GMT-14 or GMT+14. * 0.3.8 * 0.3.6 * Updated readme.md with svg badges * Speed up stop() like commit e93c7b4 * Fix assertion in usage example * Add method to change freezed time * Fixed #162 - allow decorating old-style classes. * Add support to PyMySQL * Cleanup code. * do not use hex numbers in readme * Assume the default time to freeze is "now". * Register fake types in PyMySQL conversions * Ignore threading and Queue modules. Closes #129. * Add missing parenthesis * Lock down coverage version since new coverage doesnt support py3.2 * Add test case * Fix or py3 astimezone and not passing tz. Closes #138. * Fixing halfdone work using None parameter for freeze_time(), when using 'with freeze_time() as ...' syntax. * Fixed #101 - ignore warnings when patching imported modules. * Add docs for tick argument. * Set default tz to None * Add note about deafult arguments. Closes #140. * Add license info. Closes #120. * Fri Feb 26 2016 tbechtold@suse.com - Require python-python-dateutil. package was renamed * Fri Sep 4 2015 toddrme2178@gmail.com - Update to 0.3.5 * No upstream changelog - Remove unneeded freeze_hideDeps.patch * Mon Feb 9 2015 p.drouand@gmail.com - Use download Url as source - Use tarball provided by pypi * Sun Feb 1 2015 rjschwei@suse.com - Initial build version 0.2.8 + add freeze_hideDeps.patch