Commit Graph

18095 Commits

Author SHA1 Message Date
Nadeem Vawda 7420b70240 Fix potential resource leak in test_mmap. 2011-05-07 14:35:05 +02:00
Nadeem Vawda ce79230173 Merge: #11277: Fix tests - crash will not trigger if the file is closed and reopened. 2011-05-07 14:17:27 +02:00
Nadeem Vawda 044dfadd1c Merge: #11277: Fix tests - crash will not trigger if the file is closed and reopened. 2011-05-07 14:16:50 +02:00
Nadeem Vawda 909f6d2fba Issue #11277: Fix tests - crash will not trigger if the file is closed and reopened. 2011-05-07 14:14:53 +02:00
Nadeem Vawda 02e6569628 Merge: #11277: Add tests for mmap crash when using large sparse files on OS X.
Also, reduce code duplication in LargeMmapTests.

Original patch by Steffen Daode Nurpmeso.
2011-05-07 13:11:59 +02:00
Nadeem Vawda c2bb073742 Merge: #11277: Add tests for mmap crash when using large sparse files on OS X.
Also, reduce code duplication in LargeMmapTests.

Original patch by Steffen Daode Nurpmeso.
2011-05-07 13:08:54 +02:00
Nadeem Vawda ced1056925 Issue #11277: Add tests for mmap crash when using large sparse files on OS X.
Also, reduce code duplication in LargeMmapTests.

Original patch by Steffen Daode Nurpmeso.
2011-05-07 13:01:50 +02:00
Victor Stinner 7bba62fd68 faulthandler: dump all threads by default
* Set the default value of all_threads arguments to True
 * Py_FatalError() dumps all threads, instead of only the current thread

Dump only the current thread is not reliable. In some cases, Python is unable
to retrieve the state of the current thread and so is unable to dump the
traceback. faulthandler keeps a reference to the interpreter and so is always
able to dump the traceback of all threads.
2011-05-07 12:43:00 +02:00
R David Murray 46070ebddf #11999: sync based on comparing mtimes, not mtime to system clock 2011-05-06 22:26:27 -04:00
R David Murray 94b8ee3bff #11999: sync based on comparing mtimes, not mtime to system clock 2011-05-06 22:20:34 -04:00
R David Murray caed7fe0ff #11999: sync based on comparing mtimes, not mtime to system clock 2011-05-06 22:07:19 -04:00
Vinay Sajip a6bbbe43ef Refined rollover test for slow test machines. 2011-05-06 19:06:00 +01:00
Giampaolo Rodola' d78def9474 Issue #11072: added MLSD command (RFC-3659) support to ftplib. 2011-05-06 19:49:08 +02:00
Antoine Pitrou 0872816dc1 Issue #8808: The IMAP4_SSL constructor now allows passing an SSLContext
parameter to control parameters of the secure channel.  Patch by Sijin
Joseph.
2011-05-06 18:49:52 +02:00
Ronald Oussoren 45fd0c9931 merge from 3.2 2011-05-06 17:11:44 +02:00
Ronald Oussoren 6355c16d36 ntpath.samefile fails to detect that "A.TXT" and "a.txt" refer to the same file on Windows XP.
Noticed while researching a buildbot failure due to a patch for issue #10684.
2011-05-06 17:11:07 +02:00
Antoine Pitrou ff9bfca482 Issue #12000: When a SSL certificate has a subjectAltName without any
dNSName entry, ssl.match_hostname() should use the subject's commonName.
Patch by Nicolas Bareil.
2011-05-06 15:20:55 +02:00
Antoine Pitrou 1c86b44506 Issue #12000: When a SSL certificate has a subjectAltName without any
dNSName entry, ssl.match_hostname() should use the subject's commonName.
Patch by Nicolas Bareil.
2011-05-06 15:19:49 +02:00
Ezio Melotti b4dc2502ad Issue #10775: assertRaises, assertRaisesRegex, assertWarns, and assertWarnsRegex now accept a keyword argument 'msg' when used as context managers. Initial patch by Winston Ewert. 2011-05-06 15:01:41 +03:00
Ronald Oussoren 136148e97d merge from 3.2 2011-05-06 11:17:40 +02:00
Ronald Oussoren 78349b06af merge from 3.1 2011-05-06 10:57:22 +02:00
Ronald Oussoren f51738b10e Fix for issue 10684: Folders get deleted when trying to change case with shutil.move (case insensitive file systems only) 2011-05-06 10:23:04 +02:00
Vinay Sajip 89c8862ee5 Close handler opened in test. 2011-05-06 07:19:41 +01:00
Raymond Hettinger 1c7b7f7fbe Userlist.copy() wasn't returning a UserList. 2011-05-05 14:34:35 -07:00
Raymond Hettinger 8cd2e5f751 Sync-up minor code edits with the default branch. 2011-05-05 14:15:12 -07:00
Vinay Sajip 28338fbdba Added additional output to help diagnose buildbot failures. 2011-05-05 21:23:42 +01:00
Raymond Hettinger 102d874999 Sync-up minor code edits with the default branch. 2011-05-05 11:49:12 -07:00
Raymond Hettinger 7c5dc912ba Avoid codec spelling issues by just using the utf-8 default. 2011-05-05 11:38:06 -07:00
Raymond Hettinger f90ba8a9a2 Avoid codec spelling issues by just using the utf-8 default. 2011-05-05 11:35:50 -07:00
Antoine Pitrou b596dc7c86 Merge: Use shared testing facilities in test_threading 2011-05-05 20:18:19 +02:00
Antoine Pitrou c4d7864e0e Use shared testing facilities in test_threading 2011-05-05 20:17:32 +02:00
R David Murray a4433ee300 Merge: #11873: Improve test regex so random directory names don't cause test to fail 2011-05-05 12:17:50 -04:00
R David Murray 66a18fd801 #11873: Improve test regex so random directory names don't cause test to fail 2011-05-05 11:52:44 -04:00
Nick Coghlan cb395187d0 Merge from 3.2 2011-05-06 00:03:49 +10:00
Nick Coghlan fdc2c5596e Remove trailing whitespace 2011-05-06 00:02:12 +10:00
Nick Coghlan 7ceb1804b0 Merge #11647 update from 3.2 2011-05-05 23:58:57 +10:00
Nick Coghlan 0ded3e307b Issue #11647: allow contextmanager objects to be used as decorators as described in the docs. Initial patch by Ysj Ray. 2011-05-05 23:49:25 +10:00
Vinay Sajip e9a56e8d49 Tweaked timed rollover test to allow for test-time delays. 2011-05-05 14:18:33 +01:00
Vinay Sajip 0372e10684 Improved coverage and fixed bug in HTTPHandler with POST requests. 2011-05-05 12:59:14 +01:00
R David Murray 9cc432d937 Merge #8158: add missing 'description' description to optparse docstring. 2011-05-04 21:08:07 -04:00
R David Murray 3ef4419dc3 Merge #8158: add missing 'description' description to optparse docstring. 2011-05-04 21:07:33 -04:00
R David Murray fc5ed800d8 #8158: add missing 'description' description to optparse docstring. 2011-05-04 21:06:57 -04:00
Daniel Stutzbach 3f064693bb #11335: Merge from 3.2: Fix memory leak after key function failure in sort 2011-05-04 12:47:14 -07:00
Daniel Stutzbach eda70b81d3 #11335: Fix memory leak after key function failure in sort 2011-05-04 12:46:28 -07:00
Antoine Pitrou fc20b0c65c Issue #1856: Avoid crashes and lockups when daemon threads run while the
interpreter is shutting down; instead, these threads are now killed when
they try to take the GIL.
2011-05-04 20:04:29 +02:00
Antoine Pitrou 0d5e52d346 Issue #1856: Avoid crashes and lockups when daemon threads run while the
interpreter is shutting down; instead, these threads are now killed when
they try to take the GIL.
2011-05-04 20:02:30 +02:00
Ezio Melotti 2c173bad9d #11985: merge with 3.2. 2011-05-04 18:39:59 +03:00
Ezio Melotti e548f5a001 #11985: merge with 3.1. 2011-05-04 18:39:29 +03:00
Ezio Melotti f16898bc80 #11985: update docstring of platform.python_implementation. 2011-05-04 18:37:50 +03:00
Victor Stinner 4e86d5b88d Replace open(filename, 'rU') by open(filename, 'r')
The U flag is no more used (but still accepted for backward compatibility).
2011-05-04 13:55:36 +02:00
Victor Stinner 35b300c5fd Issue #8407: signal.pthread_sigmask() returns a set instead of a list
Update the doc. Refactor also related tests.
2011-05-04 13:20:35 +02:00
Victor Stinner 6fd49e152a Issue #11998, issue #8407: workaround _tkinter issue in test_signal
The _tkinter module loads the Tcl library which creates a thread waiting events
in select(). This thread receives signals blocked by all other threads. We
cannot test blocked signals if the _tkinter module is loaded.
2011-05-04 12:38:03 +02:00
Victor Stinner 55b5fa76a7 regrtest: dump all threads on a crash, not only the current thread 2011-05-04 11:02:12 +02:00
Mark Dickinson 5bc7a44477 test_math.py: Use correct signs on zeros for expected fmod results. 2011-05-03 21:13:40 +01:00
Mark Dickinson 0cc28b7a34 Remove an unused import and an unused local definition from test_math.py. 2011-05-03 21:02:51 +01:00
Raymond Hettinger e7a2430dde Fix __hash__ in functools.cmp_to_key() to work with collections.Hashable. 2011-05-03 11:16:36 -07:00
Raymond Hettinger 003be52932 Fix __hash__ in functools.cmp_to_key() to work with collections.Hashable. 2011-05-03 11:01:32 -07:00
Victor Stinner f44ce8748d Issue #8407: disable faulthandler timeout thread on all platforms
The problem is not specific to Mac OS X.
2011-05-03 17:20:31 +02:00
Antoine Pitrou 441f935228 Fix typo in name of private function 2011-05-03 16:35:43 +02:00
Antoine Pitrou b87a56a519 Fix typo in name of private function 2011-05-03 16:34:42 +02:00
Victor Stinner d0e516db50 Issue #8407: pthread_sigmask() checks immediatly if signal handlers have been
called. The test checks that SIG_UNBLOCK calls immediatly the signal handler of
the pending SIGUSR1. Improve also the tests using an exception (division by
zero) instead of a flag (a function attribute).
2011-05-03 14:57:12 +02:00
Victor Stinner 2d4a91e0d0 Issue #8407: Fix pthread_sigmask() tests on Mac OS X
Disable faulthandler timeout thread on Mac OS X: it interacts with
pthread_sigmask() tests.
2011-05-03 14:11:22 +02:00
Raymond Hettinger a5ac2ce982 Backport 3.3 fixes and cleans ups. 2011-05-02 11:02:13 -07:00
Alexander Belopolsky 4409493d73 Relax %Y test. 2011-05-02 13:48:09 -04:00
Alexander Belopolsky 89da349b7b Issue #11930: Remove year >= 1000 limitation from datetime.strftime.
Patch by Victor Stinner.
2011-05-02 13:14:24 -04:00
Raymond Hettinger 81b9656989 Backport code cleanup for namedtuples. 2011-05-02 09:50:15 -07:00
Alexander Belopolsky 09a98a99cd merge 2011-05-02 12:31:17 -04:00
Alexander Belopolsky 03163ac185 Issue #11930: Remove deprecated time.accept2dyear. 2011-05-02 12:20:52 -04:00
Victor Stinner 59bec36b1c (Merge 3.2) logging: don't define QueueListener if Python has no thread support 2011-05-02 16:14:16 +02:00
Victor Stinner cafa2efedb logging: don't define QueueListener if Python has no thread support 2011-05-02 16:11:28 +02:00
Vinay Sajip 714b8dc501 Improved thread interlocks in tests. 2011-05-02 14:43:00 +01:00
Vinay Sajip 314b92b26e Updated docstrings. 2011-05-02 14:31:16 +01:00
R David Murray 477a6eb4a2 Merge: I was right, hardconding the localhost IP doesn't work in linux-vserver. 2011-05-02 08:48:00 -04:00
R David Murray b912c5a004 I was right, hardconding the localhost IP doesn't work in linux-vserver. 2011-05-02 08:47:24 -04:00
Vinay Sajip 7367d08838 Added tests to improve coverage. 2011-05-02 13:17:27 +01:00
Victor Stinner fadeeffe5b (Merge 3.2) Issue #11277: mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS X
to get around a mmap bug with sparse files. Patch written by Steffen Daode
Nurpmeso.
2011-05-02 01:14:55 +02:00
Victor Stinner 8108e96bc8 (Merge 3.1) Issue #11277: mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS X
to get around a mmap bug with sparse files. Patch written by Steffen Daode
Nurpmeso.
2011-05-02 01:11:33 +02:00
Victor Stinner a6cd0cf0f5 Issue #11277: mmap calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get around a
mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso.
2011-05-02 01:05:37 +02:00
Victor Stinner 6a534e7e7b (Merge 3.2) Issue #9756: When calling a method descriptor or a slot wrapper
descriptor, the check of the object type doesn't read the __class__ attribute
anymore.  Fix a crash if a class override its __class__ attribute (e.g. a proxy
of the str type).
2011-05-01 23:33:06 +02:00
Victor Stinner d9561318d8 (Merge 3.1) Issue #9756: When calling a method descriptor or a slot wrapper
descriptor, the check of the object type doesn't read the __class__ attribute
anymore.  Fix a crash if a class override its __class__ attribute (e.g. a proxy
of the str type).
2011-05-01 23:31:36 +02:00
Victor Stinner 3249dec024 Issue #9756: When calling a method descriptor or a slot wrapper descriptor, the
check of the object type doesn't read the __class__ attribute anymore.  Fix a
crash if a class override its __class__ attribute (e.g. a proxy of the str
type).
2011-05-01 23:19:15 +02:00
Victor Stinner 571e8fda9b regrtest: add the name of the failing test on a child error (-j option) 2011-05-01 22:57:43 +02:00
Victor Stinner c90e19dd3f Close #11958: Fix FTP tests for IPv6, bind to "::1" instead of "localhost".
Patch written by Charles-Francois Natali.
2011-05-01 01:23:03 +02:00
Ezio Melotti 48006cf1a8 Fix test. 2011-05-01 00:03:49 +03:00
Vinay Sajip a463d25930 Improved test coverage. 2011-04-30 21:52:48 +01:00
Vinay Sajip de19e08de4 Updated usage of boolean values. 2011-04-30 21:52:26 +01:00
Vinay Sajip 312cc0d28e Updated usage of boolean values. 2011-04-30 21:51:51 +01:00
Victor Stinner a929335961 Issue #8407, issue #11859: Add signal.pthread_sigmask() function to fetch
and/or change the signal mask of the calling thread.

Fix also tests of test_io using threads and an alarm: use pthread_sigmask() to
ensure that the SIGALRM signal is received by the main thread.

Original patch written by Jean-Paul Calderone.
2011-04-30 15:21:58 +02:00
Victor Stinner d5c355ccc7 Issue #11223: Replace threading._info() by sys.thread_info 2011-04-30 14:53:09 +02:00
Senthil Kumaran 4a0afa224c Wrap the correct test with the skip decorator for the issue10761.
merge from 3.2.
2011-04-30 06:12:25 +08:00
Senthil Kumaran be5dbebeaa merge from 3.1 2011-04-30 06:09:51 +08:00
Senthil Kumaran f108f8258e Wrap the testskip decorator for the proper test to resolve bb failure. 2011-04-30 06:06:28 +08:00
Brian Curtin 5d9deaa9d8 whitespace fix 2011-04-29 16:24:07 -05:00
Brian Curtin b8f8b4e54b merge 2011-04-29 16:14:55 -05:00
Brian Curtin 08fd8d93f7 merge 2011-04-29 16:11:30 -05:00
Brian Curtin 8b8e7f467f Further fix #7838. CREATE_NEW_CONSOLE was exposed, but none of the
constants to be used for STARTUPINFO were exposed due to the change.
2011-04-29 15:48:13 -05:00
Łukasz Langa 82710c594b Merged minor cleanups from 3.2. 2011-04-29 16:17:51 +02:00
Łukasz Langa 5c7419d433 Removed debugging leftovers. 2011-04-29 16:16:36 +02:00
Łukasz Langa 4d27d9e8b6 __class__ of a __class__ check worked only by chance. 2011-04-29 16:15:41 +02:00
Łukasz Langa 75da860413 TestChainMap was not previously used. Minor corrections applied. 2011-04-29 11:35:03 +02:00