User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7 None is passed into the LocalTimezone instance methods for the datetime object, which is not supported in the _isdst method Reproducible: Always Steps to Reproduce: 1.create datetime instance with isodate.LOCAL tzinfo 2.pass instance into isodate.strftime method 3.get traceback Actual Results: tracback Expected Results: iso8601 formatted datetime instance with local timezone patch provided
Created attachment 557330 [details] patch that detects None datetime instance and substitutes now() should be submitted upstream
Thanks for the bug report. Surprisingly, I'm not incredibly familiar with the isodate codebase, but from what I can tell, with or without the provided patch, the result is unchanged. # python -c 'import isodate ; isodate.strftime(isodate.LOCAL, "%Y")' Traceback (most recent call last): File "<string>", line 1, in <module> File "isodate/isostrf.py", line 207, in strftime return _strfdt(tdt, format, yeardigits) File "isodate/isostrf.py", line 182, in _strfdt format) File "/usr/lib64/python2.7/re.py", line 151, in sub return _compile(pattern, flags).sub(repl, string, count) File "isodate/isostrf.py", line 179, in repl return STRF_DT_MAP[match.group(0)](tdt, yeardigits) File "isodate/isostrf.py", line 97, in <lambda> (('%%0%dd' % yds) % tdt.year), AttributeError: 'LocalTimezone' object has no attribute 'year' I'm likely not triggering the failure you've reported. Can you supply the reproducer? And yes, this suggested patch should likely go upstream. I can help with that in this bug report if you like.
Created attachment 557487 [details] quick python script that demonstrates the bug
python-isodate-0.4.7-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/FEDORA-2012-0889/python-isodate-0.4.7-1.fc16
Package python-isodate-0.4.7-1.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing python-isodate-0.4.7-1.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-0889/python-isodate-0.4.7-1.fc16 then log in and leave karma (feedback).
python-isodate-0.4.7-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.