Commit Graph

13013 Commits

Author SHA1 Message Date
Benjamin Peterson d8f2d0bdb3 make test_support's captured_output a bit more robust when exceptions happen 2008-04-30 21:03:58 +00:00
Georg Brandl 28e0873f1f #2719: backport next() from 3k. 2008-04-30 19:47:09 +00:00
Eric Smith 0a95063d73 Issue 2526, float.__format__ 'n' specifier does not support thousands grouping.
Implemented grouping, with tests.
Cleaned up PyOS_ascii_formatd by breaking reformatting into smaller functions.
2008-04-30 01:09:30 +00:00
Amaury Forgeot d'Arc 87da1278eb test_sundry performs minimal tests (a simple import...) on modules that are not tested otherwise.
Some of them now have tests and can be removed.
Only 70 to go...
2008-04-28 21:07:06 +00:00
Brett Cannon 8dc4303297 Rename the test_traceback_print() function to traceback_print() to prevent
test_capi from automatically calling the function.
2008-04-28 04:50:06 +00:00
Skip Montanaro b8bdbc04e7 Get rid of _test(), _main(), _debug() and _check(). Tests are no longer
needed (better set available in Lib/test/test_robotparser.py).  Clean up a
few PEP 8 nits (compound statements on a single line, whitespace around
operators).
2008-04-28 03:27:53 +00:00
Brett Cannon 141534e56f Fix a bug introduced by the warnings rewrite where tracebacks were being
improperly indented.

Closes issue #2699.
2008-04-28 03:23:50 +00:00
Skip Montanaro fe1372c7d5 Minor cleanups:
* Avoid creating unused local variables where we can.  Where we can't prefix
  the unused variables with '_'.
* Avoid shadowing builtins where it won't change the external interface of a
  function.
* Use None as default path arg to readmodule and readmodule_ex.
2008-04-28 02:57:23 +00:00
Skip Montanaro ea59a84244 A few small changes:
* The only exception we should catch when trying to import cStringIO is an
  ImportError.
* Delete the function signatures embedded in the mk*temp docstrings.
* The tempdir global variable was initialized twice.
2008-04-27 22:49:56 +00:00
Kurt B. Kaiser 83101909cb Autocompletion of filenames now support alternate separators, e.g. the
'/' char on Windows.  Patch 2061 Tal Einat.
2008-04-27 21:52:19 +00:00
Kurt B. Kaiser 9c5c0af804 Improved AutoCompleteWindow logic. Patch 2062 Tal Einat. 2008-04-27 21:38:05 +00:00
Kurt B. Kaiser 93cdae5f81 Home / Control-A toggles between left margin and end of leading white
space.  Patch 1196903 Jeff Shute.

M    idlelib/PyShell.py
M    idlelib/EditorWindow.py
M    idlelib/NEWS.txt
2008-04-27 21:07:41 +00:00
Alexandre Vassalotti ba08f072d2 Fixed URL of PEP 205 in weakref's module docstring. 2008-04-27 00:52:24 +00:00
Benjamin Peterson 14204ad982 Allow test_import to work when it is invoked directly 2008-04-25 21:43:56 +00:00
Mark Dickinson fe536f53ea Issue 2635: fix bug in the fix_sentence_endings option to textwrap.fill. 2008-04-25 16:59:09 +00:00
Thomas Heller 6ad5fbb7ea Add from_buffer and from_buffer_copy class methods to ctypes types. 2008-04-25 15:44:16 +00:00
Armin Rigo 5364e2e46f A new crasher. 2008-04-25 09:35:18 +00:00
Amaury Forgeot d'Arc 1c596d5604 Use absolute import for test package 2008-04-24 20:41:50 +00:00
Amaury Forgeot d'Arc 747720540c Add a few tests for pydoc.
This is a modified version of a patch proposed by Humberto Diogenes
in the discussion of issue1883.

I will merge manually this change into the py3k branch: the tests must be adapted.
2008-04-24 20:22:26 +00:00
Amaury Forgeot d'Arc 48ebc264f8 Disable gc when running test_trace, or we may record the __del__ of collected objects.
See http://mail.python.org/pipermail/python-checkins/2008-April/068633.html
the extra events perfectly match several calls to socket._fileobject.__del__()
2008-04-24 20:10:26 +00:00
Amaury Forgeot d'Arc 5216721a53 Issue2681: the literal 0o8 was wrongly accepted, and evaluated as float(0.0).
This happened only when 8 is the first digit.
Credits go to Lukas Meuser.
2008-04-24 18:07:05 +00:00
Amaury Forgeot d'Arc 9686585a82 Issue #2670: urllib2.build_opener() failed when two handlers
derive the same default base class.

Will backport.
2008-04-22 21:14:41 +00:00
Gregory P. Smith 19b4411181 Major improvements:
* Default to using /dev/tty for the password prompt and input before
  falling back to sys.stdin and sys.stderr.
* Use sys.stderr instead of sys.stdout.
* print the 'password may be echoed' warning to stream used to display
  the prompt rather than always sys.stderr.
* warn() with GetPassWarning when input may be echoed.
2008-04-22 08:08:41 +00:00
Amaury Forgeot d'Arc dd8d824a56 Issue 2665: On Windows, sys.stderr does not contain a valid file when running without a console.
It seems to work, but will fail at the first flush.

This causes IDLE to crash when too many warnings are printed.

Will backport.
2008-04-21 22:35:30 +00:00
Gregory P. Smith 41e3018336 If sys.stdin is not a tty, fall back to default_getpass after printing
a warning instead of failing with a termios.error.
2008-04-21 21:31:08 +00:00
Andrew M. Kuchling a5489d415e Comment typo 2008-04-21 01:45:57 +00:00
Amaury Forgeot d'Arc eac43afdc9 Correct an apparent refleak in test_pkgutil: zipimport._zip_directory_cache contains
info for all processed zip files, even when they are no longer used.
2008-04-20 21:02:21 +00:00
Mark Dickinson d6d5148b44 Add test for tanh(-0.) == -0. on IEEE 754 systems 2008-04-20 20:38:48 +00:00
Mark Dickinson cec3f138d8 Yet more explicit special case handling to make
math.pow behave on alpha Tru64.  All IEEE 754
special values are now handled directly; only
the finite**finite case is handled by libm.
2008-04-20 04:13:13 +00:00
Mark Dickinson 9f99d70513 Report additional diagnostic information in
test_math, to help track down debian-alpha
buildbot failure.
2008-04-20 01:22:30 +00:00
Mark Dickinson e941d97d12 Additional tests for math.pow, and extra special-case
handling code in math.pow, in the hope of making all
tests pass on the alpha Tru64 buildbot.
2008-04-19 18:51:48 +00:00
Christian Heimes e74c8f2879 Added kill, terminate and send_signal to subprocess.Popen
The bits and pieces for the Windows side were already in place. The POSIX side is trivial (as usual) and uses os.kill().
2008-04-19 02:23:57 +00:00
Amaury Forgeot d'Arc 607bff1ebe Some tests did not pass on repeated calls (regrtest -R::)
Perform additional cleanup, mostly deleting from sys.modules, or clearing the warnings registry.
2008-04-18 23:31:33 +00:00
Christian Heimes 6f34109384 I finally got the time to update and merge Mark's and my trunk-math branch. The patch is collaborated work of Mark Dickinson and me. It was mostly done a few months ago. The patch fixes a lot of loose ends and edge cases related to operations with NaN, INF, very small values and complex math.
The patch also adds acosh, asinh, atanh, log1p and copysign to all platforms. Finally it fixes differences between platforms like different results or exceptions for edge cases. Have fun :)
2008-04-18 23:13:07 +00:00
Skip Montanaro b131f0468f resolve issue 2014 2008-04-18 20:35:46 +00:00
Nick Coghlan 1e88992224 Add test file missing from rev 62350 2008-04-15 10:28:14 +00:00
Nick Coghlan 106fc48336 Issue 2439: add pkgutils.get_data() as a convenience wrapper for the PEP 302 get_data() API (contributed by Paul Moore) 2008-04-15 10:25:31 +00:00
Thomas Heller 046e6a43ff Issue #2616: Implement ctypes.pointer() and ctypes.POINTER() in C for
better performance.
2008-04-14 16:10:07 +00:00
Brett Cannon c477427eba Fix spliting on colons on Windows machines with a file path by limiting the
number of splits.
2008-04-13 17:41:31 +00:00
Brett Cannon 25bb8182c6 Add an explicit check for output in a test to try to diagnose a failure on
Windows.
2008-04-13 17:09:43 +00:00
Skip Montanaro e3d3785e11 spelling 2008-04-13 03:17:30 +00:00
Brett Cannon 667bb4f236 Fix test_warnings by making the state of things more consistent for each test
when it is run.
2008-04-13 02:42:36 +00:00
Benjamin Peterson a3d19f35c4 Backport the removal of a __repr__ from 62251 2008-04-13 02:05:48 +00:00
Benjamin Peterson 7bb4d2d0fa Backported io module docs 2008-04-13 02:01:27 +00:00
Brett Cannon e974689038 Re-implement the 'warnings' module in C. This allows for usage of the
'warnings' code in places where it was previously not possible (e.g., the
parser). It could also potentially lead to a speed-up in interpreter start-up
if the C version of the code (_warnings) is imported over the use of the
Python version in key places.

Closes issue #1631171.
2008-04-12 23:44:07 +00:00
Gregory P. Smith e6c03033af socket.error inherits from IOError, it no longer needs listing in
the all_errors tuple.
2008-04-12 22:24:04 +00:00
Neal Norwitz 36a59b4a08 Remove the test file before writing it in case there is no write permission.
This might help fix some of the failures on Windows box(es).  It doesn't hurt
either way and ensure the tests are a little more self contained (ie have
less assumptions).
2008-04-10 05:46:39 +00:00
Martin v. Löwis 60a819d681 Merged revisions 62080-62262 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r62092 | collin.winter | 2008-04-01 18:27:10 +0200 (Di, 01 Apr 2008) | 1 line

  Add get_prev_sibling() to complement pytree's get_next_sibling().
........
  r62226 | collin.winter | 2008-04-08 21:07:56 +0200 (Di, 08 Apr 2008) | 1 line

  Add min() and max() to the list of special contexts that don't require adding list() calls around dict methods.
........
  r62232 | collin.winter | 2008-04-09 00:12:38 +0200 (Mi, 09 Apr 2008) | 4 lines

  Fix for http://bugs.python.org/issue2596

  This extends fix_xrange to know about the (mostly) same special contexts as fix_dict (where a special context is something that is guaranteed to fully consume the iterable), adding list() calls where appropriate. It also special-cases "x in range(y)".
........
2008-04-10 02:48:01 +00:00
Gregory P. Smith f108320055 better diagnostics 2008-04-09 23:11:56 +00:00
Georg Brandl 99bb5f3fef #2585: initialize code attribute of HTTPError. 2008-04-09 17:57:38 +00:00