- Update to 0.13.1:
* Support for python3.7 - Remove merged patch arrow-py37.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-arrow?expand=0&rev=16
This commit is contained in:
parent
71f26bfb4a
commit
5aaec9ed83
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:9cb4a910256ed536751cd5728673bfb53e6f0026e240466f90c2a92c0b79c895
|
|
||||||
size 92767
|
|
3
arrow-0.13.1.tar.gz
Normal file
3
arrow-0.13.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6f54d9f016c0b7811fac9fb8c2c7fa7421d80c54dbdd75ffb12913c55db60b8a
|
||||||
|
size 148509
|
@ -1,74 +0,0 @@
|
|||||||
From 48f5332dcdb821b0625c256972c82e48f791f39a Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Kristijan \"Fremen\" Velkovski" <me@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']
|
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 6 12:14:38 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Update to 0.13.1:
|
||||||
|
* Support for python3.7
|
||||||
|
- Remove merged patch arrow-py37.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jan 22 08:55:58 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
Tue Jan 22 08:55:58 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
@ -19,14 +19,13 @@
|
|||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%bcond_without python2
|
%bcond_without python2
|
||||||
Name: python-arrow
|
Name: python-arrow
|
||||||
Version: 0.13.0
|
Version: 0.13.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Better dates and times for Python
|
Summary: Better dates and times for Python
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/crsmithdev/arrow
|
URL: https://github.com/crsmithdev/arrow
|
||||||
Source: https://files.pythonhosted.org/packages/source/a/arrow/arrow-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/a/arrow/arrow-%{version}.tar.gz
|
||||||
Patch0: arrow-py37.patch
|
|
||||||
BuildRequires: %{python_module chai}
|
BuildRequires: %{python_module chai}
|
||||||
BuildRequires: %{python_module nose}
|
BuildRequires: %{python_module nose}
|
||||||
BuildRequires: %{python_module python-dateutil}
|
BuildRequires: %{python_module python-dateutil}
|
||||||
@ -57,7 +56,6 @@ Arrow is heavily inspired by moment.js and requests.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n arrow-%{version}
|
%setup -q -n arrow-%{version}
|
||||||
%patch0 -p1
|
|
||||||
rm -rf arrow.egg-info
|
rm -rf arrow.egg-info
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -68,7 +66,7 @@ rm -rf arrow.egg-info
|
|||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}:$PYTHONPATH" $python %{_bindir}/nosetests
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} nosetests-%{$python_bin_suffix} -v
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user