Florian Kisser added the comment:
imaplib_Time2Internaldate_locale_fix.patch was never applied to Python 2.7.
Regarding the comments I found no reason why, so this is still an issue, I
guess.
--
nosy: +Florian Kisser
___
Python tracker
Alessio added the comment:
Is anybody working with this case?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11024
___
___
Python-bugs-list
R. David Murray added the comment:
I'm not sure why this issue is still open. It looks like Alexander committed
the fix.
If you are seeing a problem, I think that would be a new bug, and you should
open a new issue giving details on how to reproduce the problem you are seeing.
--
Alessio added the comment:
Not working patch, if I use this method on append I've all messages with 1970
year
--
nosy: +Pilessio
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11024
___
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 42b9d9d795f7 by Alexander Belopolsky in branch 'default':
Issues #11024: Fixes and additional tests for Time2Internaldate.
http://hg.python.org/cpython/rev/42b9d9d795f7
--
nosy: +python-dev
R. David Murray rdmur...@bitdance.com added the comment:
The tests for this function are...not sufficient. I don't think I'm
comfortable committing a patch without improving the tests. Ideally there
would also be a test that the locale does not affect the result, which would
need to be
Sebastian Spaeth sebast...@sspaeth.de added the comment:
Added file: imaplib_Time2Internaldate_locale_fix.patch
The patch looks very good to me and works. I agree that we should be
returning a bytearray but this is should not be part of this issue.
For all that it's worth:
Signed-off-by:
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Two nitpicks:
1. To avoid repetition, I would now define Mon2num as
Mon2num = dict(zip(_month_names, range(1, 13)))
2. Please keep lines under 79 characters long.
This does not seem important enough to push to RC2, but
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Also, isn't day supposed to be space- rather than 0- padded?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11024
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
On Fri, Jan 28, 2011 at 2:44 PM, Alexander Belopolsky
rep...@bugs.python.org wrote:
..
Also, isn't day supposed to be space- rather than 0- padded?
To the best of my understanding, rfc 2060 requires space-padded day
Joe Peterson j...@skyrush.com added the comment:
Also, isn't day supposed to be space- rather than 0- padded?
This is not clear to me. RFC2822 (referenced from RFC3501 for internal date)
discusses date formats, but as used in the header. In this case, day is
specified as ([FWS] 1*2DIGIT),
Joe Peterson j...@skyrush.com added the comment:
Our messages crossed... :)
Hm, I see that in RFC 3501, as well (which obsoletes 2060).
But... I wonder: does (SP DIGIT) / 2DIGIT mean that 1 and 01 are both
OK? It seems ambiguous to me.
I still don't see why major IMAP servers are
Changes by Joe Peterson j...@skyrush.com:
Removed file:
http://bugs.python.org/file20557/imaplib_Time2Internaldate_locale_fix.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11024
___
Joe Peterson j...@skyrush.com added the comment:
Here's a new patch. I would still like to discuss the leading space vs.
leading zero issue, but I have reverted to using a leading space in this patch
- fewer changes that way.
The long line is also fixed (sorry about that - yes, long lines
Changes by Joe Peterson j...@skyrush.com:
Removed file:
http://bugs.python.org/file20587/imaplib_Time2Internaldate_locale_fix.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11024
___
Changes by Joe Peterson j...@skyrush.com:
Added file:
http://bugs.python.org/file20589/imaplib_Time2Internaldate_locale_fix.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11024
___
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
I would write the formatting code as follows:
('%2d-%s-%04d %02d:%02d:%02d %+03d%02d' %
((tt[2], _month_names[tt[1]], tt[0]) +
tt[3:6] + divmod(zone//60, 60)))
The above also assumes that month names are stored in a
Changes by Joe Peterson j...@skyrush.com:
Removed file:
http://bugs.python.org/file20589/imaplib_Time2Internaldate_locale_fix.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11024
___
Joe Peterson j...@skyrush.com added the comment:
Not cryptic at all - looks great! New patch attached with associated tweaks.
--
Added file:
http://bugs.python.org/file20591/imaplib_Time2Internaldate_locale_fix.patch
___
Python tracker
New submission from Sebastian Spaeth sebast...@sspaeth.de:
imaplib's Time2Internaldate returns invalid (as localized) INTERNALDATE
strings. Appending a message with such a time string leads to a:
19 BAD Command Argument Error. 11 (for MSÂ Exchange IMAP servers)
it returned 26-led-2011 18:23:44
Sebastian Spaeth sebast...@sspaeth.de added the comment:
P.S. To replicate this in ipython:
import locale, imaplib
locale.setlocale(locale.LC_ALL,'de_CH.utf8')
imaplib.Time2Internaldate(220254431)
Out[1]: '24-Dez-1976 06:47:11 +0100'
(Note the German 'Dez' rather than 'Dec')
--
Sebastian Spaeth sebast...@sspaeth.de added the comment:
CC'ing lavajoe as he seemed to be busy with some of imaplib's Date stuff the
last couple of days.
--
nosy: +lavajoe
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11024
Joe Peterson j...@skyrush.com added the comment:
Sebastian,
Yes, in fact Alexander Belopolsky (belopolsky) brought up the the locale issue
for this very function in one of the other issue comments.
The invert function, Internaldate2tuple(), actually does its own parsing using
a regex match
Sebastian Spaeth sebast...@sspaeth.de added the comment:
I think I found the issue he mentioned, however it was about the functions
taking the local time (rather than UTC), which is fine.
The problem is that Time2Internaldate is used for every .append() operation
internally, producing invalid
Joe Peterson j...@skyrush.com added the comment:
Yes, that's serious, certainly.
A patch should be fairly straightforward, given that part of the formatting
logic is already there (for the TZ offset at the end). You just need to format
the 6 values, and do a lookup for the month name.
If
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +r.david.murray
stage: - needs patch
versions: +Python 2.7, Python 3.1, Python 3.2 -3rd party
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11024
Joe Peterson j...@skyrush.com added the comment:
OK, I attached a patch that should work. Note that this patch works for Python
2 and Python 3.
As an aside, the str type is still returned as before (even in Python 3), and
the _month_names list uses str. As has been discussed, it may be more
Changes by Joe Peterson j...@skyrush.com:
Removed file:
http://bugs.python.org/file20556/imaplib_Time2Internaldate_locale_fix.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11024
___
Changes by Joe Peterson j...@skyrush.com:
Added file:
http://bugs.python.org/file20557/imaplib_Time2Internaldate_locale_fix.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11024
___
29 matches
Mail list logo