]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 69111 via svnmerge from
authorR. David Murray <rdmurray@bitdance.com>
Fri, 29 May 2009 21:30:55 +0000 (21:30 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Fri, 29 May 2009 21:30:55 +0000 (21:30 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r69111 | brett.cannon | 2009-01-29 20:31:34 -0500 (Thu, 29 Jan 2009) | 3 lines

  The trace module was trying to turn ints into ints since co_lnotab was changed
  to a bytes object.
........

Lib/trace.py
Misc/NEWS

index a5c2f1104becce7466068390a569b0e074e443be..a272683d957287df31ea072498e57c617650bbae 100644 (file)
@@ -367,7 +367,7 @@ def find_lines_from_code(code, strs):
     """Return dict where keys are lines in the line number table."""
     linenos = {}
 
-    line_increments = [ord(c) for c in code.co_lnotab[1::2]]
+    line_increments = code.co_lnotab[1::2]
     table_length = len(line_increments)
     docstring = False
 
index 5806c0b65ea5d2966c1dfa328aff73520252f69d..a35379429b601e7de8513212592b02dbb3f6787b 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -65,6 +65,9 @@ Core and Builtins
 Library
 -------
 
+- Fix a bug in the trace module where a bytes object from co_lnotab had its
+  items being passed through ord(). (Fixes Issue #3821)
+
 - smtplib 'login' and 'cram-md5' login are also fixed (see Issue #5259).
 
 - Issue #6121: pydoc now ignores leading and trailing spaces in the