python 3.3 unhappy with setup.py

Bug #1208910 reported by Alex Conley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dateutil
Fix Released
Undecided
Unassigned

Bug Description

Python 3.3 doesn't like the setup.py file, specifically the UTF-8 characters in author
if your default encoding doesn't support unicode. It works fine in python 3.2.

This is easy to fix though, since in python 3.0+ there is an optional encoding argument.

For example (in setup.py):

import sys

major, minor1, minor2, release, serial = sys.version_info
if major >= 3:
  f = open(TOPDIR + "/dateutil/__init__.py", encoding="utf-8")
else:
  f = open(TOPDIR + "/dateutil/__init__.py")

VERSION = re.search('__version__ = "[^"]+)"', f.read()).group(1)
f.close()

With this, python-dateutil installs fine on python 3.3 (or 3.2)
and passes the tests.

Revision history for this message
Mike Droettboom (mdboom) wrote :

This affects the use of matplotlib on Python 3.3.

http://github.com/matplotlib/matplotlib/issues/2373

Revision history for this message
Tomi Hukkalainen (tpievila) wrote :

This had been fixed in trunk, but hadn't been released until now. Sorry about that.

Changed in dateutil:
status: New → 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.