[issue665194] datetime-RFC2822 roundtripping

2012-08-22 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue665194] datetime-RFC2822 roundtripping

2012-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4c134e6ba0df by Alexander Belopolsky in branch 'default': Issue #665194: Added a small optimization http://hg.python.org/cpython/rev/4c134e6ba0df -- ___ Python tracker

[issue665194] datetime-RFC2822 roundtripping

2012-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 604222c1f8a0 by Alexander Belopolsky in branch 'default': Added test for a bug fixed in issue #665194. http://hg.python.org/cpython/rev/604222c1f8a0 -- ___ Python tracker

[issue665194] datetime-RFC2822 roundtripping

2012-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset a2d83fba8fd8 by R David Murray in branch 'default': #665194: fix variable name in exception code path. http://hg.python.org/cpython/rev/a2d83fba8fd8 -- ___ Python tracker

[issue665194] datetime-RFC2822 roundtripping

2012-08-22 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue665194] datetime-RFC2822 roundtripping

2012-08-22 Thread R. David Murray
R. David Murray added the comment: Leaving open until the test is committed. -- assignee: r.david.murray -> resolution: accepted -> fixed ___ Python tracker ___ ___

[issue665194] datetime-RFC2822 roundtripping

2012-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 71b9cca81598 by R David Murray in branch 'default': #665194: Update email.utils.localtime to use astimezone, and fix bug. http://hg.python.org/cpython/rev/71b9cca81598 -- ___ Python tracker

[issue665194] datetime-RFC2822 roundtripping

2012-08-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Please commit. I'll add the test. On Wed, Aug 22, 2012 at 9:11 PM, R. David Murray wrote: > > R. David Murray added the comment: > > I think restricting the test is fine. If we find a platform-specific bug on > another platform we can add a test specif

[issue665194] datetime-RFC2822 roundtripping

2012-08-22 Thread R. David Murray
R. David Murray added the comment: I think restricting the test is fine. If we find a platform-specific bug on another platform we can add a test specific to that platform when we fix the bug. Can you provide the test? I'm going to commit what I've got at this point to make sure I don't mis

[issue665194] datetime-RFC2822 roundtripping

2012-08-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > So since the other tests were passing before, presumably there > is some test that could be added to exercise the bug you were > fixing. Do you remember what that was? Yes, the issue was the one that was mentioned in an XXX comment: in many places UTC

[issue665194] datetime-RFC2822 roundtripping

2012-08-21 Thread R. David Murray
R. David Murray added the comment: And my tests and code were wrong, and I was wrong about what you were trying to fix. So since the other tests were passing before, presumably there is some test that could be added to exercise the bug you were fixing. Do you remember what that was? ---

[issue665194] datetime-RFC2822 roundtripping

2012-08-21 Thread R. David Murray
R. David Murray added the comment: Heh, I was just copying the previous code, and didn't think about being able to update it. Will make that change. -- ___ Python tracker ___

[issue665194] datetime-RFC2822 roundtripping

2012-08-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I noticed this part: +# We have an aware datetime. Use aware datetime arithmetic to find the +# seconds since the epoch. +delta = dt - datetime.datetime(*time.gmtime(0)[:6], + tzinfo=datetime.t

[issue665194] datetime-RFC2822 roundtripping

2012-08-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I'll take a look tomorrow morning. (EDT:-) -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue665194] datetime-RFC2822 roundtripping

2012-08-21 Thread R. David Murray
R. David Murray added the comment: Alexander, this slipped off my radar. Some of the tests Brian added fail with the patch applied. I fixed most of them by adding back the support for converting an aware datetime to an aware localtime. The remaining two I believe are what you are fixing with

[issue665194] datetime-RFC2822 roundtripping

2012-07-20 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue665194] datetime-RFC2822 roundtripping

2012-06-23 Thread R. David Murray
R. David Murray added the comment: Well, I guess I'd like to keep it since it does satisfy a need in the email package: to manipulate dates in the local timezone when composing messages. It isn't a critical need, though; the critical need is just to be able to have a datetime that has the co

[issue665194] datetime-RFC2822 roundtripping

2012-06-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: David, issue665194.diff patch is a bug fix for localtime(). If you decide to keep localtime(), there is not much of a rush because bug fixes can go in after beta. -- ___ Python tracker

[issue665194] datetime-RFC2822 roundtripping

2012-06-22 Thread R. David Murray
Changes by R. David Murray : -- components: +email nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue665194] datetime-RFC2822 roundtripping

2012-06-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Most of the localtime() logic is now implemented (correctly) in datetime.astimezone(). Attached patch fixes email.utils.localtime() implementation. -- status: closed -> open Added file: http://bugs.python.org/file26094/issue665194.diff ___

[issue665194] datetime-RFC2822 roundtripping

2012-05-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset df12ce0c96eb by R David Murray in branch 'default': #665194: Add a localtime function to email.utils. http://hg.python.org/cpython/rev/df12ce0c96eb -- ___ Python tracker

[issue665194] datetime-RFC2822 roundtripping

2011-07-20 Thread R. David Murray
R. David Murray added the comment: Fixed a bug (parsedate_to_datetime wasn't producing naive datetimes for -) and checked this in. Note that I have added Alexander's 'localtime' function to email.utils in my feature branch/pypi release, to facilitate testing date headers. If localtime g

[issue665194] datetime-RFC2822 roundtripping

2011-07-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5f7b03dcd523 by R David Murray in branch 'default': #665194: support roundtripping RFC2822 date stamps in the email.utils module http://hg.python.org/cpython/rev/5f7b03dcd523 -- nosy: +python-dev ___ Pyt

[issue665194] datetime-RFC2822 roundtripping

2011-07-13 Thread R. David Murray
R. David Murray added the comment: OK, here is a new patch proposal. As suggested by Alexander, it adds two functions to email.utils: format_datetime and parsedate_to_datetime. Adding these does not require having localtime. In fact, with this patch you can get an aware datetime representi

[issue665194] datetime-RFC2822 roundtripping

2011-05-05 Thread R. David Murray
R. David Murray added the comment: Yes, since the package will save the original text anyway, I think just clamping to 59 is best. Hmm. Maybe instead I could put in an assert that says "please report this incident to bugs.python.org so we can argue that datetime should get support for leap

[issue665194] datetime-RFC2822 roundtripping

2011-05-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, May 5, 2011 at 12:44 PM, R. David Murray wrote: .. > Do you think we can get 9527 in? I hope we can. Pure Python implementation can be improved by deducing the TZ offset from localtime() and gmtime() calls. In C we can use additional struct tm

[issue665194] datetime-RFC2822 roundtripping

2011-05-05 Thread R. David Murray
R. David Murray added the comment: Do you think we can get 9527 in? My patch was based on the non-existence of a LocalTimezone facility in the stdlib. Good point about the special interpretation of -. Given 9527 (and only given 9527) it would indeed make sense to restrict email to aware

[issue665194] datetime-RFC2822 roundtripping

2011-05-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Rather than shoehorning datetime class support into existing functions, I think a separate set of functions should be written to convert between RFC 2822 timestamps and datetime instances. Currently, email.utils has three functions dealing with date-ti

[issue665194] datetime-RFC2822 roundtripping

2011-05-04 Thread R. David Murray
R. David Murray added the comment: Here is a patch that adds datetime support to email.utils.formatdate. Ultimately the email package will give programs access to datetime+timezone representations of the dates in various headers, so this provides the output end of the round trip. Alexander,

[issue665194] datetime-RFC2822 roundtripping

2010-11-20 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue665194] datetime-RFC2822 roundtripping

2010-08-17 Thread Mark Lawrence
Changes by Mark Lawrence : -- versions: +Python 3.2 -Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue665194] datetime-RFC2822 roundtripping

2010-06-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: -1 on adding more formatting/parsing methods to datetime. +1 on adding functions to email.utils that work with datetime objects. Adding #5094 as a dependency because RFC 2822 requires timezone information for proper formatting. -- dependencies:

[issue665194] datetime-RFC2822 roundtripping

2010-05-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue665194] datetime-RFC2822 roundtripping

2009-04-22 Thread Daniel Diniz
Changes by Daniel Diniz : -- keywords: +easy stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue665194] datetime-RFC2822 roundtripping

2009-02-12 Thread Daniel Diniz
Daniel Diniz added the comment: Patch includes tests, should be updated. -- components: +Library (Lib) -None keywords: +patch nosy: +ajaksu2 stage: -> needs patch versions: +Python 2.7 ___ Python tracker ___