Commit Graph

18956 Commits

Author SHA1 Message Date
Benjamin Peterson 34b2b263db this can be done without a custom dict (also fixes #12544) 2011-07-12 19:21:42 -05:00
Antoine Pitrou 093c8e4bf0 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).

Diagnosis and patch by Davide Rizzo.
2011-07-12 21:58:39 +02:00
Antoine Pitrou 84f1b1718d 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).

Diagnosis and patch by Davide Rizzo.
2011-07-12 21:57:15 +02:00
Georg Brandl 00ebeb540f Merge 3.2.1 release clone into main repo. 2011-07-09 10:58:37 +02:00
Georg Brandl cd0dc16fdc Bump version to 3.2.1. 2011-07-09 08:56:21 +02:00
Antoine Pitrou 13d7db19f6 Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary
failure in name resolution.

Should fix a buildbot failure.
2011-07-09 02:32:36 +02:00
Antoine Pitrou 4875c46538 Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary
failure in name resolution.

Should fix a buildbot failure.
2011-07-09 02:31:24 +02:00
Antoine Pitrou 9163c473dc Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary
failure in name resolution.

Should fix a buildbot failure.
2011-07-09 02:31:24 +02:00
Antoine Pitrou 600012028e Add comment 2011-07-09 01:03:46 +02:00
Antoine Pitrou 71a28a9174 Rebind locally the globals which can be looked up at shutdown
(to avoid the warnings seen on a buildbot)
2011-07-09 01:03:00 +02:00
Antoine Pitrou 4a183b47f3 Avoid failing in test_robotparser when mueblesmoraleda.com is flaky and
an overzealous DNS service (e.g. OpenDNS) redirects to a placeholder
Web site.
2011-07-08 19:44:55 +02:00
Antoine Pitrou 95531ea2f1 Avoid failing in test_robotparser when mueblesmoraleda.com is flaky and
an overzealous DNS service (e.g. OpenDNS) redirects to a placeholder
Web site.
2011-07-08 19:43:51 +02:00
Antoine Pitrou 88fcf1bcab 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.
2011-07-08 19:22:31 +02:00
Antoine Pitrou 3aba49899c 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.
2011-07-08 19:19:57 +02:00
Antoine Pitrou 72fff046a6 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.
2011-07-08 19:19:57 +02:00
Antoine Pitrou 7128f95bd2 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.
2011-07-08 18:49:07 +02:00
Antoine Pitrou b9ac25d1c3 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.
2011-07-08 18:47:06 +02:00
Éric Araujo 4468e55d4b Close file handles in a timely manner in packaging.database (#12504).
This fixes a bug with the remove (uninstall) feature on Windows.  Patch
by Thomas Holmes.
2011-07-08 17:22:19 +02:00
Éric Araujo ce5fe83878 Factor out code used by packaging commands for HTTP requests (#12169).
We now have one function to prepare multipart POST requests, and we use
CRLF, as recommended by the HTTP spec (#10150).  Initial patch by John
Edmonds.
2011-07-08 16:27:12 +02:00
Ned Deily f6cbdc22be 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.
2011-07-05 19:09:37 -07:00
Victor Stinner 1848db891b Issue #12493: skip test_communicate_eintr() if signal.SIGALRM is missing 2011-07-05 14:49:46 +02:00
Victor Stinner 91e08772a6 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).
2011-07-05 14:30:41 +02:00
Victor Stinner 2cfb6f3aa0 Issue #12493: subprocess: communicate() handles EINTR
subprocess.Popen.communicate() now also handles EINTR errors if the process has
only one pipe.
2011-07-05 14:00:56 +02:00
Ned Deily e2d519035f Issue #12497: Install test/data to prevent failures of the various codecmaps
tests.
2011-07-04 19:06:20 -07:00
Georg Brandl bfd1edd155 Merge 3.2.1 release clone changes into main 3.2 branch after 3.2.1rc2 release. 2011-07-04 19:55:22 +02:00
Victor Stinner e40b3aabfb 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.
2011-07-04 17:35:10 +02:00
Victor Stinner 4479841b83 Issue #12429: Skip interrupted write tests on FreeBSD <= 7
On FreeBSD, the SIGALRM signal is sometimes received by the reader thread.
2011-07-04 11:48:17 +02:00
Victor Stinner cd1aa0d5ea Issue #12429: Skip interrupted write tests on FreeBSD <= 7
On FreeBSD, the SIGALRM signal is sometimes received by the reader thread.
2011-07-04 11:48:17 +02:00
Ned Deily 4143535d86 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).
2011-07-03 21:56:48 -07:00
Senthil Kumaran 9ebe08d2f6 Fix closes issue12471 - wrong TypeError message when '%i' format spec was used. 2011-07-03 21:03:16 -07:00
Senthil Kumaran c8763b9d96 Fix closes issue issue12470 - check for utime for the skipUnless condition. 2011-07-03 18:21:38 -07:00
Senthil Kumaran 0c2dba5726 Fix closes issue issue12470 - check for utime for the skipUnless condition. 2011-07-03 18:21:38 -07:00
Victor Stinner b1b25f0ffd Issue #12467: warnings: fix a race condition if a warning is emitted at
shutdown, if globals()['__file__'] is None.
2011-07-04 02:43:09 +02:00
Victor Stinner 8b0508ed4e Issue #12467: warnings: fix a race condition if a warning is emitted at
shutdown, if globals()['__file__'] is None.
2011-07-04 02:43:09 +02:00
Senthil Kumaran 80dffefcd9 Fix closes issue12438 - idlelib.PyShell's showformatwarning method was passing an incorrect arg. 2011-07-03 17:39:20 -07:00
Senthil Kumaran aa90e7c573 Fix closes issue12438 - idlelib.PyShell's showformatwarning method was passing an incorrect arg. 2011-07-03 17:39:20 -07:00
Senthil Kumaran 7079240c4a Fix closes issue12432 - remove the unused sys from glob.py 2011-07-03 17:21:05 -07:00
Victor Stinner e975af62f2 Issue #12451: pydoc: importfile() now opens the Python script in binary mode,
instead of text mode using the locale encoding, to avoid encoding issues.
2011-07-04 02:08:50 +02:00
Victor Stinner 6c47102982 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).
2011-07-04 01:45:39 +02:00
Victor Stinner bbdc08ea6e Issue #12451: xml.dom.pulldom: parse() now opens files in binary mode instead
of the text mode (using the locale encoding) to avoid encoding issues.
2011-07-04 01:25:55 +02:00
Benjamin Peterson ac91341333 never retain a generator's caller's exception state on the generator after a yield/return
This requires some trickery to properly save the exception state if the
generator creates its own exception state.
2011-07-03 16:25:11 -05:00
Benjamin Peterson d2ed630243 merge heads 2011-07-03 13:44:56 -05:00
Benjamin Peterson 83195c3f0c restore a generator's caller's exception state both on yield and (last) return
This prevents generator exception state from leaking into the caller.

Closes #12475.
2011-07-03 13:44:00 -05:00
Georg Brandl d4fa7ed8db Bump to 3.2.1rc2. 2011-07-03 09:41:27 +02:00
Georg Brandl fa76ceb3c8 Update pydoc topics. 2011-07-03 09:31:04 +02:00
Victor Stinner 2cded9c3f3 Issue #12016: Multibyte CJK decoders now resynchronize faster
They only ignore the first byte of an invalid byte sequence.

For example, b'\xff\n'.decode('gb2312', 'replace') gives '\ufffd\n' instead of
'\ufffd'.
2011-07-08 01:45:13 +02:00
Vinay Sajip 0bec35d2d0 Closes #12391: temporary files are now cleaned up. 2011-07-07 12:59:31 +01:00
Georg Brandl cd9f1203a4 Revert 76452b892838 as per http://mail.python.org/pipermail/python-dev/2011-July/112243.html. 2011-07-06 07:31:38 +02:00
Ned Deily 8a3b988b8a 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.
2011-07-05 19:11:15 -07:00
Brian Curtin 692e26be46 Normalize whitespace for #11512 fix. 2011-07-05 19:16:37 -05:00
Brian Curtin 6a4ffd7295 Fix #11512. Add an initial test suite for the cgitb, providing 75% coverage.
Patch by Robbie Clemons (robquad), produced at the PyCon 2011 sprints.
2011-07-05 19:14:16 -05:00
Victor Stinner 7f53a5027d Issue #12459: time.sleep() now raises a ValueError if the sleep length is
negative, instead of an infinite sleep on Windows or raising an IOError on
Linux for example, to have the same behaviour on all platforms.
2011-07-05 22:00:25 +02:00
Victor Stinner 5351a1f956 (merge 3.2) Issue #12493: skip test_communicate_eintr() if signal.SIGALRM is missing 2011-07-05 14:50:08 +02:00
Victor Stinner d7772bc4cb (merge 3.2) 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).
2011-07-05 14:31:28 +02:00
Victor Stinner 5b1261d750 (merge 3.2) Issue #12493: subprocess: communicate() handles EINTR
subprocess.Popen.communicate() now also handles EINTR errors if the process has
only one pipe.
2011-07-05 14:04:39 +02:00
Ned Deily 368ff10c4d Issue #12497: Install test/data to prevent failures of the various codecmaps
tests.
2011-07-04 19:11:14 -07:00
Victor Stinner 5dd470ef1d Issue #12469: fix signal order check of test_signal
When signals are unblocked, pending signal ared delivered in the reverse order
of their number (also on Linux, not only on FreeBSD 6).

Don't sort signals by their number if signals were not blocked (test_signum).
2011-07-05 01:32:06 +02:00
Victor Stinner 68757ac884 Issue #12469: test_signal checks wakeup signals order, except on freebsd6
On FreeBSD 6, when signals are unblocked, FreeBSD 6 delivers signals in the
reverse order of their number.
2011-07-05 01:15:08 +02:00
Victor Stinner 87e78ce1c6 Issue #12469: partial revert of 024827a9db64, freebsd6 thread initialization
* Don't create a thread at startup anymore to initialize the pthread library:
   it changes the behaviour of many functions related to signal handling like
   sigwait()
 * Reenable test_sigtimedwait_poll() on FreeBSD 6
2011-07-04 22:53:49 +02:00
Victor Stinner 0a01f13af8 Issue #12469: replace assertions by explicit if+raise 2011-07-04 18:06:35 +02:00
Victor Stinner d554cdf8b9 (merge 3.2) Issue #12469: Run wakeup and pending signal tests in a subprocess
to run the test in a fresh process with only one thread and to not change
signal handling of the parent process.
2011-07-04 17:49:40 +02:00
Victor Stinner b575289292 Issue #12452: Plist and Dict are now deprecated
Replace PendingDeprecationWarning warnings by DeprecationWarning.
2011-07-04 14:28:45 +02:00
Ned Deily efa384aa27 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).
2011-07-03 22:27:16 -07:00
Senthil Kumaran bc9d8f838b merge from 3.2 2011-07-03 21:05:25 -07:00
Senthil Kumaran cc78c443f2 merge from 3.2 2011-07-03 18:22:14 -07:00
Victor Stinner 5a21e83119 (merge 3.2) Issue #12467: warnings: fix a race condition if a warning is
emitted at shutdown, if globals()['__file__'] is None.
2011-07-04 02:56:10 +02:00
Senthil Kumaran 10cdc63dd4 Merge from 3.2. 'idle_formatwarning' is the correct method name. 2011-07-03 17:40:39 -07:00
Senthil Kumaran ad1013c338 merge from 3.2 2011-07-03 17:21:44 -07:00
Victor Stinner 5f9a995ad7 (merge 3.2) Issue #12451: pydoc: importfile() now opens the Python script in
binary mode, instead of text mode using the locale encoding, to avoid encoding
issues.
2011-07-04 02:09:44 +02:00
Victor Stinner 7d8c8a095a (merge 3.2) 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).
2011-07-04 01:47:40 +02:00
Victor Stinner 3663abab59 (merge 3.2) Issue #12451: xml.dom.pulldom: parse() now opens files in binary
mode instead of the text mode (using the locale encoding) to avoid encoding
issues.
2011-07-04 01:27:37 +02:00
Benjamin Peterson 536feac7f8 merge 3.2 2011-07-03 16:27:41 -05:00
Benjamin Peterson 7b7099c36f merge 3.2 (#12475) 2011-07-03 13:48:36 -05:00
Georg Brandl aeaeefa88b Remove mention of medical condition from the test suite. 2011-07-03 19:22:42 +02:00
Antoine Pitrou 1c405b3e60 Followup to 51c1f2cedb96 (and issue #12456):
qsize() raises NotImplementedError on OS X, don't use it.
2011-07-03 13:17:06 +02:00
R David Murray db4120bf9d merge #12147: make send_message correctly handle Sender and Resent- headers. 2011-07-02 21:10:44 -04:00
R David Murray ac4e5abc78 #12147: make send_message correctly handle Sender and Resent- headers.
Original patch by Nicolas Estibals.  My tweaks to the patch were mostly
style/cosmetic, and adding more tests.
2011-07-02 21:03:19 -04:00
Antoine Pitrou 020436b0d4 Issue #12456: fix a possible hang on shutdown of a concurrent.futures.ProcessPoolExecutor. 2011-07-02 21:20:25 +02:00
Vinay Sajip 65897a386e Closes #12291 for 3.3 - merged fix from 3.2. 2011-07-02 17:16:02 +01:00
Vinay Sajip 5bdae3bb7c Closes #12291: Fixed bug which was found when doing multiple loads from one stream. 2011-07-02 16:42:47 +01:00
Éric Araujo 2ee61884fe Clean up NEWS entry and tests for shutil.disk_usage (#12442) 2011-07-02 16:45:45 +02:00
Charles-François Natali 723585bbaf Merge issue #12352: Fix a deadlock in multiprocessing.Heap when a block is
freed by the garbage collector while the Heap lock is held.
2011-07-02 14:43:11 +02:00
Charles-François Natali a4a04069fd Merge issue #12352: Fix a deadlock in multiprocessing.Heap when a block is
freed by the garbage collector while the Heap lock is held.
2011-07-02 14:39:53 +02:00
Charles-François Natali 778db49da9 Issue #12352: Fix a deadlock in multiprocessing.Heap when a block is freed by
the garbage collector while the Heap lock is held.
2011-07-02 14:35:49 +02:00
R David Murray 7ae4448ed2 merge #11873: another try at fixing the regex, courtesy of Victor Stinner 2011-07-01 14:57:00 -04:00
R David Murray ee1a7cb4a4 #11873: another try at fixing the regex, courtesy of Victor Stinner 2011-07-01 14:55:43 -04:00
R David Murray 296b96c635 merge #11873: fix test regex so it covers windows os.sep as well. 2011-07-01 11:53:19 -04:00
R David Murray a3bb2f5514 #11873: fix test regex so it covers windows os.sep as well. 2011-07-01 11:51:50 -04:00
Victor Stinner 19e5bcdd9c (merge 3.2) 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).
2011-07-01 15:59:54 +02:00
Victor Stinner dfde0d4650 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).
2011-07-01 15:58:39 +02:00
Victor Stinner 8d64248c69 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().
2011-07-01 15:24:50 +02:00
Victor Stinner 2555b0aac7 (merge 3.2) Issue #11870: Skip test_threading.test_2_join_in_forked_process()
on platforms with known OS bugs

Share the list of platforms with known OS bugs with other tests. Patch written
by Charles-François Natali.
2011-07-01 14:53:07 +02:00
Victor Stinner 26d318690f Issue #11870: Skip test_threading.test_2_join_in_forked_process() on platforms
with known OS bugs

Share the list of platforms with known OS bugs with other tests. Patch written
by Charles-François Natali.
2011-07-01 14:26:24 +02:00
Giampaolo Rodola' 210e7ca032 Issue #12442: add shutil.disk_usage() 2011-07-01 13:55:36 +02:00
Victor Stinner 59929d9877 (merge 3.2) test_os: remove now useless TemporaryFileTests testcase
TemporaryFileTests has tests for os.tempnam() and os.tmpfile(), functions
removed from Python 3.

Move fdopen() tests to the FileTests testcase to test fdopen() on a file
descriptor, not on a directory descriptor (which raises an error on Windows).
2011-07-01 13:47:03 +02:00
Victor Stinner bef7fdfc04 test_os: remove now useless TemporaryFileTests testcase
TemporaryFileTests has tests for os.tempnam() and os.tmpfile(), functions
removed from Python 3.

Move fdopen() tests to the FileTests testcase to test fdopen() on a file
descriptor, not on a directory descriptor (which raises an error on Windows).
2011-07-01 13:45:30 +02:00
Victor Stinner 4497445b3f (merge 3.2) test_os: add TemporaryFileTests to the testcase list
The testcase was never executed, it's now fixed.
2011-07-01 02:57:33 +02:00
Victor Stinner 98b3722bf7 test_os: add TemporaryFileTests to the testcase list
The testcase was never executed, it's now fixed.
2011-07-01 02:56:15 +02:00
Victor Stinner bf816223df Issue #12451: Add support.create_empty_file()
We don't need to create a temporary buffered binary or text file object just to
create an empty file.

Replace also os.fdopen(handle).close() by os.close(handle).
2011-06-30 23:25:47 +02:00
Antoine Pitrou 61600cb0c3 Issue #12407: Explicitly skip test_capi.EmbeddingTest under Windows. 2011-06-30 20:04:06 +02:00
Antoine Pitrou 71cbafbda1 Issue #12407: Explicitly skip test_capi.EmbeddingTest under Windows. 2011-06-30 20:02:54 +02:00
Giampaolo Rodola' 5de1532163 Issue 12139: ftplib - remove 'post CCC' test to fix various buildot failures due to dummy test server not properly handling SSL shutdown(), see http://bugs.python.org/msg139499 2011-06-30 18:34:41 +02:00
Victor Stinner 938f635acb Issue #12451: Open the test file in binary mode in test_bz2, the text file is
not needed.
2011-06-30 18:25:07 +02:00
Victor Stinner 2f655b73e4 (merge 3.2) Issue #12451: Open files in binary mode in some tests when the text
file is not needed.

Remove also an unused variable (blank) in test_threading.
2011-06-30 18:21:39 +02:00
Victor Stinner a6d2c769fb Issue #12451: Open files in binary mode in some tests when the text file is not
needed.

Remove also an unused variable (blank) in test_threading.
2011-06-30 18:20:11 +02:00
Victor Stinner 3909da7fca (merge 3.2) 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.
2011-06-30 18:11:18 +02:00
Victor Stinner eaf399e335 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.
2011-06-30 18:10:14 +02:00
Victor Stinner a0b12a1ca7 (merge 3.2) 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).

Remove also an unused import (warnings).
2011-06-30 17:39:17 +02:00
Victor Stinner 12b8d14991 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).

Remove also an unused import (warnings).
2011-06-30 17:35:55 +02:00
Victor Stinner 319672e8a6 (merge 3.2) Issue #12451: pydoc.synopsis() now reads the encoding cookie if
available, to read the Python script from the right encoding.
2011-06-30 15:58:29 +02:00
Victor Stinner e6c910e953 Issue #12451: pydoc.synopsis() now reads the encoding cookie if available, to
read the Python script from the right encoding.
2011-06-30 15:55:43 +02:00
Victor Stinner 0b5e049ea0 (merge 3.2) Issue #12451: distutils now opens the setup script in binary mode
to read the encoding cookie, instead of opening it in UTF-8.
2011-06-30 15:41:56 +02:00
Victor Stinner dc9b1ea02e Issue #12451: distutils now opens the setup script in binary mode to read the
encoding cookie, instead of opening it in UTF-8.
2011-06-30 15:40:22 +02:00
Victor Stinner 7f86811d55 Issue #12400: test_cprofile now restores correctly the previous sys.stderr
Copy sys.stderr before replacing it, instead of using sys.__stderr__
2011-06-30 00:00:45 +02:00
Victor Stinner 7248850bee Issue #12400: test_faulthandler now uses sys.__stderr__
instead of open(os.devnull, 'w')
2011-06-29 23:24:31 +02:00
Victor Stinner e15bfeb8ce (merge 3.2) Issue #12400: regrtest.runtest() uses stream.seek(0) before .truncate()
.truncate(0) doesn't rewind.
2011-06-29 20:03:13 +02:00
Victor Stinner fcc2a21fae Issue #12400: regrtest.runtest() uses stream.seek(0) before .truncate()
.truncate(0) doesn't rewind.
2011-06-29 20:01:29 +02:00
Victor Stinner e6db1440d8 (merge 3.2) Issue #12400: test_zipimport_support doesn't restore original
sys.stdout anymore

regrtest doesn't check that a test doesn't output anything anymore.
2011-06-29 18:12:33 +02:00
Victor Stinner 592f679dce Issue #12400: test_zipimport_support doesn't restore original sys.stdout
anymore

regrtest doesn't check that a test doesn't output anything anymore.
2011-06-29 18:11:36 +02:00
Victor Stinner fa832dea2a (merge 3.2) Issue #12400: runtest() truncates the StringIO stream before a new
test
2011-06-29 17:29:22 +02:00
Victor Stinner 85b3a492d6 Issue #12400: runtest() truncates the StringIO stream before a new test 2011-06-29 17:26:38 +02:00
Victor Stinner 68416f0ae5 (merge 3.2) Issue #12400: Add missing import (os) to test_kqueue 2011-06-29 17:20:33 +02:00
Victor Stinner 125b2ba41e Issue #12400: Add missing import (os) to test_kqueue 2011-06-29 17:20:02 +02:00
Victor Stinner 05d34fc953 Issue #12400: test.support.run_doctest() doesn't change sys.stdout anymore
regrtest doesn't check that tests doesn't write something to stdout anymore.

Don't replace sys.stdout by the original sys.stdout to be able to capture the
output for regrtest -W.
2011-06-29 15:53:11 +02:00
Victor Stinner bddc4d4607 Issue #12400: test.support.run_doctest() doesn't change sys.stdout anymore
regrtest doesn't check that tests doesn't write something to stdout anymore.

Don't replace sys.stdout by the original sys.stdout to be able to capture the
output for regrtest -W.
2011-06-29 15:52:46 +02:00
Victor Stinner ba08905062 (merge 3.2) Issue #12400: regrtest, force verbose mode to True with option -W
If verbose is False, the output is empty. Fix also a typo in a variable name.
2011-06-29 15:38:18 +02:00
Victor Stinner ea95de75dd Issue #12400: regrtest, force verbose mode to True with option -W
If verbose is False, the output is empty. Fix also a typo in a variable name.
2011-06-29 15:34:48 +02:00
Victor Stinner d71bd9a9a4 (merge 3.2) Issue #12400: runtest() reuses the same io.StringIO instance for
all calls

 * Don't force verbose to True with option -W
 * Rename rerun_failed variable to output_on_failure
2011-06-29 15:25:40 +02:00
Victor Stinner 8313d6aef8 Issue #12400: runtest() reuses the same io.StringIO instance for all calls
* Don't force verbose to True with option -W
 * Rename rerun_failed variable to output_on_failure
2011-06-29 15:22:26 +02:00
Victor Stinner 7348c6bbb6 (merge 3.2) Issue #12400: don't use sys.stderr in test_kqueue because it may be
replaced by a io.StringIO object by regrtest (which has no file descriptor).
2011-06-29 14:59:46 +02:00
Victor Stinner 46b2091146 Issue #12400: don't use sys.stderr in test_kqueue because it may be replaced by
a io.StringIO object by regrtest (which has no file descriptor).
2011-06-29 14:59:10 +02:00
Victor Stinner 7e32f3a401 Issue #12400: fix test_faulthandler if regrtest captures sys.stderr
faulthandler.enable() requires that sys.stderr has a fileno() method.
2011-06-29 13:44:05 +02:00
Victor Stinner 0b8f0c2766 (merge 3.2) Issue #12400: remove unused import 2011-06-29 13:24:58 +02:00
Victor Stinner bd98f9367c Issue #12400: remove unused variable 2011-06-29 13:24:28 +02:00
Victor Stinner 565dbadc22 Issue #12400: oops, remove debug code... 2011-06-29 13:23:49 +02:00
Victor Stinner e2185d714b (merge 3.2) 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.
2011-06-29 13:04:35 +02:00
Victor Stinner a7c33e5168 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.
2011-06-29 13:00:54 +02:00
Victor Stinner 9e8b82f1e1 Issue #12303: run sig*wait*() tests in a subprocesss
... instead of using fork(): sig*wait*() functions behave differently (not
correctly) after a fork, especially on FreeBSD 6.

Skip also test_sigtimedwait_poll() on FreeBSD 6 because of a kernel bug.
2011-06-29 10:43:02 +02:00
Ned Deily fceb4120fc Issue #9516: Port the revised deployment target processing for OSX from
distutils to packaging.
2011-06-28 20:04:24 -07:00
Ned Deily 5c727cb978 Issue #9516: Port OS X deployment target tests from distutils to packaging
test_command_build_ext.
2011-06-28 20:03:17 -07:00
Ned Deily 8c86d308a1 Issue #9516: Merge Distutils changes from 3.2 2011-06-28 20:01:52 -07:00
Ned Deily a8f8b50bd7 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.
2011-06-28 19:44:24 -07:00
Ned Deily d13007fa11 Issue #9516: Correct and expand OS X deployment target tests in distutils
test_build_ext.
2011-06-28 19:43:15 -07:00
Benjamin Peterson 274271d1ae remove unused imports (closes #12432)
A patch from Vincent Legoll.
2011-06-28 10:25:04 -05:00
Ned Deily 4a1ec12999 Issue #12141: Install copies of template C module file so that
test_build_ext of test_distutils and test_command_build_ext of
test_packaging are no longer silently skipped when
run outside of a build directory.
2011-06-28 00:53:54 -07:00
Ned Deily 58f27b203c 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.
2011-06-28 00:42:50 -07:00
Ned Deily 8b56c4b1b8 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)
2011-06-28 00:13:01 -07:00
Ned Deily 3eb67d58d6 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)
2011-06-28 00:00:28 -07:00
Ned Deily f6837aa171 Issue #10736: Fix test_ttk test_widgets failures with Cocoa Tk 8.5.9
2.8 +  on Mac OS X.  (Patch by Ronald Oussoren)
2011-06-27 23:18:45 -07:00
Ned Deily 11f00f3b00 Issue #10736: Fix test_ttk test_widgets failures with Cocoa Tk 8.5.9
on Mac OS X.  (Patch by Ronald Oussoren)
2011-06-27 23:12:20 -07:00
Benjamin Peterson b37db00c46 merge 3.2 2011-06-27 17:51:44 -05:00
Benjamin Peterson 68b543aa02 fix ws 2011-06-27 17:51:18 -05:00
Benjamin Peterson 9df8874b41 merge 3.2 (#11302) 2011-06-27 17:50:14 -05:00
Benjamin Peterson 6ccfe85847 add more ast tests (closes #11302)
A patch from Vincent Legoll.
2011-06-27 17:46:06 -05:00
Benjamin Peterson e90ec366fb don't memoize objects that are their own copies (closes #12422)
Patch mostly by Alex Gaynor.
2011-06-27 16:22:46 -05:00
Vinay Sajip 2353e35570 Closes #12419: Added ident to SysLogHandler. 2011-06-27 15:40:06 +01:00
Benjamin Peterson 345a5d7357 merge 3.2 2011-06-27 09:19:02 -05:00
Benjamin Peterson 0f93d3d6f3 strip trailing ws 2011-06-27 09:18:46 -05:00
Benjamin Peterson 16ba98cc28 merge heads 2011-06-27 09:16:47 -05:00
Benjamin Peterson 68151d4f7f merge 3.2 (#12417) 2011-06-27 09:15:19 -05:00
Benjamin Peterson afa44a8096 update profile license (closes #12417) 2011-06-27 09:14:34 -05:00
Benjamin Peterson 8d77069558 update profile license (closes #12417) 2011-06-27 09:14:34 -05:00
Giampaolo Rodola' 096dcb1eff Issue 12139: add CCC command support to FTP_TLS class to revert the SSL connection back to clear-text. 2011-06-27 11:17:51 +02:00
Raymond Hettinger 29e2c64edd Issue #4608: urllib.request.urlopen does not return an iterable object 2011-06-26 14:30:25 +02:00
Raymond Hettinger 038018aaa4 Issue #4608: urllib.request.urlopen does not return an iterable object 2011-06-26 14:29:35 +02:00
Benjamin Peterson 9003760991 map cells to arg slots at code creation time (closes #12399)
This removes nested loops in PyEval_EvalCodeEx.
2011-06-25 22:54:45 -05:00
Raymond Hettinger 70797194ab Issue 11802: filecmp cache was growing without bound. 2011-06-25 17:20:21 +02:00
Mark Dickinson eceebeb14f Issue #12408: Fix relative import in test_future5.py. Thanks Cesare Di Mauro. 2011-06-25 13:29:14 +02:00
Raymond Hettinger d0de3d4cc4 Issue 11802: filecmp cache was growing without bound. 2011-06-25 17:21:04 +02:00
Raymond Hettinger 06eef9c130 Issue 11758: increase xml.dom.minidom test coverage (contributed by mdorn, reviewed by Sandro Tosi). 2011-06-25 15:54:52 +02:00
Ross Lagerwall 7f485785dd Fix test_signal on Windows after #12303. 2011-06-25 15:03:52 +02:00
Mark Dickinson 36a9de041b Issue #12408: Merge. 2011-06-25 13:29:49 +02:00
Ross Lagerwall bc808224b6 Issue #12303: Add sigwaitinfo() and sigtimedwait() to the signal module. 2011-06-25 12:13:40 +02:00
Raymond Hettinger 12fb2f41f0 Code simplification suggested by Sven Marnach. 2011-06-25 11:31:46 +02:00
Raymond Hettinger 5279fb99cb Code simplification suggested by Sven Marnach. 2011-06-25 11:30:53 +02:00
Victor Stinner e71db4450c Issue #12392: fix thread initialization on FreeBSD 6
On FreeBSD6, pthread_kill() doesn't work on the main thread before the creation
of the first thread. Create therefore a dummy thread (no-op) a startup to
initialize the pthread library.

Add also a test for this use case, test written by Charles-François Natali.
2011-06-24 20:52:27 +02:00
R David Murray fcb17e13da Merge #10206: add test for previously fixed bug. 2011-06-24 13:28:08 -04:00
R David Murray e697e3750f #10206: add test for previously fixed bug.
Patch by Francisco Martín Brugué.
2011-06-24 13:26:31 -04:00
Benjamin Peterson e109c70860 give the names of missing positional or keyword-only arguments (closes #12356) 2011-06-24 09:37:26 -05:00
Victor Stinner 66f7d66174 Issue #11223: skip also test_rlock_acquire_interruption() on FreeBSD6 2011-06-23 14:22:28 +02:00
Victor Stinner f25ae48dfd Issue #11223: skip test_lock_acquire_interruption() on FreeBSD6
Locks are implemented using a mutex and a condition variable of the pthread
library on FreeBSD6. POSIX condition variables cannot be interrupted by signals
(see pthread_cond_wait manual page).
2011-06-23 11:57:56 +02:00
R David Murray 3a420c752d #10354: remove last public mentions of 'template' and comment as private.
I didn't rename the variable because I can see no good reason
to break backward compatibility just to put an underscore in
the name.
2011-06-22 21:01:13 -04:00
Victor Stinner 8153b7a57a (merge 3.2) Issue #12383: skip test_empty_env() of subprocess on Windows
Cannot test an empty environment on Windows: Windows requires at least the
SYSTEMROOT environment variable to start Python.
2011-06-23 01:02:50 +02:00
Victor Stinner 62d511809d Issue #12383: skip test_empty_env() of subprocess on Windows
Cannot test an empty environment on Windows: Windows requires at least the
SYSTEMROOT environment variable to start Python.
2011-06-23 01:02:25 +02:00
Victor Stinner 4527365ee4 Issue #12363: improve siginterrupt() tests
Add a basic synchronization code between the child and the parent processes:
the child writes "ready" to stdout.
2011-06-22 22:15:51 +02:00
Victor Stinner c0a9f75fba (merge 3.2) Issue #12383: fix test_empty_env() of subprocess on Mac OS X
Mac OS X adds __CF_USER_TEXT_ENCODING variable to an empty environment. Fix
also the test on the Py_ENABLE_SHARED config varible: test that the variable is
present, don't check it's value.
2011-06-22 21:29:07 +02:00
Victor Stinner 237e5cb376 Issue #12383: fix test_empty_env() of subprocess on Mac OS X
Mac OS X adds __CF_USER_TEXT_ENCODING variable to an empty environment. Fix
also the test on the Py_ENABLE_SHARED config varible: test that the variable is
present, don't check it's value.
2011-06-22 21:28:43 +02:00
R David Murray 749073af13 #1874: detect invalid multipart CTE and report it as a defect. 2011-06-22 13:47:53 -04:00
Victor Stinner 11cc475be7 (merge 3.2) Issue #12383: skip test_empty_env() if compiled is compiled in
shared mode

Try also to get more informations about the Mac OS X failure: display the keys
of the environment, instead of just the number of variables.
2011-06-21 21:59:51 +02:00
Victor Stinner 372309a551 Issue #12383: skip test_empty_env() if compiled is compiled in shared mode
Try also to get more informations about the Mac OS X failure: display the keys
of the environment, instead of just the number of variables.
2011-06-21 21:59:06 +02:00
Victor Stinner 372b838db5 (merge 3.2) Close #12383: Fix subprocess module with env={}: don't copy the
environment variables, start with an empty environment.
2011-06-21 17:24:21 +02:00
Victor Stinner f1512a2967 Close #12383: Fix subprocess module with env={}: don't copy the environment
variables, start with an empty environment.
2011-06-21 17:18:38 +02:00
Victor Stinner d628496323 Close #12363: fix a race condition in siginterrupt() tests
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
2011-06-20 23:28:09 +02:00
Victor Stinner 395dc58ee7 (merge 3.2) Issue #12285: multiprocessing.Pool() raises a ValueError if the
number of processes if negative or null.
2011-06-20 17:54:03 +02:00
Victor Stinner 2fae27b735 Issue #12285: multiprocessing.Pool() raises a ValueError if the number of
processes if negative or null.
2011-06-20 17:53:35 +02:00
Victor Stinner fb25ba9b07 Close #12289: Fix "is executable?" test in the CGI server
Use os.access(path, os.X_OK) instead of (os.stat(path).st_mode & 0o111 != 0),
and ignore the test on Windows.
2011-06-20 17:45:54 +02:00
Benjamin Peterson f5ff22329b use a invalid name for the __class__ closure for super() (closes #12370)
This prevents the assignment of __class__ in the class body from breaking
super. (Although a determined person could do locals()["@__class__"] = 4)
2011-06-19 19:42:22 -05:00
Benjamin Peterson 019d0f27a3 merge 3.2 2011-06-19 17:49:22 -05:00
Benjamin Peterson 206cd1c284 fix uglyNamingConvention 2011-06-19 17:49:13 -05:00
Éric Araujo 3e425ac64b packaging: Add the project directory to sys.path to support local setup hooks.
Original patch by Vinay Sajip on #11637.
2011-06-19 21:23:43 +02:00
Éric Araujo 348c572dcf Fix typo 2011-06-19 18:53:31 +02:00
R David Murray afc9a5eaa1 #6771: Move wrapper function into __init__ and eliminate wrapper module
Andrew agreed in the issue that eliminating the module file made sense.
Wrapper has only been exposed as a function, and so there is no (easy)
way to access the wrapper module, which in any case only had the one
function in it.  Since __init__ already contains a couple wrapper
functions, it seems to make sense to just move wrapper there instead of
importing it from a single function module.
2011-06-18 20:21:09 -04:00
R David Murray e76ff4081a merge #11584: make Header and make_header handle binary unknown-8bit input 2011-06-18 13:02:42 -04:00
R David Murray e5e366c856 #11584: make Header and make_header handle binary unknown-8bit input
Analogous to the decode_header fix, this fix makes Header.append and
make_header correctly handle the unknown-8bit charset introduced by email5.1,
when the input to them is binary strings.  Previous to this fix the
make_header(decode_header(x)) == x invariant was broken in the face of the
unknown-8bit charset.
2011-06-18 12:57:28 -04:00
R David Murray 7df08379c6 merge #11584: make decode_header handle Header objects correctly
This updates 12e39cd7a0e4 (merge of b21fdfa0019c), which fixed this bug
incorrectly.
2011-06-18 12:32:27 -04:00
R David Murray 6bdb1769dc #11584: make decode_header handle Header objects correctly
This updates b21fdfa0019c, which fixed this bug incorrectly.
2011-06-18 12:30:55 -04:00
R David Murray 953510560f merge #11700: proxy object close methods can now be called multiple times 2011-06-17 22:25:14 -04:00
R David Murray c88bce1580 #11700: proxy object close methods can now be called multiple times
This makes them work like the close provided by regular file objects.
2011-06-17 22:24:05 -04:00
Éric Araujo 3c8ca089b1 Make decorators used in packaging preserve docstrings 2011-06-17 21:10:21 +02:00
Éric Araujo 980d344ff3 Brange merge 2011-06-17 19:39:18 +02:00
Éric Araujo 74d68135ad Brange merge 2011-06-17 19:38:38 +02:00
R David Murray 4c7d21e2b3 merge #11767: use context manager to close file in __getitem__ to prevent FD leak 2011-06-17 12:56:41 -04:00
R David Murray 05ff990401 #11767: use context manager to close file in __getitem__ to prevent FD leak
All of the other methods in mailbox that create message objects take care to
close the file descriptors they use, so it seems to make sense to have
__getitem__ do so as well.

Patch by Filip Gruszczyński.
2011-06-17 12:54:56 -04:00
Éric Araujo ed5d2f1310 Minor tweaks to packaging tests.
- Move a tearDown method right after setUp
- Use assertRaises instead of reinventing it
- Skip a test instead of commenting it out, as a reminder
2011-06-17 15:47:41 +02:00
Éric Araujo c06f46f74c Packaging tests: don’t let an internal cache grow indefinitely.
Victor Stinner diagnosed on #12167 that some reference leaks came from
util._path_created, a set used for caching; there are two tests that
cause additions to this set, so now they clear it in tearDown, avoiding
17 refleaks.  (My tests show that it’s necessary to clear the set in
only one test, clearing it in both does not stop more refleaks, but
there’s no harm in doing it.)
2011-06-17 15:43:18 +02:00
Victor Stinner e470995eff (Merge 3.2) Issue #10883: test_urllib2net closes socket explicitly 2011-06-17 14:53:41 +02:00
Victor Stinner eaca5c8b95 Issue #10883: test_urllib2net closes socket explicitly 2011-06-17 14:53:02 +02:00
Victor Stinner f073dc286c (Merge 3.2) Issue #12133: fix a ResourceWarning in urllib.request
AbstractHTTPHandler.do_open() of urllib.request closes the HTTP connection if
its getresponse() method fails with a socket error. Patch written by Ezio
Melotti.
2011-06-17 14:02:18 +02:00
Victor Stinner a4c45d73cf Issue #12133: fix a ResourceWarning in urllib.request
AbstractHTTPHandler.do_open() of urllib.request closes the HTTP connection if
its getresponse() method fails with a socket error. Patch written by Ezio
Melotti.
2011-06-17 14:01:18 +02:00
Victor Stinner 723993983a Issue #12333: run tests on the new module in a subprocess
It is not possible to unload a module written in C, so use a subprocess to run
the tests on the module compiled by test_build_ext(). Using a subprocess, we
don't have to unload the module, save/restore sys.path, and the test can be run
more than once.

This commit fixes also an access error on rmtree() on Windows: because the
module was not really unloaded, it was not possible to remove the temporary
directory (it is not possible to remove a directory on Windows if it still
contains an open file).
2011-06-17 13:52:56 +02:00
Victor Stinner 0f270b2c37 Issue #12333: close files before removing the directory
packaging.tests.support.TempdirManager: rmtree() fails on Windows if there are
still open files in the directory.
2011-06-17 13:25:53 +02:00
Éric Araujo d2c7e3fe96 Minor tweaks in packaging’s test_dist.
- Use different Metadata objects to write and read a PKG-INFO (METADATA)
  file, to make sure the tested values come from the file

- No need to restore methods on an instance after monkey-patching them:
  the methods are still the same on the class

- Harmonize dedent calls
2011-06-17 13:24:33 +02:00
Victor Stinner 3bcc0170bd (Merge 3.2) Issue #12310: finalize the old process after _run_after_forkers()
multiprocessing: Process._bootstrap() keeps a reference to the old process to
delay its finalization until after _run_after_forkers() as been executed. This
change should fix a crash on Mac OS X Tiger when a lock is released after a
fork.

Patch written by Charles-François Nataliv and Antoine Pitrou.
2011-06-17 12:36:26 +02:00
Victor Stinner 0f83b1511c Issue #12310: finalize the old process after _run_after_forkers()
multiprocessing: Process._bootstrap() keeps a reference to the old process to
delay its finalization until after _run_after_forkers() as been executed. This
change should fix a crash on Mac OS X Tiger when a lock is released after a
fork.

Patch written by Charles-François Nataliv and Antoine Pitrou.
2011-06-17 12:31:49 +02:00
Victor Stinner ac6602bdc1 Issue #12333: restore the previous dir before removing the current directory
packaging.tests.support.TempdirManager: removing the current directory is not
allowed on Windows or Solaris. Store the current directory and restore it
before removing the temporary directory (which is used as the working directory
during the tests).
2011-06-17 12:20:46 +02:00
Éric Araujo 3e85e54274 Remove unused code in packaging.pypi.dist 2011-06-16 23:50:17 +02:00
Éric Araujo 6f67765389 Stop binding sys.path as default parameter value in packaging.
The two public functions in database default to sys.path if the given
*paths* argument is None; the private functions don’t have default
values for their arguments anymore, which is fine as the public
functions that call them pass their arguments down.  Likewise in
install, the functions will pass down their *paths* arguments down to
database functions.

A one-line unneeded function in install was removed instead of being
changed, and the few remaining tests that used brute-force restoration
of sys.path have been cleaned up to use sys.path.remove.
2011-06-16 23:43:15 +02:00
Éric Araujo b6be20ca33 Packaging: remove last mentions and uses of setup.py in the code.
Now only the compatibility layer (in create, util and install) talk
about setup.py.
2011-06-16 23:34:55 +02:00
Éric Araujo 434812d569 Clean up packaging.tests.test_mixin2to3 2011-06-16 23:21:01 +02:00
Victor Stinner 4e97abce2d Issue #12167: Fix a reafleak in packaging.tests.PyPIServer constructor
Don't modify mutable default arguments...
2011-06-15 23:58:57 +02:00
Brian Curtin a87d586fd6 branch merge? 2011-06-13 16:10:32 -05:00
Brian Curtin c9d6a501db branch merge 2011-06-13 16:03:01 -05:00
Brian Curtin 3e86c99f90 Merge from 3.2 for Issue #12084. 2011-06-13 16:00:35 -05:00
Brian Curtin d25aef55c8 Fix #12084. os.stat on Windows wasn't working properly with relative symlinks.
Use of DeviceIoControl to obtain the symlink path via the reparse tag was
removed. The code now uses GetFinalPathNameByHandle in the case of a
symbolic link and works properly given the added test which creates a symbolic
link and calls os.stat on it from multiple locations.

Victor Stinner also noticed an issue with os.lstat following the os.stat
code path when being passed bytes. The posix_lstat function was adjusted to
properly hook up win32_lstat instead of the previous STAT macro (win32_stat).
2011-06-13 15:16:04 -05:00
Victor Stinner 415007e30d Issue #12316: Fix sigwait() test using threads
Spawn a new process instead of using fork(). Patch written by Charles-François
Natali.
2011-06-13 16:19:06 +02:00
Éric Araujo 8d233f2cb0 Also specify encoding when reading setup.cfg (#12320) 2011-06-12 23:02:57 +02:00
Éric Araujo 043f5ae697 Specify the encoding of the setup.cfg in one packaging test (#12320) 2011-06-12 22:04:58 +02:00
Benjamin Peterson 3bbb722654 allow __dir__ to return any sequence 2011-06-11 16:12:08 -05:00
Benjamin Peterson 703f7c4bf5 merge 3.2 (#9284) 2011-06-11 15:56:46 -05:00
Benjamin Peterson 9620cc0463 allow "fake" filenames in findsource (closes #9284)
This allows findsource() to work in doctests.

A patch from Dirkjan Ochtman.
2011-06-11 15:53:11 -05:00
Éric Araujo bc18532eee Branch merge 2011-06-11 19:56:09 +02:00
Charles-François Natali a529308348 Issue #12287: In ossaudiodev, check that the device isn't closed in several
methods.
2011-06-11 18:58:24 +02:00
Benjamin Peterson d858df20d0 bump to 3.1.4 2011-06-11 09:58:58 -05:00
Éric Araujo 6280606a57 Adjust logging in packaging.util.spawn (related to #11599) 2011-06-11 09:46:07 +02:00
Éric Araujo 643cb7345f Allow multiple setup hooks in packaging’s setup.cfg files (#12240).
Original patch by Erik Bray.
2011-06-11 00:33:38 +02:00
Éric Araujo 8474f2901b setup.cfg: Document that description-file can contain more than one file 2011-06-11 00:21:18 +02:00
Éric Araujo 3605030c9b Fix assorted bugs in packaging.util.cfg_to_args (#11595).
Original patch by Erik Bray.
2011-06-10 23:52:26 +02:00
Éric Araujo 1c1d9a5026 Move useful function to packaging.util.
Original patch by Erik Bray as part of #11595, changed by me to improve
readability.
2011-06-10 23:26:31 +02:00
Benjamin Peterson 49aaad3c47 merge heads 2011-06-10 12:32:07 -05:00
Benjamin Peterson ae10b3201c merge 3.2 (#12009) 2011-06-10 12:30:16 -05:00