Jeffrey Yasskin
3404b3ce2a
Check in some documentation tweaks for PEP 3141, add some tests, and implement
...
the promotion to complex on pow(negative, fraction).
2007-09-07 15:15:49 +00:00
Jeffrey Yasskin
aaaef110dc
Add a test for fail*AlmostEqual, including the new support for complex numbers.
2007-09-07 15:00:39 +00:00
Thomas Heller
2e638c3a8a
Backport from py3k branch:
...
Add a workaround for a strange bug on win64, when _ctypes is compiled
with the SDK compiler. This should fix the failing
Lib\ctypes\test\test_as_parameter.py test.
2007-09-07 09:33:24 +00:00
Thomas Heller
2825b2ea44
Add a 'c_longdouble' type to the ctypes module.
2007-09-07 06:32:17 +00:00
Kurt B. Kaiser
44fa8f650f
Make IDLE's file decode more robust.
...
1. coding_spec() only looks at first two lines of bytes to avoid
a UnicodeDecodeError if rest of file is e.g. latin-1
2. coding_spec() handles \n or \r
3. Clarify that locale_encoding is used by calling it that. However, it's
still called IOBinding.encoding in other parts of IDLE and that usage
needs to be checked to verify that's still what is desired.
4. Return None from _decode() if decoding fails.
5. Name the vars representing bytes and strings or chars appropriately.
2007-09-07 05:06:21 +00:00
Brett Cannon
1e534b5425
Fix a crasher where Python code managed to infinitely recurse in C code without
...
ever going back out to Python code in PyObject_Call(). Required introducing a
static RuntimeError instance so that normalizing an exception there is no
reliance on a recursive call that would put the exception system over the
recursion check itself.
2007-09-07 04:18:30 +00:00
Brett Cannon
68a6da99e6
Make uuid1 and uuid4 tests conditional on whether ctypes can be imported;
...
implementation of either function depends on ctypes but uuid as a whole does
not.
2007-09-07 03:17:50 +00:00
Brett Cannon
504d885417
Fix docstring for getfullargspec().
2007-09-07 02:12:14 +00:00
Gregory P. Smith
a5e8ab5d5c
merge r58023 to fix issue1112 on windows. make this test more robust
...
and deterministic.
2007-09-06 23:06:50 +00:00
Gregory P. Smith
339a3ad87a
backport of r58023 to fix unit test suite issue1112 on windows
2007-09-06 23:01:32 +00:00
Gregory P. Smith
161586c804
Apply the fix from Issue1112 to make this test more robust and keep
...
windows happy.
2007-09-06 22:59:59 +00:00
Jeffrey Yasskin
1cc5544345
Extend unittest's fail*AlmostEqual methods to work on complex numbers.
2007-09-06 18:55:17 +00:00
Armin Rigo
337841dac7
PyDict_GetItem() returns a borrowed reference.
...
This attack is against ceval.c:IMPORT_NAME, which calls an
object (__builtin__.__import__) without holding a reference to it.
2007-09-06 09:30:38 +00:00
Kurt B. Kaiser
105f60ee62
1. Fail gracefully if the file fails to decode when loaded.
...
2. If the load fails, close the half-built edit window.
3. Don't reopen the file to check the shebang.
4. Clarify that we're setting tabs in Tk.
M EditorWindow.py
M FileList.py
2007-09-06 04:03:04 +00:00
Guido van Rossum
3da4c4bcab
Use an event variable to wait for the server to be ready, not time.sleep().
2007-09-06 03:57:23 +00:00
Armin Rigo
362bb51503
PyDict_GetItem() returns a borrowed reference.
...
There are probably a number of places that are open to attacks
such as the following one, in bltinmodule.c:min_max().
2007-09-05 07:51:21 +00:00
Guido van Rossum
fd4a7de172
Fix doctest failure introduced by r57949.
...
The formatting of errors from pdb's own print command is different
from the formatting of errors when pdb exec's an arbitrary command;
the introduction of print as a pdb command caused this test to use
the former instead of the latter, causing the test to fail.
2007-09-05 03:26:38 +00:00
Bill Janssen
ffe576dc78
SSL certificate distinguished names should be represented by tuples
2007-09-05 00:46:27 +00:00
Eric Smith
11529195ca
Changed some ValueError's to KeyError and IndexError.
...
Corrected code for invalid conversion specifier.
Added tests to verify.
Modified string.Formatter to correctly expand format_spec's,
and added a limit to recursion depth. Added _vformat()
method to support both of these.
2007-09-04 23:04:22 +00:00
Martin v. Löwis
fc787d515d
Patch #1031213 : Decode source line in SyntaxErrors back to its original
...
source encoding.
2007-09-04 14:20:25 +00:00
Martin v. Löwis
a5136196bc
Patch #1031213 : Decode source line in SyntaxErrors back to its original
...
source encoding. Will backport to 2.5.
2007-09-04 14:19:28 +00:00
Thomas Heller
476157bea5
Make the _wrap_close type (which is returned by os.popen) iterable.
...
This should fix the Lib\test\test_uuid.py test on Windows.
2007-09-04 11:27:47 +00:00
Georg Brandl
c9879246a2
Add "print" command to pdb, "print s" previously invoked the print statement.
2007-09-04 07:07:56 +00:00
Gregory P. Smith
1d6ec653d0
fix test, use bytes not unicode and let the test raise its internal exception
...
rather than just complaining about stderr not being what we expected masking
the true problem.
2007-09-03 16:48:32 +00:00
Eric Smith
4cb4e4e882
Fix segfault discovered by Ron Adam. Not checking for terminating right bracket in "'{0[}'.format(())". Fixed, and tests added.
2007-09-03 08:40:29 +00:00
Martin v. Löwis
f82d9b52fa
Patch #1076 : Use wide API for registry functions.
2007-09-03 07:43:05 +00:00
Georg Brandl
c76473d887
Fix Mac build, patch #1091 by Humberto Diogenes.
2007-09-03 07:27:49 +00:00
Georg Brandl
4cdceac760
Fix #883466 : don't allow Unicode as arguments to quopri and uu codecs.
2007-09-03 07:16:46 +00:00
Eric Smith
9d4ba3970f
Removed used_args param from string.Formatter.get_field. It was left in by mistake from an earlier edit.
2007-09-02 15:33:26 +00:00
Collin Winter
2ac0121305
Run 2to3's fix_has_key over distutils.
2007-09-01 20:37:22 +00:00
Collin Winter
0470689215
Run 2to3's fix_has_key over Lib/plat-os2emx/.
2007-09-01 20:35:04 +00:00
Collin Winter
ba21f618a3
Fix refleaks in test_with caused by reusing the same exception instance over and over.
2007-09-01 20:29:04 +00:00
Collin Winter
c59dacdbd8
Fix a poorly-translated raise statement in contextlib.
2007-09-01 20:27:58 +00:00
Collin Winter
1966f1c98f
Fix refleaks exposed by test_raise.
2007-09-01 20:26:44 +00:00
Kurt B. Kaiser
1963ad3126
Saving a file containing unicode failed.
2007-09-01 19:47:39 +00:00
Eric Smith
37f10386f1
Changed to use 'U' argument to PyArg_ParseTuple, instead of manually checking for unicode objects.
2007-09-01 10:56:01 +00:00
Kurt B. Kaiser
804252b3d9
Eliminate latin-1 encoding
2007-08-31 21:42:36 +00:00
Kurt B. Kaiser
d953f6e2c7
Point IDLE menu Help / Python Docs at Python 3000 version
2007-08-31 21:40:34 +00:00
Bill Janssen
470dcd2611
remove use of non-existent SSLFakeSocket in apparently untested code
2007-08-31 19:03:31 +00:00
Bill Janssen
910fa59595
remove mentions of socket.ssl in comments
2007-08-31 19:02:46 +00:00
Bill Janssen
c459264f5b
deprecate use of FakeSocket
2007-08-31 19:02:23 +00:00
Kurt B. Kaiser
610cee3e86
Convert IDLE's CREDITS file to unicode.
2007-08-31 18:37:07 +00:00
Guido van Rossum
27b02407b7
Updated tracker link.
2007-08-31 17:25:37 +00:00
Guido van Rossum
ba25c89919
Got test_plistlib working. Don't ask how.
2007-08-31 14:18:20 +00:00
Guido van Rossum
261f9df18d
Fix fall-out of str.decode removal.
2007-08-31 14:07:27 +00:00
Thomas Heller
674e9389e9
Add a workaround for a strange bug on win64, when _ctypes is compiled
...
with the SDK compiler. This should fix the failing
Lib\ctypes\test\test_as_parameter.py test.
2007-08-31 13:06:44 +00:00
Barry Warsaw
c5a6a3078b
Restore test_email for a1. It passes completely.
2007-08-31 11:19:21 +00:00
Barry Warsaw
bef9d21d14
Make test_email.py completely pass. This is cheating though because the two
...
line splitting examples don't split things the way they used to -- or should.
In these cases, change the test case and add an XXX.
The final failure was in Charset.body_encode() with euc-jp charset. These
return the original string unencoded, which isn't right. XXX and comment this
out for now; we'll fix it after a1.
2007-08-31 10:55:37 +00:00
Georg Brandl
7f13e6b3e2
string.maketrans() now produces translation tables for bytes.translate() -- wrong module?
...
Fix all remaining instances that did bad things with the new str.translate().
2007-08-31 10:37:15 +00:00
Thomas Heller
680d7befc0
Fix a buggy test. str8 objects contained NUL-terminated strings,
...
bytes objects don't.
2007-08-31 09:54:51 +00:00