Thomas Heller [Thu, 3 Feb 2005 20:37:04 +0000 (20:37 +0000)]
Running a bdist_wininst installer, built with Python 2.3, installing
for Python 2.4 caused a segfault when post_install_script was used.
The reason was that the file handle passed to PyRun_SimpleFile() was
created with MSVCRT.DLL, but Python 2.4 uses MSVCR71.DLL.
So, I replaced PyRun_SimpleFile() with PyRun_SimpleString(). The
segfault is gone, but the output of the postinstall script doesn't
show up, because still freopen() from MSVCRT is used.
Thomas Heller [Thu, 20 Jan 2005 19:25:24 +0000 (19:25 +0000)]
Some bugs have been fixed in distutils, so increment the last part of
the version number. For the distutils version numbering scheme, see
http://mail.python.org/pipermail/distutils-sig/2005-January/004368.html
Backport for bug #839496: always read files in binary mode. Opening files in
text mode may cause newline translations, making the actual size of the content
transmitted *less* than the content-length.
Backport patch #712317: In URLs such as http://www.example.com?query=spam,
treat '?' as a delimiter. Previously, the 'network location' (<authority> in
RFC 2396) would become 'www.example.com?query=spam', while RFC 2396 does not
allow a '?' in <authority>. See bug #548176 for further discussion.
Backport patch #1095362: replace hardcoded test for POST/GET with call to
get_method, removing some duplication and gaining some flexibility in the
process.
* In the documentation for createDocument(), it is now stated that the Python
DOM API allows implementations to forego creation of the document element
child node, if no namespace and local name arguments are given. (This
possibility is left open and unaddressed in the W3C spec).
* Addition by me: use 'name' rather than 'attname', for consistency with the
DOM specification and the Python DOM API implementation.
Jack Jansen [Fri, 7 Jan 2005 13:17:33 +0000 (13:17 +0000)]
Backport of Patch #1097739 by Bob Ippolito:
MacOSX: if we cannot use -undefined dynamic_lookup (such as on 10.2 or earlier)
we link extension directly against the dynamic library in the framework in
stead of against the framework. This will fix building extensions for 2.3
after 2.4 has been installed too.
Jack Jansen [Thu, 6 Jan 2005 23:16:03 +0000 (23:16 +0000)]
Backported from the trunk:
After discussion on the PythonMac-SIG it was decided that it is better
to make using "-undefined dynamic_lookup" for linking extensions more
automatic on 10.3 and later. So if we're on that platform and
MACOSX_DEPLOYMENT_TARGET is not set we now set it to the current OSX
version during configure. Additionally, distutils will pick up the
configure-time value by default.
Jack Jansen [Mon, 3 Jan 2005 15:46:45 +0000 (15:46 +0000)]
Backport of 1.37:
- Added an "installer" flavor, which uses the "open" command to install
something (overridable through Install-command entry)
- Hidden status is now determined by flavor == hidden, not by
missing Download-URL. Hidden packages behave like installer packages.
- Made some error messages a bit more understandable.
Because there's new functionality the version has been upped to 0.5.
Jack Jansen [Fri, 31 Dec 2004 11:23:20 +0000 (11:23 +0000)]
Backport:
Fix for #1091468: DESTROOTed frameworkinstalls fail. Added a --destroot
option to various tools, and do the right thing when we're doing a destroot
install.
Patch #1011890: fix inspect.getsource breaking with line-continuation &
more. Thanks to Simon Percivall!
The patch makes changes to inspect.py in two places:
* the pattern to match against functions at line 436 is
modified: lambdas should be matched even if not
preceded by whitespace, as long as "lambda" isn't part
of another word.
* the BlockFinder class is heavily modified. Changes are:
- checking for "def", "class" or "lambda" names
before setting self.started to True. Then checking the
same line for word characters after the colon (if the
colon is on that line). If so, and the line does not
end with a line continuation marker, raise EndOfBlock
immediately.
- adding self.passline to show that the line is to be
included and no more checking is necessary on that
line. Since a NEWLINE token is not generated when a
line continuation marker exists, this allows getsource
to continue with these functions even if the following
line would not be indented.
Don't backport the tests, as these have been too heavily modified on the trunk.
Jack Jansen [Tue, 28 Dec 2004 21:53:49 +0000 (21:53 +0000)]
Backport of 1.36:
- getDefaultDatabase wasn't listed in __all__.
- using a different database for non-final releases should only be done
for X.Y.0. Non-final micro releases can use the default database just fine,
as they are required to be backward compatible.
Fred Drake [Thu, 23 Dec 2004 16:55:32 +0000 (16:55 +0000)]
discuss how the __builtin__ module is normally used, and try to clarify the
difference between __builtins__ and __builtin__ (based on an email comment)
(backported from trunk revision 1.9)
Kurt B. Kaiser [Thu, 23 Dec 2004 04:32:25 +0000 (04:32 +0000)]
The GUI was hanging if the shell window was closed while a raw_input()
was pending. Restored the quit() of the readline() mainloop().
http://mail.python.org/pipermail/idle-dev/2004-December/002307.html
Walter Dörwald [Tue, 21 Dec 2004 22:35:24 +0000 (22:35 +0000)]
Backport checkin:
The changes to the stateful codecs in 2.4 resulted in StreamReader.readline()
trying to return a complete line even if a size parameter was given (see
http://www.python.org/sf/1076985). This leads to buffer overflows with long
source lines under Windows if e.g. cp1252 is used as the source encoding.
This patch reverts the behaviour of readline() to something that behaves more
like Python 2.3: If a size parameter is given, read() is called only once.
As a side effect of this, readline() now supports all types of linebreaks
supported by unicode.splitlines().
Note that the tokenizer is still broken and it's possible to provoke segfaults
(see http://www.python.org/sf/1089395).
Gregory P. Smith [Sun, 19 Dec 2004 22:25:32 +0000 (22:25 +0000)]
* reworked berkeleydb include and library detection code in setup.py
to make sure the library version that matches the header file is used.
* update the bsddb module docs to indicate BerkeleyDB 3.2 thru 4.3 support