Ticket #3065 defect closed duplicate

Opened 5 years ago

Last modified 9 months ago

imap relies on a C locale for date formatting

Reported by: therve Owned by: argonemyth
Priority: normal Milestone:
Component: mail Keywords: locale
Cc: moijes12@… Branch:
Author: Launchpad Bug:

Description (last modified by therve) (diff)

spew_internaldate uses time.strftime, which is locale dependant. It should use something not relying on the locale.

The problem can be reproduce by running the imap test suite with gtk2 reactor and a non english locale (like fr_FR).

Change History

1

Changed 5 years ago by exarkun

  • priority changed from low to normal

This is actually a bug in the implementation of date formatting, not in the tests. The resulting string should not vary depending on the locale of the server environment.

2

Changed 5 years ago by therve

  • description modified (diff)
  • summary changed from test_imap relies on a C locale to test data formatting to imap relies on a C locale for date formatting

Yeah it seems so. I've looked at the RFC ( http://www.faqs.org/rfcs/rfc3501.html), and the format date-time uses date-month, and date-month explicitly lists the month in english abbreviated format.

3

Changed 5 years ago by therve

  • description modified (diff)

4

Changed 3 years ago by jml

  • keywords locale added

5

Changed 2 years ago by <automation>

  • owner exarkun deleted

6

Changed 11 months ago by moijes12

  • cc moijes12@… added

So, if someone were to start working on this, where does he begin ?

7

Changed 11 months ago by exarkun

Thanks for your interest in this ticket, moijes12. Can you explain what you're asking in more detail? Superficially, it seems like this ticket describes the issue in pretty good detail.

8

Changed 10 months ago by exarkun

  • owner set to argonemyth

9

Changed 9 months ago by argonemyth

  • status changed from new to closed
  • resolution set to worksforme

From what I read in the method spew_internaldate, someone already fixed the problem and we already have a test for it: test_fetchInternalDateLocaleIndependent.

Here is my local output from trial [trunk r35167]:

$ bin/trial -r gtk2 twisted.mail.test.test_imap.NewFetchTestCase.test_fetchInternalDateLocaleIndependent
twisted.mail.test.test_imap
  NewFetchTestCase
    test_fetchInternalDateLocaleIndependent ...                            [OK]

-------------------------------------------------------------------------------
Ran 1 tests in 0.059s

PASSED (successes=1)

Just to make sure, I changed my locale to fr_FR.utf8 and ran the mail test suite with gtk2 reactor, all tests passed. I am going to close this ticket, if anyone still run into this issue, please re-open the ticket.

10

Changed 9 months ago by exarkun

  • status changed from closed to reopened
  • resolution worksforme deleted

This was fixed by #4937, which was a duplicate of this ticket. Marking this one as the duplicate, since #4937 is already resolved.

11

Changed 9 months ago by exarkun

  • status changed from reopened to closed
  • resolution set to duplicate
Note: See TracTickets for help on using tickets.