Commit Graph

36445 Commits

Author SHA1 Message Date
Georg Brandl 4ffc8f5107 Patch #1555098: use str.join() instead of repeated string
concatenation in robotparser.
2007-03-13 09:41:31 +00:00
Georg Brandl 94fe3f58d0 Patch #1635454: the csv.DictWriter class now includes the offending
field names in its exception message if you try to write a record with
a dictionary containing fields not in the CSV field names list.
2007-03-13 09:32:11 +00:00
Georg Brandl ceede5c359 Patch #1668100: urllib2 now correctly raises URLError instead of
OSError if accessing a local file via the file:// protocol fails.
2007-03-13 08:14:27 +00:00
Georg Brandl 8f032cbb05 Patch #1642844: comments to clarify the complexobject constructor. 2007-03-13 07:57:51 +00:00
Georg Brandl 0692a2621c Patch #1679379: add documentation for fnmatch.translate(). 2007-03-13 07:50:57 +00:00
Georg Brandl 3bb156722e Typo and grammar fixes. 2007-03-13 07:23:16 +00:00
Neal Norwitz 75c7c80ee5 Fix some style nits:
* lines too long
  * wrong indentation
  * space after a function name
  * wrong function name in error string
  * simplifying some logic

Also add an error check to PyDict_SetItemString.
2007-03-13 05:31:38 +00:00
Neal Norwitz 1ff06c7fc8 Add some other acks for recent checkins:
Brian Leair  - 922167
Tomer Filiba - 1591665
Jeremy Jones - 1192590
2007-03-13 05:07:14 +00:00
Neal Norwitz 1ea3de7512 Add Jerry Seutter for a bunch of his recent patches refactoring tests 2007-03-13 04:59:58 +00:00
Brett Cannon 09a86bc5ef Fix a typo where the variable name was not updated. 2007-03-13 03:05:40 +00:00
Brett Cannon 41d4e32353 Add test.test_support.transient_internet . Returns a context manager that
nests test.test_support.TransientResource context managers that capture
exceptions raised when the Internet connection is flaky.

Initially using in test_socket_ssl but should probably be expanded to cover any
test that should not raise the captured exceptions if the Internet connection
works.
2007-03-13 02:34:09 +00:00
Tim Peters 192cd567bd Set missing svn:eol-style property on text files. 2007-03-12 18:09:22 +00:00
Tim Peters ea5962f86e Whitespace normalization. 2007-03-12 18:07:52 +00:00
Collin Winter cb637c9ea3 Patch #1670993: Refactor test_threadedtempfile.py to use unittest. 2007-03-12 17:24:07 +00:00
Georg Brandl f252c7b76b Typo fix. 2007-03-12 16:15:09 +00:00
Collin Winter 276887b16d Bug #742342: make Python stop segfaulting on infinitely-recursive reload()s. Fixed by patch #922167.
Will backport.
2007-03-12 16:11:39 +00:00
Collin Winter f567ca3e1a Patch #1678088: convert test_operations to use unittest, fold the result into test_dict. 2007-03-12 15:57:19 +00:00
Georg Brandl 7b9c555520 Bug #1678647: write a newline after printing an exception in any
case, even when converting the value to a string failed.
2007-03-12 14:30:05 +00:00
Georg Brandl 871f1bc601 Backport from Py3k branch:
Patch #1591665: implement the __dir__() special function lookup in PyObject_Dir.

Had to change a few bits of the patch because classobjs and __methods__ are still
in Py2.6.
2007-03-12 13:17:36 +00:00
Martin v. Löwis 2681beb23e Patch #1677862: Require a space or tab after import in .pth files. 2007-03-12 11:01:10 +00:00
Martin v. Löwis eb62357a2e Bug #1675511: Use -Kpic instead of -xcode=pic32 on Solaris/x86. 2007-03-12 10:50:39 +00:00
Skip Montanaro 9cea8e5118 Sane humans would call these invalid tests, but Andrew McNamara pointed out
that given the inputs in these tests Excel does indeed produce the output
these tests expect.  Document that for future confused folks.
2007-03-12 03:30:50 +00:00
Barry Warsaw cbbc3f19c1 Tokio Kikuchi's fix for SF bug #1629369; folding whitespace allowed in the
display name of an email address, e.g.

Foo
\tBar <foo@example.com>

Test case added by Barry.
2007-03-12 03:20:01 +00:00
Collin Winter 071d1ae136 Patch #1678662: ftp.python.org does not exist. So the testcode in urllib.py must use a more
stable FTP.
Will backport.
2007-03-12 01:55:54 +00:00
Vinay Sajip a5e764873a Fix resource leak reported in SF #1516995. 2007-03-11 18:32:07 +00:00
Collin Winter 2faa9e1466 Patch #1192590: Fix pdb's "ignore" and "condition" commands so they trap the IndexError caused by passing in an invalid breakpoint number.
Will backport.
2007-03-11 16:00:20 +00:00
Žiga Seilnacht 8903208776 Patch #1675981: remove unreachable code from type.__new__() method.
__dict__ and __weakref__ are removed from the slots tuple earlier
in the code, in the loop that mangles slot names. Will backport.
2007-03-11 15:54:54 +00:00
Georg Brandl b27831887f Add missing "return" statements in exception handler. 2007-03-11 08:28:46 +00:00
Collin Winter ae04106a0e Patch #1599845: Add an option to disable the implicit calls to server_bind() and server_activate() in the constructors for TCPServer, SimpleXMLRPCServer and DocXMLRPCServer. 2007-03-10 14:41:48 +00:00
Collin Winter 3351aa7dd5 Convert an assert to a raise so it works even in the presence of -O. 2007-03-10 14:33:32 +00:00
Georg Brandl 7478096148 Typos. 2007-03-10 07:38:14 +00:00
Collin Winter faaa204129 Add proper attribution for a bug fix. 2007-03-10 03:35:34 +00:00
Neal Norwitz c8f6c23b0b Simplify a little by handling the TCP case first.
Update to use predominant style of spaces around = in args list
and print to stderr if debugging.
2007-03-10 03:19:18 +00:00
Collin Winter 22c42ba88c Bug #1531963: Make SocketServer.TCPServer's server_address always be equal to calling getsockname() on the server's socket.
Will backport.
2007-03-10 02:51:26 +00:00
Collin Winter dbead56cb6 * Unlink test files before and after each test; hopefully this will cut down on recent buildbot failures in test_islink.
* Drop safe_remove() in favor of test_support.unlink().
* Fix the indentation of test_samefile so that it runs.
2007-03-10 02:23:40 +00:00
Collin Winter 9453e5dce5 Hashing simplification pointed out by Thomas Wouters. 2007-03-09 23:30:39 +00:00
Thomas Heller 2456a3c02a Bug #1651235: When a tuple was passed to a ctypes function call,
Python would crash instead of raising an error.

The crash was caused by a section of code that should have been
removed long ago, at that time ctypes had other ways to pass
parameters to function calls.
2007-03-09 20:39:22 +00:00
Collin Winter e38051db87 Patch #1491866: change the complex() constructor to allow parthensized forms. This means complex(repr(x)) now works instead of raising a ValueError. 2007-03-09 20:33:07 +00:00
Martin v. Löwis 1bcffef959 Add Ziga Seilnacht. 2007-03-09 19:36:01 +00:00
Thomas Heller c2f7725c86 Fix bug #1646630: ctypes.string_at(buf, 0) and ctypes.wstring_at(buf, 0)
returned string up to the first NUL character.
2007-03-09 19:21:28 +00:00
Collin Winter b7b2b4eecf Bug #1629566: clarify the docs on the return values of parsedate() and parsedate_tz() in email.utils and rfc822. 2007-03-09 18:09:10 +00:00
Martin v. Löwis 1190a38d33 Patch #957003: Implement smtplib.LMTP. 2007-03-09 15:35:55 +00:00
Georg Brandl fd61107e7a Typo. 2007-03-09 12:58:41 +00:00
Neal Norwitz 0593de32d9 Fix SF #1676971, Complex OverflowError has a typo 2007-03-09 05:59:01 +00:00
Collin Winter fb728de5f4 Add NEWS item for patch #1481079 (r54234). 2007-03-09 03:26:32 +00:00
Collin Winter 83b2bf6d9a Patch #1481079: Support of HTTP_REFERER in CGIHTTPServer.py 2007-03-09 03:15:56 +00:00
Brett Cannon a30fcb4dae Introduce test.test_support.TransientResource. It's a context manager to
surround calls to resources that may or may not be available.  Specifying the
expected exception and attributes to be raised if the resource is not available
prevents overly broad catching of exceptions.

This is meant to help suppress spurious failures by raising
test.test_support.ResourceDenied if the exception matches.  It would probably
be good to go through the various network tests and surround the calls to catch
connection timeouts (as done with test_socket_ssl in this commit).
2007-03-08 23:58:11 +00:00
Collin Winter 9b2a109540 Patch #1668482: don't use '-' in mkstemp 2007-03-08 22:16:25 +00:00
Raymond Hettinger 0e520b46ab SF #1637850: make_table in difflib did not work with unicode 2007-03-08 21:33:47 +00:00
Collin Winter 5545314ba7 Backported r54226 from p3yk: Move test_unittest, test_doctest and test_doctest2 higher up in the testing order. 2007-03-08 19:58:14 +00:00