Only override the AC_PROG_CC determined CFLAGS if they were set by the user.
This restores the default behavior in the common case of not having CFLAGS
defined when running configure.
Ronald Oussoren [Fri, 30 Apr 2010 11:20:14 +0000 (11:20 +0000)]
Fix for issue #3646: with this patch it is possible to do a
framework install of Python in your home directory (on OSX):
$ configure --enable-framework=${HOME}/Library/Frameworks
$ make && make install
Without this patch the framework would get installed just fine,
but 'make install' would try to install the application bundles
and command-line tools outside the user's home, which doesn't work
for non-admin users (and is bad form anyway).
Fix doubled 'the'.
Markup fixes to use :exc:, :option: in a few places.
(Glitch: unittest.main's -c ends up a link to the Python
interpreter's -c option. Should we skip using :option: for that
switch, or disable the auto-linking somehow?)
Victor Stinner [Tue, 27 Apr 2010 23:55:59 +0000 (23:55 +0000)]
Issue #7449, last part (11): fix many tests if thread support is disabled
* Use try/except ImportError or test_support.import_module() to import thread
and threading modules
* Add @unittest.skipUnless(threading, ...) to testcases using threads
Victor Stinner [Tue, 27 Apr 2010 23:51:16 +0000 (23:51 +0000)]
Issue #7449, part 10: test_cmd imports trace module using test_support.import_module()
Use test_support.import_module() instead of import to raise a SkipTest
exception if the import fail. Import trace fails if the threading module is
missing.
See also part 3: test_doctest: import trace module in test_coverage().
Victor Stinner [Tue, 27 Apr 2010 23:33:58 +0000 (23:33 +0000)]
Partial revert of r80556 (Issue #7449, part 5, fix ctypes test)
Rewrite r80556: the thread test have to be executed just after the test on
libc_open() and so the test cannot be splitted in two functions (without
duplicating code, and I don't want to duplicate code).
Victor Stinner [Tue, 27 Apr 2010 23:14:58 +0000 (23:14 +0000)]
Issue #7449, part 9: fix test_xmlrpclib for missing threading module
* Skip testcases using threads if threading module is missing
* Use "http://" instead of URL in ServerProxyTestCase if threading is missing
because URL is not set in this case
Victor Stinner [Tue, 27 Apr 2010 23:01:29 +0000 (23:01 +0000)]
Issue #7449, part 7: simplify threading detection in test_capi
* Skip TestPendingCalls if threading module is missing
* Test if threading module is present or not, instead of test the presence of
_testcapi._test_thread_state
Victor Stinner [Tue, 27 Apr 2010 22:01:24 +0000 (22:01 +0000)]
Issue #7449, part 5: split Test.test_open() of ctypes/test/test_errno.py
* Split Test.test_open() in 2 functions: test_open() and test_thread_open()
* Skip test_open() and test_thread_open() if we are unable to find the C
library
* Skip test_thread_open() if thread support is disabled
* Use unittest.skipUnless(os.name == "nt", ...) on test_GetLastError()
Victor Stinner [Tue, 27 Apr 2010 21:56:26 +0000 (21:56 +0000)]
Issue #7449, part 4: skip test_multiprocessing if thread support is disabled
import threading after _multiprocessing to raise a more revelant error message:
"No module named _multiprocessing". _multiprocessing is not compiled without
thread support.
Victor Stinner [Tue, 27 Apr 2010 21:51:26 +0000 (21:51 +0000)]
Issue #7449 part 3, test_doctest: import trace module in test_coverage()
Import trace module fail if the threading module is missing. test_coverage() is
only used if test_doctest.py is used with the -c option. This commit allows to
execute the test suite without thread support.
Move "import trace" in test_coverage() and use
test_support.import_module('trace').
Antoine Pitrou [Tue, 27 Apr 2010 09:51:18 +0000 (09:51 +0000)]
replace custom code with standard library functionality (HTTPServer.shutdown())
+ enable test that was never run (!)
+ make tests faster by lowering polling timeout
R. David Murray [Mon, 26 Apr 2010 21:17:14 +0000 (21:17 +0000)]
Issue #6656: fix locale.format_string to handle escaped percents and mappings.
Refactors format_string. Includes tests for the two problems noted in
the issue, but as far as I can see there are no other tests that confirm
that format_string conforms to normal % formatting rules.
When DeprecationWarning was silenced by default, it also silenced any use of -Q
by default as well. This change fixes that by treating -Q like -3 when it comes
to DeprecationWarning; using it causes the silencing to not occur.
Antoine Pitrou [Sun, 25 Apr 2010 21:40:32 +0000 (21:40 +0000)]
Issue #2302: Fix a race condition in SocketServer.BaseServer.shutdown,
where the method could block indefinitely if called just before the
event loop started running. This also fixes the occasional freezes
witnessed in test_httpservers.
Brian Curtin [Sat, 24 Apr 2010 15:40:11 +0000 (15:40 +0000)]
Fix #7838. Add docstrings and privatize _subprocess implementation details.
Since CREATE_NEW_* are used for the creation flags of a subprocess, they
were added to __all__. The rest of the previously exposed attributes are
now qualified by _subprocess.ATTR rather than importing *.
Antoine Pitrou [Sat, 24 Apr 2010 10:43:57 +0000 (10:43 +0000)]
Make test_makefile_close a networked test (can't read() from a non-connected
socket under OS X), and skip it under Windows (where sockets can't be read()
from using their fds).
Antoine Pitrou [Thu, 22 Apr 2010 23:33:02 +0000 (23:33 +0000)]
Issue #8108: Fix the unwrap() method of SSL objects when the socket has
a non-infinite timeout. Also make that method friendlier with applications
wanting to continue using the socket in clear-text mode, by disabling
OpenSSL's internal readahead. Thanks to Darryl Miles for guidance.
Issue #8108: test_ftplib's non-blocking SSL server now has proper handling
of SSL shutdowns.