New Upstream Release - python-pytimeparse
Ready changes
Summary
Merged new upstream version: 1.1.8 (was: 1.1.5).
Resulting package
Built on 2023-08-14T09:51 (took 6m18s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-releases python3-pytimeparse
Lintian Result
Diff
diff --git a/.travis.yml b/.travis.yml
index e644439..415fd0f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,8 +4,10 @@ python:
- "3.2"
- "3.3"
- "3.4"
+ - "3.5"
+ - "3.6"
# command to install dependencies
-install: "pip install . coveralls"
+install: "pip install . 'coverage<4' coveralls"
# command to run tests
script:
coverage run --source=pytimeparse setup.py test
diff --git a/LICENSE.rst b/LICENSE.rst
new file mode 100644
index 0000000..d5143a0
--- /dev/null
+++ b/LICENSE.rst
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Will Roberts
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/MANIFEST.in b/MANIFEST.in
index 6464c08..55bb35f 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,2 +1,3 @@
+include LICENSE.rst
include README.rst
include pytimeparse/VERSION
diff --git a/README.rst b/README.rst
index 822c651..76438e2 100644
--- a/README.rst
+++ b/README.rst
@@ -10,7 +10,7 @@
:target: https://coveralls.io/r/wroberts/pytimeparse
:alt: Test code coverage
-.. image:: https://pypip.in/version/pytimeparse/badge.svg
+.. image:: https://img.shields.io/pypi/v/pytimeparse.svg
:target: https://pypi.python.org/pypi/pytimeparse/
:alt: Latest Version
diff --git a/debian/changelog b/debian/changelog
index 124bfa0..275b4ab 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-pytimeparse (1.1.8-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk> Mon, 14 Aug 2023 09:45:36 -0000
+
python-pytimeparse (1.1.5-4) unstable; urgency=medium
[ Ondřej Nový ]
diff --git a/pytimeparse/VERSION b/pytimeparse/VERSION
index e25d8d9..18efdb9 100644
--- a/pytimeparse/VERSION
+++ b/pytimeparse/VERSION
@@ -1 +1 @@
-1.1.5
+1.1.8
diff --git a/pytimeparse/timeparse.py b/pytimeparse/timeparse.py
index 94a5c64..3be5a22 100644
--- a/pytimeparse/timeparse.py
+++ b/pytimeparse/timeparse.py
@@ -71,8 +71,16 @@ TIMEFORMATS = [
DAYCLOCK=DAYCLOCK),
r'{SECCLOCK}'.format(
SECCLOCK=SECCLOCK),
+ #r'{YEARS}'.format(
+ #YEARS=YEARS),
+ #r'{MONTHS}'.format(
+ #MONTHS=MONTHS),
]
+COMPILED_SIGN = re.compile(r'\s*' + SIGN + r'\s*(?P<unsigned>.*)$')
+COMPILED_TIMEFORMATS = [re.compile(r'\s*' + timefmt + r'\s*$', re.I)
+ for timefmt in TIMEFORMATS]
+
MULTIPLIERS = dict([
#('years', 60 * 60 * 24 * 365),
#('months', 60 * 60 * 24 * 30),
@@ -98,6 +106,8 @@ def _interpret_as_minutes(sval, mdict):
and (('hours' not in mdict) or (mdict['hours'] is None))
and (('days' not in mdict) or (mdict['days'] is None))
and (('weeks' not in mdict) or (mdict['weeks'] is None))
+ #and (('months' not in mdict) or (mdict['months'] is None))
+ #and (('years' not in mdict) or (mdict['years'] is None))
):
mdict['hours'] = mdict['mins']
mdict['mins'] = mdict['secs']
@@ -143,11 +153,11 @@ def timeparse(sval, granularity='seconds'):
>>> timeparse('1:30', granularity='minutes')
5400
'''
- match = re.match(r'\s*' + SIGN + r'\s*(?P<unsigned>.*)$', sval)
+ match = COMPILED_SIGN.match(sval)
sign = -1 if match.groupdict()['sign'] == '-' else 1
sval = match.groupdict()['unsigned']
- for timefmt in TIMEFORMATS:
- match = re.match(r'\s*' + timefmt + r'\s*$', sval, re.I)
+ for timefmt in COMPILED_TIMEFORMATS:
+ match = timefmt.match(sval)
if match and match.group(0).strip():
mdict = match.groupdict()
if granularity == 'minutes':
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..79bc678
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,5 @@
+[bdist_wheel]
+# This flag says that the code is written to work on both Python 2 and Python
+# 3. If at all possible, it is good practice to do this. If you cannot, you
+# will need to generate wheels for each Python version that you support.
+universal=1
diff --git a/setup.py b/setup.py
index 677f002..c57954d 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,6 @@ distutils setup script for pytimeparse.
from setuptools import setup, find_packages # Always prefer setuptools over distutils
from codecs import open # To use a consistent encoding
from os import path
-import sys
HERE = path.abspath(path.dirname(__file__))
@@ -41,7 +40,7 @@ setup(
author_email='wildwilhelm@gmail.com',
# Choose your license
- license='MIT',
+ license='License :: OSI Approved :: MIT License',
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
@@ -67,6 +66,8 @@ setup(
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
],
# What does your project relate to?
Debdiff
[The following lists of changes regard files as different if they have different names, permissions or owners.]
Files in second set of .debs but not in first
-rw-r--r-- root/root /usr/lib/python3/dist-packages/pytimeparse-1.1.8.egg-info/PKG-INFO -rw-r--r-- root/root /usr/lib/python3/dist-packages/pytimeparse-1.1.8.egg-info/dependency_links.txt -rw-r--r-- root/root /usr/lib/python3/dist-packages/pytimeparse-1.1.8.egg-info/top_level.txt
Files in first set of .debs but not in second
-rw-r--r-- root/root /usr/lib/python3/dist-packages/pytimeparse-1.1.5.egg-info/PKG-INFO -rw-r--r-- root/root /usr/lib/python3/dist-packages/pytimeparse-1.1.5.egg-info/dependency_links.txt -rw-r--r-- root/root /usr/lib/python3/dist-packages/pytimeparse-1.1.5.egg-info/top_level.txt
No differences were encountered in the control files