- update to 5.6.0:

* Removed dependency on pytz.
  * In utc.now(), bind late to allow for monkeypatching.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tempora?expand=0&rev=49
This commit is contained in:
Dirk Mueller 2024-07-02 15:22:04 +00:00 committed by Git OBS Bridge
commit 1dfb880d70
5 changed files with 434 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

306
python-tempora.changes Normal file
View File

@ -0,0 +1,306 @@
-------------------------------------------------------------------
Tue Jul 2 15:18:11 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 5.6.0:
* Removed dependency on pytz.
* In utc.now(), bind late to allow for monkeypatching.
-------------------------------------------------------------------
Sat Mar 16 14:39:37 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 5.5.1:
* Remove test dependency on backports.unittest_mock.
-------------------------------------------------------------------
Wed Jul 19 09:02:01 UTC 2023 - ecsos <ecsos@opensuse.org>
- %{?sle15_python_module_pythons} must be at beginning to work.
-------------------------------------------------------------------
Wed Jul 12 22:50:07 UTC 2023 - Arun Persaud <arun@gmx.de>
- specfile:
* require 3.8 or later
* Changelog got renamed to NEWS
- update to version 5.5.0:
* Features
+ Stopwatch now uses time.monotonic.
- changes from version 5.4.0:
* Features
+ Require Python 3.8 or later.
- changes from version 5.3.0:
* #24: Removed use of datetime.utc** functions deprecated in Python
3.12.
-------------------------------------------------------------------
Thu May 4 21:03:54 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 5.2.2:
* Fixed bug in tests that would fail when a leap year
was about a year away.
-------------------------------------------------------------------
Fri Apr 21 12:37:13 UTC 2023 - Dirk Müller <dmueller@suse.com>
- add sle15_python_module_pythons (jsc#PED-68)
-------------------------------------------------------------------
Thu Apr 13 22:45:18 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Make calling of %{sle15modernpython} optional.
-------------------------------------------------------------------
Wed Mar 1 09:04:03 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
- Disable broken tests gh#jaraco/tempora#22
- Update to 5.2.1:
* #21: Restored dependency on jaraco.functools, still used in timing
module.
-------------------------------------------------------------------
Wed Jan 4 18:47:50 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 5.2.0:
* Packaging refresh.
-------------------------------------------------------------------
Mon Dec 5 13:41:37 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to version 5.1.0
* Introduced infer_datetime and added some type hints.
-------------------------------------------------------------------
Sat Sep 17 15:45:14 UTC 2022 - Arun Persaud <arun@gmx.de>
- specfile:
* change to pyproject.toml build
- update to version 5.0.2:
* Refreshed project.
* Enrolled with Tidelift.
-------------------------------------------------------------------
Thu Feb 3 21:18:29 UTC 2022 - Arun Persaud <arun@gmx.de>
- update to version 5.0.1:
* Refreshed project.
-------------------------------------------------------------------
Sat Jan 29 18:11:13 UTC 2022 - Arun Persaud <arun@gmx.de>
- specfile:
* update copyright year
- update to version 5.0.0:
* Removed deprecated divide_* functions and Parser class.
* Require Python 3.7 or later.
* #19: Fixed error reporting in parse_timedelta.
- changes from version 4.1.2:
* #18: Docs now build without warnings.
-------------------------------------------------------------------
Tue Oct 5 13:30:13 UTC 2021 - Stefan Schubert <schubi@suse.de>
- Added BuildRequires: alts
-------------------------------------------------------------------
Thu Sep 30 07:54:19 UTC 2021 - Stefan Schubert <schubi@suse.de>
- Use libalternatives instead of update-alternatives.
-------------------------------------------------------------------
Wed Sep 1 11:24:10 UTC 2021 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to version 4.1.1
* Fixed issue where digits were picked up in the unit when
adjacent to the last unit.
- from version 4.1.0
* Added support for more formats in ``parse_timedelta``.
* #17: ``parse_timedelta`` now supports formats emitted by
``timeit``, including honoring nanoseconds at the
microsecond resolution.
- from version 4.0.2
* Refreshed package metadata.
- Update BuildRequires from setup.py
-------------------------------------------------------------------
Sun Nov 15 18:07:54 UTC 2020 - Arun Persaud <arun@gmx.de>
- specfile:
* be more specific in %files section
- update to version 4.0.1:
* Refreshed package metadata.
-------------------------------------------------------------------
Fri Jul 24 12:28:31 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- update to 4.0.0
* Removed ``strptime`` function in favor of
`datetime.datetime.strptime`. If passing
a ``tzinfo`` parameter, instead invoke `.replace(tzinfo=...)`
on the result.
* Deprecated ``divide_timedelta`` and ``divide_timedelta_float``
now that Python supports this functionality natively.
* Deprecated ``Parser`` class. The
'dateutil.parser' provides more sophistication.
-------------------------------------------------------------------
Tue Apr 14 09:12:12 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Don't use %python3_only command, but properly use alternatives.
-------------------------------------------------------------------
Thu Mar 26 11:21:36 UTC 2020 - pgajdos@suse.com
- version update to 3.0.0
* #10: strftime now reverts to the stdlib behavior for %u.
-------------------------------------------------------------------
Sat Mar 14 07:10:21 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Drop py2 only dependency
-------------------------------------------------------------------
Wed Mar 11 12:25:08 UTC 2020 - pgajdos@suse.com
- version update to 2.1.0
v2.1.0
======
- #9: Fixed error when date object is passed to ``strftime``.
- #11: ``strftime`` now honors upstream expectation of
rendering date values on time objects and vice versa.
- #10: ``strftime`` now honors ``%µ`` for rendering just
the "microseconds" as ``%u`` supported previously.
In a future, backward-incompatible release, the
``%u`` behavior will revert to the behavior as found
in stdlib.
v2.0.0
======
* Require Python 3.6 or later.
* Removed DatetimeConstructor.
-------------------------------------------------------------------
Mon Feb 24 10:54:59 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Fix fdupes call
- Do not pull in flake8
-------------------------------------------------------------------
Thu Apr 18 15:24:46 UTC 2019 - Marketa Calabkova <mcalabkova@suse.com>
- update to 1.14.1
* Fix failing doctest in parse_timedelta
- Launch tests and removing some unneeded dependencies
-------------------------------------------------------------------
Wed Mar 20 01:58:47 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Add missing %license
- Re-activate test suite
- Remove bcond python2
- Add missing build dependency jaraco.functools >= 1.20
- Remove inappropriate build dependency pytest-flake8
-------------------------------------------------------------------
Mon Mar 18 09:31:58 UTC 2019 - Dirk Mueller <dmueller@suse.com>
- fix last version update missing new runtime requires
-------------------------------------------------------------------
Thu Mar 14 18:11:24 CET 2019 - Matej Cepl <mcepl@suse.com>
- Upgrade all the way to 1.14:
- Package refresh, including use of declarative config in the package metadata.
- Enhancements to BackoffDelay: Added .reset method and Made
iterable to retrieve delay values.
- Added UTC module (Python 3 only), inspired by the utc project.
- Scheduler now honors daylight savings times in the PeriodicCommands.
- Added timing.BackoffDelay, suitable for implementing
exponential backoff delays, such as those between retries.
- Added support for months, years to parse_timedelta.
- Introducing timing.Timer, featuring a expired method for
detecting when a certain duration has been exceeded.
- Stopwatch now behaves reliably during timezone changes and
(presumably) daylight savings time changes.
- Update project skeleton.
- Run the SPEC file through spec-cleaner
- Switched off test suite run temporarily. gh#jaraco/tempora#6
-------------------------------------------------------------------
Tue Dec 4 12:55:04 UTC 2018 - Matej Cepl <mcepl@suse.com>
- Remove superfluous devel dependency for noarch package
-------------------------------------------------------------------
Thu Jan 11 12:25:33 UTC 2018 - tchvatal@suse.com
- Fix building with python3 only available
-------------------------------------------------------------------
Fri Mar 31 13:43:53 UTC 2017 - jmatejek@suse.com
- update for singlespec
- update to 1.6.1
* adopt irc.schedule as tempora.schedule
* adopt jaraco.timing as tempora.timing
-------------------------------------------------------------------
Tue Aug 2 13:24:18 UTC 2016 - sor.alexei@meowr.ru
- Switch to Python2.
-------------------------------------------------------------------
Thu Jun 9 17:28:20 UTC 2016 - toddrme2178@gmail.com
- Remove unneeded python3-Sphinx dependency.
-------------------------------------------------------------------
Sun May 8 07:09:08 UTC 2016 - arun@gmx.de
- specfile:
* updated source url to files.pythonhosted.org
-------------------------------------------------------------------
Tue Dec 29 19:40:21 UTC 2015 - arun@gmx.de
- specfile:
* updated url (moved to github)
* *.txt -> *.rst in %doc
* changed from zip to tar-ball
- update to version 1.4:
* moved to Github.
* Improved test support on Python 2.
-------------------------------------------------------------------
Sat Apr 25 17:58:49 UTC 2015 - arun@gmx.de
- specfile:
* added python3-setuptools_scm
* removed python3-hgtools
- update to version 1.3:
* Added divide_timedelta from "svg.charts".
* Added date_range from "svg.charts".
-------------------------------------------------------------------
Sun Feb 22 20:47:30 UTC 2015 - arun@gmx.de
- update to version 1.2:
* Only require sphinx and pytest-runner when necessary.
-------------------------------------------------------------------
Mon Feb 16 02:13:54 UTC 2015 - arun@gmx.de
- update to version 1.1:
* Add license info (retroactively applied to all commits).
-------------------------------------------------------------------
Sat Feb 14 21:31:45 UTC 2015 - arun@gmx.de
- initial version

101
python-tempora.spec Normal file
View File

@ -0,0 +1,101 @@
#
# spec file for package python-tempora
#
# 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/
#
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons}
Name: python-tempora
Version: 5.6.0
Release: 0
Summary: Objects and routines pertaining to date and time (tempora)
License: MIT
URL: https://github.com/jaraco/tempora
Source: https://files.pythonhosted.org/packages/source/t/tempora/tempora-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module freezegun}
BuildRequires: %{python_module jaraco.functools >= 1.20}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest > 4.6}
BuildRequires: %{python_module pytest-freezegun}
BuildRequires: %{python_module setuptools >= 56}
BuildRequires: %{python_module setuptools_scm >= 3.4.1}
BuildRequires: %{python_module toml}
BuildRequires: %{python_module tzdata}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros >= 20210929
Requires: python-jaraco.functools >= 1.20
Requires: python-tzdata
BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%python_subpackages
%description
Objects and routines pertaining to date and time (tempora)
Modules include:
* tempora (top level package module) contains miscellaneous utilities and constants.
* timing contains routines for measuring and profiling.
* schedule contains an event scheduler.
%prep
%setup -q -n tempora-%{version}
sed -i '/--mypy/d' pytest.ini
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/calc-prorate
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
sed -i -e 's:--black::' -e 's:--cov::' -e 's/--flake8//g' pytest.ini
# https://github.com/jaraco/tempora/issues/22
donttest="tempora.parse_timedelta"
%pytest -k "not $donttest"
%pre
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative calc-prorate
%post
%python_install_alternative calc-prorate
%postun
%python_uninstall_alternative calc-prorate
%files %{python_files}
%license LICENSE
%doc NEWS.rst README.rst docs/*rst
%python_alternative %{_bindir}/calc-prorate
%{python_sitelib}/tempora
%{python_sitelib}/tempora-%{version}.dist-info
%changelog

3
tempora-5.6.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3bfcc12cbdbbbafecaaccb9097fc3754435b9d063dce43338e4fa87d39104aed
size 21659