1
0

2 Commits

Author SHA256 Message Date
86386871b0 Accepting request 1219194 from devel:languages:python
- update to 0.7.2:
  * drop end of life python versions
  * Don't match garbage characters at the end of parsed strings
  * Fractional seconds are cut off to microseconds (always round
    down)
  * Allow control over return type of parse_duration #64 (Felix
    Claessen)
  * Python >= 3.7 required
- drop python-isodate-no-six.patch (upstream)

- add six dependency
- Remove BuildRequires: python-2to3, useless since included in main

OBS-URL: https://build.opensuse.org/request/show/1219194
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-isodate?expand=0&rev=23
2024-10-30 16:33:11 +00:00
0a9a04302f - update to 0.7.2:
* drop end of life python versions
  * Don't match garbage characters at the end of parsed strings
  * Fractional seconds are cut off to microseconds (always round
    down)
  * Allow control over return type of parse_duration #64 (Felix
    Claessen)
  * Python >= 3.7 required
- drop python-isodate-no-six.patch (upstream)
- add six dependency
- Remove BuildRequires: python-2to3, useless since included in main

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isodate?expand=0&rev=38
2024-10-29 21:31:58 +00:00
5 changed files with 30 additions and 68 deletions

Binary file not shown.

BIN
isodate-0.7.2.tar.gz LFS Normal file

Binary file not shown.

View File

@@ -1,52 +0,0 @@
Index: isodate-0.6.1/setup.py
===================================================================
--- isodate-0.6.1.orig/setup.py
+++ isodate-0.6.1/setup.py
@@ -40,7 +40,6 @@ setup(name='isodate',
# dependencies:
install_requires=[
- 'six'
],
# PyPI metadata
Index: isodate-0.6.1/src/isodate.egg-info/requires.txt
===================================================================
--- isodate-0.6.1.orig/src/isodate.egg-info/requires.txt
+++ isodate-0.6.1/src/isodate.egg-info/requires.txt
@@ -1 +0,0 @@
-six
Index: isodate-0.6.1/src/isodate/isoduration.py
===================================================================
--- isodate-0.6.1.orig/src/isodate/isoduration.py
+++ isodate-0.6.1/src/isodate/isoduration.py
@@ -34,8 +34,6 @@ from datetime import timedelta
from decimal import Decimal
import re
-from six import string_types
-
from isodate.duration import Duration
from isodate.isoerror import ISO8601Error
from isodate.isodatetime import parse_datetime
@@ -82,7 +80,7 @@ def parse_duration(datestring):
The alternative format does not support durations with years, months or
days set to 0.
"""
- if not isinstance(datestring, string_types):
+ if not isinstance(datestring, str):
raise TypeError("Expecting a string %r" % datestring)
match = ISO8601_PERIOD_REGEX.match(datestring)
if not match:
Index: isodate-0.6.1/src/isodate/tests/test_pickle.py
===================================================================
--- isodate-0.6.1.orig/src/isodate/tests/test_pickle.py
+++ isodate-0.6.1/src/isodate/tests/test_pickle.py
@@ -1,6 +1,6 @@
import unittest
-from six.moves import cPickle as pickle
+import pickle
import isodate

View File

@@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Oct 29 21:31:26 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 0.7.2:
* drop end of life python versions
* Don't match garbage characters at the end of parsed strings
* Fractional seconds are cut off to microseconds (always round
down)
* Allow control over return type of parse_duration #64 (Felix
Claessen)
* Python >= 3.7 required
- drop python-isodate-no-six.patch (upstream)
-------------------------------------------------------------------
Fri Apr 21 12:27:08 UTC 2023 - Dirk Müller <dmueller@suse.com>
@@ -32,7 +45,7 @@ Mon Dec 13 01:44:25 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
-------------------------------------------------------------------
Mon Nov 8 10:20:27 UTC 2021 - Dirk Müller <dmueller@suse.com>
- add six dependency
- add six dependency
-------------------------------------------------------------------
Wed May 26 07:18:51 UTC 2021 - pgajdos@suse.com
@@ -102,7 +115,7 @@ Wed Apr 17 14:08:25 UTC 2013 - toddrme2178@gmail.com
-------------------------------------------------------------------
Tue Apr 16 19:21:24 UTC 2013 - p.drouand@gmail.com
- Remove BuildRequires: python-2to3, useless since included in main
- Remove BuildRequires: python-2to3, useless since included in main
python devel package
- Add Requires: python3; fix build for OpenSUSE <= 12.2

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-isodate
#
# Copyright (c) 2023 SUSE LLC
# 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
@@ -16,18 +16,19 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{?sle15_python_module_pythons}
Name: python-isodate
Version: 0.6.1
Version: 0.7.2
Release: 0
Summary: An ISO 8601 Date/Time/Duration Parser and Formatter
License: BSD-3-Clause
URL: https://pypi.org/project/isodate/
Source: https://files.pythonhosted.org/packages/source/i/isodate/isodate-%{version}.tar.gz
# https://github.com/gweis/isodate/commit/07d1602048083415bc22dc72cff152c9c2e0e021
Patch0: python-isodate-no-six.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
@@ -41,21 +42,21 @@ mentioned there, then it is treated as non existent, and not as an allowed
option.
%prep
%setup -q -n isodate-%{version}
%autopatch -p1
%autosetup -p1 -n isodate-%{version}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pyunittest discover -v src/
%pytest
%files %{python_files}
%doc CHANGES.txt README.rst TODO.txt
%{python_sitelib}/*
%{python_sitelib}/isodate
%{python_sitelib}/isodate-%{version}.dist-info
%changelog