import tzwin failed on Windows Python 2.x
Bug #1143880 reported by
Tommy Alex
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dateutil |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from dateutil.tzwin import tzwin
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\GNU\
import winreg
ImportError: No module named winreg
>>>
The _winreg module has been renamed to winreg in Python 3
but on python2.x, _winreg should be imported
this also make dateutil.tz.tzwin None
should import _winreg as winreg after the ImportError
Related branches
lp://staging/~ccanepacc/dateutil/fix-py2X-tzwin-import
Ready for review
for merging
into
lp://staging/dateutil
- jarondl (community): Disapprove
- Dateutil Maintainers: Pending requested
-
Diff: 15 lines (+4/-1)1 file modifieddateutil/tzwin.py (+4/-1)
To post a comment you must log in.
Hello,
I think that this patch is needed for winreg to work both on python 2 and 3.