Commit Graph

9163 Commits

Author SHA1 Message Date
Benjamin Peterson e56717c3d2 merge heads 2011-09-28 10:48:40 -04:00
Benjamin Peterson 19f6260710 this isn't fixed on windows yet... 2011-09-28 10:48:32 -04:00
Ezio Melotti d8b509b192 #13012: use splitlines(keepends=True/False) instead of splitlines(0/1). 2011-09-28 17:37:55 +03:00
Benjamin Peterson a6e50f589f this test works as expected now 2011-09-28 08:20:00 -04:00
Benjamin Peterson e28544ad5f revert unintended change 2011-09-28 08:19:25 -04:00
Benjamin Peterson 9c6e6a0c7f don't check that the first character is XID_Continue
Current, XID_Continue is a superset of XID_Start, but that may sometime change.
2011-09-28 08:09:05 -04:00
Martin v. Löwis 287eca658d Fix struct sizes. Drop -1, since the resulting string was actually the largest one
that could be allocated.
2011-09-28 10:03:28 +02:00
Martin v. Löwis f02aa65acb Use compile() instead of eval(). 2011-09-28 09:22:13 +02:00
Martin v. Löwis 0c9fe4d109 Use eval instead of codecs.lookup to trigger UTF-8 generation. 2011-09-28 09:15:11 +02:00
Martin v. Löwis d63a3b8beb Implement PEP 393. 2011-09-28 07:41:54 +02:00
Mark Dickinson 0d5f6adbb3 Issue #13012: Allow 'keepends' to be passed as a keyword argument in str.splitlines, bytes.splitlines and bytearray.splitlines. 2011-09-24 09:14:39 +01:00
Victor Stinner a1fe1f8dcf Merge 3.2: Issue #7732: Don't open a directory as a file anymore while
importing a module. Ignore the direcotry if its name matchs the module name
(e.g.  "__init__.py") and raise a ImportError instead.
2011-09-23 18:59:08 +02:00
Victor Stinner 53ffdc53bf Issue #7732: Don't open a directory as a file anymore while importing a
module. Ignore the direcotry if its name matchs the module name (e.g.
"__init__.py") and raise a ImportError instead.
2011-09-23 18:54:40 +02:00
Victor Stinner 92c144ee72 Merge 3.2: Issue #12931: Add a test with Unicode URI to test_xmlrpc 2011-09-23 01:31:04 +02:00
Victor Stinner da6eb5305f Issue #12931: Add a test with Unicode URI to test_xmlrpc 2011-09-23 01:29:44 +02:00
Charles-François Natali 9089b7956b Fix a race condition in test_socket.ThreadableTest: the client is reported
ready before having been set up.
2011-09-21 22:05:01 +02:00
Charles-François Natali a49ed7650a Fix a race condition in test_socket.ThreadableTest: the client is reported as
ready before having been set up.
2011-09-21 22:03:58 +02:00
Charles-François Natali fba2b6b454 Issue #12981: test_multiprocessing: catch ImportError when importing
multiprocessing.reduction, which may not be available (e.g. if the OS doesn't
support FD passing over Unix domain sockets).
2011-09-21 18:49:18 +02:00
Charles-François Natali e51c8dad1a Issue #12981: test_multiprocessing: catch ImportError when importing
multiprocessing.reduction, which may not be available (e.g. if the OS doesn't
support FD passing over Unix domain sockets).
2011-09-21 18:48:21 +02:00
Jesus Cea 41c98a3207 Close #13022: _multiprocessing.recvfd() doesn't check that file descriptor was actually received 2011-09-21 03:56:05 +02:00
Jesus Cea 4507e6456e Close #13022: _multiprocessing.recvfd() doesn't check that file descriptor was actually received 2011-09-21 03:53:25 +02:00
Meador Inge 1c9f0c93ad Issue #1172711: Add 'long long' support to the array module.
Initial patch by Oren Tirosh and Hirokazu Yamamoto.
2011-09-20 19:55:51 -05:00
Victor Stinner 4ad6ed7d4d Merge 3.2: test_multiprocessing removes temporary files 2011-09-21 01:12:59 +02:00
Victor Stinner d0b10a6435 test_multiprocessing removes temporary files 2011-09-21 01:10:29 +02:00
Victor Stinner c61fae04f6 Merge 3.2: test_httplib removes temporary files 2011-09-21 01:09:29 +02:00
Victor Stinner 18d15cb665 test_httplib removes temporary files 2011-09-21 01:09:04 +02:00
Charles-François Natali bc8f08216e Issue #12981: test_multiprocessing: catch ImportError when importing
multiprocessing.reduction, which may not be available (e.g. if the OS doesn't
support FD passing over Unix domain sockets).
2011-09-20 20:36:51 +02:00
Éric Araujo becf1c5857 Branch merge 2011-09-19 16:10:26 +02:00
Nick Coghlan 2496f331a7 Close issue 12958 by flagging expected failures in test_socket on Mac OS X 2011-09-19 20:26:31 +10:00
Éric Araujo 28df8de6af Make regrtest look at internal dicts in sysconfig.
This reveals problems in the packaging test suite, which I’ll look
into after the regrtest checks are made more usable (see #12314).
2011-09-19 05:10:45 +02:00
Éric Araujo c1b7e7f8bb A few style changes originally done in the distutils2 repo 2011-09-18 23:12:30 +02:00
Senthil Kumaran b7a690aeb4 merge from 3.2 - Add the missing quote_plus call. Fix closes Issue12924 2011-09-13 06:41:43 +08:00
Senthil Kumaran 305a68eb4a Add the quote_plus call in the test. 2011-09-13 06:40:27 +08:00
Nadeem Vawda 64d25ddb9c Issue #12306: Add ZLIB_RUNTIME_VERSION to the zlib module.
While we're at it, also document ZLIB_VERSION.

Patch by Torsten Landschoff.
2011-09-12 00:04:13 +02:00
Nadeem Vawda 249ab5e8d1 BZ2File now uses the compresslevel argument given by the caller,
instead of ignoring it and always using a compression level of 9.
2011-09-11 22:38:11 +02:00
Jesus Cea ceb5d169e9 Better fix for #12763: test_posix failure on OpenIndiana 2011-09-10 01:16:55 +02:00
Jesus Cea 1e1c8f4913 Fix issue #12948: multiprocessing test failures can hang the buildbots 2011-09-09 22:16:57 +02:00
Jesus Cea da752d80c8 Fix issue #12948: multiprocessing test failures can hang the buildbots 2011-09-09 22:15:16 +02:00
Jesus Cea 440b3834e2 Close issue #12948: multiprocessing test failures can hang the buildbots 2011-09-09 20:29:01 +02:00
Jesus Cea 94f964f810 Close issue #12948: multiprocessing test failures can hang the buildbots 2011-09-09 20:26:57 +02:00
Charles-François Natali ea0d5fcb4a Issue #12871: sched_get_priority_(min|max) might not be defined even though
<sched.h> is available (most notably on OpenBSD when built without pthread):
add an explicit configure check.
2011-09-06 19:03:35 +02:00
Victor Stinner 900c292c6b Issue #12567: Fix curses.unget_wch() tests
Skip the test if the function is missing. Use U+0061 (a) instead of U+00E9 (é)
because U+00E9 raises a _curses.error('unget_wch() returned ERR') on some
buildbots. It's maybe because of the locale encoding.
2011-09-06 10:08:28 +02:00
Victor Stinner 71e44cb97f Issue #12567: Add curses.unget_wch() function
Push a character so the next get_wch() will return it.
2011-09-06 01:53:03 +02:00
Ezio Melotti 6a8c8a80a1 #12888: merge with 3.2. 2011-09-05 17:15:32 +03:00
Ezio Melotti d9e0b068af #12888: Fix a bug in HTMLParser.unescape that prevented it to escape more than 128 entities. Patch by Peter Otten. 2011-09-05 17:11:06 +03:00
Benjamin Peterson 9fd5374d4e merge 3.2 (#12878) 2011-09-03 09:32:24 -04:00
Benjamin Peterson f6f3a35447 add a __dict__ descr for IOBase (closes #12878) 2011-09-03 09:26:20 -04:00
Charles-François Natali 3391e64482 Issue #12868: Skip test_faulthandler.test_stack_overflow() on OpenBSD:
sigaltstack(2) doesn't work when linked with pthread.
2011-09-01 23:08:21 +02:00
Antoine Pitrou 5edbaf295e Issue #12802: the Windows error ERROR_DIRECTORY (numbered 267) is now
mapped to POSIX errno ENOTDIR (previously EINVAL).
2011-09-01 21:38:37 +02:00
Antoine Pitrou a762285831 Issue #12802: the Windows error ERROR_DIRECTORY (numbered 267) is now
mapped to POSIX errno ENOTDIR (previously EINVAL).
2011-09-01 21:37:43 +02:00
Benjamin Peterson 799bd80d8a expose linux extended file system attributes (closes #12720) 2011-08-31 22:15:17 -04:00
Éric Araujo ab3bea6815 Merge fix for #10086 from 3.2 2011-08-31 16:52:12 +02:00
Éric Araujo 48e484fdde Fix test_sysconfig when run from a Python installed under /site (#10086).
Patch by Hallvard B Furuseth.
2011-08-31 16:48:17 +02:00
Antoine Pitrou 2d243494c6 Try to fix one of the bigmem tests in test_pickle 2011-08-30 23:39:59 +02:00
Antoine Pitrou e897e95880 Try to fix one of the bigmem tests in test_pickle 2011-08-30 23:39:34 +02:00
Antoine Pitrou 7a18d21230 Remove misleading comment and code.
Windows does set the errno attribute to ENOENT, but the error message
displays the Windows error number (3 -> ERROR_PATH_NOT_FOUND), not the
errno number (2 -> ENOENT).
The Unix errno corresponding to 3 is ESRCH, explaining the confusion,
which can be seen in the following snippet:

>>> shutil.rmtree("foo")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "Z:\default\lib\shutil.py", line 272, in rmtree
    onerror(os.listdir, path, sys.exc_info())
  File "Z:\default\lib\shutil.py", line 270, in rmtree
    names = os.listdir(path)
WindowsError: [Error 3] The system cannot find the path specified:
'foo\\*.*'
>>> e = sys.last_value
>>> e.errno
2
>>> e.winerror
3
>>> errno.errorcode[2]
'ENOENT'

For reference, see PC/errmap.h and
http://msdn.microsoft.com/en-us/library/ms681382%28v=vs.85%29.aspx
2011-08-30 18:34:47 +02:00
Antoine Pitrou a514eb95f3 Issue #12847: Fix a crash with negative PUT and LONG_BINPUT arguments in
the C pickle implementation.
2011-08-30 00:28:40 +02:00
Antoine Pitrou 55549ec476 Issue #12847: Fix a crash with negative PUT and LONG_BINPUT arguments in
the C pickle implementation.
2011-08-30 00:27:10 +02:00
Antoine Pitrou ee763e2acc Issue #11564: Avoid crashes when trying to pickle huge objects or containers
(more than 2**31 items).  Instead, in most cases, an OverflowError is raised.
2011-08-29 23:14:53 +02:00
Antoine Pitrou 82be19f889 Issue #11564: Avoid crashes when trying to pickle huge objects or containers
(more than 2**31 items).  Instead, in most cases, an OverflowError is raised.
2011-08-29 23:09:33 +02:00
Antoine Pitrou 76f570a9c6 Make tests faster by reaping threads only at the end 2011-08-28 01:24:22 +02:00
Antoine Pitrou d54fa555cb Make tests faster by reaping threads only at the end 2011-08-28 01:23:52 +02:00
Nick Coghlan 513886aabb Fix #12835: prevent use of the unencrypted sendmsg/recvmsg APIs on SSL wrapped sockets (Patch by David Watson) 2011-08-28 00:00:27 +10:00
Nadeem Vawda a89c32ccd9 Merge: Make regrtest complain when -M and -j are used together.
-j doesn't pass the memlimit on to child processes, so this doesn't work at
present, and even if it did, running multiple bigmem tests at once would
usually not be desirable (since you generally want to devote as much of the
available RAM as possible to each test).
2011-08-27 15:24:23 +02:00
Nadeem Vawda c1fba3ea0c Make regrtest complain when -M and -j are used together.
-j doesn't pass the memlimit on to child processes, so this doesn't work at
present, and even if it did, running multiple bigmem tests at once would
usually not be desirable (since you generally want to devote as much of the
available RAM as possible to each test).
2011-08-27 15:22:05 +02:00
Antoine Pitrou 0a95b43723 Followup to cdc6c1b072a5: I forgot to "hg add" the test files 2011-08-25 15:01:15 +02:00
Antoine Pitrou 4fd1e6a3ba Issue #12803: SSLContext.load_cert_chain() now accepts a password argument
to be used if the private key is encrypted.  Patch by Adam Simpkins.
2011-08-25 14:39:44 +02:00
Charles-François Natali a045c05878 Issue #12656: Really fix test_asyncore failures on Windows buildbots... 2011-08-25 01:22:50 +02:00
Charles-François Natali e3540b47d1 Issue #12656: Fix test_asyncore failures on Windows buildbots. 2011-08-25 00:50:41 +02:00
Charles-François Natali e78cbecaf1 Issue #12656: Add tests for IPv6 and Unix sockets to test_asyncore. 2011-08-24 23:24:05 +02:00
Antoine Pitrou 7a084105a0 Merge 2011-08-23 19:49:13 +02:00
Antoine Pitrou 162fee109b Issue #11657: Fix sending file descriptors over 255 over a multiprocessing Pipe.
Also added some tests.
2011-08-23 19:48:34 +02:00
Charles-François Natali 6cea35a8e3 Issue #12821: Fix test_fcntl failures on OpenBSD 5. 2011-08-23 19:46:46 +02:00
Antoine Pitrou bcb39d4846 Issue #11657: Fix sending file descriptors over 255 over a multiprocessing Pipe.
Also added some tests.
2011-08-23 19:46:22 +02:00
Antoine Pitrou 5bd8b8d80f A warning doesn't equate a failed test
(this broken -F with e.g. test_multiprocessing)
2011-08-23 19:32:26 +02:00
Nick Coghlan 5fab03fd15 Remove the SSLSocket versions of sendmsg/recvmsg due to lack of proper tests and documentation in conjunction with lack of any known use cases (see issue #6560 for details) 2011-08-23 22:26:44 +10:00
Ezio Melotti 83feff5686 #6484: refactor a bit the tests. 2011-08-23 01:39:22 +03:00
Sandro Tosi 91f948a734 #12191: fix build failures, explicitly passing group argument when I want to test it 2011-08-22 23:55:39 +02:00
Ezio Melotti a3fbde3504 Merge indentation fix and skip decorator with 3.2. 2011-08-23 00:40:09 +03:00
Ezio Melotti a5c92b4714 Fix indentation and add a skip decorator. 2011-08-23 00:37:08 +03:00
Sandro Tosi d902a14dd0 #12191: add shutil.chown() to change user and/or group owner of a given path also specifying their names. 2011-08-22 23:28:27 +02:00
Ezio Melotti 6f2a683a0c #9200: merge with 3.2. 2011-08-22 20:31:11 +03:00
Ezio Melotti 93e7afc5d9 #9200: The str.is* methods now work with strings that contain non-BMP characters even in narrow Unicode builds. 2011-08-22 14:08:38 +03:00
Nadeem Vawda 3d1706fa83 Fix deprecation warnings in test_socket. 2011-08-22 09:46:56 +02:00
Nick Coghlan 029ba2b8cd Add unit tests for the mailcap module. Patch by Gregory Nofi (closes #6484) 2011-08-22 16:05:44 +10:00
Nick Coghlan 96fe56abec Add support for the send/recvmsg API to the socket module. Patch by David Watson and Heiko Wundram. (Closes #6560) 2011-08-22 11:55:57 +10:00
Charles-François Natali 7b911cb621 Issue #12783: Fix test_posix failures on FreeBSD buildbots, due to
sched_setparam() returning EINVAL for processes with SCHED_OTHER scheduling
policy.
2011-08-21 12:41:43 +02:00
Victor Stinner e67474725b Issue #12326: refactor usage of sys.platform
* Use str.startswith(tuple): I didn't know this Python feature, Python rocks!
 * Replace sometimes sys.platform.startswith('linux') with
   sys.platform == 'linux'
 * sys.platform doesn't contain the major version on Cygwin on Mac OS X
   (it's just 'cygwin' and 'darwin')
2011-08-21 00:39:18 +02:00
Antoine Pitrou e8bb1a0229 Issue #12213: Fix a buffering bug with interleaved reads and writes that
could appear on BufferedRandom streams.
2011-08-20 14:52:04 +02:00
Antoine Pitrou e05565ec5a Issue #12213: Fix a buffering bug with interleaved reads and writes that
could appear on BufferedRandom streams.
2011-08-20 14:39:23 +02:00
Antoine Pitrou 8fd544ffa9 Issue #12791: Break reference cycles early when a generator exits with an exception. 2011-08-20 14:18:25 +02:00
Antoine Pitrou a370fcf3b2 Issue #12791: Break reference cycles early when a generator exits with an exception. 2011-08-20 14:15:03 +02:00
Antoine Pitrou 107d65d144 Fix typo in test names 2011-08-19 20:33:11 +02:00
Antoine Pitrou 20db51108c Fix typo in test names 2011-08-19 20:32:34 +02:00
Antoine Pitrou df7fc9dda7 Issue #12778: Reduce memory consumption when JSON-encoding a large container of many small objects. 2011-08-19 18:03:14 +02:00
Nadeem Vawda 74adbaa7bd Merge: Fix ResourceWarnings in test_subprocess. 2011-08-19 05:14:40 +02:00
Nadeem Vawda 0d7cda3e63 Fix ResourceWarnings in test_subprocess. 2011-08-19 05:12:01 +02:00
Charles-François Natali 2736c5d47c Issue #12650: fix failures on some buildbots, when a subprocess takes a long
time to spawn.
2011-08-19 00:25:07 +02:00
Charles-François Natali 72d161af51 Issue #12650: fix failures on some buildbots, when a subprocess takes a long
time to spawn.
2011-08-19 00:24:00 +02:00
Benjamin Peterson c07f3be4e0 merge 3.2 2011-08-18 13:55:31 -05:00