Merge change 54983 from the trunk: Add the locale "English" to test_locale.py for a windows run, since "En" isn't legal for the Visual C 8 runtime. This update restores full testsuite compliance to VisualStudio 2005 builds, apart from unavailible external modules.
Merge change 54982 from the trunk. This fixes the test_subprocess test in the testsuite for VisualStudio2005 builds, by "sanitizing" the "mode" that is used in the posixmodule's fdopen(). In particular the non-standard "U" mode character is removed.
the nb_long slot on classobject instances now defaults to call the nb_int slot member if there is no __long__ attribute found. This is in accordance with a suggestion from Armin Rigo, and allows the test_getargs2.py test in the testsuite for x64
Fix two problems that emerged when the testsuite was run with an x64 build: PyLong_FromSSize_t incorrectly assumed an unsigned object, and itertools.count() had the wrong upper limit for the iterator.
Fix NonRecursiveMutex on x64. The signature of the faux-InterlockedCompareExchange function was wrong: It works with LONG and not PVOID objects, and it needs to have the target marked as volatile. Further, it is not needed at all for x64 targets, since that platform always has the real McCoy.
Merging change 55102 from the trunk:
Fix those parts in the testsuite that assumed that sys.maxint would cause overflow on x64. Now the testsuite is well behaved on that platform.
When accessing the .value attribute of a c_wchar_p instance, and the
instance does not point to a valid wchar_t zero-terminated string,
raise a ValueError. c_char_p does this already.
The ValueError message now contains the correct pointer address.
Additional changes to the property sheets in PCBuild8. Visual Studio doesn's save those when it builds, unlike the .vcproj files, so I chekced in out-of-date versions.
Merging of change 55024 from the truk to release25-maint branch.
Complete revamp of PCBuild8 directory. Use subdirectories for each project under the main pcbuild solution. Now make extensive use of property sheets to simplify project configuration. x64 build fully supported, and the process for building PGO version (Profiler Guided Optimization) simplified. All projects are now present, except _ssl, which needs to be reimplemented. Also, some of the projects that require external libraries need extra work to fully compile on x64.
Update with the version that has been running for a while. Most of
the changes are to support multiple versions (ie, trunk and 2.5).
Also check for conflicts in the .tex file when a release is cut.
Georg Brandl [Tue, 24 Apr 2007 15:27:25 +0000 (15:27 +0000)]
Bug #1706381: Specifying the SWIG option "-c++" in the setup.py file
(as opposed to the command line) will now write file names ending in
".cpp" too.
(backport from rev. 54941)
Barry Warsaw [Mon, 23 Apr 2007 01:58:33 +0000 (01:58 +0000)]
Recommit r54805:
Add code to read from master_fd in the parent, breaking when we get an OSError
(EIO can occur on Linux) or there's no more data to read. Without this,
test_pty.py can hang on the waitpid() because the child is blocking on the
stdout write. This will definitely happen on Mac OS X and could potentially
happen on other platforms. See the comment for details.
Fix various minor issues discovered with static analysis using Visual Studio 2005 Team System.
Removed obsolete comment, since .dll modules are no longer supported on windows, only .pyd.
Lars Gustäbel [Sat, 21 Apr 2007 12:20:09 +0000 (12:20 +0000)]
Bug #1704156: Support for unicode strings as input filenames is
neither documented nor intended but works in Python 2.4 under certain
conditions. This stopped working in 2.5 because struct.pack is used.
This small patch restores the old behaviour. A more solid solution is
planned for 2.6.
Walter Dörwald [Sat, 21 Apr 2007 10:31:43 +0000 (10:31 +0000)]
Backport r54786:
Fix utf-8-sig incremental decoder, which didn't recognise a BOM when the
first chunk fed to the decoder started with a BOM, but was longer than 3 bytes.
Barry Warsaw [Fri, 13 Apr 2007 16:12:02 +0000 (16:12 +0000)]
Add code to read from master_fd in the parent, breaking when we get an OSError
(EIO can occur on Linux) or there's no more data to read. Without this,
test_pty.py can hang on the waitpid() because the child is blocking on the
stdout write. This will definitely happen on Mac OS X and could potentially
happen on other platforms. See the comment for details.
Backport 54644:
SF #1685563, MSVCCompiler creates redundant and long PATH strings
If MSVCCompiler.initialize() was called multiple times, the path
would get duplicated. On Windows, this is a problem because the
path is limited to 4k. There's no benefit in adding a path multiple
times, so prevent that from occuring. We also normalize the path
before checking for duplicates so things like /a and /a/ won't both
be stored.
Georg Brandl [Sat, 31 Mar 2007 18:58:21 +0000 (18:58 +0000)]
Bug #1655392: don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS
returned by python-config if Python was built with --enable-shared
because that prevented the shared library from being used.
(backport from rev. 54634)
Georg Brandl [Thu, 29 Mar 2007 12:42:16 +0000 (12:42 +0000)]
In Windows' time.clock(), when QueryPerformanceFrequency() fails,
the C lib's clock() is used, but it must be divided by CLOCKS_PER_SEC
as for the POSIX implementation (thanks to #pypy).
(backport from rev. 54606)
Žiga Seilnacht [Sat, 24 Mar 2007 14:27:21 +0000 (14:27 +0000)]
Patch #1489771: update syntax rules in Python Reference Manual.
Python 2.5 added support for explicit relative import statements and
yield expressions, which were missing in the manual.
Also fix grammar productions that used the names from the Grammar file,
markup that broke the generated grammar.txt, and wrap some lines that
broke the pdf output.
(backport from rev. 54559)
Georg Brandl [Wed, 21 Mar 2007 11:52:38 +0000 (11:52 +0000)]
Bug #1684254: webbrowser now uses shlex to split any command lines
given to get(). It also detects when you use '&' as the last argument
and creates a BackgroundBrowser then.
(backport -- this is a regression from 2.4 and therefore backported)
Georg Brandl [Wed, 21 Mar 2007 09:00:55 +0000 (09:00 +0000)]
Patch #1682205: a TypeError while unpacking an iterable is no longer
masked by a generic one with the message "unpack non-sequence".
(backport from rev. 54480)