Antoine Pitrou [Tue, 12 Jul 2011 19:57:15 +0000 (21:57 +0200)]
Issue #12149: Update the method cache after a type's dictionnary gets
cleared by the garbage collector. This fixes a segfault when an instance
and its type get caught in a reference cycle, and the instance's
deallocator calls one of the methods on the type (e.g. when subclassing
IOBase).
Antoine Pitrou [Fri, 8 Jul 2011 17:19:57 +0000 (19:19 +0200)]
Avoid failing in test_urllibnet.test_bad_address when some overzealous
DNS service (e.g. OpenDNS) resolves a non-existent domain name. The test
is now skipped instead.
Antoine Pitrou [Fri, 8 Jul 2011 17:19:57 +0000 (19:19 +0200)]
Avoid failing in test_urllibnet.test_bad_address when some overzealous
DNS service (e.g. OpenDNS) resolves a non-existent domain name. The test
is now skipped instead.
Antoine Pitrou [Fri, 8 Jul 2011 16:47:06 +0000 (18:47 +0200)]
Issue #12440: When testing whether some bits in SSLContext.options can be
reset, check the version of the OpenSSL headers Python was compiled against,
rather than the runtime version of the OpenSSL library.
Victor Stinner [Fri, 8 Jul 2011 00:26:39 +0000 (02:26 +0200)]
Issue #12423: Fix os.abort() documentation
The Python signal handler for SIGABRT is not called on os.abort() (only if the
signal is raised manually or sent by another process). Patch by Kamil Kisiel.
Ned Deily [Wed, 6 Jul 2011 02:09:37 +0000 (19:09 -0700)]
Issue #8716: Instead of relying on Aqua Tk exceptions to detect lack of
OS X window manager connection in tk tests, use OS X Application Services
API calls instead.
Victor Stinner [Tue, 5 Jul 2011 12:30:41 +0000 (14:30 +0200)]
Issue #12451: pydoc: html_getfile() now uses tokenize.open() to support Python
scripts using a encoding different than UTF-8 (read the coding cookie of the
script).
issue10403 - Let's not use members anymore. Use 'attribute' where it denotes attribute and 'methods' where it denotes methods. Context should clarify usage.
Victor Stinner [Mon, 4 Jul 2011 15:35:10 +0000 (17:35 +0200)]
Issue #12469: Run "wakeup" signal tests in subprocess to run the test in a
fresh process with only one thread and to not change signal handling of the
parent process.
Ned Deily [Mon, 4 Jul 2011 04:56:48 +0000 (21:56 -0700)]
Issue #8716: Avoid crashes caused by Aqua Tk on OSX when attempting to run
test_tk or test_ttk_guionly under a username that is not currently logged
in to the console windowserver (as may be the case under buildbot or ssh).
Victor Stinner [Mon, 4 Jul 2011 00:08:50 +0000 (02:08 +0200)]
Issue #12451: pydoc: importfile() now opens the Python script in binary mode,
instead of text mode using the locale encoding, to avoid encoding issues.
Victor Stinner [Sun, 3 Jul 2011 23:45:39 +0000 (01:45 +0200)]
Issue #12451: runpy: run_path() now opens the Python script in binary mode,
instead of text mode using the locale encoding, to support other encodings than
UTF-8 (scripts using the coding cookie).
Victor Stinner [Fri, 1 Jul 2011 13:58:39 +0000 (15:58 +0200)]
Issue #12363: increase the timeout of siginterrupt() tests
Move also the "ready" trigger after the installation of the signal handler and
the call to siginterrupt().
Use a timeout of 5 seconds instead of 3. Two seconds are supposed to be enough,
but some of our buildbots are really slow (especially the FreeBSD 6 VM).
Victor Stinner [Fri, 1 Jul 2011 13:24:50 +0000 (15:24 +0200)]
Issue #12363: improve siginterrupt() tests
Backport commits 968b9ff9a059 and aff0a7b0cb12 from the default branch to 3.2
branch. Extract of the changelog messages:
"The previous tests used time.sleep() to synchronize two processes. If the host
was too slow, the test could fail.
The new tests only use one process, but they use a subprocess to:
- have only one thread
- have a timeout on the blocking read (select cannot be used in the test,
select always fail with EINTR, the kernel doesn't restart it)
- not touch signal handling of the parent process"
and
"Add a basic synchronization code between the child and the parent processes:
the child writes "ready" to stdout."
I replaced .communicate(timeout=3.0) by an explicit waiting loop using
Popen.poll().
Victor Stinner [Thu, 30 Jun 2011 16:10:14 +0000 (18:10 +0200)]
Issue #12451: The XInclude default loader of xml.etree now decodes files from
UTF-8 instead of the locale encoding if the encoding is not specified. It now
also opens XML files for the parser in binary mode instead of the text mode to
avoid encoding issues.
Victor Stinner [Thu, 30 Jun 2011 15:35:55 +0000 (17:35 +0200)]
Issue #12451: doctest.debug_script() doesn't create a temporary file anymore to
avoid encoding issues (it used the locale encoding, whereas UTF-8 should be).
Victor Stinner [Wed, 29 Jun 2011 11:00:54 +0000 (13:00 +0200)]
Issue #12400: regrtest -W doesn't rerun the tests twice anymore, but captures
the output and displays it on failure instead. regrtest -v doesn't print the
error twice anymore if there is only one error.
Ned Deily [Wed, 29 Jun 2011 02:44:24 +0000 (19:44 -0700)]
Issue #9516: Change distutils to no longer globally attempt to check and
set the MACOSX_DEPLOYMENT_TARGET env variable for the interpreter process
on OS X. This could cause failures in non-distutils subprocesses and was
unreliable since tests or user programs could modify the interpreter
environment after distutils set it. Instead, have distutils set the
the deployment target only in the environment of each build subprocess.
Continue to use the previous algorithm for deriving the deployment target
value:
if MACOSX_DEPLOYMENT_TARGET is not set in the interpreter's env:
use the interpreter build configure MACOSX_DEPLOYMENT_TARGET
elif the MACOSX_DEPLOYMENT_TARGET env value >= configure value:
use the env MACOSX_DEPLOYMENT_TARGET
else: # env value less than interpreter build configure value
raise exception
This allows building extensions that can only run on newer versions of
the OS than the version python was built for, for example with a python
built for 10.3 or later and an extension that needs to be built for 10.5.
Ned Deily [Tue, 28 Jun 2011 07:42:50 +0000 (00:42 -0700)]
Issue #12141: Install a copy of template C module file so that
test_build_ext of test_distutils is no longer silently skipped when
run outside of a build directory.
Ned Deily [Tue, 28 Jun 2011 07:00:28 +0000 (00:00 -0700)]
Issue #8746: Correct faulty configure checks so that os.chflags() and
os.lchflags() are once again built on systems that support these
functions (*BSD and OS X). Also add new stat file flags for OS X
(UF_HIDDEN and UF_COMPRESSED). Also add additional tests for
os.chflags() and os.lchflags(). (Tests by Garrett Cooper)