Commit Graph

18472 Commits

Author SHA1 Message Date
Éric Araujo 78af7d8392 Make packaging.tests.support.LoggingCatcher.get_logs flush the log handler.
This removes the need to call flush manually in each test, except when
testing code that creates warning without checking them.
2011-06-02 14:53:59 +02:00
Tarek Ziade 721ccd0ce1 added the generate-setup action 2011-06-02 12:00:44 +02:00
Éric Araujo 98b6592266 Branch merge 2011-06-01 19:47:06 +02:00
Éric Araujo 25987d0c4b The compiler class for EMX was removed 2011-06-01 15:20:44 +02:00
Éric Araujo 25d5737f15 Fix typos in class names 2011-06-01 14:41:11 +02:00
Victor Stinner 301f3f093c test_faulthandler: use a longer sleep (2.5 sec instead of 1.3 sec) in
_check_dump_tracebacks_later() to avoid failures if the system is slow.
2011-06-01 13:49:12 +02:00
Victor Stinner ebbbdafd87 (Merge 3.2) Close #12230: Mac OS X Tiger (10.4) has a kernel bug: sometimes,
the file descriptor of a pipe closed in the parent process is valid in the
child process according to fstat(), but the mode of the file descriptor is
invalid, and read or write raise an error.

test.support.requires_mac_ver() is now a decorator, as suggested by Ezio
Melotti, and its docstring is fixed (linux_version => mac_ver).
2011-06-01 13:19:07 +02:00
Victor Stinner 88701e27e9 Close #12230: Mac OS X Tiger (10.4) has a kernel bug: sometimes, the file
descriptor of a pipe closed in the parent process is valid in the child process
according to fstat(), but the mode of the file descriptor is invalid, and read
or write raise an error.

Add also requires_mac_ver() decorator to test.support.
2011-06-01 13:13:04 +02:00
Victor Stinner fce9233e93 test.support: add requires_mac_ver() function
Add also linux_version() to __all__.
2011-06-01 12:28:04 +02:00
Benjamin Peterson 8c6f88efa2 remove __version__s dependent on subversion keyword expansion (closes #12221) 2011-05-31 20:52:17 -05:00
Victor Stinner 1b5b9d7434 (Merge 3.2) Close #12085: Fix an attribute error in subprocess.Popen destructor
if the constructor has failed, e.g. because of an undeclared keyword argument.
Patch written by Oleg Oshmyan.
2011-06-01 00:58:57 +02:00
Victor Stinner 87b9bc3893 Close #12085: Fix an attribute error in subprocess.Popen destructor if the
constructor has failed, e.g. because of an undeclared keyword argument. Patch
written by Oleg Oshmyan.
2011-06-01 00:57:47 +02:00
Éric Araujo 1256a6864e Re-add line that was mistakenly removed alongside RPM support.
This reveals the need for bdist* tests.
2011-05-31 22:38:41 +02:00
Victor Stinner 2082268025 Issue #8407: test_signal doesn't check signal delivery order
Tthe signal delivery order is not portable or reliable.
2011-05-31 22:31:09 +02:00
Éric Araujo 9deedf696e Re-apply distutils2 changes lost before the merge of packaging.
wrap_text was removed in favor of standard textwrap but the removal of the
function was lost in a bad merge; a change in sdist mysteriously disappeared.
2011-05-31 18:04:32 +02:00
Éric Araujo a94bdee2e4 Fix nonsensical name.
The code used “long” to refer to a long option (e.g. --quiet), which was
probably changed by 2to3 and not caught by the human operator, and then
changed to “integer” by me to avoid shadowing without seeing the real
obvious fix.
2011-05-31 15:05:38 +02:00
Éric Araujo b4fefc8fa2 Fix test name in debug message 2011-05-31 14:33:32 +02:00
Tarek Ziade e2655974cf code cleanup in packaging.run 2011-05-31 12:15:42 +02:00
Tarek Ziade 5a5ce388ed make sure we check for write access before starting the install, and add correct exit code 2011-05-31 12:09:34 +02:00
Nick Coghlan 62ecb6aa0a Tidy up the additional string module tests added at the Pycon sprints (closes #11505) 2011-05-31 19:40:11 +10:00
Tarek Ziade 441531f6e6 improved pysetup list UI 2011-05-31 09:18:24 +02:00
Benjamin Peterson cccfd9932d merge heads 2011-05-30 19:25:43 -05:00
Benjamin Peterson 15ac311088 add tests for negative with conjugate 2011-05-30 19:22:53 -05:00
Victor Stinner 1eb6d278a8 (Merge 3.2) Issue #12057: Add tests for ISO 2022 codecs
iso2022_jp, iso2022_jp_2 and iso2022_kr
2011-05-31 00:03:07 +02:00
Victor Stinner ee49797c8d Issue #12057: Add tests for ISO 2022 codecs
iso2022_jp, iso2022_jp_2 and iso2022_kr
2011-05-31 00:01:24 +02:00
Tarek Ziade f47fa58b62 better UI when the user does not have the perms to remove the project 2011-05-30 23:26:51 +02:00
Victor Stinner 2a12974bca Close #12028: Make threading._get_ident() public, rename it to
threading.get_ident() and document it. This function was used by
_thread.get_ident().
2011-05-30 23:02:52 +02:00
Victor Stinner d976098e3b Close #12089: Remove outdated and unused code from regrtest. 2011-05-30 22:58:13 +02:00
Victor Stinner e15dce3d18 Close #12171: IncrementalEncoder.reset() of CJK codecs (multibytecodec) calls
encreset() instead of decreset().
2011-05-30 22:56:00 +02:00
Tarek Ziade 1cc9bbd751 fixed the test_uninstall patch 2011-05-30 19:16:49 +02:00
Tarek Ziade 371df05740 Issue 12218: Removing wsgiref.egg-info 2011-05-30 18:55:32 +02:00
Benjamin Peterson c6c5e04611 merge heads 2011-05-30 11:15:05 -05:00
Benjamin Peterson 758888d437 don't restrict unexpected EOF errors to the first line (closes #12216) 2011-05-30 11:12:38 -05:00
Benjamin Peterson c8507bfe9c use better naming scheme 2011-05-30 10:52:48 -05:00
Brian Quinlan 1ae2998f3e Increases some test timeouts to fix issue 11864. 2011-05-30 21:52:24 +10:00
Tarek Ziade b9c09878ab displaying the faulty project name is a good idea 2011-05-30 12:25:38 +02:00
Tarek Ziade 2da756592b removed spurious output 2011-05-30 12:25:21 +02:00
Tarek Ziade b1b6e1384c Cleaned up the installer output behavior.
This change also makes sure the logger handlers are not alterated after an
installation. That also fixes the remaining environment alteration issue in
test_packaging.
2011-05-30 12:07:49 +02:00
Tarek Ziade 43f289ad88 cleanup packaging.database 2011-05-30 11:07:54 +02:00
Tarek Ziade a17d8883fd a resource module for 2 functions is overkill. database is the right place for those 2011-05-30 10:57:44 +02:00
Nadeem Vawda 72e58651b2 Simplify line-oriented tests in test_bz2. 2011-05-30 02:09:54 +02:00
Nadeem Vawda f3ecb83822 Issue #1625: Add stream ordering test to test_bz2. 2011-05-30 01:58:12 +02:00
Nadeem Vawda 07d291ae59 Remove unused data from test_bz2.
DATA_CRLF was used to test BZ2File's universal newline logic, which was removed
in changeset ce63a5dcb0af. The tests themselves were removed in fbabdb0d7dd2.
2011-05-30 01:44:45 +02:00
Nadeem Vawda 98838bac9c Miscellaneous cleanups to bz2 and test_bz2 following issue #1625.
* In bz2.decompress(), concatenate partial results in a way that should
   be more friendly to other Python implementations
* Remove redundant comments in test_bz2
* Use 'while True:' instead of 'while 1:'
2011-05-30 01:12:24 +02:00
Ned Deily 65bf417fe1 Issue #10736: Revert changeset de4d34a95603 as it causes failures with
old Apple-supplied Carbon Tk 8.4.
2011-05-29 15:39:11 -07:00
Ned Deily d8e08067b9 Issue #10736: Fix test_ttk test_widgets failures with Cocoa Tk 8.5.9
on Mac OS X.  (Patch by Ronald Oussoren)
2011-05-29 15:28:54 -07:00
Charles-François Natali d92ccb1f75 Skip test_pipe2 on Linux kernels older than 2.6.27. 2011-05-29 20:46:27 +02:00
Charles-François Natali daafdd5bea Issue #12196: Add pipe2() to the os module. 2011-05-29 20:07:40 +02:00
Benjamin Peterson 43af12b0b4 unify TryExcept and TryFinally (closes #12199) 2011-05-29 11:43:10 -05:00
Éric Araujo c739066914 Branch merge 2011-05-29 18:08:34 +02:00
Éric Araujo 4b8f6651f0 Branch merge 2011-05-29 18:05:53 +02:00
Charles-François Natali 2d51721832 Issue #12196: Add PIPE_MAX_SIZE to test.support, constant larger than the
underlying OS pipe buffer size.
2011-05-29 16:36:44 +02:00
Éric Araujo 7f9b37be45 Port r86353 to packaging (#10359: “;” after function definition is invalid in ISO C) 2011-05-29 02:59:52 +02:00
Éric Araujo 601aba6f15 Merge touch-ups and fixes for #9831 (+port fix to packaging) and #9223 from 3.2 2011-05-29 00:56:39 +02:00
Éric Araujo c5069e0070 Merge doc touch-ups and fixes for #9831 and #9223 from 3.1 2011-05-29 00:29:56 +02:00
Éric Araujo 489c8ff26b Fix test_build_py when sys.dont_write_bytecode is true (#9831).
The tests now pass all combinations of -O/-OO and -B.  See also #7071
and #6292 for previous variations on the same theme.

test_versionpredicate needs a skip when sys.flags.optimize is true, but
I don’t know how to make that work with a DocTestSuite.
2011-05-28 23:32:50 +02:00
Gregory P. Smith 8281ba8bcb follow on to the last commit, remove the final POSIXPurePythonTestCase
reference.  (the difference between running test_subprocess.py
directly rather than via regrtest.py)
2011-05-28 10:00:14 -07:00
Gregory P. Smith 59fd1bfcc1 The _posixsubprocess module is now required on POSIX.
Remove the pure Python POSIX subprocess implementation.

If non-CPython VMs (are there any for 3.x yet?) were somehow depending
on this, they already have the exact same set of problems with Python
code being executed after os.fork() that _posixsubprocess was written
to deal with.  They should implement an equivalent outside of Python.
2011-05-28 09:32:39 -07:00
Gregory P. Smith 7439e7b7ce Fix ProcessTestCasePOSIXPurePython to test the module from import when
_posixsubprocess doesn't exist rather than simply stubbing it out
after the fact.  This adds coverage for the RuntimeWarning as well as
using the pure python _create_pipe instead of using
_posixsubprocess.cloexec_pipe unintentionally with the pure python
code.

Ironically: I don't think any platform should ever actually _use_ the
pure Python subprocess code on POSIX platforms anymore.  This at least
tests it properly in this stable branch.  The pure python code for
this is likely to be removed in 3.3.
2011-05-28 09:06:02 -07:00
Gregory P. Smith c80504fb69 Fix ProcessTestCasePOSIXPurePython to test the module from import when
_posixsubprocess doesn't exist rather than simply stubbing it out
after the fact.  This adds coverage for the RuntimeWarning as well as
using the pure python _create_pipe instead of using
_posixsubprocess.cloexec_pipe unintentionally with the pure python
code.

Ironically: I don't think any platform should ever actually _use_ the
pure Python subprocess code on POSIX platforms anymore.  This at least
tests it properly in this stable branch.  The pure python code for
this is likely to be removed in 3.3.
2011-05-28 09:06:02 -07:00
Ned Deily 59a333844a Issue #985064: Make plistlib more resilient to faulty input plists.
Patch by Mher Movsisyan.
2011-05-28 03:09:33 -07:00
Ned Deily 32b5cb0a66 Issue #985064: Make plistlib more resilient to faulty input plists.
Patch by Mher Movsisyan.
2011-05-28 03:02:30 -07:00
Ned Deily b8e59f77e6 Issue #985064: Make plistlib more resilient to faulty input plists.
Patch by Mher Movsisyan.
2011-05-28 02:19:19 -07:00
Ned Deily 61be422bd7 Issue #9670: Increase the default stack size for secondary threads on
Mac OS X and FreeBSD to reduce the chances of a crash instead of a
"maximum recursion depth" RuntimeError exception.
(patch by Ronald Oussoren)
2011-05-28 00:45:52 -07:00
Ned Deily 056f5b9dad Issue #9670: Increase the default stack size for secondary threads on
Mac OS X and FreeBSD to reduce the chances of a crash instead of a
"maximum recursion depth" RuntimeError exception.
(patch by Ronald Oussoren)
2011-05-28 00:36:12 -07:00
Ned Deily 9a7c524dc6 Issue #9670: Increase the default stack size for secondary threads on
Mac OS X and FreeBSD to reduce the chances of a crash instead of a
"maximum recursion depth" RuntimeError exception.
(patch by Ronald Oussoren)
2011-05-28 00:19:56 -07:00
Benjamin Peterson aeabd5f29c add some with syntax examples 2011-05-27 15:02:03 -05:00
Victor Stinner 0501070669 Revert my commit 3555cf6f9c98: "Issue #8796: codecs.open() calls the builtin
open() function instead of using StreamReaderWriter. Deprecate StreamReader,
StreamWriter, StreamReaderWriter, StreamRecoder and EncodedFile() of the codec
module. Use the builtin open() function or io.TextIOWrapper instead."

"It has not been approved !" wrote Marc-Andre Lemburg.
2011-05-27 16:50:40 +02:00
Benjamin Peterson 43b068648e try to use the same str object for all code filenames when compiling or unmarshalling (#12190)
This should reduce memory usage.
2011-05-27 09:08:01 -05:00
Nadeem Vawda 4e18ac850f Merge heads 2011-05-27 02:03:06 +02:00
Nadeem Vawda 55b4338874 Issue #1625: BZ2File and bz2.decompress() now support multi-stream files.
Initial patch by Nir Aides.
2011-05-27 01:52:15 +02:00
Victor Stinner 98fe1a0c3b Issue #8796: codecs.open() calls the builtin open() function instead of using
StreamReaderWriter. Deprecate StreamReader, StreamWriter, StreamReaderWriter,
StreamRecoder and EncodedFile() of the codec module. Use the builtin open()
function or io.TextIOWrapper instead.
2011-05-27 01:51:18 +02:00
Éric Araujo d4ae04fdb8 Branch merge 2011-05-26 16:50:19 +02:00
Éric Araujo dec2067b2a Branch merge 2011-05-26 16:49:59 +02:00
Éric Araujo f46676d48f Branch merge 2011-05-26 16:35:14 +02:00
Victor Stinner b57f108b03 Issue #12175: BufferedReader.read(-1) now calls raw.readall() if available. 2011-05-26 00:19:38 +02:00
Tarek Ziade 5eb555990a Issue #12180: Fixed a few remaining errors in test_packaging when no threading. 2011-05-25 23:46:09 +02:00
Victor Stinner d2780aedce (Merge 3.2) Issue #12175: RawIOBase.readall() now returns None if read()
returns None.
2011-05-25 22:51:16 +02:00
Victor Stinner 988512cfd7 (Merge 3.1) Issue #12175: RawIOBase.readall() now returns None if read()
returns None.
2011-05-25 22:49:15 +02:00
Victor Stinner a80987f20d Issue #12175: RawIOBase.readall() now returns None if read() returns None. 2011-05-25 22:47:16 +02:00
Victor Stinner af62c7d3de (Merge 3.2) Issue #12175: FileIO.readall() now raises a ValueError instead of
an IOError if the file is closed.
2011-05-25 22:13:47 +02:00
Victor Stinner 4767114e77 (Merge 3.1) Issue #12175: FileIO.readall() now raises a ValueError instead of
an IOError if the file is closed.
2011-05-25 22:11:55 +02:00
Victor Stinner b79f28ccbd Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError if
the file is closed.
2011-05-25 22:09:03 +02:00
Senthil Kumaran 242926d227 merge commit. 2011-05-26 00:26:32 +08:00
Senthil Kumaran 5e826e8a1b Fix closes issue #11109 - socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass.
A new method called service_action is made available in BaseServer, called by
serve_forever loop. This useful in cases where Mixins can use it for cleanup
action. ForkingMixin class uses service_action to collect the zombie child
processes. Initial Patch by Justin Wark.
2011-05-26 00:22:59 +08:00
Éric Araujo aa1ef2d735 Merge 3.2 2011-05-25 18:22:26 +02:00
Éric Araujo 559b5f1ca0 Minor cleanup in sysconfig.
Also remove outdated and unhelpful docstrings in test_sysconfig.
2011-05-25 18:21:43 +02:00
Antoine Pitrou b46004c94f Issue #12045: Avoid duplicate execution of command in ctypes.util._get_soname().
Patch by Sijin Joseph.
2011-05-25 18:17:25 +02:00
Éric Araujo 51b7aedadd Merge 3.1 2011-05-25 18:13:49 +02:00
Éric Araujo 29ef0064de Branch merge 2011-05-25 18:12:22 +02:00
Benjamin Peterson dac9acedfd test that object has a __dir__() implementation 2011-05-25 09:33:37 -05:00
Benjamin Peterson 81b21d7766 test values and types of (True/False).(imag/real) 2011-05-25 09:21:46 -05:00
Victor Stinner 2e2baa9208 Issue #12049: test_ssl now checks also that RAND_bytes() raises an error if
there is not enough entropy.
2011-05-25 11:15:16 +02:00
Victor Stinner c13ef66649 Issue #8407: Fix the signal handler of the signal module: if it is called
twice, it now writes the number of the second signal into the wakeup fd.
2011-05-25 02:35:58 +02:00
Benjamin Peterson b45c7087aa excellent place for assertRaises 2011-05-24 19:31:01 -05:00
Victor Stinner be6210363e Issue #8533: regrtest replaces also sys.stdout on Windows
Replace sys.stdout to use backslashreplace. Use '\n' newline on all operating
systems.
2011-05-25 02:01:55 +02:00
Victor Stinner 6daa33c8ac Issue #10818: Remove deprecated pydoc.serve() function
The pydoc module has a new enhanced web server.
2011-05-25 01:41:22 +02:00
Victor Stinner 383c3fc6b4 Issue #10818: Remove the Tk GUI of the pydoc module (pydoc -g has been
deprecated in Python 3.2).
2011-05-25 01:35:05 +02:00
Nadeem Vawda f1a1af21eb Fix typo in bz2 module. 2011-05-25 00:32:08 +02:00
Victor Stinner 62666e1db1 (Merge 3.2) Issue #12057: Add tests for the HZ encoding 2011-05-25 00:17:13 +02:00