Mark Dickinson [Thu, 17 Jun 2010 12:33:22 +0000 (12:33 +0000)]
Issue #9011: Remove buggy and unnecessary ST->AST compilation code
dealing with unary minus applied to a constant. The removed code was
mutating the ST, causing a second compilation to fail. (The peephole
optimizer already takes care of optimizing this case, so there's no
lost optimization opportunity here.)
#8720: fix inspect regression by teaching getsourcefile about linecache.
The fix for issue 4050 caused a regression: before that fix, source
lines in the linecache would eventually be found by inspect. After the
fix inspect reports an error earlier, and the source isn't found.
The fix for the fix is to have getsourcefile look in the linecache for
the file and return the psuedo-filename if the source is there, just as
it already returns it if there is a PEP 302 loader.
........
Issue #9012: "Separate compilation of time and datetime modules."
Segregated code shared between time and datetime modules into
Modules/_time.c. Added a new header file, Modules/_time.h, which
will be used instead of Include/timefuncs.h for declarations shared
between time and datetime modules.
#8889: rewrite transient_internet so we don't use EAI_NODATA on FreeBSD.
FreeBSD doesn't have socket.EAI_NODATA. I rewrote the routine because
there's no easy way to conditionally include a context manager in a
with statement. As a side benefit, instead of a stack of context
managers there's now only one.
........
#5610: use \Z not $ so we don't eat extra chars when body part ends with \r\n.
If a body part ended with \r\n, feedparser, using '$' to terminate its
search for the newline, would match on the \r\n, and think that it needed
to strip two characters in order to account for the line end before the
boundary. That made it chop one too many characters off the end of
the body part. Using \Z makes the match correct.
Ronald Oussoren [Tue, 15 Jun 2010 16:05:20 +0000 (16:05 +0000)]
Fix for issue #8577: without this patch test_distutils
will fail when builddir != srcdir (that is, when you
run configure in a directory that is not the top of
the source tree).
Victor Stinner [Sun, 13 Jun 2010 18:21:50 +0000 (18:21 +0000)]
Issue #8592: PyArg_Parse*() functions raise a TypeError for "y", "u" and "Z"
formats if the string contains a null byte/character. Write unit tests for
string formats.
Issue #8986: erfc was raising OverflowError on Linux for arguments in
the (approximate) range (-27.3, 30.0), as a result of an escaped errno
value.
........
Issue 7490: make IGNORE_EXCEPTION_DETAIL also ignore details of the module containing the exception under test (original patch by Lennart Regebro)
........
Brett Cannon [Sat, 12 Jun 2010 00:39:28 +0000 (00:39 +0000)]
Calling __import__ as a method technically works, but really should be wrapped
in a staticmethod. This is important for when __import__ is set to a function
defined in Python instead of C.
Victor Stinner [Fri, 11 Jun 2010 23:30:12 +0000 (23:30 +0000)]
Fix some bugs in c-api/arg.rst documentation
* replace "the default encoding" by "'utf-8' encoding"
* fix "w" / "w*" / "w#" doc: similar to "y" / "y*" / "y#"
and not "s" / "s*" / "s#"
* "u#": remove "Non-Unicode objects are handled by interpreting their
read-buffer pointer ...", it's no more true
* "es", "es#": remove "... and objects convertible to Unicode into a character
buffer", it's no more true
* Py_BuildValue(), "K" and "L" formats: specify the name of the C type on
Windows (_int64 / unsigned _int64) as done for PyArg_Parse*() long long
types
--CETTE ligne, et les suivantes ci-dessous, seront ignorées--
Issue #8941: decoding big endian UTF-32 data in UCS-2 builds could crash
the interpreter with characters outside the Basic Multilingual Plane
(higher than 0x10000).
........
Michael Foord [Thu, 10 Jun 2010 16:16:08 +0000 (16:16 +0000)]
Merged revisions 81853 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81853 | michael.foord | 2010-06-08 23:44:52 +0100 (Tue, 08 Jun 2010) | 1 line
Issue 8948. cleanup functions are not run by unittest.TestCase.debug(), plus class and module teardowns are not run by unittest.TestSuite.debug().
........
Victor Stinner [Thu, 10 Jun 2010 12:00:55 +0000 (12:00 +0000)]
Issue #8922: Normalize the encoding name in PyUnicode_AsEncodedString() to
enable shortcuts for upper case encoding name. Add also a shortcut for
"iso-8859-1" in PyUnicode_AsEncodedString() and PyUnicode_Decode().
Victor Stinner [Tue, 8 Jun 2010 21:00:13 +0000 (21:00 +0000)]
Py_FatalError(): don't sys sys.last_xxx variables
Call PyErr_PrintEx(0) instead of PyErr_Print() to avoid a crash if
Py_FatalError() is called in an early stage of Python initialization (if PySys
is not yet initialized).
Victor Stinner [Tue, 8 Jun 2010 20:46:00 +0000 (20:46 +0000)]
sys_pyfile_write() does nothing if file is NULL
mywrite() falls back to the C file object if sys_pyfile_write() returns an
error. This patch fixes a segfault is Py_FatalError() is called in an early
stage of Python initialization.
Stefan Krah [Tue, 8 Jun 2010 13:41:44 +0000 (13:41 +0000)]
Issue #7384: If the system readline library is linked against ncurses,
the curses module must be linked against ncurses as well. Otherwise it
is not safe to load both the readline and curses modules in an application.
Thanks Thomas Dickey for answering questions about ncurses/ncursesw
and readline!
Issue #7384: If the system readline library is linked against ncurses,
the curses module must be linked against ncurses as well. Otherwise it
is not safe to load both the readline and curses modules in an application.
Thanks Thomas Dickey for answering questions about ncurses/ncursesw
and readline!
........
r81672 | stefan.krah | 2010-06-03 16:25:16 +0200 (Thu, 03 Jun 2010) | 3 lines
Use compiler rather than compiler_obj. Thanks Michael Foord for noticing.
........
r81683 | stefan.krah | 2010-06-04 11:49:20 +0200 (Fri, 04 Jun 2010) | 1 line