Hello community,

here is the log from the commit of package python-tempora for 
openSUSE:Leap:15.2 checked in at 2020-03-01 08:50:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-tempora (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-tempora.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-tempora"

Sun Mar  1 08:50:58 2020 rev:16 rq:780305 version:1.8

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-tempora/python-tempora.changes  
2020-01-15 15:53:45.679608839 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.python-tempora.new.26092/python-tempora.changes   
    2020-03-01 08:51:02.793234182 +0100
@@ -1,0 +2,6 @@
+Mon Feb 24 11:16:52 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update to 1.8 to work with updated portend package:
+  * Support for Timer argument
+
+-------------------------------------------------------------------

Old:
----
  tempora-1.6.1.tar.gz

New:
----
  tempora-1.8.tar.gz

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

Other differences:
------------------
++++++ python-tempora.spec ++++++
--- /var/tmp/diff_new_pack.v85hCk/_old  2020-03-01 08:51:03.153234898 +0100
+++ /var/tmp/diff_new_pack.v85hCk/_new  2020-03-01 08:51:03.157234906 +0100
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %bcond_without python2
 Name:           python-tempora
-Version:        1.6.1
+Version:        1.8
 Release:        0
 Summary:        Objects and routines pertaining to date and time (tempora)
 License:        MIT
@@ -58,7 +58,7 @@
 
 %install
 %python_install
-%fdupes %{buildroot}
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
 %python_exec -m pytest tests

++++++ tempora-1.6.1.tar.gz -> tempora-1.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/.readthedocs.yml 
new/tempora-1.8/.readthedocs.yml
--- old/tempora-1.6.1/.readthedocs.yml  1970-01-01 01:00:00.000000000 +0100
+++ new/tempora-1.8/.readthedocs.yml    2017-06-25 17:53:17.000000000 +0200
@@ -0,0 +1,5 @@
+python:
+  version: 3
+  extra_requirements:
+    - docs
+  pip_install: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/.travis.yml new/tempora-1.8/.travis.yml
--- old/tempora-1.6.1/.travis.yml       2016-09-13 02:20:01.000000000 +0200
+++ new/tempora-1.8/.travis.yml 2017-06-25 17:53:17.000000000 +0200
@@ -2,10 +2,11 @@
 language: python
 python:
 - 2.7
-- 3.5
+- 3.6
+install:
+- pip install tox "setuptools>=28.2"
 script:
-- pip install -U pytest
-- python setup.py test
+- tox
 branches:
   except:
   - skeleton
@@ -15,8 +16,9 @@
   on:
     tags: true
     all_branches: true
-    python: 3.5
+    python: 3.6
   user: jaraco
   distributions: dists
+  skip_upload_docs: true
   password:
     secure: 
biQEz9Cj1jtsTAjRztnKiJfYSA930L42f67duu7L2vdomRw/sGQOZ7ygStibeHj0mk8w+o5PV7f8oYu0NfKoonc5PF2Zlmj7izEC9Sl7zS6n8NwvToVqAuQikurfk8Fa1qv5ppqaJcbofT6/lI8Cx9fqucwCSqsIcwka7XB4Oaf+aycfVsKr/G302UTw82SnGiteYFPZeTkqUQx5zVJJ09dyTdDYc8YWP6VqmpE0KX2XxyXIwESglVXB7mf7AGI9VRh1Pji1SmsiONMmFC+UX1Um/HHhHG7Id+wKy1eO3/JYbLlq4IyZT7HnBZMVIf0Ib5fxrX7RztSO2H0tOEa1/acJQSoBMICD2j/fKk3BoxIBkY4qiKpiktNlka7AbzfBqj2qABoZFXlNIV2FPFSE6qZNUXe+NMHFVaQ5+7VS6JZUZQIt4+klbpH+UJTVIXSzbZpu2trsLsXyXdZLIYk5lg5tpGfj9DEblSJgJoMvmOmuPZMcjTfquPIw+oJ1EJayQL69VnA4czErKE1sla5ArKCEnV6yhDLFv2uze8f+XJq5Ed7ccnXEgIMW/nNRgZVLiQCbT1x5hGzKdNGUiDe6LWF8YbfbJnjEDTshBZXS0vNfPbxhkzLfzsji2kovOH6gH/Rme4ZF6RjAoMejeOPTYbB7AA2kWWeW5qlynU4ARi0=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/CHANGES.rst new/tempora-1.8/CHANGES.rst
--- old/tempora-1.6.1/CHANGES.rst       2016-09-13 02:20:01.000000000 +0200
+++ new/tempora-1.8/CHANGES.rst 2017-06-25 17:53:17.000000000 +0200
@@ -1,3 +1,22 @@
+1.8
+===
+
+Introducing ``timing.Timer``, featuring a ``expired``
+method for detecting when a certain duration has been
+exceeded.
+
+1.7.1
+=====
+
+#3: Stopwatch now behaves reliably during timezone
+    changes and (presumably) daylight savings time
+    changes.
+
+1.7
+===
+
+Update project skeleton.
+
 1.6
 ===
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/PKG-INFO new/tempora-1.8/PKG-INFO
--- old/tempora-1.6.1/PKG-INFO  2016-09-13 02:20:25.000000000 +0200
+++ new/tempora-1.8/PKG-INFO    2017-06-25 17:54:03.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
 Name: tempora
-Version: 1.6.1
+Version: 1.8
 Summary: Objects and routines pertaining to date and time (tempora)
 Home-page: https://github.com/jaraco/tempora
 Author: Jason R. Coombs
@@ -25,9 +25,18 @@
          - timing contains routines for measuring and profiling.
          - schedule contains an event scheduler.
         
+        
+        License
+        =======
+        
+        License is indicated in the project metadata (typically one or more
+        of the Trove classifiers). For more details, see `this explanation
+        <https://github.com/jaraco/skeleton/issues/1>`_.
+        
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: MIT License
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
+Requires-Python: >=2.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/README.rst new/tempora-1.8/README.rst
--- old/tempora-1.6.1/README.rst        2016-09-13 02:20:01.000000000 +0200
+++ new/tempora-1.8/README.rst  2017-06-25 17:53:17.000000000 +0200
@@ -16,3 +16,11 @@
    utilities and constants.
  - timing contains routines for measuring and profiling.
  - schedule contains an event scheduler.
+
+
+License
+=======
+
+License is indicated in the project metadata (typically one or more
+of the Trove classifiers). For more details, see `this explanation
+<https://github.com/jaraco/skeleton/issues/1>`_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/appveyor.yml 
new/tempora-1.8/appveyor.yml
--- old/tempora-1.6.1/appveyor.yml      1970-01-01 01:00:00.000000000 +0100
+++ new/tempora-1.8/appveyor.yml        2017-06-25 17:53:17.000000000 +0200
@@ -0,0 +1,21 @@
+environment:
+
+  APPVEYOR: true
+
+  matrix:
+    - PYTHON: "C:\\Python36-x64"
+    - PYTHON: "C:\\Python27-x64"
+
+install:
+  # symlink python from a directory with a space
+  - "mklink /d \"C:\\Program Files\\Python\" %PYTHON%"
+  - "SET PYTHON=\"C:\\Program Files\\Python\""
+  - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
+
+build: off
+
+test_script:
+  - "python -m pip install tox"
+  - "tox"
+
+version: '{build}'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/docs/conf.py 
new/tempora-1.8/docs/conf.py
--- old/tempora-1.6.1/docs/conf.py      2016-09-13 02:20:01.000000000 +0200
+++ new/tempora-1.8/docs/conf.py        2017-06-25 17:53:17.000000000 +0200
@@ -1,38 +1,31 @@
 #!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
-import setuptools_scm
-
 extensions = [
     'sphinx.ext.autodoc',
+    'jaraco.packaging.sphinx',
     'rst.linker',
 ]
 
-# General information about the project.
-project = 'tempora'
-copyright = '2015-2016 Jason R. Coombs'
-
-# The short X.Y version.
-version = setuptools_scm.get_version(root='..', relative_to=__file__)
-# The full version, including alpha/beta/rc tags.
-release = version
-
 master_doc = 'index'
 
 link_files = {
-       'CHANGES.rst': dict(
+       '../CHANGES.rst': dict(
                using=dict(
                        GH='https://github.com',
-                       project=project,
                ),
                replace=[
                        dict(
-                               pattern=r"(Issue )?#(?P<issue>\d+)",
-                               url='{GH}/jaraco/{project}/issues/{issue}',
+                               pattern=r'(Issue )?#(?P<issue>\d+)',
+                               url='{package_url}/issues/{issue}',
+                       ),
+                       dict(
+                               
pattern=r'^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n',
+                               with_scm='{text}\n{rev[timestamp]:%d %b %Y}\n',
                        ),
                        dict(
-                               
pattern=r"^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n",
-                               with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n",
+                               pattern=r'PEP[- ](?P<pep_number>\d+)',
+                               
url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/',
                        ),
                ],
        ),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/pytest.ini new/tempora-1.8/pytest.ini
--- old/tempora-1.6.1/pytest.ini        2016-09-13 02:20:01.000000000 +0200
+++ new/tempora-1.8/pytest.ini  2017-06-25 17:53:17.000000000 +0200
@@ -1,4 +1,4 @@
 [pytest]
-norecursedirs=*.egg .eggs dist build
+norecursedirs=dist build .tox
 addopts=--doctest-modules
 doctest_optionflags=ALLOW_UNICODE ELLIPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/setup.cfg new/tempora-1.8/setup.cfg
--- old/tempora-1.6.1/setup.cfg 2016-09-13 02:20:25.000000000 +0200
+++ new/tempora-1.8/setup.cfg   2017-06-25 17:54:03.000000000 +0200
@@ -1,16 +1,11 @@
 [aliases]
-release = dists build_sphinx upload upload_docs
+release = dists upload
 dists = clean --all sdist bdist_wheel
-test = pytest
 
 [wheel]
 universal = 1
 
-[upload]
-repository = https://upload.pypi.org/legacy/
-
 [egg_info]
 tag_build = 
-tag_svn_revision = 0
 tag_date = 0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/setup.py new/tempora-1.8/setup.py
--- old/tempora-1.6.1/setup.py  2016-09-13 02:20:01.000000000 +0200
+++ new/tempora-1.8/setup.py    2017-06-25 17:53:17.000000000 +0200
@@ -3,24 +3,16 @@
 # Project skeleton maintained at https://github.com/jaraco/skeleton
 
 import io
-import sys
 
 import setuptools
 
 with io.open('README.rst', encoding='utf-8') as readme:
        long_description = readme.read()
 
-needs_pytest = {'pytest', 'test'}.intersection(sys.argv)
-pytest_runner = ['pytest_runner'] if needs_pytest else []
-needs_sphinx = {'release', 'build_sphinx', 
'upload_docs'}.intersection(sys.argv)
-sphinx = ['sphinx', 'rst.linker'] if needs_sphinx else []
-needs_wheel = {'release', 'bdist_wheel'}.intersection(sys.argv)
-wheel = ['wheel'] if needs_wheel else []
-
 name = 'tempora'
 description = 'Objects and routines pertaining to date and time (tempora)'
 
-setup_params = dict(
+params = dict(
        name=name,
        use_scm_version=True,
        author="Jason R. Coombs",
@@ -30,19 +22,25 @@
        url="https://github.com/jaraco/"; + name,
        packages=setuptools.find_packages(),
        include_package_data=True,
-       namespace_packages=name.split('.')[:-1],
+       python_requires='>=2.7',
        install_requires=[
                'six',
                'pytz',
        ],
        extras_require={
+               'testing': [
+                       'pytest>=2.8',
+                       'pytest-sugar',
+                       'backports.unittest_mock',
+               ],
+               'docs': [
+                       'sphinx',
+                       'jaraco.packaging>=3.2',
+                       'rst.linker>=1.9',
+               ],
        },
        setup_requires=[
-               'setuptools_scm>=1.9',
-       ] + pytest_runner + sphinx + wheel,
-       tests_require=[
-               'pytest>=2.8',
-               'backports.unittest_mock',
+               'setuptools_scm>=1.15.0',
        ],
        classifiers=[
                "Development Status :: 5 - Production/Stable",
@@ -58,4 +56,4 @@
        },
 )
 if __name__ == '__main__':
-       setuptools.setup(**setup_params)
+       setuptools.setup(**params)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/tempora/timing.py 
new/tempora-1.8/tempora/timing.py
--- old/tempora-1.6.1/tempora/timing.py 2016-09-13 02:20:01.000000000 +0200
+++ new/tempora-1.8/tempora/timing.py   2017-06-25 17:53:17.000000000 +0200
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
 from __future__ import unicode_literals, absolute_import
 
 import datetime
@@ -44,16 +46,16 @@
                        del self.start_time
 
        def start(self):
-               self.start_time = datetime.datetime.now()
+               self.start_time = datetime.datetime.utcnow()
 
        def stop(self):
-               stop_time = datetime.datetime.now()
+               stop_time = datetime.datetime.utcnow()
                self.elapsed += stop_time - self.start_time
                del self.start_time
                return self.elapsed
 
        def split(self):
-               local_duration = datetime.datetime.now() - self.start_time
+               local_duration = datetime.datetime.utcnow() - self.start_time
                return self.elapsed + local_duration
 
        # context manager support
@@ -64,6 +66,7 @@
        def __exit__(self, exc_type, exc_value, traceback):
                self.stop()
 
+
 class IntervalGovernor(object):
        """
        Decorate a function to only allow it to be called once per
@@ -88,3 +91,33 @@
                return wrapper
 
        __call__ = decorate
+
+
+class Timer(Stopwatch):
+       """
+       Watch for a target elapsed time.
+
+       >>> t = Timer(0.1)
+       >>> t.expired()
+       False
+       >>> __import__('time').sleep(0.15)
+       >>> t.expired()
+       True
+       """
+       def __init__(self, target=float('Inf')):
+               self.target = self._accept(target)
+               super(Timer, self).__init__()
+
+       def _accept(self, target):
+               "Accept None or ∞ or datetime or numeric for target"
+               if isinstance(target, datetime.timedelta):
+                       target = target.total_seconds()
+
+               if target is None:
+                       # treat None as infinite target
+                       target = float('Inf')
+
+               return target
+
+       def expired(self):
+               return self.split().total_seconds() > self.target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/tempora.egg-info/PKG-INFO 
new/tempora-1.8/tempora.egg-info/PKG-INFO
--- old/tempora-1.6.1/tempora.egg-info/PKG-INFO 2016-09-13 02:20:25.000000000 
+0200
+++ new/tempora-1.8/tempora.egg-info/PKG-INFO   2017-06-25 17:54:03.000000000 
+0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
 Name: tempora
-Version: 1.6.1
+Version: 1.8
 Summary: Objects and routines pertaining to date and time (tempora)
 Home-page: https://github.com/jaraco/tempora
 Author: Jason R. Coombs
@@ -25,9 +25,18 @@
          - timing contains routines for measuring and profiling.
          - schedule contains an event scheduler.
         
+        
+        License
+        =======
+        
+        License is indicated in the project metadata (typically one or more
+        of the Trove classifiers). For more details, see `this explanation
+        <https://github.com/jaraco/skeleton/issues/1>`_.
+        
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: MIT License
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
+Requires-Python: >=2.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/tempora.egg-info/SOURCES.txt 
new/tempora-1.8/tempora.egg-info/SOURCES.txt
--- old/tempora-1.6.1/tempora.egg-info/SOURCES.txt      2016-09-13 
02:20:25.000000000 +0200
+++ new/tempora-1.8/tempora.egg-info/SOURCES.txt        2017-06-25 
17:54:03.000000000 +0200
@@ -1,10 +1,12 @@
-.gitignore
+.readthedocs.yml
 .travis.yml
 CHANGES.rst
 README.rst
+appveyor.yml
 pytest.ini
 setup.cfg
 setup.py
+tox.ini
 docs/conf.py
 docs/history.rst
 docs/index.rst
@@ -15,7 +17,6 @@
 tempora.egg-info/SOURCES.txt
 tempora.egg-info/dependency_links.txt
 tempora.egg-info/entry_points.txt
-tempora.egg-info/namespace_packages.txt
 tempora.egg-info/requires.txt
 tempora.egg-info/top_level.txt
 tempora/tests/test_schedule.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tempora-1.6.1/tempora.egg-info/namespace_packages.txt 
new/tempora-1.8/tempora.egg-info/namespace_packages.txt
--- old/tempora-1.6.1/tempora.egg-info/namespace_packages.txt   2016-09-13 
02:20:25.000000000 +0200
+++ new/tempora-1.8/tempora.egg-info/namespace_packages.txt     1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/tempora.egg-info/requires.txt 
new/tempora-1.8/tempora.egg-info/requires.txt
--- old/tempora-1.6.1/tempora.egg-info/requires.txt     2016-09-13 
02:20:25.000000000 +0200
+++ new/tempora-1.8/tempora.egg-info/requires.txt       2017-06-25 
17:54:03.000000000 +0200
@@ -1,2 +1,12 @@
 six
 pytz
+
+[docs]
+sphinx
+jaraco.packaging>=3.2
+rst.linker>=1.9
+
+[testing]
+pytest>=2.8
+pytest-sugar
+backports.unittest_mock
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/tests/test_timing.py 
new/tempora-1.8/tests/test_timing.py
--- old/tempora-1.6.1/tests/test_timing.py      2016-09-13 02:20:01.000000000 
+0200
+++ new/tempora-1.8/tests/test_timing.py        2017-06-25 17:53:17.000000000 
+0200
@@ -1,4 +1,7 @@
 import datetime
+import time
+import contextlib
+import os
 from unittest import mock
 
 from tempora import timing
@@ -18,3 +21,24 @@
        governed('b')
        governed(3, 'sir')
        func_under_test.assert_called_once_with('a')
+
+
+@contextlib.contextmanager
+def change(alt_tz, monkeypatch):
+       monkeypatch.setitem(os.environ, 'TZ', alt_tz)
+       time.tzset()
+       try:
+               yield
+       finally:
+               monkeypatch.delitem(os.environ, 'TZ')
+               time.tzset()
+
+
+def test_Stopwatch_timezone_change(monkeypatch):
+       """
+       The stopwatch should provide a consistent duration even
+       if the timezone changes.
+       """
+       watch = timing.Stopwatch()
+       with change('AEST-10AEDT-11,M10.5.0,M3.5.0', monkeypatch):
+               assert abs(watch.split().total_seconds()) < 0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tempora-1.6.1/tox.ini new/tempora-1.8/tox.ini
--- old/tempora-1.6.1/tox.ini   1970-01-01 01:00:00.000000000 +0100
+++ new/tempora-1.8/tox.ini     2017-06-25 17:53:17.000000000 +0200
@@ -0,0 +1,7 @@
+[tox]
+minversion = 2.4
+
+[testenv]
+commands = py.test {posargs}
+usedevelop = True
+extras = testing


Reply via email to