Commit Graph

15438 Commits

Author SHA1 Message Date
Florent Xicluna 7b2a7710ef typo 2010-09-06 20:27:55 +00:00
Brian Curtin 13a0db5ddb Fix some errors that #7566 introduced on non-Windows platforms due to
an ImportError. Rearranged the import, faked out the implementation when
the import fails, and reorganized a test that depends on Win32 behavior.
2010-09-06 19:46:17 +00:00
Antoine Pitrou 4bc12ef47d Issue #9754: Similarly to assertRaises and assertRaisesRegexp, unittest
test cases now also have assertWarns and assertWarnsRegexp methods to
check that a given warning type was triggered by the code under test.
2010-09-06 19:25:46 +00:00
Antoine Pitrou 972ee13e03 Issue #5506: BytesIO objects now have a getbuffer() method exporting a
view of their contents without duplicating them.  The view is both readable
and writable.
2010-09-06 18:48:21 +00:00
Brian Curtin 6285774f06 Implement #7566 - os.path.sameopenfile for Windows.
This uses the GetFileInformationByHandle function to return a tuple of values
to identify a file, then ntpath.sameopenfile compares file tuples, which
is exposed as os.path.sameopenfile.
2010-09-06 17:07:27 +00:00
Brian Curtin 5c997b8d90 Fix #8956. ValueError message was only mentioning one signal.
Rather than list out the three signals (or more over time), the message was
made less specific but still descriptive.
2010-09-06 16:29:29 +00:00
Brian Curtin c734b312cb Clean up the fix to #9324 with some of the suggestions raised on python-dev
in response to the original checkin.

Move the validation from the original loop into a switch statement,
and adjust a platform check in the tests.
2010-09-06 16:04:10 +00:00
Gregory P. Smith 13b55291ac hashlib has two new constant attributes: algorithms_guaranteed and
algorithms_avaiable that respectively list the names of hash algorithms
guaranteed to exist in all Python implementations and the names of hash
algorithms available in the current process.

Renames the attribute new in 3.2a0 'algorithms' to 'algorithms_guaranteed'.
2010-09-06 08:30:23 +00:00
Raymond Hettinger d5825ccd40 Take advantage of the frozenset constant optimization. 2010-09-05 23:15:06 +00:00
Antoine Pitrou 0d739d7047 Issue #9293: I/O streams now raise `io.UnsupportedOperation` when an
unsupported operation is attempted (for example, writing to a file open
only for reading).
2010-09-05 23:01:12 +00:00
Éric Araujo 1138eba3df Fix accidental suppression in r84537 2010-09-05 18:59:49 +00:00
Éric Araujo 23eae8646c Make naming consistent 2010-09-05 18:43:07 +00:00
Georg Brandl 58a7b46075 Bump to 3.2a2. 2010-09-05 08:30:40 +00:00
Georg Brandl bef3db2368 Update pydoc topics. 2010-09-05 08:28:41 +00:00
Raymond Hettinger 4c7c9af542 Clean-up functools.total_ordering(). 2010-09-05 05:57:35 +00:00
Raymond Hettinger 02566ec89f Adopt more descriptive attribute names as suggested on python-dev. 2010-09-04 22:46:06 +00:00
Antoine Pitrou 0049249d63 Issue #8734: Avoid crash in msvcrt.get_osfhandle() when an invalid file
descriptor is provided.  Patch by Pascal Chambon.
2010-09-04 20:53:29 +00:00
Antoine Pitrou 7d6e076f6d Issue #7451: Improve decoding performance of JSON objects, and reduce
the memory consumption of said decoded objects when they use the same
strings as keys.
2010-09-04 20:16:53 +00:00
Antoine Pitrou d9107aaded Issue #9777: test_idna requires the "network" resource 2010-09-04 18:50:35 +00:00
Antoine Pitrou 74a69fa662 Issue #9225: Remove the ROT_FOUR and DUP_TOPX opcode, the latter replaced
by the new (and simpler) DUP_TOP_TWO.  Performance isn't changed, but
our bytecode is a bit simplified.  Patch by Demur Rumed.
2010-09-04 18:43:52 +00:00
Brett Cannon ef0e6c3b04 _warnings exposed two variables with the name 'default_action' and
'once_registry'. This is bad as the warnings module had variables named
'defaultaction' and 'onceregistry' which are what people should be looking at
(technically those variables shouldn't be mucked with as they are undocumented,
but we all know better than to believe that isn't happening). So the variables
from _warnings have been renamed to come off as private and to avoid confusion
over what variable should be used.

Closes issue #9766. Thanks to Antoine Pitrou for the discovery.
2010-09-04 18:24:04 +00:00
Antoine Pitrou d6399d2d19 Fix running the copy module from the command-line (however use{ful,less} it may be). 2010-09-04 17:46:44 +00:00
Antoine Pitrou 3941a8fece Issue #1100562: Fix deep-copying of objects derived from the list and dict types.
Patch by Michele Orrù and Björn Lindqvist.
2010-09-04 17:40:21 +00:00
Antoine Pitrou e5a9101519 Issue #9581: Fix non-working PosixGroupsTester test case
(it only runs as root, which is why nobody bothered about the failure)
2010-09-04 17:32:06 +00:00
Fred Drake cc645b9a59 add consistent support for the vars and default arguments on all
configuration parser classes
(http://bugs.python.org/issue9421)
2010-09-04 04:35:34 +00:00
Florent Xicluna edf5f0ddc0 Strengthen BytesWarning tests. 2010-09-03 20:00:37 +00:00
Florent Xicluna 764d612f5e Remove redundant context manager. 2010-09-03 19:55:26 +00:00
Florent Xicluna 43e4ea1b17 Remove unused import, fix typo and rewrap docstrings. 2010-09-03 19:54:02 +00:00
Florent Xicluna 7dde792e62 Use a context manager for some file objects. 2010-09-03 19:52:03 +00:00
Antoine Pitrou 24e561ae04 Issue #3805: clean up implementation of the _read method in _ssl.c. 2010-09-03 18:38:17 +00:00
Barry Warsaw 35f3a2cbeb PEP 3149 is accepted.
http://mail.python.org/pipermail/python-dev/2010-September/103408.html
2010-09-03 18:30:30 +00:00
Daniel Stutzbach 06a3c8ae82 fromfd exists on Windows now 2010-09-03 11:11:43 +00:00
Raymond Hettinger faf7b7f4ec Issue 8420: Fix obscure set crashers. 2010-09-03 10:00:50 +00:00
Fred Drake 8844441ae6 fix output from RawConfigParser.write and ConfigParser.write for None
values (http://bugs.python.org/issue7005)
(merged r84443 from the release27-mmaint branch, with changes to reflect
changes in Python 3)
2010-09-03 04:22:36 +00:00
Raymond Hettinger af1e140334 Readability nit. 2010-09-02 19:58:35 +00:00
Raymond Hettinger 7babc1b6a5 Better method name. Tighten inner-loop with bound methods. 2010-09-02 19:56:28 +00:00
Raymond Hettinger 331722d411 Make OrderedDict.popitem() a bit smarter and faster 2010-09-02 18:44:16 +00:00
Daniel Stutzbach 045b3ba184 Issue #9212: Added the missing isdisjoint method to the dict_keys and
dict_items views.  The method is required by the collections.Set ABC,
which the views register as supporting.
2010-09-02 15:06:06 +00:00
Raymond Hettinger 38d17e3df0 Speed-up cache updates 2010-09-02 09:44:28 +00:00
Antoine Pitrou e0793ba992 Issue #9737: Fix a crash when trying to delete a slice or an item from
a memoryview object.
2010-09-01 21:14:16 +00:00
Antoine Pitrou 1ce3eb5c5b Issue #8990: array.fromstring() and array.tostring() get renamed to
frombytes() and tobytes(), respectively, to avoid confusion.  Furthermore,
array.frombytes(), array.extend() as well as the array.array()
constructor now accept bytearray objects.  Patch by Thomas Jollans.
2010-09-01 20:29:34 +00:00
Antoine Pitrou fce7fd6426 Issue #9549: sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding()
are now removed, since their effect was inexistent in 3.x (the default
encoding is hardcoded to utf-8 and cannot be changed).
2010-09-01 18:54:56 +00:00
Benjamin Peterson 49203dc9f2 reformat comment 2010-08-31 20:10:55 +00:00
Daniel Stutzbach 19d6a4fd49 Issue #808164: Fixed socket.close to avoid references to globals, to
avoid issues when socket.close is called from a __del__ method.
2010-08-31 20:08:07 +00:00
Daniel Stutzbach 061b14a4a1 Reverted r84315 and r84316, with Benjamin's blessing. The tests were
fine.  They were failing due to a problem exposed in r84307 and fixed
in r84317.   See Issue 8781 for details.
2010-08-31 15:45:04 +00:00
Vinay Sajip dc5097ff07 Removed _unicode variable which is always False in Python 3.x. 2010-08-31 07:52:17 +00:00
Vinay Sajip ec1cd1c475 logging: merged duplicated code in fileConfig and dictConfig paths. 2010-08-30 19:02:14 +00:00
Vinay Sajip 609364a989 Logging: removed some old commented out code. 2010-08-30 18:31:13 +00:00
Giampaolo Rodolà 8b7da623ce Fix issue #9711: raise ValueError is SSLConnection constructor is invoked with keyfile and not certfile. 2010-08-30 18:28:05 +00:00
Vinay Sajip 40d9a4e854 Improved logging.Formatter date/time formatting documentation. 2010-08-30 18:10:03 +00:00
Benjamin Peterson 33856de84d handle names starting with non-ascii characters correctly #9712 2010-08-30 14:41:20 +00:00
Florent Xicluna e01de8f2f3 remove pointless coding cookies 2010-08-30 14:05:50 +00:00
Benjamin Peterson e992a7da01 remove pointless coding cookie 2010-08-30 13:57:28 +00:00
Giampaolo Rodolà 4a656ebe05 dedent some lines in test_ssl so that they are actually executed 2010-08-29 22:50:39 +00:00
Giampaolo Rodolà cd9dfb919a in ssl tests rely on IOError.errno rather thanf IOError.strerror for better compatibility across platforms. 2010-08-29 20:56:56 +00:00
Giampaolo Rodolà 745ab3807e Fix issue issue9706: provides a better error handling for various SSL operations 2010-08-29 19:25:49 +00:00
Giampaolo Rodolà 374f835316 Raise ValuError if non-zero flag argument is provided for sendall() method for conformity with send(), recv() and recv_into() 2010-08-29 12:08:09 +00:00
Antoine Pitrou 1a9a9d5433 Issue #1868: Eliminate subtle timing issues in thread-local objects by
getting rid of the cached copy of thread-local attribute dictionary.
2010-08-28 18:17:03 +00:00
Mark Dickinson 64a38c0eb5 Issue #1512791: In setframerate method of Wave_write, round non-integral
inputs to the nearest integer.  Thanks Neil Tallim for the patch.
2010-08-28 17:22:16 +00:00
Brett Cannon a7ceeb335f OSError is the exception raised when one tries to create a directory that
already exists, not IOError.

Part of the continuing saga of issue #9572.
2010-08-26 21:07:13 +00:00
Senthil Kumaran 4bb5c273c6 Fix Issue8797 - Reset the basic auth retry count when response code is not 401. 2010-08-26 06:16:22 +00:00
Benjamin Peterson 0e10206f2c basicsize and itemsize are Py_ssize_t #9688 2010-08-25 23:13:17 +00:00
Benjamin Peterson 6505ee8453 apparently this test should be gated, too 2010-08-25 17:57:04 +00:00
Benjamin Peterson b35f646796 this test is only valid when sizeof(wchar) == Py_UNICODE_SIZE 2010-08-25 17:02:22 +00:00
Victor Stinner ef6ff662c9 Fix test_sys: set LC_ALL instead of LANG
LC_ALL is read before LANG to choose the locale encoding (LC_ALL, LANG and then
LC_CTYPE: use the first non empty variable).
2010-08-25 08:33:34 +00:00
Martin v. Löwis 112c0f3411 Issue #1027206: getnameinfo is now restricted to numeric addresses as input. 2010-08-25 07:38:15 +00:00
R. David Murray 219d1c8ae3 #1194222: make parsedate always return RFC2822 four character years.
Two character years are now converted to four character years using
the Posix standard rule (<68 == 2000, >=68==1900).  This makes the
parsed date RFC2822 compliant even if the input is not.

Patch and test by Jeffrey Finkelstein.
2010-08-25 00:45:55 +00:00
Victor Stinner 1970b62aee Disable test_undecodable_code() of test_sys on Windows
This test is irrevelant on Windows
2010-08-25 00:20:27 +00:00
Victor Stinner ebe53a23c9 Fix test_sys for FreeBSD, Solaris and Mac OS X
_Py_char2wchar() (mbctowcs) decodes b'\xff' to '\xff' on FreeBSD, Solaris and
Mac OS X, even if the locale is C (and the locale encoding is ASCII). Patch
test_undecodable_code() to support this output and document the two different
kinds of outputs.
2010-08-24 23:05:51 +00:00
Benjamin Peterson 16925e8539 remove parens 2010-08-24 21:30:14 +00:00
Brett Cannon 1d6569cfb9 Fix a bug where an attribute was lacking an object to work off of.
Related to the fix for issue #9572. Thanks to Łukasz Czuja for catching the
bug.
2010-08-24 21:04:05 +00:00
Daniel Stutzbach 31da5b2f69 Issue 8750: Fixed MutableSet's methods to correctly handle reflexive operations, namely x -= x and x ^= x 2010-08-24 20:49:57 +00:00
Benjamin Peterson 17689991e6 only catch AttributeError in hasattr() #9666 2010-08-24 03:26:23 +00:00
Giampaolo Rodolà 9cf5ef4cc0 fix issue 9129: adds proper error handling on accept() when smtpd accepts new incoming connections. 2010-08-23 22:28:13 +00:00
Giampaolo Rodolà bbc4782d77 fix issue 9601: ftplib now provides a workaround for invalid response code returned on MKD and PWD by non-compliant FTPserver implementations such as ISS shipped with Windows server 2003 2010-08-23 22:10:32 +00:00
Benjamin Peterson 076e031e54 cleanup imports 2010-08-23 21:58:59 +00:00
Giampaolo Rodolà 76fc8c7098 fix issue 658749: correctly interprets asyncore's windows errors on connect() 2010-08-23 21:53:41 +00:00
Vinay Sajip de6e9d615d Issue #9501: Fixed logging regressions in cleanup code. 2010-08-23 17:50:30 +00:00
Benjamin Peterson 9c2930e4be run total_ordering() tests, and fix the function (default comparisons shouldn't be considered) 2010-08-23 17:40:33 +00:00
Martin v. Löwis 67e91ad9cf Explicitly pass socket type and family for getaddrinfo,
to make test work on Solaris.
Disable gethostbyaddr IDNA test for now as there is no
reverse DNS entry for the IPv6 address of the test name.
2010-08-23 15:27:26 +00:00
Brett Cannon ee6d64773b One of the joys of having test_multiprocessing occasionally execute after
test_importlib is that it discovers special little race conditions. For
instance, it turns out that importlib would throw an exception if two different
Python processes both tried to create the __pycache__ directory as one process
would succeed, causing the other process to fail as it didn't expect to get any
"help". So now importlib simply stays calm and just accepts someone else did
the work of creating the __pycache__ directory for it, moving on with life.

Closes issue #9572.
2010-08-22 22:19:11 +00:00
Brett Cannon 186335bd5c Make sure that no __pycache__ directory is needlessly left behind when testing
imports with an empty string in sys.path.
2010-08-22 22:11:06 +00:00
Antoine Pitrou 0723d2c78d Add an import lock test for multithreaded circular imports.
(part of #9657)
2010-08-22 20:43:26 +00:00
Brett Cannon 8d18907a2e While not strictly necessary thanks to the odd ABC inheritance done through
importlib._bootstrap, add the optional methods for importlib.abc.SourceLoader
for completeness.
2010-08-22 20:38:47 +00:00
Martin v. Löwis 56773cf0d2 Mention that gethostbyaddr now also supports IDNA. 2010-08-22 19:38:04 +00:00
Martin v. Löwis fc0275a14a Issue #1027206: Support IDNA in gethostbyname, gethostbyname_ex and
getaddrinfo. Patch by David Watson.
2010-08-22 19:33:47 +00:00
Vinay Sajip 89994b279f Issue #9512: Made comment more informative. 2010-08-22 18:11:02 +00:00
Antoine Pitrou 7224d073d2 Test that calls to path hooks and meta_path entries are serialized by the import lock.
(part of issue #9251)
2010-08-22 10:18:36 +00:00
Raymond Hettinger 9117c75148 Issue #9214: Fix set operations on KeysView and ItemsView. 2010-08-22 07:44:24 +00:00
Giampaolo Rodolà 6545ed6e4f remove obsolete 'import SOCKS' statement 2010-08-21 20:34:37 +00:00
Antoine Pitrou b46b9d59ef Issue #9617: Signals received during a low-level write operation aren't
ignored by the buffered IO layer anymore.
2010-08-21 19:09:32 +00:00
Giampaolo Rodolà 522180a60b fix smtpd.py I accidentally broke in my previous commit 2010-08-21 18:58:21 +00:00
Giampaolo Rodolà 5fe9cd53b2 revert changes made in r84236 committed by accident 2010-08-21 18:47:59 +00:00
Giampaolo Rodolà 5c8c9a2c33 fix issue #9129: added proper error handling when accepting new connections in SMTPServer.handle_accept 2010-08-21 18:35:05 +00:00
Marc-André Lemburg ff562506d4 Fix a typo in the alias target name for 'macintosh'. 2010-08-21 10:58:31 +00:00
Benjamin Peterson 23110e7361 alias macintosh to mac_roman #843590 2010-08-21 02:54:44 +00:00
Benjamin Peterson 0cc7444ea9 speed hack can be implemented more cleanly by directly calling __new__ 2010-08-21 02:45:15 +00:00
Benjamin Peterson bf6f31b65f use blank object instead 2010-08-21 02:43:31 +00:00
Benjamin Peterson c3f810fb56 remove outdated comment 2010-08-21 02:41:33 +00:00
Victor Stinner c44abb127b Workaround issue #8611 in test_undecodable_code() of test_sys
Write test.support.workaroundIssue8611() function so it will be easier to
remove this workaround from all tests.
2010-08-20 16:52:14 +00:00
Victor Stinner 1b6372a1d1 test_undecodable_code(): set locale to C
The test is still failing on "x86 FreeBSD 7.2 3.x" and "sparc solaris10 gcc
3.x" buildbots. It looks like the locale encoding is able to decode b'\xff'. I
suppose that it is an encoding like 'iso-8859-1'.

Use C locale to set, I hope, the locale encoding to 'ascii'. Display also the
encoding so if the test fails, at least I will learn the locale encoding
choosen for the C locale.
2010-08-20 16:38:14 +00:00
Victor Stinner e6376f8849 test_main_invalid_unicode() of test_sys: print string as ascii
There are buildbot failures on "x86 FreeBSD 3.x" and "sparc solaris10 gcc 3.x".
I suppose that _Py_char2wchar() doesn't fail even if the locale encoding is
unable to decode the byte string, because _Py_char2wchar() has a special mode
for platform without mbrtowc() (ISO C99) function.

Let's check my theory by avoid error on the Python print() instruction.
2010-08-20 11:08:18 +00:00
Vinay Sajip 89d8f82d01 Issue #7077: Fixed bug in previous fix. 2010-08-20 08:43:22 +00:00
Vinay Sajip 467d12fcb2 Issue #7077: Fixed SysLogHandler implementation of Unicode handling. 2010-08-19 22:20:22 +00:00
Amaury Forgeot d'Arc 12844e6df6 Add tests for r84209 (crashes in the Ast builder)
Also remove one tab, and move a check closer to the possible failure.
2010-08-19 21:32:38 +00:00
Senthil Kumaran 67a62a41b8 Fix Issue9639 - reset the retry count on successful auth. 2010-08-19 17:50:31 +00:00
Victor Stinner 5c1808a1a8 test_pep277: display the filename as ascii on failure 2010-08-19 17:35:00 +00:00
Victor Stinner 114b724a4b Skip test_encodings() of test_os on Windows and Mac OS X 2010-08-19 17:22:57 +00:00
Victor Stinner 515ca2047d test_main_invalid_unicode() of test_sys displays stderr on failure 2010-08-19 17:18:12 +00:00
Victor Stinner 38430e2dff Fix os.get_exec_path() (code and tests) for python -bb
Catch BytesWarning exceptions.
2010-08-19 17:10:18 +00:00
Victor Stinner 99435247e3 Ooops, finish test_sys fix: use expected variable 2010-08-19 11:30:09 +00:00
Victor Stinner 85ca2afe3b Fix test_sys about fs encoding for Windows and Mac OS X
* Check fs encoding value on Windows
 * Ignore LANG= test on Windows and Mac OS X (fs encoding is hardcoded on these
   platforms)
2010-08-19 11:23:47 +00:00
Victor Stinner 70f88c59eb Fix test_os: workaround #8611 bug 2010-08-19 11:17:12 +00:00
Senthil Kumaran f241afaead Fix Issue9638 - remove dead code from py3k imaplib 2010-08-19 07:02:20 +00:00
Victor Stinner e8d5145e18 Create os.fsdecode(): decode from the filesystem encoding with surrogateescape
error handler, or strict error handler on Windows.

 * Rewrite os.fsencode() documentation
 * Improve os.fsencode and os.fsdecode() tests using the new PYTHONFSENCODING
   environment variable
2010-08-19 01:05:19 +00:00
Victor Stinner c732e3ba08 test_sys: move tests at the right place
filesystem encoding is not related to sys.sizeof()
2010-08-18 22:44:15 +00:00
Victor Stinner 398356baaa Improve error message if the command is not decodable 2010-08-18 22:23:22 +00:00
Amaury Forgeot d'Arc 7e44b6b0c5 Add more tests to unicodedata with large code points
(the other functions where not affected by the recent change)
2010-08-18 22:07:15 +00:00
Victor Stinner 94908bbc15 Issue #8622: Add PYTHONFSENCODING environment variable to override the
filesystem encoding.

initfsencoding() displays also a better error message if get_codeset() failed.
2010-08-18 21:23:25 +00:00
Amaury Forgeot d'Arc 56ab01b66a Fix stupid typo in test. 2010-08-18 21:12:52 +00:00
Victor Stinner 74a833fa96 Decompose TESTFN_UNICODE on Mac OS X 2010-08-18 21:06:23 +00:00
Amaury Forgeot d'Arc 324ac65ceb #5127: Even on narrow unicode builds, the C functions that access the Unicode
Database (Py_UNICODE_TOLOWER, Py_UNICODE_ISDECIMAL, and others) now accept
and return characters from the full Unicode range (Py_UCS4).

The differences from Python code are few:
- unicodedata.numeric(), unicodedata.decimal() and unicodedata.digit()
  now return the correct value for large code points
- repr() may consider more characters as printable.
2010-08-18 20:44:58 +00:00
Antoine Pitrou 36e778ef02 Issue #9433: The "-j" option to regrtest now works under Windows too.
It is not sure it will be beneficial, though, since process launching is
more expensive under Windows than it is under Linux.
2010-08-18 20:44:14 +00:00
Senthil Kumaran 7ff59131f8 Fix Issue672656 - Securing pydoc server. 2010-08-18 19:32:21 +00:00
Victor Stinner d91df1a7a9 Improve PEP 383 tests (in test_os)
* Use the current filesystem encoding instead of always using utf-8
 * Enable the test on Mac OS X
 * Use TESTFN_UNENCODABLE and TESTFN_UNICODE instead of arbitrary filenames
 * To decode a filename, use strict error handler instead surrogateescape for
   mbcs encoding (on Windows)
 * Use TESTFN_UNENCODABLE (if available) for the directory name

Skip the test if no non-ascii filename can be created.
2010-08-18 10:56:19 +00:00
Antoine Pitrou 79c5ef11d5 Issue #3488: Provide convenient shorthand functions `gzip.compress`
and `gzip.decompress`.  Original patch by Anand B. Pillai.
2010-08-17 21:10:05 +00:00
Giampaolo Rodolà 42382fedcc fix issue #8807: adds a context parameter to POP3_SSL class. 2010-08-17 16:09:53 +00:00
Giampaolo Rodolà ccfb91c89f fix issue #8866: parameters passed to socket.getaddrinfo can now be specified as single keyword arguments. 2010-08-17 15:30:23 +00:00
Nick Coghlan d26c18adcc Issue #8202: Set sys.argv[0] to -m rather than -c while searching for the module to execute. Also updates all the cmd_line_script tests to validate the setting of sys.path[0] and the current working directory 2010-08-17 13:06:11 +00:00
Nick Coghlan 46e6380563 Another attempt at pacifying the windows buildbots by ignoring all the variable information in the dis.code_info tests 2010-08-17 11:28:07 +00:00
Nick Coghlan 09c8123e6f Address XXX comment in dis.py: inspect.py now attempts to reuse the dis.py compiler flag values before resorting to defining its own 2010-08-17 10:18:16 +00:00
Nick Coghlan 77203adb7e Ignore the exact ID value for the nested function in the dis.code_info tests 2010-08-17 09:25:57 +00:00
Ezio Melotti fc8b205da2 Correct a couple of assert* methods. Patch by Dave Malcolm. 2010-08-17 08:35:41 +00:00
Nick Coghlan eae2da1da7 Issue 9147: Add dis.code_info() 2010-08-17 08:03:36 +00:00
Nick Coghlan 9887683f74 Document and test the resolution of issue 3445 (tolerate missing attributes in functools.update_wrapper, previously implemented as a side effect of the __annotations__ copying patch) and implement issue 9567 (add a __wrapped__ attribute when using update_wrapper) 2010-08-17 06:17:18 +00:00
Benjamin Peterson 052a02be4a add tests for mknod() and mkfifo() #9569 2010-08-17 01:27:09 +00:00
Benjamin Peterson 82c4885210 remove test for oldstyle classes 2010-08-17 01:08:46 +00:00
Benjamin Peterson 83cd3b91e2 use assertTrue/assertFalse 2010-08-17 01:07:53 +00:00
Benjamin Peterson 45c257f193 add support for abstract class and static methods #5867 2010-08-17 00:52:52 +00:00
Victor Stinner 36e791179c test_zipimport: fix test name 2010-08-17 00:44:11 +00:00
Alexander Belopolsky 977a684c94 Issue #8983: Corrected docstrings. 2010-08-16 20:17:07 +00:00
Florent Xicluna c9c29e2ab2 I get it wrong in r84097: s/relative/absolute/ 2010-08-16 19:03:05 +00:00
Alexander Belopolsky e29e6bffb5 Issue #665761: functools.reduce() will no longer mask exceptions other
than TypeError raised by the iterator argument.  Also added a test to
check that zip() already behaves similarly.
2010-08-16 18:55:46 +00:00
Florent Xicluna 27354ccec9 Use test.support and unittest features. Fix duplicated test (bad merge in r79033). Fix comment for issue #7902. 2010-08-16 18:41:19 +00:00
Victor Stinner 2460a43a65 Issue #9425: read_directory() is fully unicode compliant
zipimport is now able to load a module with an unencodable filename.
2010-08-16 17:54:28 +00:00
Antoine Pitrou 982c018b32 Remove debug hack 2010-08-16 14:33:42 +00:00
Giampaolo Rodolà 677d95c258 fix getaddrinfo test failure on OSX caused by AI_CANNAME erroneously used as the value for 'proto' 2010-08-16 05:08:11 +00:00
Richard Jones daf235032f close down sockets held by asyncore at end of test; closes issue9619 2010-08-16 01:48:14 +00:00
Antoine Pitrou b14ac8c2b0 Save and restore the global asyncore.socket_map, and warn if a test modified it 2010-08-16 00:28:05 +00:00
Antoine Pitrou ed9863685f Add debug output to the asyncore test 2010-08-15 23:28:10 +00:00
Antoine Pitrou f4c7badc02 Put test_ciphers in NetworkedTests 2010-08-15 23:02:22 +00:00
Antoine Pitrou 968dc03f24 Following Ezio's suggestion, force verbose mode on test_ssl to diagnose freezes on 3.x 2010-08-15 22:16:23 +00:00
Florent Xicluna dc692740a8 Replace the deprecated ConfigParser.readfp() method, and fix the incomplete merge in r82293. 2010-08-15 20:16:27 +00:00
Victor Stinner a0241c8587 Fix TESTFN_UNENCODABLE of test.support on Mac OS X 2010-08-15 19:28:21 +00:00
Raymond Hettinger 0b5669c0f5 Fix __all__. 2010-08-15 07:41:40 +00:00
Raymond Hettinger bc653d1abe Remove unused imports 2010-08-15 03:35:24 +00:00
Raymond Hettinger f309828175 Remove the lfu_cache. Add more tests. 2010-08-15 03:30:45 +00:00
Raymond Hettinger 0f56e90f05 Support cache sizes. 2010-08-14 23:52:08 +00:00
Raymond Hettinger 5202fadb2c Localize one more builtin lookup. 2010-08-14 22:29:52 +00:00
Raymond Hettinger cbe8813f18 Add locks to make the caches well behaved in multi-threaded code.
Store builtins in cell variables to speed-up the common path,
reducing the chance of a lock needing to block at all.
2010-08-14 22:22:10 +00:00
Raymond Hettinger d9e8cc6249 Clean-up the cache patch for the re module. 2010-08-14 21:17:48 +00:00
Florent Xicluna 62829dc727 Silence BytesWarning while testing exception 2010-08-14 20:51:58 +00:00
Florent Xicluna 82a3f8afcb Silence the BytesWarning, due to patch r83294 for #9301 2010-08-14 18:30:35 +00:00
Victor Stinner 03c9e1dbc2 Mac OS X denies unencodable filenames (invalid utf-8) 2010-08-14 17:35:20 +00:00
Giampaolo Rodolà 419f704d76 fix issue #8857: provide a test case for socket.getaddrinfo 2010-08-14 16:45:41 +00:00
Antoine Pitrou ab6190f9aa There doesn't seem to be a reason for this test to be disabled. 2010-08-14 16:33:38 +00:00
Antoine Pitrou d151e27446 This is a better resolution than r84021 (because it will also affect
ssl.get_server_certificate()).
2010-08-14 16:32:10 +00:00
Antoine Pitrou 35bebe12e0 Add a reasonable timeout to network SSL tests, so as to avoid buildbot timeouts
when the remote server doesn't answer.
2010-08-14 16:24:38 +00:00
Florent Xicluna aa17106e41 Merged manually from 2.7 branch to 3.x trunk.
------------------------------------------------------------------------
  r79925 | nick.coghlan | 2010-04-10 16:24:36 +0200 (sam. 10 avril 2010)

  Try to turn some buildbots green by allowing test_multiprocessing to
  pass even if it hits the sys.exc_clear code in the threading module, and
  improve the test coverage by making the ctypes dependencies a bit more
  granular (two of the cited ctypes objects don't exist on my system)
  ------------------------------------------------------------------------
2010-08-14 15:56:42 +00:00
Éric Araujo da668ff24f Use a marker in generated MANIFEST files, don't touch files without it. Fixes #8688. 2010-08-14 02:30:34 +00:00
Antoine Pitrou e9b428f997 Reimplement addbuilddir() in C inside getpath.c, so as to execute it
at interpreter startup before importing any non-builtin modules.
Should fix #9589.
2010-08-13 22:25:01 +00:00
Victor Stinner 09c449c7de Fix a typo: TESTFN_UNENCODEABLE => TESTFN_UNENCODABLE 2010-08-13 22:23:24 +00:00
Brian Curtin d835cf1c84 Fix #9588. Add sys.executable to two shell=True tests. 2010-08-13 20:42:57 +00:00
Victor Stinner ddfb2c3a33 Issue #9560: Use -b option of the file command in _syscmd_file()
Omit the filename to avoid enconding issues, especially with non encodable
characters in the Python full path.
2010-08-13 16:30:15 +00:00
Antoine Pitrou 3060c4573f Reapply r83877. 2010-08-13 16:27:38 +00:00
Antoine Pitrou 6fdb74f0ae Re-apply r83871. 2010-08-13 16:26:40 +00:00
Victor Stinner b4b8eb9163 Oops, I did it again: add missing \ removed in previous commit 2010-08-13 13:47:18 +00:00
Victor Stinner 11fd4e962d Oops, create TESTFN_UNENCODEABLE from TEST_FN, not TESTFN_UNICODE
test_imp fails on Linux with C locale because TESTFN_UNICODE is not encodable
to ascii.
2010-08-13 13:45:00 +00:00
Victor Stinner 1a4d12d746 Issue #9425: NullImporter constructor is fully unicode compliant
* On non-Windows OSes: the constructor accepts bytes filenames
   and use surrogateescape for unicode filenames
 * On Windows: use GetFileAttributesW() instead of GetFileAttributesA()
2010-08-13 13:07:29 +00:00
Victor Stinner 3d85a6fa04 Set TESTFN_UNENCODEABLE on non-Windows OSes
* Use 0xff byte on non-Windows OSes
 * mbcs is now really strict by default: i closed the issue #850997, so use the
   filesystem encoding and not Latin-1
 * Rename TESTFN_UNICODE_UNENCODEABLE to TESTFN_UNENCODEABLE
2010-08-13 13:02:04 +00:00
Eric Smith 994addc414 Remove unused test class. 2010-08-12 21:55:30 +00:00
Antoine Pitrou 7c8bcb6f92 Issue #7467: when a file from a ZIP archive, its CRC is checked and a
BadZipfile error is raised if it doesn't match (as used to be the
case in Python 2.5 and earlier).
2010-08-12 15:11:50 +00:00
Tim Golden 3a879e8a27 #9055: remove assertion at the end of test_8959_b since the test is about crashing, not about counting and is difficult to manage when run as a service 2010-08-11 15:59:57 +00:00
Tim Golden 126c2960ca #2304: fix incorporating Eric Smith's .format suggestion and tested on Ubuntu as well as Windows 2010-08-11 14:20:40 +00:00
Antoine Pitrou 32cfedeb1c Issue #9550: a BufferedReader could issue an additional read when the
original read request had been satisfied, which can block indefinitely
when the underlying raw IO channel is e.g. a socket.  Report and original
patch by Jason V. Miller.
2010-08-11 13:31:33 +00:00
Mark Dickinson cf940c701f Issue #9530: Fix undefined-behaviour-inducing overflow checks in bytes and bytearray implementations. 2010-08-10 18:35:01 +00:00
Antoine Pitrou 817c9df7e5 test_winsound shouldn't crash when ctypes isn't available 2010-08-10 00:45:32 +00:00
Antoine Pitrou 5af4f4b983 Issue #3757: thread-local objects now support cyclic garbage collection.
Thread-local objects involved in reference cycles will be deallocated
timely by the cyclic GC, even if the underlying thread is still running.
2010-08-09 22:38:19 +00:00
Antoine Pitrou 6e451df800 Followup to r83869 and issue #8524: rename socket.forget() to socket.detach()
and make it return the file descriptor.
2010-08-09 20:39:54 +00:00
Senthil Kumaran 30e86a4767 Fix Issue7007 - Use percent-encoded consistently instead of URL Encoded variations. Changes in Modules. 2010-08-09 20:01:35 +00:00
Florent Xicluna 87082ee14d Merged manually from 2.7 branch to 3.x trunk.
------------------------------------------------------------------------
  r81149 | florent.xicluna | 2010-05-13 23:40:01 +0200 (jeu. 13 mai 2010) | 2 lignes

  Better test skipping, with message in the log.
  ------------------------------------------------------------------------
  r81150 | florent.xicluna | 2010-05-13 23:41:05 +0200 (jeu. 13 mai 2010) | 2 lignes

  Improve test feedback to troubleshoot issue #8423 on OS X.
  ------------------------------------------------------------------------
  r81151 | florent.xicluna | 2010-05-14 01:46:48 +0200 (ven. 14 mai 2010) | 2 lignes

  Revert changeset r81150 which helped diagnose issue #8423 on some OS X buildbot.
  ------------------------------------------------------------------------
  r82056 | florent.xicluna | 2010-06-17 22:30:56 +0200 (jeu. 17 juin 2010) | 2 lignes

  Add few words about test.test_genericpath.CommonTest
  ------------------------------------------------------------------------
2010-08-09 17:18:05 +00:00
Florent Xicluna ec882214fe Merged manually from 2.7 branch to 3.x trunk.
------------------------------------------------------------------------
  r80411 | florent.xicluna | 2010-04-23 19:59:10 +0200 (ven. 23 avril 2010) | 2 lignes

  Remove ImportWarnings filters.  They become obsolete after r79310, issue #8205.
  ------------------------------------------------------------------------
  r80412 | florent.xicluna | 2010-04-23 20:10:12 +0200 (ven. 23 avril 2010) | 2 lignes

  Fix the "regrtest -s" switch.
  ------------------------------------------------------------------------
  r81140 | florent.xicluna | 2010-05-13 19:05:29 +0200 (jeu. 13 mai 2010) | 3 lignes

  Add sensible information about the OS X platform to diagnose issue #8423:
  test_pep277 fails on "x86 Tiger" buildbot but not on "PPC Tiger".
  ------------------------------------------------------------------------
  r81141 | florent.xicluna | 2010-05-13 20:16:06 +0200 (jeu. 13 mai 2010) | 2 lignes

  Revert the additional OS X information (r81140).  Keep the endianness information.
  ------------------------------------------------------------------------
2010-08-09 16:56:43 +00:00
Benjamin Peterson a3a3fc6770 typo 2010-08-09 15:49:56 +00:00
Benjamin Peterson 42ac47548d don't alias directly, so that extra arguments don't appear #6678 2010-08-09 13:05:35 +00:00
Fred Drake a492362f9a issue #9452:
Add read_file, read_string, and read_dict to the configparser API;
new source attribute to exceptions.
2010-08-09 12:52:45 +00:00
Antoine Pitrou f14c263280 Also temporarily revert r83871, to fix compilation on buildbots 2010-08-09 12:47:33 +00:00
Antoine Pitrou aba74bddd6 Revert r83877 in order to fix compilation 2010-08-09 10:47:46 +00:00
Senthil Kumaran 9f347ea545 reapply the revert made in r83875
Now the _collections is statically built, the build dependencies are in proper
order and build works fine.

Commit Log from r83874:
Issue 9396.   Apply functools.lru_cache in the place of the
random flushing cache in the re module.
2010-08-09 07:30:53 +00:00
Raymond Hettinger 31022301b5 Revert 83784 adding functools.lru_cache() to the re module.
The problem is that the re module is imported by sysconfig
and re needs functools which uses collections.OrderedDict()
but the _collectionsmodule.c code is not yet constructed
at this point in the build.

The likely best solution will be to include _collections
as part of the static build before the rest of the
boot-strapping.
2010-08-09 05:56:50 +00:00
Raymond Hettinger 4f859ed9c7 Issue 9396. Apply functools.lru_cache in the place of the
random flushing cache in the re module.
2010-08-09 04:24:42 +00:00
Raymond Hettinger 5b0c1e07ca Issue 7846: fnmatch cache can grow without bound
Updated to solution to use the functools.lru_cache().
Restores the API so that purge() is not needed
(because the cache never gets big).
2010-08-09 02:07:15 +00:00
Antoine Pitrou e43f9d0ed6 Issue #8524: Add a forget() method to socket objects, so as to put the
socket into the closed state without closing the underlying file
descriptor.
2010-08-08 23:24:50 +00:00
Florent Xicluna ba8a98600e Fix xml.etree.ElementInclude to include the tail of the current node. Issue #6231 2010-08-08 23:08:41 +00:00
Florent Xicluna 14bd1c3b2e Fix BytesWarning in test_xml_etree, introduced with r83851. 2010-08-08 22:58:56 +00:00
Victor Stinner d62e6cabca Issue #9425: file system encoding is not always utf-8
Fix a regression introduced in test_sys by r83778.
2010-08-08 22:31:44 +00:00
Antoine Pitrou 696e03553b Issue #477863: Print a warning at shutdown if gc.garbage is not empty. 2010-08-08 22:18:46 +00:00
Florent Xicluna c17f17294f Issue #8047: Fix the xml.etree serializer to return bytes by default.
Use ``encoding="unicode"`` to generate a Unicode string.
2010-08-08 19:48:29 +00:00
Benjamin Peterson 1a0a737b13 revert r83830, breaks tests on unixes 2010-08-08 19:08:44 +00:00
Benjamin Peterson 4eb5fa56e4 Merged revisions 82779,82855,83740,83789-83791,83797-83801,83803,83811,83827,83844 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r82779 | benjamin.peterson | 2010-07-10 14:45:08 -0500 (Sat, 10 Jul 2010) | 1 line

  typo in attribute name #9217
........
  r82855 | benjamin.peterson | 2010-07-13 16:27:38 -0500 (Tue, 13 Jul 2010) | 1 line

  remove more extraneous commas #9245
........
  r83740 | alexandre.vassalotti | 2010-08-05 01:58:36 -0500 (Thu, 05 Aug 2010) | 4 lines

  Issue 5077: Update fixer for the other functions gone from the operator module.

  Patch by Meador Inge.
........
  r83789 | benjamin.peterson | 2010-08-07 17:45:14 -0500 (Sat, 07 Aug 2010) | 1 line

  cleanup and use unicode consistently
........
  r83790 | benjamin.peterson | 2010-08-07 17:52:06 -0500 (Sat, 07 Aug 2010) | 1 line

  unicode literal
........
  r83791 | benjamin.peterson | 2010-08-07 17:52:55 -0500 (Sat, 07 Aug 2010) | 1 line

  .get() is pointless here
........
  r83797 | benjamin.peterson | 2010-08-07 18:54:51 -0500 (Sat, 07 Aug 2010) | 1 line

  add a function to find how a node is indented
........
  r83798 | benjamin.peterson | 2010-08-07 18:55:28 -0500 (Sat, 07 Aug 2010) | 1 line

  when splitting import statements, use correct indentation #9386
........
  r83799 | benjamin.peterson | 2010-08-07 18:57:43 -0500 (Sat, 07 Aug 2010) | 1 line

  double quotes
........
  r83800 | benjamin.peterson | 2010-08-07 18:58:52 -0500 (Sat, 07 Aug 2010) | 1 line

  add another test
........
  r83801 | benjamin.peterson | 2010-08-07 19:02:10 -0500 (Sat, 07 Aug 2010) | 1 line

  cleanup; style-nits
........
  r83803 | benjamin.peterson | 2010-08-07 19:05:08 -0500 (Sat, 07 Aug 2010) | 1 line

  slightly more explicit
........
  r83811 | benjamin.peterson | 2010-08-07 22:56:44 -0500 (Sat, 07 Aug 2010) | 4 lines

  Fix node.pre_order() to call the right method on its children.

  This was a rather tragic copy-paste error.
........
  r83827 | benjamin.peterson | 2010-08-08 08:12:48 -0500 (Sun, 08 Aug 2010) | 1 line

  cause test to actually run and fix it
........
  r83844 | benjamin.peterson | 2010-08-08 13:46:37 -0500 (Sun, 08 Aug 2010) | 1 line

  fix whitespace
........
2010-08-08 19:01:25 +00:00
Florent Xicluna 39d795d8c1 Issue #7564: Skip test_ioctl if another process is attached to /dev/tty. 2010-08-08 18:06:13 +00:00
Mark Dickinson 93d768d632 Remove unused import. 2010-08-08 17:12:46 +00:00
Florent Xicluna 37d3d9aa96 Add test case for the HTTPResponse being an iterable. Follow-up of issue #4608. 2010-08-08 16:25:27 +00:00
Tim Golden e3f76168a9 Issue #2304: Add additional quotes when using cmd shell on Windows. Original patch from Gabriel Genellina 2010-08-08 16:17:48 +00:00
Florent Xicluna 419e384601 Use unittest specific methods for some urllib test cases. And replace urllib2 with urllib.request in comments. 2010-08-08 16:16:07 +00:00
Benjamin Peterson 1f594ad424 use same quoting as the rest of the file 2010-08-08 13:17:07 +00:00
Senthil Kumaran d95cc75483 Fix Issue8280 - urllib2's Request method will remove fragements in the url.
This is how it should work,wget and curl work like this way too. Old behavior was wrong.
2010-08-08 11:27:53 +00:00
Tim Golden ad537f23e2 Issue #3210: Revert C module changes and apply patch from Hirokazu Yamamoto instead 2010-08-08 11:18:16 +00:00
Raymond Hettinger d331ce9e66 Issue #9507: Named tuple repr will now automatically display the right
name in a tuple subclass.
2010-08-08 01:13:42 +00:00
Benjamin Peterson fa45076cbd kill outdated comment 2010-08-07 21:32:12 +00:00
Mark Dickinson af43e9a288 Issue #8433: Fix test_curses failure for platforms with recent versions of ncurses. 2010-08-07 12:33:36 +00:00
Victor Stinner 6c6f851eae Issue #9425: skip tests if a filename is not encodable 2010-08-07 10:09:35 +00:00
Brian Curtin 42143562c2 Fix an assertRaises situation and typo. Also pass all tests to run_unittest
rather than do it by platform -- the proper skips are in place already.
2010-08-07 03:47:21 +00:00
Brian Curtin ef9efbd69c Fix #9324: Add parameter validation to signal.signal on Windows in order
to prevent crashes.
2010-08-06 19:27:32 +00:00
Tim Golden af5ac3974b Issue #3210: Ensure stdio handles are closed if CreateProcess fails 2010-08-06 13:03:56 +00:00
Gerhard Häring 1c5471f319 Issue #6683: For SMTP logins we now try all authentication methods advertised
by the server. Many servers are buggy and advertise authentication methods they
o not support in reality. This change makes smtplib.auth() work more often in
the real world, where we face misconfigured servers and servers that advertise
methods they don't support due to the madness that is SASL.
2010-08-05 14:08:44 +00:00
Mark Dickinson 388122d43b Issue #9337: Make float.__str__ identical to float.__repr__.
(And similarly for complex numbers.)
2010-08-04 20:56:28 +00:00
Antoine Pitrou 560f7647ce Issue #8814: function annotations (the `__annotations__` attribute)
are now included in the set of attributes copied by default by
functools.wraps and functools.update_wrapper.  Patch by Terrence Cole.
2010-08-04 18:28:02 +00:00
Senthil Kumaran 5626eec0c2 Sending the auth info as string. Fix BytesWarning: str() on a bytes instance Exception on buildbot. 2010-08-04 17:46:23 +00:00
Antoine Pitrou 23df483cb6 Try to fix issue #9415: skip some tests on broken Ubuntu OpenSSL 2010-08-04 17:14:06 +00:00
Antoine Pitrou 15cee6209f In verbose mode, identify OpenSSL build and platform more precisely 2010-08-04 16:45:21 +00:00
Brian Curtin a6a3274aad Fix #9513 to remove relative imports from multiprocessing.
The test suite currently skips test_multiprocessing on Windows
because it fails on finding _multiprocessing in several
win32-specific blocks. Removing the relative import lets this
through and allows the test to run (and pass).
2010-08-04 15:47:24 +00:00
Antoine Pitrou 482e66a58a Issue #9496: Provide a test suite for the rlcompleter module. Patch by
Michele Orrù.
2010-08-04 15:43:16 +00:00
Richard Jones 6a9e6bbf1a fix test_smtplib/test_smtpd collision through pre-loaded reply data in mock_socket 2010-08-04 12:27:36 +00:00
Antoine Pitrou 62f68ed31f Factor out stripping of interpreter debug output in test.support.strip_python_stderr() 2010-08-04 11:48:56 +00:00
Giampaolo Rodolà f96482e91a as per discussion with antoine revert changes made in 83708 as the user useing ftplib's readline methods is supposed to always use a binary file 2010-08-04 10:36:18 +00:00
Giampaolo Rodolà b939235c6a fix issue #6822: ftplib's storline method doesn't work with text files 2010-08-04 10:12:00 +00:00
Giampaolo Rodolà b5c23761d3 issue #8687: provides a test suite for sched.py module 2010-08-04 09:28:05 +00:00
Giampaolo Rodolà 934abddaec fix issue #2944: asyncore doesn't handle connection refused correctly (patch by Alexander Shigin). Merged from 2.7 branch. 2010-08-04 09:02:27 +00:00
Senthil Kumaran 84c7d9f87b Fix Issue754016 - urlparse goes wrong with IP:port without scheme 2010-08-04 04:50:44 +00:00
Richard Jones 4aa0d4d2d0 improve smtpd module test coverage 2010-08-04 01:20:14 +00:00
Antoine Pitrou 577ba7d43a That test was never run (since thread has been renamed to _thread in 3.x) 2010-08-04 00:18:49 +00:00
R. David Murray c4e69cc1d8 #3196: if needed pad a short base64 encoded word before trying to decode.
The RFCs encourage following Postel's law: be liberal in what you accept.
So if someone forgot to pad the base64 encoded word payload to an
even four bytes, we add the padding before handing it to base64mime.decode.
Previously, missing padding resulted in a HeaderParseError.

Patch by Jason Williams.
2010-08-03 22:14:10 +00:00
Antoine Pitrou da991da30b In test_threading_local, test both the default _thread._local implementation
and the pure Python implementation in Lib/_threading_local.py
2010-08-03 18:32:26 +00:00
R. David Murray 88c49fe320 #9444: use first of prefix_chars for help opt instead of raising error
An argparse option parser created with a prefix_chars that did not
include a '-' would happily add -h and --help options, and then throw
an error when it tried to format the help because the - was an invalid
prefix character.  This patch makes it use the first character of
prefix_chars as the character for the help options if and only if '-'
is not one of the valid prefix_chars.

Fix by Theodore Turocy, unit tests by Catherine Devlin.
2010-08-03 17:56:09 +00:00
Georg Brandl e8e02e3b5b Fix regrtest -F. 2010-08-03 07:56:50 +00:00
Ronald Oussoren fcd77016b3 Fix for issue 9455: platform.mac_ver() broken on OSX/ppc 2010-08-03 07:42:42 +00:00
Richard Jones 64b02de010 improvements to test_smtplib per issue2423
merged the socket mock introduced in test_smtpd
2010-08-03 06:39:33 +00:00
Georg Brandl c8284cfc57 #9087: update json docstrings -- unicode and long do not exist anymore. 2010-08-02 20:16:18 +00:00
Georg Brandl 07b90caed4 #8861: remove unused variable. 2010-08-02 19:44:48 +00:00
Georg Brandl 56be37cef2 #7973: Fix distutils options spelling. 2010-08-02 19:16:34 +00:00