Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-tempora for openSUSE:Factory 
checked in at 2022-02-03 23:16:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-tempora (Old)
 and      /work/SRC/openSUSE:Factory/.python-tempora.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-tempora"

Thu Feb  3 23:16:11 2022 rev:12 rq:950306 version:5.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-tempora/python-tempora.changes    
2021-10-25 15:17:08.293664559 +0200
+++ /work/SRC/openSUSE:Factory/.python-tempora.new.1898/python-tempora.changes  
2022-02-03 23:16:42.444522285 +0100
@@ -1,0 +2,14 @@
+Sat Jan 29 18:11:13 UTC 2022 - Arun Persaud <a...@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.
+
+-------------------------------------------------------------------

Old:
----
  tempora-4.1.1.tar.gz

New:
----
  tempora-5.0.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-tempora.spec ++++++
--- /var/tmp/diff_new_pack.w23EtY/_old  2022-02-03 23:16:43.484515187 +0100
+++ /var/tmp/diff_new_pack.w23EtY/_new  2022-02-03 23:16:43.488515159 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-tempora
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,16 +16,15 @@
 #
 
 
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
 %if 0%{?suse_version} > 1500
 %bcond_without libalternatives
 %else
 %bcond_with libalternatives
 %endif
-
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%define skip_python2 1
 Name:           python-tempora
-Version:        4.1.1
+Version:        5.0.0
 Release:        0
 Summary:        Objects and routines pertaining to date and time (tempora)
 License:        MIT
@@ -43,14 +42,14 @@
 BuildRequires:  python-rpm-macros >= 20210929
 Requires:       python-jaraco.functools >= 1.20
 Requires:       python-pytz
+BuildArch:      noarch
 %if %{with libalternatives}
-Requires:       alts
 BuildRequires:  alts
+Requires:       alts
 %else
 Requires(post): update-alternatives
 Requires(postun):update-alternatives
 %endif
-BuildArch:      noarch
 %python_subpackages
 
 %description

++++++ tempora-4.1.1.tar.gz -> tempora-5.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-4.1.1/.editorconfig 
new/tempora-5.0.0/.editorconfig
--- old/tempora-4.1.1/.editorconfig     2021-06-21 00:45:32.000000000 +0200
+++ new/tempora-5.0.0/.editorconfig     2022-01-09 02:41:28.000000000 +0100
@@ -9,6 +9,7 @@
 
 [*.py]
 indent_style = space
+max_line_length = 88
 
 [*.{yml,yaml}]
 indent_style = space
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-4.1.1/.github/workflows/main.yml 
new/tempora-5.0.0/.github/workflows/main.yml
--- old/tempora-4.1.1/.github/workflows/main.yml        2021-06-21 
00:45:32.000000000 +0200
+++ new/tempora-5.0.0/.github/workflows/main.yml        2022-01-09 
02:41:28.000000000 +0100
@@ -7,10 +7,13 @@
     strategy:
       matrix:
         python:
-        - 3.6
+        - 3.7
         - 3.9
-        - 3.10.0-alpha - 3.10.99
-        platform: [ubuntu-latest, macos-latest, windows-latest]
+        - "3.10"
+        platform:
+        - ubuntu-latest
+        - macos-latest
+        - windows-latest
     runs-on: ${{ matrix.platform }}
     steps:
       - uses: actions/checkout@v2
@@ -34,7 +37,7 @@
       - name: Setup Python
         uses: actions/setup-python@v2
         with:
-          python-version: 3.9
+          python-version: "3.10"
       - name: Install tox
         run: |
           python -m pip install tox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-4.1.1/.pre-commit-config.yaml 
new/tempora-5.0.0/.pre-commit-config.yaml
--- old/tempora-4.1.1/.pre-commit-config.yaml   2021-06-21 00:45:32.000000000 
+0200
+++ new/tempora-5.0.0/.pre-commit-config.yaml   2022-01-09 02:41:28.000000000 
+0100
@@ -3,8 +3,3 @@
   rev: 20.8b1
   hooks:
   - id: black
-
-- repo: https://github.com/asottile/blacken-docs
-  rev: v1.9.1
-  hooks:
-  - id: blacken-docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-4.1.1/CHANGES.rst 
new/tempora-5.0.0/CHANGES.rst
--- old/tempora-4.1.1/CHANGES.rst       2021-06-21 00:45:32.000000000 +0200
+++ new/tempora-5.0.0/CHANGES.rst       2022-01-09 02:41:28.000000000 +0100
@@ -1,3 +1,16 @@
+v5.0.0
+======
+
+- Removed deprecated ``divide_*`` functions and ``Parser``
+  class.
+- Require Python 3.7 or later.
+- #19: Fixed error reporting in parse_timedelta.
+
+v4.1.2
+======
+
+- #18: Docs now build without warnings.
+
 v4.1.1
 ======
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-4.1.1/PKG-INFO new/tempora-5.0.0/PKG-INFO
--- old/tempora-4.1.1/PKG-INFO  2021-06-21 00:45:53.251093000 +0200
+++ new/tempora-5.0.0/PKG-INFO  2022-01-09 02:41:53.631449700 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: tempora
-Version: 4.1.1
+Version: 5.0.0
 Summary: Objects and routines pertaining to date and time (tempora)
 Home-page: https://github.com/jaraco/tempora
 Author: Jason R. Coombs
@@ -12,7 +12,7 @@
 Classifier: License :: OSI Approved :: MIT License
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3 :: Only
-Requires-Python: >=3.6
+Requires-Python: >=3.7
 Provides-Extra: testing
 Provides-Extra: docs
 License-File: LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-4.1.1/docs/conf.py 
new/tempora-5.0.0/docs/conf.py
--- old/tempora-4.1.1/docs/conf.py      2021-06-21 00:45:32.000000000 +0200
+++ new/tempora-5.0.0/docs/conf.py      2022-01-09 02:41:28.000000000 +0100
@@ -27,3 +27,10 @@
 
 # Be strict about any broken references:
 nitpicky = True
+
+# Include Python intersphinx mapping to prevent failures
+# jaraco/skeleton#51
+extensions += ['sphinx.ext.intersphinx']
+intersphinx_mapping = {
+    'python': ('https://docs.python.org/3', None),
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-4.1.1/pyproject.toml 
new/tempora-5.0.0/pyproject.toml
--- old/tempora-4.1.1/pyproject.toml    2021-06-21 00:45:32.000000000 +0200
+++ new/tempora-5.0.0/pyproject.toml    2022-01-09 02:41:28.000000000 +0100
@@ -1,5 +1,5 @@
 [build-system]
-requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4.1"]
+requires = ["setuptools>=56", "setuptools_scm[toml]>=3.4.1"]
 build-backend = "setuptools.build_meta"
 
 [tool.black]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-4.1.1/pytest.ini new/tempora-5.0.0/pytest.ini
--- old/tempora-4.1.1/pytest.ini        2021-06-21 00:45:32.000000000 +0200
+++ new/tempora-5.0.0/pytest.ini        2022-01-09 02:41:28.000000000 +0100
@@ -2,13 +2,6 @@
 norecursedirs=dist build .tox .eggs
 addopts=--doctest-modules
 doctest_optionflags=ALLOW_UNICODE ELLIPSIS
-# workaround for warning pytest-dev/pytest#6178
-junit_family=xunit2
 filterwarnings=
        # Suppress deprecation warning in flake8
        ignore:SelectableGroups dict interface is deprecated::flake8
-       # Suppress deprecation warning in pypa/packaging#433
-       ignore:The distutils package is deprecated::packaging.tags
-       # suppress known warnings
-       ignore:Use native division:DeprecationWarning:tempora
-       ignore:Use dateutil.parser:DeprecationWarning:tempora
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-4.1.1/setup.cfg new/tempora-5.0.0/setup.cfg
--- old/tempora-4.1.1/setup.cfg 2021-06-21 00:45:53.251093000 +0200
+++ new/tempora-5.0.0/setup.cfg 2022-01-09 02:41:53.631449700 +0100
@@ -1,6 +1,4 @@
 [metadata]
-license_files = 
-       LICENSE
 name = tempora
 author = Jason R. Coombs
 author_email = jar...@jaraco.com
@@ -17,7 +15,7 @@
 [options]
 packages = find_namespace:
 include_package_data = true
-python_requires = >=3.6
+python_requires = >=3.7
 install_requires = 
        pytz
        jaraco.functools>=1.20
@@ -31,12 +29,14 @@
 
 [options.extras_require]
 testing = 
-       pytest >= 4.6
+       pytest >= 6
        pytest-checkdocs >= 2.4
        pytest-flake8
-       pytest-black >= 0.3.7; python_implementation != "PyPy" and 
python_version < "3.10"
+       pytest-black >= 0.3.7; \
+       python_implementation != "PyPy"
        pytest-cov
-       pytest-mypy; python_implementation != "PyPy" and python_version < "3.10"
+       pytest-mypy; \
+       python_implementation != "PyPy"
        pytest-enabler >= 1.0.1
        
        backports.unittest_mock
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-4.1.1/tempora/__init__.py 
new/tempora-5.0.0/tempora/__init__.py
--- old/tempora-4.1.1/tempora/__init__.py       2021-06-21 00:45:32.000000000 
+0200
+++ new/tempora-5.0.0/tempora/__init__.py       2022-01-09 02:41:28.000000000 
+0100
@@ -5,86 +5,20 @@
 import re
 import numbers
 import functools
-import warnings
 import contextlib
 
 from jaraco.functools import once
 
 
-class Parser:
-    """
-    *deprecated*
-
-    Datetime parser: parses a date-time string using multiple possible
-    formats.
-
-    >>> p = Parser(('%H%M', '%H:%M'))
-    >>> tuple(p.parse('1319'))
-    (1900, 1, 1, 13, 19, 0, 0, 1, -1)
-    >>> dateParser = Parser(('%m/%d/%Y', '%Y-%m-%d', '%d-%b-%Y'))
-    >>> tuple(dateParser.parse('2003-12-20'))
-    (2003, 12, 20, 0, 0, 0, 5, 354, -1)
-    >>> tuple(dateParser.parse('16-Dec-1994'))
-    (1994, 12, 16, 0, 0, 0, 4, 350, -1)
-    >>> tuple(dateParser.parse('5/19/2003'))
-    (2003, 5, 19, 0, 0, 0, 0, 139, -1)
-    >>> dtParser = Parser(('%Y-%m-%d %H:%M:%S', '%a %b %d %H:%M:%S %Y'))
-    >>> tuple(dtParser.parse('2003-12-20 19:13:26'))
-    (2003, 12, 20, 19, 13, 26, 5, 354, -1)
-    >>> tuple(dtParser.parse('Tue Jan 20 16:19:33 2004'))
-    (2004, 1, 20, 16, 19, 33, 1, 20, -1)
-
-    Be forewarned, a ValueError will be raised if more than one format
-    matches:
-
-    >>> Parser(('%H%M', '%H%M%S')).parse('732')
-    Traceback (most recent call last):
-        ...
-    ValueError: More than one format string matched target 732.
-
-    >>> Parser(('%H',)).parse('22:21')
-    Traceback (most recent call last):
-    ...
-    ValueError: No format strings matched the target 22:21.
-    """
-
-    formats = ('%m/%d/%Y', '%m/%d/%y', '%Y-%m-%d', '%d-%b-%Y', '%d-%b-%y')
-    "some common default formats"
-
-    def __init__(self, formats=None):
-        warnings.warn("Use dateutil.parser", DeprecationWarning)
-        if formats:
-            self.formats = formats
-
-    def parse(self, target):
-        self.target = target
-        results = tuple(filter(None, map(self._parse, self.formats)))
-        del self.target
-        if not results:
-            tmpl = "No format strings matched the target {target}."
-            raise ValueError(tmpl.format(**locals()))
-        if not len(results) == 1:
-            tmpl = "More than one format string matched target {target}."
-            raise ValueError(tmpl.format(**locals()))
-        return results[0]
-
-    def _parse(self, format):
-        try:
-            result = time.strptime(self.target, format)
-        except ValueError:
-            result = False
-        return result
-
-
 # some useful constants
-osc_per_year = 290091329207984000
+osc_per_year = 290_091_329_207_984_000
 """
 mean vernal equinox year expressed in oscillations of atomic cesium at the
 year 2000 (see http://webexhibits.org/calendars/timeline.html for more info).
 """
-osc_per_second = 9192631770
+osc_per_second = 9_192_631_770
 seconds_per_second = 1
-seconds_per_year = 31556940
+seconds_per_year = 31_556_940
 seconds_per_minute = 60
 minutes_per_hour = 60
 hours_per_day = 24
@@ -376,21 +310,6 @@
     return ''.join(format_pieces)
 
 
-def divide_timedelta_float(td, divisor):
-    """
-    Divide a timedelta by a float value
-
-    >>> one_day = datetime.timedelta(days=1)
-    >>> half_day = datetime.timedelta(days=.5)
-    >>> divide_timedelta_float(one_day, 2.0) == half_day
-    True
-    >>> divide_timedelta_float(one_day, 2) == half_day
-    True
-    """
-    warnings.warn("Use native division", DeprecationWarning)
-    return td / divisor
-
-
 def calculate_prorated_values():
     """
     >>> monkeypatch = getfixture('monkeypatch')
@@ -461,6 +380,11 @@
     >>> diff.seconds
     20940
 
+    >>> parse_timedelta('foo')
+    Traceback (most recent call last):
+    ...
+    ValueError: Unexpected 'foo'
+
     >>> parse_timedelta('14 seconds foo')
     Traceback (most recent call last):
     ...
@@ -492,6 +416,7 @@
     datetime.timedelta(seconds=50435, microseconds=362000)
 
     TODO: Should this be 14 hours or 14 minutes?
+
     >>> parse_timedelta('14:00')
     datetime.timedelta(seconds=50400)
 
@@ -507,6 +432,13 @@
 
     >>> parse_timedelta('.002 ??s, 499 ns')
     datetime.timedelta(microseconds=1)
+
+    Expect ValueError for other invalid inputs.
+
+    >>> parse_timedelta('13 feet')
+    Traceback (most recent call last):
+    ...
+    ValueError: Invalid unit feets
     """
     return _parse_timedelta_nanos(str).resolve()
 
@@ -533,7 +465,7 @@
         check_unmatched(text[pos : match.start()])
         yield match
         pos = match.end()
-    check_unmatched(text[match.end() :])
+    check_unmatched(text[pos:])
 
 
 _unit_lookup = {
@@ -617,7 +549,11 @@
         if unit == 'nanoseconds':
             return _Saved_NS(nanoseconds=value)
 
-        res = _Saved_NS(td=datetime.timedelta(**{unit: value}))
+        try:
+            raw_td = datetime.timedelta(**{unit: value})
+        except TypeError:
+            raise ValueError(f"Invalid unit {unit}")
+        res = _Saved_NS(td=raw_td)
         with contextlib.suppress(KeyError):
             res.nanoseconds = int(value * cls.multiplier[unit]) % 1000
         return res
@@ -640,19 +576,6 @@
         return f'_Saved_NS(td={self.td!r}, nanoseconds={self.nanoseconds!r})'
 
 
-def divide_timedelta(td1, td2):
-    """
-    Get the ratio of two timedeltas
-
-    >>> one_day = datetime.timedelta(days=1)
-    >>> one_hour = datetime.timedelta(hours=1)
-    >>> divide_timedelta(one_hour, one_day) == 1 / 24
-    True
-    """
-    warnings.warn("Use native division", DeprecationWarning)
-    return td1 / td2
-
-
 def date_range(start=None, stop=None, step=None):
     """
     Much like the built-in function range, but works with dates
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-4.1.1/tempora/timing.py 
new/tempora-5.0.0/tempora/timing.py
--- old/tempora-4.1.1/tempora/timing.py 2021-06-21 00:45:32.000000000 +0200
+++ new/tempora-5.0.0/tempora/timing.py 2022-01-09 02:41:28.000000000 +0100
@@ -33,7 +33,7 @@
     ...     assert isinstance(watch.split(), datetime.timedelta)
 
     In that case, the watch is stopped when the context is exited,
-    so to read the elapsed time::
+    so to read the elapsed time:
 
     >>> watch.elapsed
     datetime.timedelta(...)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-4.1.1/tempora.egg-info/PKG-INFO 
new/tempora-5.0.0/tempora.egg-info/PKG-INFO
--- old/tempora-4.1.1/tempora.egg-info/PKG-INFO 2021-06-21 00:45:53.000000000 
+0200
+++ new/tempora-5.0.0/tempora.egg-info/PKG-INFO 2022-01-09 02:41:53.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: tempora
-Version: 4.1.1
+Version: 5.0.0
 Summary: Objects and routines pertaining to date and time (tempora)
 Home-page: https://github.com/jaraco/tempora
 Author: Jason R. Coombs
@@ -12,7 +12,7 @@
 Classifier: License :: OSI Approved :: MIT License
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3 :: Only
-Requires-Python: >=3.6
+Requires-Python: >=3.7
 Provides-Extra: testing
 Provides-Extra: docs
 License-File: LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-4.1.1/tempora.egg-info/requires.txt 
new/tempora-5.0.0/tempora.egg-info/requires.txt
--- old/tempora-4.1.1/tempora.egg-info/requires.txt     2021-06-21 
00:45:53.000000000 +0200
+++ new/tempora-5.0.0/tempora.egg-info/requires.txt     2022-01-09 
02:41:53.000000000 +0100
@@ -7,7 +7,7 @@
 rst.linker>=1.9
 
 [testing]
-pytest>=4.6
+pytest>=6
 pytest-checkdocs>=2.4
 pytest-flake8
 pytest-cov
@@ -18,6 +18,6 @@
 types-freezegun
 types-pytz
 
-[testing:platform_python_implementation != "PyPy" and python_version < "3.10"]
+[testing:platform_python_implementation != "PyPy"]
 pytest-black>=0.3.7
 pytest-mypy

Reply via email to