Commit Graph

8110 Commits

Author SHA1 Message Date
Senthil Kumaran 578617ad45 merge from 3.2 - Fix closes issue12581 - Increase the urllib.parse test coverage (cases applicable to 2.7). Patch by Petter Haggholm. 2011-07-23 18:41:43 +08:00
Benjamin Peterson 77820242dd verify the types of AST strings and identifiers (closes #12609 and #12610) 2011-07-22 10:39:50 -05:00
R David Murray 9522595d70 #7484: no more <> around addresses in VRFY or EXPN
The RFC doesn't say that they are allowed; apparently many mailers accept
them, but not postfix.  Contributions to this patch were made by Felipe Cruz
and Catalin Iacob.
2011-07-18 21:34:04 -04:00
Alex Gaynor 9737648c74 Backport 2eb8789e30e7. 2011-07-17 16:44:31 -07:00
Antoine Pitrou 304f0f952d Issue #11603: Fix a crash when __str__ is rebound as __repr__.
Patch by Andreas Stührk.
2011-07-15 21:22:50 +02:00
Benjamin Peterson c3349cd22e port 8d05f697acd4 (#11627) 2011-07-15 14:15:40 -05:00
Victor Stinner b30ac940db Issue #12250: test_socketserver uses a timeout of 60 seconds instead of 20
test_shutdown() may fail on very slow buildbots like FreeBSD 6.4 just because
of the arbitrary timeout.
2011-07-14 14:53:24 +02:00
Ned Deily 0ab67ee79e Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
as the processor type on some Mac systems.  Also fix NameError in fallback
_mac_ver_gestalt function.  And remove out-of-date URL in docs.
2011-07-13 15:05:31 -07:00
Antoine Pitrou 1616645a00 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 22:04:20 +02:00
Antoine Pitrou 4a4a0fed07 Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary
failure in name resolution.

Should fix a buildbot failure.
2011-07-09 02:34:05 +02:00
Antoine Pitrou 2960308c0c 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:40:15 +02:00
Antoine Pitrou a4d58d26a1 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:14:19 +02:00
Victor Stinner ba8b3a2ca7 Close #12501: Adjust callable() warning: callable() is only not supported in
Python 3.1. callable() is again supported in Python 3.2.
2011-07-08 02:07:45 +02:00
Victor Stinner b78fed9ee6 Issue #12493: skip test_communicate_eintr() if signal.SIGALRM is missing 2011-07-05 14:50:35 +02:00
Victor Stinner e790131dc6 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:08:01 +02:00
Victor Stinner 4c41f84033 test_io: make quiet the DeprecationWarning('classic int division') 2011-07-05 13:29:26 +02:00
Victor Stinner 42dcc679c2 test_array: make quiet the DeprecationWarning 2011-07-05 13:14:17 +02:00
Victor Stinner 49d495fa25 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:44:46 +02:00
Ned Deily 46268c49f6 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:52:35 -07:00
Victor Stinner 65c153547b Issue #12467: warnings: fix a race condition if a warning is emitted at
shutdown, if globals()['__file__'] is None.
2011-07-04 03:05:37 +02:00
Charles-François Natali 7c20ad32fd Issue #12352: In test_free_from_gc(), restore the GC thresholds even if the GC
wasn't enabled at first.
2011-07-02 14:08:27 +02:00
Charles-François Natali 414d0faedc 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 13:56:19 +02:00
Victor Stinner 041d2e1e1e 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 15:04:03 +02:00
Raymond Hettinger bf7a266074 Fixup repr for dict_proxy objects. 2011-06-30 00:44:36 +01:00
Ned Deily 43e1054e38 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-27 23:41:53 -07:00
Benjamin Peterson c98198d3ca fix ws 2011-06-27 17:51:18 -05:00
Benjamin Peterson 90ebedc626 add more ast tests (closes #11302)
A patch from Vincent Legoll.
2011-06-27 17:46:06 -05:00
Victor Stinner f64a0cffca Issue #12285: multiprocessing.Pool() raises a ValueError if the number of
processes if negative or null.
2011-06-20 17:54:33 +02:00
R David Murray f1138bb1b6 #11700: proxy object close methods can now be called multiple times
This makes them work like the close provided by regular file objects.  This
patch also backports the close-the-underlying-file code for _ProxyFile objects
that was introduced along with context manager support in the 3.x branch.
2011-06-17 22:23:04 -04:00
Victor Stinner c74a6ba2d6 Issue #12133: 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:06:27 +02:00
Benjamin Peterson 0eb4ac4c62 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
Benjamin Peterson b30d5c711e merge heads 2011-06-10 11:33:58 -05:00
Benjamin Peterson 8b8162d868 merge 2.7.2 release branch with fix for #12009 2011-06-10 11:33:41 -05:00
Benjamin Peterson 43ee1a5d90 fix regression in netrc comment handling (closes #12009) 2011-06-10 11:32:52 -05:00
R David Murray 873c583244 #10694: zipfile now ignores garbage at the end of a zipfile.
Original fix by 'rep', final patch (with tests) by Xuanji Li.
2011-06-09 16:01:09 -04:00
Mark Dickinson a493ca3fae Issue #12080: Fix a performance issue in Decimal._power_exact that caused some corner-case Decimal.__pow__ calls to take an unreasonably long time. 2011-06-04 18:24:15 +01:00
Victor Stinner e3826c7774 Issue #12016: Add test_errorhandle() to TestBase_Mapping of
test_multibytecodec_support. Improve also error message of the
test_errorhandle() of TestBase.
2011-06-03 23:56:43 +02:00
Raymond Hettinger 45b082935d Fix named tuples to work with vars(). 2011-06-02 20:40:35 -07:00
Victor Stinner e9b185f263 Issue #12085: Fix test_subprocess for my previous commit
Replace support by test_support, and add captured_stderr() function.
2011-06-01 01:57:48 +02:00
Victor Stinner 776e69b5b3 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 01:03:00 +02:00
Victor Stinner d9f5292443 Issue #12057: Add tests for ISO 2022 codecs
iso2022_jp, iso2022_jp_2 and iso2022_kr
2011-05-30 23:58:21 +02:00
Ned Deily 482f908410 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:11:54 -07:00
Benjamin Peterson 4fa68ab10b raise an ValueError in getvalue() on closed StringIO (closes #12161)
Thanks for Catalin Iacob for the patch.
2011-05-26 09:56:41 -05:00
Victor Stinner daf17e9bc8 Issue #12175: RawIOBase.readall() now returns None if read() returns None. 2011-05-25 22:52:37 +02:00
Victor Stinner 5100a405dc Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError if
the file is closed.
2011-05-25 22:15:36 +02:00
Victor Stinner 9e5cdcc243 Issue #12057: Add tests for the HZ encoding 2011-05-25 00:19:07 +02:00
Victor Stinner 40b41e1ffd Issue #12100: Don't reset incremental encoders of CJK codecs at each call to
their encode() method anymore, but continue to call the reset() method if the
final argument is True.
2011-05-24 22:29:13 +02:00
Benjamin Peterson 8de87a6403 correctly lookup __dir__ 2011-05-23 16:11:05 -05:00
Victor Stinner 6c603c4593 test_codecs now removes the temporay file (created by the test) 2011-05-23 16:19:31 +02:00
Victor Stinner 2e7f39e889 Issue #12012: test_ssl uses test_support.import_module()
Skip the whole file if the SSL module is missing. It was already the case,
except that the SkipTest exception was raised in test_main().

This commit fixes an error in test_ssl if the ssl module is missing.
2011-05-22 13:22:28 +02:00