Hello community, here is the log from the commit of package python-arrow for openSUSE:Factory checked in at 2019-01-28 20:47:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-arrow (Old) and /work/SRC/openSUSE:Factory/.python-arrow.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-arrow" Mon Jan 28 20:47:02 2019 rev:6 rq:667743 version:0.13.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-arrow/python-arrow.changes 2019-01-21 11:03:32.931027925 +0100 +++ /work/SRC/openSUSE:Factory/.python-arrow.new.28833/python-arrow.changes 2019-01-28 20:48:58.181871938 +0100 @@ -1,0 +2,6 @@ +Tue Jan 22 08:55:58 UTC 2019 - Tomáš Chvátal <tchva...@suse.com> + +- Add patch to work with python 3.7: + * arrow-py37.patch + +------------------------------------------------------------------- New: ---- arrow-py37.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-arrow.spec ++++++ --- /var/tmp/diff_new_pack.kRmlhO/_old 2019-01-28 20:48:58.757871331 +0100 +++ /var/tmp/diff_new_pack.kRmlhO/_new 2019-01-28 20:48:58.757871331 +0100 @@ -24,8 +24,9 @@ Summary: Better dates and times for Python License: Apache-2.0 Group: Development/Languages/Python -URL: http://crsmithdev.com/arrow +URL: https://github.com/crsmithdev/arrow Source: https://files.pythonhosted.org/packages/source/a/arrow/arrow-%{version}.tar.gz +Patch0: arrow-py37.patch BuildRequires: %{python_module chai} BuildRequires: %{python_module nose} BuildRequires: %{python_module python-dateutil} @@ -56,6 +57,7 @@ %prep %setup -q -n arrow-%{version} +%patch0 -p1 rm -rf arrow.egg-info %build @@ -63,7 +65,7 @@ %install %python_install -%python_expand %fdupes -s %{buildroot}%{$python_sitelib} +%python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}:$PYTHONPATH" $python %{_bindir}/nosetests ++++++ arrow-py37.patch ++++++ >From 48f5332dcdb821b0625c256972c82e48f791f39a Mon Sep 17 00:00:00 2001 From: "Kristijan \"Fremen\" Velkovski" <m...@krisfremen.com> Date: Sun, 9 Sep 2018 10:17:46 +0000 Subject: [PATCH 1/3] Python 3.7 support. --- arrow/arrow.py | 14 +++++++------- arrow/util.py | 8 -------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/arrow/arrow.py b/arrow/arrow.py index c8e2606..054889f 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -195,7 +195,6 @@ def strptime(cls, date_str, fmt, tzinfo=None): # factories: ranges and spans @classmethod - @util.list_to_iter_deprecation def range(cls, frame, start, end=None, tz=None, limit=None): ''' Returns an iterator of :class:`Arrow <arrow.arrow.Arrow>` objects, representing points in time between two inputs. @@ -267,7 +266,6 @@ def range(cls, frame, start, end=None, tz=None, limit=None): @classmethod - @util.list_to_iter_deprecation def span_range(cls, frame, start, end, tz=None, limit=None): ''' Returns an iterator of tuples, each :class:`Arrow <arrow.arrow.Arrow>` objects, representing a series of timespans between two inputs. @@ -319,7 +317,6 @@ def span_range(cls, frame, start, end, tz=None, limit=None): return (r.span(frame) for r in _range) @classmethod - @util.list_to_iter_deprecation def interval(cls, frame, start, end, interval=1, tz=None): ''' Returns an iterator of tuples, each :class:`Arrow <arrow.arrow.Arrow>` objects, representing a series of intervals between two inputs. @@ -360,10 +357,13 @@ def interval(cls, frame, start, end, interval=1, tz=None): spanRange = iter(cls.span_range(frame, start, end, tz)) while True: - intvlStart, intvlEnd = next(spanRange) # StopIteration when exhausted - for _ in range(interval-1): - _, intvlEnd = next(spanRange) # StopIteration when exhausted - yield intvlStart, intvlEnd + try: + intvlStart, intvlEnd = next(spanRange) + for _ in range(interval-1): + _, intvlEnd = next(spanRange) + yield intvlStart, intvlEnd + except StopIteration: + return # representations diff --git a/arrow/util.py b/arrow/util.py index 088e5df..5f804c4 100644 --- a/arrow/util.py +++ b/arrow/util.py @@ -99,12 +99,4 @@ def wrapper(self, *args, **kwargs): del _wrap_method -def list_to_iter_deprecation(f): - warn_text = '{0}() will return an iterator in a future release, convert to list({0}())'.format(f.__name__) - @functools.wraps(f) - def wrapper(*args, **kwargs): - return list_to_iter_shim(f(*args, **kwargs), warn_text=warn_text) - return wrapper - - __all__ = ['total_seconds', 'is_timestamp', 'isstr', 'list_to_iter_shim', 'list_to_iter_deprecation']