dateutil requirement needs version spec

Bug #919551 reported by Duncan McGreggor
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
txAWS
Fix Released
Low
Duncan McGreggor

Bug Description

This ticket was originally titled "unicode/str errors in dateutil" but has been renamed to better match the fix.

I'm getting tons of errors when I run the test suite with trial in Python 2.7:

FAILED (skips=3, failures=24, errors=18, successes=381)

More of them seem to be generated due to this error:

  initial_value must be unicode or None, not str

Here's a sample traceback:

[ERROR]
Traceback (most recent call last):
  File "/Users/oubiwann/lab/txaws/trunk/txaws/s3/client.py", line 99, in _parse_list_buckets
    date_time = parseTime(date_text)
  File "/sw/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 698, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
  File "/sw/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 302, in parse
    res = self._parse(timestr, **kwargs)
  File "/sw/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 350, in _parse
    l = _timelex.split(timestr)
  File "/sw/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 144, in split
    return list(cls(s))
  File "/sw/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg/dateutil/parser.py", line 44, in __init__
    instream = StringIO(instream)
exceptions.TypeError: initial_value must be unicode or None, not str

txaws.s3.tests.test_client.S3ClientTestCase.test_list_buckets

Related branches

Revision history for this message
Thomas Herve (therve) wrote :

I notice that your dateutil version is 2.0: on its website, it's marked as python >= 3.0, not for python 2.7. Can you try again with dateutil 1.5? Thanks.

Changed in txaws:
assignee: nobody → Duncan McGreggor (oubiwann)
importance: Undecided → Low
Revision history for this message
Duncan McGreggor (oubiwann) wrote :

Yikes.

Yeah, I just used "pip install ." in the txaws directory, and it installs python-dateutil-2.0.tar.gz... so, that looks like a bug :-)

I'll update the setup.py requirements to use a version less than 2.0...

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

No matter what I set the version requirements to in setup.py, pip and easy_install still download 2.0.

I checked on PyPI, and it seems that python-dateutil only has 2.0 available, not 1.5.

I'm guessing that Gustavo needs to allow for previous versions to be downloaded (this is done from the admin page in one's PyPI account). Once it's possible to download 1.5 again, I'll give this another try...

Changed in txaws:
status: New → Incomplete
Revision history for this message
Kapil Thangavelu (hazmat) wrote : Re: [Bug 919551] Re: unicode/str errors in dateutil

Excerpts from Duncan McGreggor's message of Sun Jan 22 00:02:43 UTC 2012:
> No matter what I set the version requirements to in setup.py, pip and
> easy_install still download 2.0.
>
> I checked on PyPI, and it seems that python-dateutil only has 2.0
> available, not 1.5.
>
> I'm guessing that Gustavo needs to allow for previous versions to be
> downloaded (this is done from the admin page in one's PyPI account).
> Once it's possible to download 1.5 again, I'll give this another try...
>
> ** Changed in: txaws
> Status: New => Incomplete
>

using a version spec python-dateutil<3.0 works for me. previous versions
are accessible from gustavo's site @ http://labix.org/python-dateutil

$ virtualenv --no-site-packages v
New python executable in v/bin/python
Installing
distribute....................................................................................................................................................................................done.
Installing pip...............done.

kapil@realms-slice:~/$ . v/bin/activate

(v)kapil@realms-slice:~/$easy_install "python-dateutil<3.0"

Searching for python-dateutil<3.0
Reading http://pypi.python.org/simple/python-dateutil/
Reading http://labix.org/python-dateutil
Best match: python-dateutil 2.0
Downloading http://labix.org/download/python-dateutil/python-dateutil-2.0.tar.gz
Processing python-dateutil-2.0.tar.gz
Running python-dateutil-2.0/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-eYy2AV/python-dateutil-2.0/egg-dist-tmp-xe6iWr
Adding python-dateutil 2.0 to easy-install.pth file

Installed
/home/kapil/v/lib/python2.7/site-packages/python_dateutil-2.0-py2.7.egg
Processing dependencies for python-dateutil<3.0
Finished processing dependencies for python-dateutil<3.0

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote : Re: unicode/str errors in dateutil

dateutil 1.5 is now being show in pypi too.

Changed in txaws:
status: Incomplete → New
Revision history for this message
Duncan McGreggor (oubiwann) wrote :

@Gustavo: Thanks! Works like a charm, now.

@Kapil: Yeah, I dunno why my easy_install wasn't working, but pip for sure was having problems. It was only looking at the PyPI site, not at labix. Anyway, with Gustavo opening up the previous versions on PyPI, pip's installing the right one with the setuptools requirement updated with a version spec.

summary: - unicode/str errors in dateutil
+ dateutil requirement needs version spec
description: updated
Changed in txaws:
milestone: none → 0.3
status: New → In Progress
Changed in txaws:
status: In Progress → Fix Committed
Changed in txaws:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.