[Python-modules-commits] [python-iso8601] 01/10: Import python-iso8601_0.1.11.orig.tar.gz

Tristan Seligmann mithrandi at moszumanska.debian.org
Wed Nov 18 19:18:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

mithrandi pushed a commit to branch master
in repository python-iso8601.

commit f7278b93132c94895db96c10da282a51fe43bca7
Author: Tristan Seligmann <mithrandi at debian.org>
Date:   Wed Nov 18 21:04:00 2015 +0200

    Import python-iso8601_0.1.11.orig.tar.gz
---
 LICENSE                   |  2 +-
 PKG-INFO                  | 22 ++++++++++++++++++----
 README.rst                | 20 +++++++++++++++++---
 dev-requirements.txt      |  1 +
 iso8601.egg-info/PKG-INFO | 22 ++++++++++++++++++----
 iso8601/iso8601.py        | 23 +++++++++++++++--------
 iso8601/test_iso8601.py   |  1 +
 setup.cfg                 |  2 +-
 setup.py                  |  2 +-
 tox.ini                   |  2 +-
 10 files changed, 74 insertions(+), 23 deletions(-)

diff --git a/LICENSE b/LICENSE
index 471acb7..4eb54ea 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2007 - 2013 Michael Twomey
+Copyright (c) 2007 - 2015 Michael Twomey
 
 Permission is hereby granted, free of charge, to any person obtaining a
 copy of this software and associated documentation files (the
diff --git a/PKG-INFO b/PKG-INFO
index 0736310..996a38c 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: iso8601
-Version: 0.1.10
+Version: 0.1.11
 Summary: Simple module to parse ISO 8601 dates
 Home-page: https://bitbucket.org/micktwomey/pyiso8601
 Author: Michael Twomey
@@ -13,7 +13,7 @@ Description: Simple module to parse ISO 8601 dates
         
         >>> import iso8601
         >>> iso8601.parse_date("2007-01-25T12:00:00Z")
-        datetime.datetime(2007, 1, 25, 12, 0, tzinfo=<iso8601.iso8601.Utc ...>)
+        datetime.datetime(2007, 1, 25, 12, 0, tzinfo=<iso8601.Utc>)
         >>>
         
         See the LICENSE file for the license this package is released under.
@@ -47,7 +47,7 @@ Description: Simple module to parse ISO 8601 dates
         Time Zones
         ----------
         
-        - Nothing uses the default timezone given (UTC).
+        - Nothing, will use the default timezone given (which in turn defaults to UTC).
         - Z (UTC)
         - +/-hh:mm
         - +/-hhmm
@@ -65,7 +65,8 @@ Description: Simple module to parse ISO 8601 dates
         Homepage
         ========
         
-        - https://bitbucket.org/micktwomey/pyiso8601/
+        - Documentation: http://pyiso8601.readthedocs.org/
+        - Source: https://bitbucket.org/micktwomey/pyiso8601/
         
         This was originally hosted at https://code.google.com/p/pyiso8601/
         
@@ -100,7 +101,10 @@ Description: Simple module to parse ISO 8601 dates
         - Python 2.7
         - Python 3.2
         - Python 3.3
+        - Python 3.4
+        - Python 3.5
         - PyPy
+        - PyPy 3
         
         Python 3.0 and 3.1 are untested but should work (tests didn't run under them when last tried).
         
@@ -111,6 +115,16 @@ Description: Simple module to parse ISO 8601 dates
         Changes
         =======
         
+        0.1.11
+        ------
+        
+        * Remove logging (thanks to Quentin Pradet in https://bitbucket.org/micktwomey/pyiso8601/pull-requests/6/remove-debug-logging/diff)
+        * Add support for , as separator for fractional part (thanks to ecksun in https://bitbucket.org/micktwomey/pyiso8601/pull-requests/5/add-support-for-as-separator-for/diff)
+        * Add Python 3.4 and 3.5 to tox test config.
+        * Add PyPy 3 to tox test config.
+        * Link to documentation at http://pyiso8601.readthedocs.org/
+        
+        
         0.1.10
         ------
         
diff --git a/README.rst b/README.rst
index e854dee..f46f2a1 100644
--- a/README.rst
+++ b/README.rst
@@ -5,7 +5,7 @@ This module parses the most common forms of ISO 8601 date strings (e.g.
 
 >>> import iso8601
 >>> iso8601.parse_date("2007-01-25T12:00:00Z")
-datetime.datetime(2007, 1, 25, 12, 0, tzinfo=<iso8601.iso8601.Utc ...>)
+datetime.datetime(2007, 1, 25, 12, 0, tzinfo=<iso8601.Utc>)
 >>>
 
 See the LICENSE file for the license this package is released under.
@@ -39,7 +39,7 @@ Times
 Time Zones
 ----------
 
-- Nothing uses the default timezone given (UTC).
+- Nothing, will use the default timezone given (which in turn defaults to UTC).
 - Z (UTC)
 - +/-hh:mm
 - +/-hhmm
@@ -57,7 +57,8 @@ Known differences from the ISO 8601 spec:
 Homepage
 ========
 
-- https://bitbucket.org/micktwomey/pyiso8601/
+- Documentation: http://pyiso8601.readthedocs.org/
+- Source: https://bitbucket.org/micktwomey/pyiso8601/
 
 This was originally hosted at https://code.google.com/p/pyiso8601/
 
@@ -92,7 +93,10 @@ Tested against:
 - Python 2.7
 - Python 3.2
 - Python 3.3
+- Python 3.4
+- Python 3.5
 - PyPy
+- PyPy 3
 
 Python 3.0 and 3.1 are untested but should work (tests didn't run under them when last tried).
 
@@ -103,6 +107,16 @@ Python 2.5 is not supported (too old for the tests for the most part). It could
 Changes
 =======
 
+0.1.11
+------
+
+* Remove logging (thanks to Quentin Pradet in https://bitbucket.org/micktwomey/pyiso8601/pull-requests/6/remove-debug-logging/diff)
+* Add support for , as separator for fractional part (thanks to ecksun in https://bitbucket.org/micktwomey/pyiso8601/pull-requests/5/add-support-for-as-separator-for/diff)
+* Add Python 3.4 and 3.5 to tox test config.
+* Add PyPy 3 to tox test config.
+* Link to documentation at http://pyiso8601.readthedocs.org/
+
+
 0.1.10
 ------
 
diff --git a/dev-requirements.txt b/dev-requirements.txt
index 4c6290e..231b44b 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -1,4 +1,5 @@
 devpi>=1.2.1
 pytest>=2.5.2
+Sphinx>=1.2.1
 tox>=1.7.0
 wheel>=0.22.0
\ No newline at end of file
diff --git a/iso8601.egg-info/PKG-INFO b/iso8601.egg-info/PKG-INFO
index 0736310..996a38c 100644
--- a/iso8601.egg-info/PKG-INFO
+++ b/iso8601.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: iso8601
-Version: 0.1.10
+Version: 0.1.11
 Summary: Simple module to parse ISO 8601 dates
 Home-page: https://bitbucket.org/micktwomey/pyiso8601
 Author: Michael Twomey
@@ -13,7 +13,7 @@ Description: Simple module to parse ISO 8601 dates
         
         >>> import iso8601
         >>> iso8601.parse_date("2007-01-25T12:00:00Z")
-        datetime.datetime(2007, 1, 25, 12, 0, tzinfo=<iso8601.iso8601.Utc ...>)
+        datetime.datetime(2007, 1, 25, 12, 0, tzinfo=<iso8601.Utc>)
         >>>
         
         See the LICENSE file for the license this package is released under.
@@ -47,7 +47,7 @@ Description: Simple module to parse ISO 8601 dates
         Time Zones
         ----------
         
-        - Nothing uses the default timezone given (UTC).
+        - Nothing, will use the default timezone given (which in turn defaults to UTC).
         - Z (UTC)
         - +/-hh:mm
         - +/-hhmm
@@ -65,7 +65,8 @@ Description: Simple module to parse ISO 8601 dates
         Homepage
         ========
         
-        - https://bitbucket.org/micktwomey/pyiso8601/
+        - Documentation: http://pyiso8601.readthedocs.org/
+        - Source: https://bitbucket.org/micktwomey/pyiso8601/
         
         This was originally hosted at https://code.google.com/p/pyiso8601/
         
@@ -100,7 +101,10 @@ Description: Simple module to parse ISO 8601 dates
         - Python 2.7
         - Python 3.2
         - Python 3.3
+        - Python 3.4
+        - Python 3.5
         - PyPy
+        - PyPy 3
         
         Python 3.0 and 3.1 are untested but should work (tests didn't run under them when last tried).
         
@@ -111,6 +115,16 @@ Description: Simple module to parse ISO 8601 dates
         Changes
         =======
         
+        0.1.11
+        ------
+        
+        * Remove logging (thanks to Quentin Pradet in https://bitbucket.org/micktwomey/pyiso8601/pull-requests/6/remove-debug-logging/diff)
+        * Add support for , as separator for fractional part (thanks to ecksun in https://bitbucket.org/micktwomey/pyiso8601/pull-requests/5/add-support-for-as-separator-for/diff)
+        * Add Python 3.4 and 3.5 to tox test config.
+        * Add PyPy 3 to tox test config.
+        * Link to documentation at http://pyiso8601.readthedocs.org/
+        
+        
         0.1.10
         ------
         
diff --git a/iso8601/iso8601.py b/iso8601/iso8601.py
index becdd95..b4ffc1c 100644
--- a/iso8601/iso8601.py
+++ b/iso8601/iso8601.py
@@ -14,13 +14,10 @@ from datetime import (
     tzinfo
 )
 from decimal import Decimal
-import logging
 import sys
 import re
 
-__all__ = ["parse_date", "ParseError"]
-
-LOG = logging.getLogger(__name__)
+__all__ = ["parse_date", "ParseError", "UTC"]
 
 if sys.version_info >= (3, 0, 0):
     _basestring = str
@@ -52,7 +49,7 @@ ISO8601_REGEX = re.compile(
                     (:{0,1}(?P<minute>[0-9]{2})){0,1}
                     (
                         :{0,1}(?P<second>[0-9]{1,2})
-                        (\.(?P<second_fraction>[0-9]+)){0,1}
+                        ([.,](?P<second_fraction>[0-9]+)){0,1}
                     ){0,1}
                     (?P<timezone>
                         Z
@@ -79,7 +76,7 @@ class ParseError(Exception):
 # Yoinked from python docs
 ZERO = timedelta(0)
 class Utc(tzinfo):
-    """UTC
+    """UTC Timezone
 
     """
     def utcoffset(self, dt):
@@ -91,6 +88,9 @@ class Utc(tzinfo):
     def dst(self, dt):
         return ZERO
 
+    def __repr__(self):
+        return "<iso8601.Utc>"
+
 UTC = Utc()
 
 class FixedOffset(tzinfo):
@@ -137,7 +137,6 @@ def to_int(d, key, default_to_zero=False, default=None, required=True):
 
     """
     value = d.get(key) or default
-    LOG.debug("Got %r for %r with default %r", value, key, default)
     if (value in ["", None]) and default_to_zero:
         return 0
     if value is None:
@@ -174,6 +173,15 @@ def parse_date(datestring, default_timezone=UTC):
     have dates without a timezone (not strictly correct). In this case the
     default timezone specified in default_timezone is used. This is UTC by
     default.
+
+    :param datestring: The date to parse as a string
+    :param default_timezone: A datetime tzinfo instance to use when no timezone
+                             is specified in the datestring. If this is set to
+                             None then a naive datetime object is returned.
+    :returns: A datetime.datetime instance
+    :raises: ParseError when there is a problem parsing the date or
+             constructing the datetime instance.
+
     """
     if not isinstance(datestring, _basestring):
         raise ParseError("Expecting a string %r" % datestring)
@@ -181,7 +189,6 @@ def parse_date(datestring, default_timezone=UTC):
     if not m:
         raise ParseError("Unable to parse date string %r" % datestring)
     groups = m.groupdict()
-    LOG.debug("Parsed %s into %s with default timezone %s", datestring, groups, default_timezone)
 
     tz = parse_timezone(groups, default_timezone=default_timezone)
 
diff --git a/iso8601/test_iso8601.py b/iso8601/test_iso8601.py
index ed2d45a..bc5e763 100644
--- a/iso8601/test_iso8601.py
+++ b/iso8601/test_iso8601.py
@@ -77,6 +77,7 @@ def test_parse_invalid_date(invalid_date, error_string):
     ("1997-08-29T06:14:00.000123Z", datetime.datetime(1997, 8, 29, 6, 14, 0, 123, iso8601.UTC), "1997-08-29T06:14:00.000123+00:00"),  # https://bitbucket.org/micktwomey/pyiso8601/issue/9/regression-parsing-microseconds
     ("2014-02", datetime.datetime(2014, 2, 1, 0, 0, 0, 0, iso8601.UTC), "2014-02-01T00:00:00+00:00"),  # https://bitbucket.org/micktwomey/pyiso8601/issue/14/regression-yyyy-mm-no-longer-parses
     ("2014", datetime.datetime(2014, 1, 1, 0, 0, 0, 0, iso8601.UTC), "2014-01-01T00:00:00+00:00"),  # YYYY
+    ("1997-08-29T06:14:00,000123Z", datetime.datetime(1997, 8, 29, 6, 14, 0, 123, iso8601.UTC), "1997-08-29T06:14:00.000123+00:00"),  # Use , as decimal separator
 ])
 def test_parse_valid_date(valid_date, expected_datetime, isoformat):
     parsed = iso8601.parse_date(valid_date)
diff --git a/setup.cfg b/setup.cfg
index 72f9d44..ebbec92 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
 [egg_info]
+tag_build = 
 tag_svn_revision = 0
 tag_date = 0
-tag_build = 
 
diff --git a/setup.py b/setup.py
index 3e60572..e9dc75d 100644
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@ long_description = open(os.path.join(os.path.dirname(__file__), "README.rst")).r
 
 setup(
     name="iso8601",
-    version="0.1.10",
+    version="0.1.11",
     description=long_description.split("\n")[0],
     long_description=long_description,
     author="Michael Twomey",
diff --git a/tox.ini b/tox.ini
index 4c2697d..ac326f2 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = py26,py27,py32,py33,pypy
+envlist = py26,py27,py32,py33,py34,py35,pypy,pypy3
 
 [testenv]
 deps=pytest>=2.4.2

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-iso8601.git



More information about the Python-modules-commits mailing list