Bug 965862

Summary: RFE: python3-iso8601
Product: [Fedora] Fedora Reporter: Jerry James <loganjerry>
Component: python-iso8601Assignee: Pádraig Brady <pbrady>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ian, pbrady
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-iso8601-0.1.10-2.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-06 03:35:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jerry James 2013-05-21 20:59:07 UTC
Description of problem:
I'm working on a package that uses python-iso8601.  This package supposedly works under both python2 and python3, so I would like to make both packages, but there is no python3-iso8601.

It appears that the python-iso8601 upstream has not been active for a few years.  The bug reports are piling up.  Some people have noticed, which is why this fork exists: https://github.com/OpenLearningNet/pyiso8601.  It fixes a few bugs, so it may be worth switching upstreams.  Sadly, the fork doesn't provide python3 support, either.

Issue 23 for the current googlecode upstream has one appraoch.  The package I am working on actually bundles pyiso8601, and takes a simpler approach.  It adds "import sys" at the top, then this a little further down:

if sys.version_info < (3, 0):
    bytes = str

and then does this:

@@ -86,8 +117,8 @@
     default timezone specified in default_timezone is used. This is UTC by
     default.
     """
-    if not isinstance(datestring, basestring):
-        raise ParseError("Expecting a string %r" % datestring)
+    if not isinstance(datestring, bytes):
+        raise ParseError("Expecting bytes %r" % datestring)
     m = ISO8601_REGEX.match(datestring)
     if not m:
         raise ParseError("Unable to parse date string %r" % datestring)


Version-Release number of selected component (if applicable):
python-iso8601-0.1.4-6.fc19.noarch

How reproducible:
N/A

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Pádraig Brady 2013-05-29 21:09:12 UTC
Yes adding the diff from python-subunit as a patch to the exising python-iso8601 package makes sense. I know the author and will ask about getting it merged upstream too.

Comment 2 Jerry James 2014-02-13 19:36:12 UTC
Pádraig, has there been any upstream movement on this?  Thanks.

Comment 3 Jerry James 2014-04-23 14:34:35 UTC
Status update, please?

Comment 4 Pádraig Brady 2014-04-24 00:22:09 UTC
Sorry, yes the patch has been merged upstream in the meantime.

I'll update the f20 package to add python3 support

Comment 5 Fedora Update System 2014-04-24 00:30:14 UTC
python-iso8601-0.1.10-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python-iso8601-0.1.10-2.fc20

Comment 6 Jerry James 2014-04-24 19:25:55 UTC
Fantastic.  Thanks a lot, Pádraig.

Comment 7 Fedora Update System 2014-04-25 04:25:59 UTC
Package python-iso8601-0.1.10-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-iso8601-0.1.10-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5564/python-iso8601-0.1.10-2.fc20
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2014-05-06 03:35:43 UTC
python-iso8601-0.1.10-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.