I've been running the python tests frequently today, from a checkout I did mid-morning. I just noticed an unexpected failure. This is with a regular build; I'll see if it is repeatable. Jeremy test test_strptime failed -- Traceback (most recent call last): File "/home/jeremy/src/python/dist/src/Lib/test/test_strptime.py", line 203, in test_compile self.failUnless(found, "Matching failed on '%s' using '%s' regex" % File "/home/jeremy/src/python/dist/src/Lib/unittest.py", line 268, in failUnless if not expr: raise self.failureException, msg AssertionError: Matching failed on 'Thu 05 Jun 2003 05:46:43 PM EDT' using '(?P<a>Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*(?P<d>3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])\s*(?P<b>Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s*(?P<Y>\d\d\d\d)\s*(?P<I>1[0-2]|0[1-9]|[1-9]):(?P<M>[0-5]\d|\d):(?P<S>6[0-1]|[0-5]\d|\d)\s*(?P<p>AM|PM)\s*EST' regex
On Thu, 2003-06-05 at 17:56, Jeremy Hylton wrote:
I've been running the python tests frequently today, from a checkout I did mid-morning. I just noticed an unexpected failure. This is with a regular build; I'll see if it is repeatable.
It is repeatable. It looks like the regex is expecting EST and getting EDT. Jeremy
Jeremy Hylton wrote:
On Thu, 2003-06-05 at 17:56, Jeremy Hylton wrote:
I've been running the python tests frequently today, from a checkout I did mid-morning. I just noticed an unexpected failure. This is with a regular build; I'll see if it is repeatable.
It is repeatable.
It looks like the regex is expecting EST and getting EDT.
I will take a look tomorrow. Until then, Jeremy, can you see if it passes if you back out the recent changes that modified timezone handling (I think it was just the last one; added GMT and UTC acknowledgement as well as handilng the timezone better, or so I thought)? -Brett
Brett C. wrote:
Jeremy Hylton wrote:
On Thu, 2003-06-05 at 17:56, Jeremy Hylton wrote:
I've been running the python tests frequently today, from a checkout I did mid-morning. I just noticed an unexpected failure. This is with a regular build; I'll see if it is repeatable.
It is repeatable.
I pass with no issues.
It looks like the regex is expecting EST and getting EDT.
Yep. It looks like the timezones list is getting botched.
I will take a look tomorrow.
I changed my mind. =)
Until then, Jeremy, can you see if it passes if you back out the recent changes that modified timezone handling (I think it was just the last one; added GMT and UTC acknowledgement as well as handilng the timezone better, or so I thought)?
So it is actually two versions ago; version 1.16 is what I would like you to run (1.17 tried to make timzone handling more robust and 1.18 calls time.tzset in case there was a locale change since time.tzname does not get changed without the call). Can you also run the below line of code and paste in what gets spit out?:: >>> import time, _strptime; time.daylight; time.tzname; _strptime.LocaleTime().timezone; time.daylight; time.tzname; time.tzset() -Brett
Jeremy Hylton wrote:
I've been running the python tests frequently today, from a checkout I did mid-morning. I just noticed an unexpected failure. This is with a regular build; I'll see if it is repeatable.
Jeremy
test test_strptime failed -- Traceback (most recent call last): File "/home/jeremy/src/python/dist/src/Lib/test/test_strptime.py", line 203, in test_compile self.failUnless(found, "Matching failed on '%s' using '%s' regex" % File "/home/jeremy/src/python/dist/src/Lib/unittest.py", line 268, in failUnless if not expr: raise self.failureException, msg AssertionError: Matching failed on 'Thu 05 Jun 2003 05:46:43 PM EDT' using '(?P<a>Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*(?P<d>3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])\s*(?P<b>Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s*(?P<Y>\d\d\d\d)\s*(?P<I>1[0-2]|0[1-9]|[1-9]):(?P<M>[0-5]\d|\d):(?P<S>6[0-1]|[0-5]\d|\d)\s*(?P<p>AM|PM)\s*EST' regex
Jeremy, are you still getting this failure? How about anyone else? -Brett
On Thu, 2003-06-12 at 18:24, Brett C. wrote:
test test_strptime failed -- Traceback (most recent call last): File "/home/jeremy/src/python/dist/src/Lib/test/test_strptime.py", line 203, in test_compile self.failUnless(found, "Matching failed on '%s' using '%s' regex" % File "/home/jeremy/src/python/dist/src/Lib/unittest.py", line 268, in failUnless if not expr: raise self.failureException, msg AssertionError: Matching failed on 'Thu 05 Jun 2003 05:46:43 PM EDT' using '(?P<a>Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*(?P<d>3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])\s*(?P<b>Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s*(?P<Y>\d\d\d\d)\s*(?P<I>1[0-2]|0[1-9]|[1-9]):(?P<M>[0-5]\d|\d):(?P<S>6[0-1]|[0-5]\d|\d)\s*(?P<p>AM|PM)\s*EST' regex
Jeremy, are you still getting this failure? How about anyone else?
Strangely enough, I am. I've run the tests irregularly over the last couple of weeks without seeing it. But today I ran the tests and say the failure. Is there any reason you expect that this is a transient bug? test test_strptime failed -- Traceback (most recent call last): File "/home/jeremy/src/python/dist/src/Lib/test/test_strptime.py", line 203, in test_compile self.failUnless(found, "Matching failed on '%s' using '%s' regex" % File "/home/jeremy/src/python/dist/src/Lib/unittest.py", line 268, in failUnless if not expr: raise self.failureException, msg AssertionError: Matching failed on 'Fri 27 Jun 2003 12:49:38 PM EDT' using '(?P<a>Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*(?P<d>3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])\s*(?P<b>Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s*(?P<Y>\d\d\d\d)\s*(?P<I>1[0-2]|0[1-9]|[1-9]):(?P<M>[0-5]\d|\d):(?P<S>6[0-1]|[0-5]\d|\d)\s*(?P<p>AM|PM)\s*EST' regex Jeremy
On Thu, 2003-06-12 at 18:24, Brett C. wrote:
test test_strptime failed -- Traceback (most recent call last): File "/home/jeremy/src/python/dist/src/Lib/test/test_strptime.py", line 203, in test_compile self.failUnless(found, "Matching failed on '%s' using '%s' regex" % File "/home/jeremy/src/python/dist/src/Lib/unittest.py", line 268, in failUnless if not expr: raise self.failureException, msg AssertionError: Matching failed on 'Thu 05 Jun 2003 05:46:43 PM EDT' using '(?P<a>Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*(?P<d>3[0-1]|[1-2]\d|0[1-9]|[1-9]|
[1-9])\s*(?P<b>Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s*(?P<Y>\d\d\d\d)\s*(?P<I>1[0-2]|0[1-9]|[1-9]):(?P<M>[0-5]\d|\d):( ?P<S>6[0-1]|[0-5]\d|\d)\s*(?P<p>AM|PM)\s*EST' regex
Jeremy, are you still getting this failure? How about anyone else?
Strangely enough, I am. I've run the tests irregularly over the last couple of weeks without seeing it. But today I ran the tests and say the failure.
I've run the test hundreds of times and observed no failures on my WindowsME box. The traceback above shows the pattern matches through the timezone and fails on 'EDT' vs 'EST' with the EDT being correct for this time of year. The EDT version comes from time.strftime(). I suspect the pattern's timezone is extracted from another source and the difference only shows up on certain platforms. This doesn't explain the transient nature of the bug or what needs to be changed, but I hope it helps a bit. Raymond Hettinger ################################################################# ################################################################# ################################################################# ##### ##### ##### ################################################################# ################################################################# #################################################################
Jeremy Hylton wrote:
On Thu, 2003-06-12 at 18:24, Brett C. wrote:
test test_strptime failed -- Traceback (most recent call last): File "/home/jeremy/src/python/dist/src/Lib/test/test_strptime.py", line 203, in test_compile self.failUnless(found, "Matching failed on '%s' using '%s' regex" % File "/home/jeremy/src/python/dist/src/Lib/unittest.py", line 268, in failUnless if not expr: raise self.failureException, msg AssertionError: Matching failed on 'Thu 05 Jun 2003 05:46:43 PM EDT' using '(?P<a>Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*(?P<d>3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])\s*(?P<b>Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s*(?P<Y>\d\d\d\d)\s*(?P<I>1[0-2]|0[1-9]|[1-9]):(?P<M>[0-5]\d|\d):(?P<S>6[0-1]|[0-5]\d|\d)\s*(?P<p>AM|PM)\s*EST' regex
Jeremy, are you still getting this failure? How about anyone else?
Strangely enough, I am. I've run the tests irregularly over the last couple of weeks without seeing it. But today I ran the tests and say the failure.
Is there any reason you expect that this is a transient bug?
Timezone info is fetched from time.tzname so it should be consistent but can change between platforms. Below is from an email I sent a while back. Can you try what I suggest and let me know the results?
Until then, Jeremy, can you see if it passes if you back out the recent changes that modified timezone handling (I think it was just the last one; added GMT and UTC acknowledgement as well as handilng the timezone better, or so I thought)?
So it is actually two versions ago; version 1.16 is what I would like you to run (1.17 tried to make timzone handling more robust and 1.18 calls time.tzset in case there was a locale change since time.tzname does not get changed without the call). Can you also run the below line of code and paste in what gets spit out?:: >>> import time, _strptime; time.daylight; time.tzname; _strptime.LocaleTime().timezone; time.daylight; time.tzname; time.tzset() -Brett
participants (4)
-
Brett C.
-
Jeremy Hylton
-
Jeremy Hylton
-
Raymond Hettinger