Commit Graph

14991 Commits

Author SHA1 Message Date
Georg Brandl 17e3d698b5 Avoid triggering DeprecationWarnings in test_smtpd and smtpd. 2010-07-31 10:08:09 +00:00
Georg Brandl b00a75f175 At least give IDLE 3.1 a release date. No further entries there for 3.2 though. 2010-07-31 09:03:30 +00:00
Florent Xicluna c049fca0da Fix an oversight in r83294. unquote() should reject bytes. Issue #9301. 2010-07-31 08:56:55 +00:00
Georg Brandl 62069d3ce7 Bump versions and review NEWS file. 2010-07-31 08:56:11 +00:00
Georg Brandl 80ff2adf88 Update pydoc topics and adapt Topics builder to Sphinx 1.0. 2010-07-31 08:27:46 +00:00
Georg Brandl 604ef370b3 Make urllib tests pass for now. Will figure out what the correct semantics should be after release. 2010-07-31 08:20:02 +00:00
Georg Brandl e1e8df1082 Fix pdb test failures on the buildbots. 2010-07-31 08:14:16 +00:00
Raymond Hettinger 51b401bbe1 Only expose the abstract base classes.
The concrete types are for internal use (registration).
We are not trying to resurrect the types module
in collections.
2010-07-31 07:12:50 +00:00
Georg Brandl b90ffd88f1 Part of #7245: when KeyboardInterrupt is raised while defining commands, restore the old commands instead of producing a traceback. 2010-07-30 22:20:16 +00:00
Senthil Kumaran d496c4c936 Fix issue9301 - handle unquote({}) kind of case. 2010-07-30 19:34:36 +00:00
Georg Brandl 0a9c3e91dc Show the traceback line numbers as well as the current line numbers if an exception is being debugged. Courtesy of pdb++ by Antonio Cuni. Also document -> and >> markers for "list". 2010-07-30 18:46:38 +00:00
Georg Brandl cdf66a9a7c Test that "source" with nonexisting things works as expected. 2010-07-30 18:15:16 +00:00
Georg Brandl 5ed2b5a92a Fix source finding if the given frame is a module-level frame. 2010-07-30 18:08:12 +00:00
Georg Brandl e59ca2afe3 Add "longlist" and "source" commands, ideas borrowed from pdb++ by Antonio Cuni. 2010-07-30 17:04:28 +00:00
Georg Brandl 0d08962659 Several enhancements to pdb and its test suite.
* added basic test for basic commands
* removed duplication of command docs, and moved them to their implementation
* unified and useful display of exceptions
* output messages and errors using overridable methods (also fixes #1503502)
2010-07-30 16:00:46 +00:00
Georg Brandl 9d624d26d1 pdb now has its own tests. 2010-07-30 15:33:52 +00:00
Georg Brandl d2fd4cae8e Add Breakpoint.bpformat(), which returns the info usually printed by bpprint(). Necessary for major refactoring of pdb output handling. 2010-07-30 15:01:23 +00:00
Georg Brandl 6cccb865d1 #7964 followup: add test case to ensure issue remains fixed. 2010-07-30 14:16:43 +00:00
Georg Brandl 7410dd11ef #809887: improve pdb feedback for breakpoint-related actions. Also add a functional test for these commands. 2010-07-30 12:01:20 +00:00
Georg Brandl 3f94089a77 #5294: Fix the behavior of pdb "continue" command when called in the top-level debugged frame. 2010-07-30 10:29:19 +00:00
Georg Brandl d72e043bdd #5727: Restore the ability to use readline when calling into pdb in doctests. 2010-07-30 09:59:28 +00:00
Georg Brandl 06535ee56d Remove redundant import. 2010-07-30 09:54:44 +00:00
Georg Brandl 34cc0f53be #6719: In pdb, do not stop somewhere in the encodings machinery if the source file to be debugged is in a non-builtin encoding. 2010-07-30 09:43:00 +00:00
Georg Brandl 25fbb891d8 Issue #8048: Prevent doctests from failing when sys.displayhook has
been reassigned.
2010-07-30 09:23:23 +00:00
Georg Brandl 46b9afc862 #1472251: remove addition of "\n" to code given to pdb.run[eval](), the bug in exec() that made this necessary has been fixed. Also document that you can give code objects to run() and runeval(), and add some tests to test_pdb. 2010-07-30 09:14:20 +00:00
Georg Brandl 44f8bf9411 #8015: fix crash when entering an empty line for breakpoint commands. Also restore environment properly when an exception occurs during the definition of commands. 2010-07-30 08:54:49 +00:00
Georg Brandl 26a0f87e28 Document the "jump" command in pdb.__doc__, and add a version tag for "until X". 2010-07-30 08:45:26 +00:00
Georg Brandl 2dfec552fe Allow giving an explicit line number to "until". 2010-07-30 08:43:32 +00:00
Georg Brandl e023091815 #1437051: allow "continue"/"next"/etc. in .pdbrc, also add pdb -c option to give these commands. This allows to run a script until an exception occurs. 2010-07-30 08:29:39 +00:00
Georg Brandl 1e30bd3753 #9230: allow Pdb.checkline() to be called without a current frame, for setting breakpoints before starting debugging. 2010-07-30 07:21:26 +00:00
Georg Brandl a91a94b7c0 #4179: In pdb, allow "list ." as a command to return to the currently debugged line. 2010-07-30 07:14:01 +00:00
Georg Brandl 0a0fc07d37 #4108: the first default entry (User-agent: *) wins. 2010-07-29 17:55:01 +00:00
Victor Stinner 70120e202d #8603: Add environb to os.__all__ 2010-07-29 17:19:38 +00:00
Georg Brandl 056cb93e7a #6630: allow customizing flags for compiling string.Template.idpattern. 2010-07-29 17:16:10 +00:00
Victor Stinner 1cec3e367c #9397: remove mention of dbm.bsd which does not exist anymore. 2010-07-29 16:26:56 +00:00
Georg Brandl 470a123910 #1090076: explain the behavior of *vars* in get() better. 2010-07-29 14:17:12 +00:00
Georg Brandl 6d23c44ee5 Fix #9412: make list of messages an instance attribute instead of class attribute. 2010-07-29 13:19:42 +00:00
Georg Brandl 8dcaa7396f #9411: allow selecting an encoding for configparser files. Also adds a new test config file to test special cases. 2010-07-29 12:17:40 +00:00
Georg Brandl f206d0e393 Fix for r83202: improve the handling of empty lines. 2010-07-29 11:56:20 +00:00
Victor Stinner 96f0de9004 Update test_os.py according to my last changes on _Environ.__repr__() 2010-07-29 00:29:00 +00:00
Victor Stinner bed7117fda Issue #9283: Oops, add missing { and } to repr(os.environ) 2010-07-28 21:25:42 +00:00
Victor Stinner d73c1a3009 #9283: Fix repr(os.environ), display unicode keys and values on POSIX systems 2010-07-28 21:23:23 +00:00
Georg Brandl aa5b33311a Add missing file. 2010-07-28 17:37:27 +00:00
Florent Xicluna 02ea12b291 Syntax cleanup. 2010-07-28 16:39:41 +00:00
Senthil Kumaran 3f8ab965f7 Fix Issue6325 - robotparse to honor urls with query strings. 2010-07-28 16:27:56 +00:00
Georg Brandl 96a60ae90c #1682942: add some ConfigParser features: alternate delimiters, alternate comments, empty lines in values. Also enhance the docs with more examples and mention SafeConfigParser before ConfigParser. Patch by Lukas Langa, review by myself, Eric and Ezio. 2010-07-28 13:13:46 +00:00
Georg Brandl cbb0ae4a42 #9354: Provide getsockopt() in asyncore file_wrapper(). Patch by Lukas Langa. 2010-07-28 08:19:35 +00:00
Ezio Melotti 84befb00bd Fix failure introduced in r83182. 2010-07-28 00:23:21 +00:00
Victor Stinner cf448832eb Issue #8966: ctypes: Remove implicit bytes-unicode conversion 2010-07-28 00:15:03 +00:00
Victor Stinner 42746df17b Fix ctypes tests to avoid implicit bytes-unicode conversion 2010-07-27 23:36:41 +00:00
Alexander Belopolsky 455f7bdc05 Issue #9378: python -m pickle <pickle file> will now load and display
the first object in the pickle file.
2010-07-27 23:02:38 +00:00
Ezio Melotti 9a381c7a02 With skipUnless there is no need to add test classes conditionally. 2010-07-27 22:24:13 +00:00
Ezio Melotti 63c4640327 Use proper skips and assert* methods in test_asyncore. 2010-07-27 22:03:33 +00:00
Florent Xicluna f1046ca817 Issue #4770: Restrict binascii module to accept only bytes (as specified).
And fix the email package to encode to ASCII instead of ``raw-unicode-escape`` before ASCII-to-binary decoding.
2010-07-27 21:20:15 +00:00
Alexander Belopolsky c02cc2707a Issue #9384: python -m tkinter will now display a simple demo applet. 2010-07-27 14:16:32 +00:00
Gregory P. Smith 5a63183a8b The default size of the re module's compiled regular expression cache has
been increased from 100 to 500 and the cache replacement policy has changed
from simply clearing the entire cache on overflow to randomly forgetting 20%
of the existing cached compiled regular expressions.  This is a performance
win for applications that use a lot of regular expressions and limits the
impact of the performance hit anytime the cache is exceeded.
2010-07-27 05:31:29 +00:00
Alexander Belopolsky aeb039863d Make python version of fromtimestamp behave more like C. 2010-07-26 02:36:41 +00:00
Brian Curtin 9a27b0cd19 Fix #7113. Patch by Łukasz Langa.
Changes include using a list of lines instead of patching together using
string interpolation, and a multi-line value test cases.
2010-07-26 00:27:10 +00:00
Andrew M. Kuchling 688b9e384e #777884: make .normalize() do nothing for childless nodes, instead of raising an exception 2010-07-25 23:38:47 +00:00
Michael Foord bd6c079552 Issue #4686 - add .args to exceptions in the configparsermodule 2010-07-25 23:09:25 +00:00
Alexander Belopolsky 07de165d6e Corrected comments on where settrace and setprofile are tested. 2010-07-25 15:05:42 +00:00
Alexander Belopolsky 13c475385b Issue #9315: Renamed test_trace to test_sys_settrace and
test_profilehooks to test_sys_setprofile so that test_trace can be
used for testing the trace module and for naming consistency.
2010-07-25 15:02:55 +00:00
Alexander Belopolsky f6d2ca06ac Issue #9315: Revert r83005 before renaming test_trace to
test_sys_settrace and test_profilehooks to test_sys_setprofile in all
three branches.
2010-07-25 14:58:54 +00:00
Ronald Oussoren cb615e6abe Fix for issue 9367: the test code for os.getgroups
assumes that the result of getgroups and the output
of the id(1) command return groups in the same
order.  That assumption is both fragile and false.
2010-07-24 14:15:19 +00:00
Richard Jones 803ef8a694 Implementation for issue 4184
Changes the previously private attributes to make them public, increasing the potential for extending the library in user code. Backward-compatible and documented.
2010-07-24 09:51:40 +00:00
Victor Stinner 756f547b9a #9032: XML-RPC client: Transport.request() retries on EPIPE error
The EPIPE error occurs when the server closes the socket and the client sends a
"big" XML-RPC request (I don't know exactly the size threshold).

request() just have to ignore the error because single_request() closes the
socket on error, and so the next call to single_request() will open a new
socket.

Remove also a comment in the HTTP client because it's now wrong: see r70643
and issue #5542.
2010-07-24 02:24:55 +00:00
Victor Stinner eccc5facd3 Issue #4629: getopt raises an error if an argument ends with = whereas getopt
doesn't except a value (eg. --help= is rejected if getopt uses ['help='] long
options).
2010-07-24 00:49:20 +00:00
Alexander Belopolsky a565874cc1 Use _datetime docstring if _datetime is available. 2010-07-23 20:03:53 +00:00
Alexander Belopolsky cf86e368eb Issue #7989: Added pure python implementation of the datetime module. 2010-07-23 19:25:47 +00:00
Brett Cannon 671153db25 Add queue tests for empty, full, put_nowait, and get_nowait.
Closes issue 9357. Thanks to Brian Brazil for the patch.
2010-07-23 16:56:21 +00:00
Ezio Melotti 6086118ced #9359: fix typo. Thanks to Piotr Kasprzyk for the patch. 2010-07-23 16:48:22 +00:00
Brian Curtin 81a4a6abb7 Tab test_repr_daemon over so it's included in ThreadTests.
Noticed by Amaury.
2010-07-23 16:30:10 +00:00
Brett Cannon 4b16e130cc Add tests for fnmatch.filter and translate.
Partially closes issue 9356. Thanks to Brian Brazil for the patch.
2010-07-23 16:23:13 +00:00
Brett Cannon cc14320159 Make fnmatch be more PEP 8 compliant.
Partially closes issue 9356. Thanks to Brian Brazil for the patch.
2010-07-23 16:22:25 +00:00
Richard Jones 8cb3619f86 New tests for smtpd module. Has full coverage for SMTPChannel and SMTPServer. 2010-07-23 16:20:40 +00:00
Brett Cannon 3f5f226ba0 Add more tests for the threading.Thread.repr.
Partially closes issue 9346. Thanks to Brian Brazil for the patch.
2010-07-23 15:50:52 +00:00
Brett Cannon 148724d39b Rip out old testing code that was inlined in threading.
Partially closes issue 9346. Thanks Brian Brazil for the patch.
2010-07-23 15:50:02 +00:00
Brett Cannon 42e54b29b9 Stop shadowing a test class. 2010-07-23 14:45:19 +00:00
Brett Cannon 1f27479e26 Explicitly test relative imports by reusing importlib tests.
Closes issue 8392. Thanks Virgil Dupras for the initial patch.
2010-07-23 14:03:16 +00:00
Brett Cannon cfae36fa8e Test calendar.monthrange.
Closes issue 9342. Thanks John Chandler for the patch.
2010-07-23 13:54:14 +00:00
Ronald Oussoren b6ee4f5bfc This fixes issue7900 by adding code that deals
with the fact that getgroups(2) might return
more that MAX_GROUPS on OSX.

See the issue (and python-dev archives) for the
gory details. Summarized: OSX behaves rather oddly
and Apple says this is intentional.
2010-07-23 13:53:51 +00:00
Martin v. Löwis c9e1c7d97f Issue #6095: Make directory argument to os.listdir optional.
Patch by Virgil Dupras.
2010-07-23 12:16:41 +00:00
Ronald Oussoren e186e384f4 Fix for issue 7895. Avoid crashing the interpreter
when calling platform.mac_ver after calling os.fork by
reading from a system configuration file instead of
using OSX APIs.
2010-07-23 11:54:59 +00:00
Ronald Oussoren c3960c28b0 Minor tweak of test_osx_env to
avoid failing when the framework is not
yet installed.
2010-07-23 11:48:36 +00:00
Ronald Oussoren 102d11a6d6 Workaround for issue 4047: in some configurations of
the Crash Reporter on OSX test_subprocess will trigger
the reporter.

This patch prints a warning when the Crash Reporter will
get triggered intentionally, which should avoid confusing
people.
2010-07-23 09:50:05 +00:00
Ronald Oussoren e8d252dbcb Ensure that the Makefile variable expansion
in distutils.sysconfig matches that in the
toplevel sysconfig module.

Without this patch universal builds on OSX are
broken.

Als add a test that checks that the two version
of get_config_vars agree on important values.
2010-07-23 09:43:17 +00:00
Georg Brandl 599b65deca Use augassign. 2010-07-23 08:46:35 +00:00
Brian Curtin db902ac0b4 Skip this test as it doesn't apply to Windows. It was added for
#9189 for some GCC flags.
2010-07-22 15:38:28 +00:00
Tarek Ziadé 3679727939 reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen. 2010-07-22 12:50:05 +00:00
Brett Cannon 5db0c94072 Add importlib benchmarks which try to be "realistic" by importing the decimal
module which is the largest module in the stdlib.
2010-07-22 07:40:56 +00:00
Alexander Belopolsky 3f8ecab589 Issue #9323: Fixed a bug in trace.py that resulted in loosing the name
of the script being traced.  Patch by Eli Bendersky.
2010-07-21 17:43:42 +00:00
Antoine Pitrou 8cb6dbf1b9 Issue #5395: check that array.fromfile() re-raises an IOError instead of replacing it
with EOFError.
(this is only an added test, but 2.x will get a fix too)
2010-07-21 16:41:31 +00:00
Doug Hellmann 1c524754f6 Apply patch from Ray Allen for issue 9296 2010-07-21 12:29:04 +00:00
Benjamin Peterson 20f9c3c50f revert unintended changes 2010-07-20 22:39:34 +00:00
Benjamin Peterson 013783c529 move test_trace.py so as not to conflict with future tests for the trace module 2010-07-20 22:37:19 +00:00
Alexander Belopolsky 533a167a71 Issue #9282: Fixed --listfuncs option of trace.py. Thanks Eli
Bendersky for the patch.
2010-07-20 19:55:18 +00:00
Ronald Oussoren d21886cea4 Without this patch the value of sysconfig.get_config_var('LDSHARED')
is wrong when PY_LDFLAGS is not empty.

The bug was caused by LDSHARED getting expanded *before* sysconfig
renamed PY_LDSHARED (and simular values) to names without a PY_
prefix.

The patch tries to maintain the intended behaviour of allowing users
to set LDFLAGS in the environment and have that affect the build.

Without this patch a universal build on OSX cannot build universal
(fat binary) extensions.
2010-07-20 16:07:10 +00:00
Gregory P. Smith 41e6c3df8b Fixes Issue #3704: http.cookiejar was not properly handling URLs with a / in
the parameters.  (This is jjlee's issue3704.patch ported to py3k)
2010-07-19 23:17:22 +00:00
Senthil Kumaran 79e17f6f66 Fix Issue9301 - urllib.parse.unquote and unquote_to_byte to raise TypeError for None. 2010-07-19 18:17:19 +00:00
Stefan Krah 99212f61db Sub-issue of #9036: Fix incorrect use of Py_CHARMASK. 2010-07-19 17:58:26 +00:00