[issue1258] Removal of basestring type
Christian Heimes
report at bugs.python.org
Tue Oct 16 01:11:45 CEST 2007
Christian Heimes added the comment:
> Any details on those? They don't fail for me.
Here you are.
$ ./python Lib/test/test_cProfile.py
121 function calls (101 primitive calls) in 1.000 CPU seconds
Ordered by: standard name
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 1.000 1.000 <string>:1(<module>)
8 0.064 0.008 0.080 0.010
test_cProfile.py:103(subhelper)
28 0.028 0.001 0.028 0.001
test_cProfile.py:115(__getattr__)
1 0.270 0.270 1.000 1.000 test_cProfile.py:30(testfunc)
23/3 0.150 0.007 0.170 0.057 test_cProfile.py:40(factorial)
20 0.020 0.001 0.020 0.001 test_cProfile.py:53(mul)
2 0.040 0.020 0.600 0.300 test_cProfile.py:60(helper)
4 0.116 0.029 0.120 0.030 test_cProfile.py:78(helper1)
2 0.000 0.000 0.140 0.070
test_cProfile.py:89(helper2_indirect)
8 0.312 0.039 0.400 0.050 test_cProfile.py:93(helper2)
1 0.000 0.000 0.000 0.000 utf_8.py:15(decode)
1 0.000 0.000 0.000 0.000 {_codecs.utf_8_decode}
1 0.000 0.000 1.000 1.000 {exec}
12 0.000 0.000 0.012 0.001 {hasattr}
4 0.000 0.000 0.000 0.000 {method 'append' of 'list'
objects}
1 0.000 0.000 0.000 0.000 {method 'disable' of
'_lsprof.Profiler' objects}
4 0.000 0.000 0.000 0.000 {sys.exc_info}
Ordered by: standard name
Function called...
ncalls tottime
cumtime
<string>:1(<module>) -> 1 0.270
1.000 test_cProfile.py:30(testfunc)
test_cProfile.py:103(subhelper) -> 16 0.016
0.016 test_cProfile.py:115(__getattr__)
test_cProfile.py:115(__getattr__) ->
test_cProfile.py:30(testfunc) -> 1 0.014
0.130 test_cProfile.py:40(factorial)
2 0.040
0.600 test_cProfile.py:60(helper)
test_cProfile.py:40(factorial) -> 20/3 0.130
0.147 test_cProfile.py:40(factorial)
20 0.020
0.020 test_cProfile.py:53(mul)
test_cProfile.py:53(mul) ->
test_cProfile.py:60(helper) -> 4 0.116
0.120 test_cProfile.py:78(helper1)
2 0.000
0.140 test_cProfile.py:89(helper2_indirect)
6 0.234
0.300 test_cProfile.py:93(helper2)
test_cProfile.py:78(helper1) -> 4 0.000
0.004 {hasattr}
4 0.000
0.000 {method 'append' of 'list' objects}
4 0.000
0.000 {sys.exc_info}
test_cProfile.py:89(helper2_indirect) -> 2 0.006
0.040 test_cProfile.py:40(factorial)
2 0.078
0.100 test_cProfile.py:93(helper2)
test_cProfile.py:93(helper2) -> 8 0.064
0.080 test_cProfile.py:103(subhelper)
8 0.000
0.008 {hasattr}
utf_8.py:15(decode) -> 1 0.000
0.000 {_codecs.utf_8_decode}
{_codecs.utf_8_decode} ->
{exec} -> 1 0.000
1.000 <string>:1(<module>)
1 0.000
0.000 utf_8.py:15(decode)
{hasattr} -> 12 0.012
0.012 test_cProfile.py:115(__getattr__)
{method 'append' of 'list' objects} ->
{method 'disable' of '_lsprof.Profiler' objects} ->
{sys.exc_info} ->
Ordered by: standard name
Function was called by...
ncalls tottime
cumtime
<string>:1(<module>) <- 1 0.000
1.000 {exec}
test_cProfile.py:103(subhelper) <- 8 0.064
0.080 test_cProfile.py:93(helper2)
test_cProfile.py:115(__getattr__) <- 16 0.016
0.016 test_cProfile.py:103(subhelper)
12 0.012
0.012 {hasattr}
test_cProfile.py:30(testfunc) <- 1 0.270
1.000 <string>:1(<module>)
test_cProfile.py:40(factorial) <- 1 0.014
0.130 test_cProfile.py:30(testfunc)
20/3 0.130
0.147 test_cProfile.py:40(factorial)
2 0.006
0.040 test_cProfile.py:89(helper2_indirect)
test_cProfile.py:53(mul) <- 20 0.020
0.020 test_cProfile.py:40(factorial)
test_cProfile.py:60(helper) <- 2 0.040
0.600 test_cProfile.py:30(testfunc)
test_cProfile.py:78(helper1) <- 4 0.116
0.120 test_cProfile.py:60(helper)
test_cProfile.py:89(helper2_indirect) <- 2 0.000
0.140 test_cProfile.py:60(helper)
test_cProfile.py:93(helper2) <- 6 0.234
0.300 test_cProfile.py:60(helper)
2 0.078
0.100 test_cProfile.py:89(helper2_indirect)
utf_8.py:15(decode) <- 1 0.000
0.000 {exec}
{_codecs.utf_8_decode} <- 1 0.000
0.000 utf_8.py:15(decode)
{exec} <-
{hasattr} <- 4 0.000
0.004 test_cProfile.py:78(helper1)
8 0.000
0.008 test_cProfile.py:93(helper2)
{method 'append' of 'list' objects} <- 4 0.000
0.000 test_cProfile.py:78(helper1)
{method 'disable' of '_lsprof.Profiler' objects} <-
{sys.exc_info} <- 4 0.000
0.000 test_cProfile.py:78(helper1)
####################################
$ ./python Lib/test/test_doctest.py
doctest (doctest) ... 66 tests with zero failures
**********************************************************************
File "/home/heimes/dev/python/py3k/Lib/test/test_doctest.py", line 1570,
in test.test_doctest.test_debug
Failed example:
try: doctest.debug_src(s)
finally: sys.stdin = real_stdin
Expected:
> <string>(1)<module>()
(Pdb) next
12
--Return--
> <string>(1)<module>()->None
(Pdb) print(x)
12
(Pdb) continue
Got:
> /home/heimes/dev/python/py3k/Lib/encodings/utf_8.py(16)decode()
-> return codecs.utf_8_decode(input, errors, True)
(Pdb) next
--Return--
>
/home/heimes/dev/python/py3k/Lib/encodings/utf_8.py(16)decode()->('<string>',
8)
-> return codecs.utf_8_decode(input, errors, True)
(Pdb) print(x)
*** NameError: NameError("name 'x' is not defined",)
(Pdb) continue
12
**********************************************************************
1 items had failures:
1 of 4 in test.test_doctest.test_debug
***Test Failed*** 1 failures.
Traceback (most recent call last):
File "Lib/test/test_doctest.py", line 2422, in <module>
test_main()
File "Lib/test/test_doctest.py", line 2406, in test_main
test_support.run_doctest(test_doctest, verbosity=True)
File "/home/heimes/dev/python/py3k/Lib/test/test_support.py", line
569, in run_doctest
raise TestFailed("%d of %d doctests failed" % (f, t))
test.test_support.TestFailed: 1 of 414 doctests failed
####################################
$ ./python Lib/test/test_email.py
Traceback (most recent call last):
File "Lib/test/test_email.py", line 13, in <module>
test_main()
File "Lib/test/test_email.py", line 10, in test_main
test_support.run_unittest(suite())
File "/home/heimes/dev/python/py3k/Lib/test/test_support.py", line
541, in run_unittest
_run_suite(suite)
File "/home/heimes/dev/python/py3k/Lib/test/test_support.py", line
524, in _run_suite
raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
File "/home/heimes/dev/python/py3k/Lib/email/test/test_email.py", line
1445, in test_same_boundary_inner_outer
msg = self._msgobj('msg_15.txt')
File "/home/heimes/dev/python/py3k/Lib/email/test/test_email.py", line
67, in _msgobj
return email.message_from_file(fp)
File "/home/heimes/dev/python/py3k/Lib/email/__init__.py", line 46, in
message_from_file
return Parser(*args, **kws).parse(fp)
File "/home/heimes/dev/python/py3k/Lib/email/parser.py", line 68, in parse
data = fp.read(8192)
File "/home/heimes/dev/python/py3k/Lib/io.py", line 1240, in read
readahead, pending = self._read_chunk()
File "/home/heimes/dev/python/py3k/Lib/io.py", line 1136, in _read_chunk
pending = self._decoder.decode(readahead, not readahead)
File "/home/heimes/dev/python/py3k/Lib/codecs.py", line 291, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xbe in position 86:
unexpected code byte
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1258>
__________________________________
More information about the Python-bugs-list
mailing list