[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2016-09-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- versions: +Python 3.7 -Python 3.5 ___ Python tracker ___

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2014-06-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Eli, Given your last comment, are you still proposing your patch for inclusion or should we take the #8915 approach? -- assignee: belopolsky - nosy: -Alexander.Belopolsky versions: +Python 3.5 -Python 3.3

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2013-10-08 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- nosy: -eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8957 ___ ___ Python-bugs-list

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2011-01-15 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Sat, Jan 15, 2011 at 2:20 AM, Eli Bendersky rep...@bugs.python.org wrote: .. This solution is a hack, but so is the whole __calc_date_time function :-) [IMHO] I am not sure how to proceed. On one hand, I opened

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2011-01-15 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: 6. datetime.find(self.f_month[m]) = 0 - self.f_month[m] in datetime Python is not C! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8957

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2011-01-15 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Alexander, 1) Patch comments - thanks for those. Will have them fixed. 2) General strategy for implementing strptime. I must confess I don't fully understand the reason for doing what the _strptime module does. Standard C AFAIK has nothing of

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2011-01-15 Thread Alexander Belopolsky
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: You pretty much hit the nail on the head. Some platforms don't have strptime or did not have it at the time this code was written. The locale module is probably more recent than this code as well. -- nosy:

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2011-01-15 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Alexander, but still - this isn't just an implementation of strptime. strptime, AFAIU strptime gets the format string as a parameter and uses it to parse a date string into a tm struct. So why do we need to parse a date string *without* a

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2011-01-14 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: The problem for Hebrew appears to be the same as the one Victor stated for French. March in Hebrew is also a 3-letter word which means it's equal to its abbreviation. -- ___ Python tracker

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2011-01-14 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: I'm attaching a patch for Lib/_strptime.py that handles the month differently in __calc_date_time. It cycles all months, trying to find one where the full and abbrev names are different and matches it against the timestamp created by strftime.

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2011-01-13 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Alexander, I get the same error for the he_IL locale. Will look into this -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8957 ___

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2011-01-12 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: On Linux, cfmt.py fails on fr_FR locale (the only valid locale in the list of tested locales): --- fr_FR [mer. 12 janv. 2011 11:30:35 CET] %a %d %B %Y %H:%M:%S %Z != %a %d %b %Y %T %Z --- The problem is the month format:

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2011-01-11 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- title: strptime('%c', ..) fails to parse output of strftime('%c', ..) in non-English locale - strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales ___

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2011-01-11 Thread Roumen Petrov
Roumen Petrov bugtr...@roumenpetrov.info added the comment: - %T is equal for %H:%M:%S - locales with %A and %B are broken on this platform as %c is Appropriate date and time representation (%c) with abbreviations -- ___ Python tracker

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2011-01-11 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Tue, Jan 11, 2011 at 7:26 PM, Roumen Petrov rep...@bugs.python.org wrote: .. - locales with %A and %B are broken on this platform as %c is Appropriate date and time representation (%c) with abbreviations According to