Raymond Hettinger
2df20a3e08
Minor wordsmithing on docstring
2008-01-31 22:07:16 +00:00
Jeffrey Yasskin
38db364076
Remove unused to-be-magic methods from Rational per issue 1968. Do not port
...
this patch to py3k.
2008-01-31 17:45:59 +00:00
Jeffrey Yasskin
b23dea6adb
Added more documentation on how mixed-mode arithmetic should be implemented. I
...
also noticed and fixed a bug in Rational's forward operators (they were
claiming all instances of numbers.Rational instead of just the concrete types).
2008-01-31 07:44:11 +00:00
Raymond Hettinger
e973c61238
Missing return
2008-01-31 01:42:11 +00:00
Raymond Hettinger
e67420d72e
Fix defect in __ixor__ which would get the wrong
...
answer if the input iterable had a duplicate element
(two calls to toggle() reverse each other). Borrow
the correct code from sets.py.
2008-01-31 01:38:15 +00:00
Christian Heimes
cba36bbe65
Bug #1234 : Fixed semaphore errors on AIX 5.2
2008-01-30 22:54:18 +00:00
Raymond Hettinger
a44327a9a2
Update itertool recipes
2008-01-30 22:17:31 +00:00
Christian Heimes
796fc31585
The previous change was causing a segfault after multiple calls to Py_Initialize() and Py_Finalize().
2008-01-30 18:58:29 +00:00
Christian Heimes
0d9244332b
Fixed some references leaks in sys.
2008-01-30 17:21:22 +00:00
Christian Heimes
67ac0667f0
Removed unused var
2008-01-30 11:46:00 +00:00
Christian Heimes
4d4f270941
Patch #1970 by Antoine Pitrou: Speedup unicode whitespace and linebreak detection. The speedup is about 25% for split() (571 / 457 usec) and 35% (175 / 127 usec )for splitlines()
2008-01-30 11:32:37 +00:00
Raymond Hettinger
7d5fbaee42
Demonstrate new except/as syntax.
2008-01-30 00:51:58 +00:00
Raymond Hettinger
7d518f418b
MutableSets support a remove() method.
2008-01-30 00:08:31 +00:00
Raymond Hettinger
abf3fcf39f
Add isdisjoint() to the Set/MutableSet ABCs.
2008-01-30 00:01:07 +00:00
Raymond Hettinger
867558afd6
CallMethod is faster with a NULL third-argument than with an empty format string.
2008-01-29 19:52:09 +00:00
Brett Cannon
9748a1098f
Ignore .pyc and .pyo files.
2008-01-29 04:20:56 +00:00
Brett Cannon
8fff20f950
Update Vim syntax highlighting to specify what revision was used to generate
...
the file.
2008-01-29 04:18:04 +00:00
Brett Cannon
870d0c2871
Fix the reindent rule to use $(BUILDPYTHON).
2008-01-29 04:13:07 +00:00
Gregory P. Smith
f866bac73c
Disable use of BerkeleyDB 4.6.x to see what the odd platform buildbots
...
think. In particular, neal norwitz has traced an Ubuntu sparc64 crash
to the Lib/test/bsddb/test_basics.py test when opening a db with DB_THREAD.
2008-01-28 23:21:00 +00:00
Raymond Hettinger
bf3d1d5dc8
Removed unnecessary conditional (spotted by Neal Norwitz).
2008-01-28 21:51:25 +00:00
Raymond Hettinger
e84ada3d95
Factor-out common code with a new macro
2008-01-28 21:48:07 +00:00
Raymond Hettinger
7759a0cd76
Factor-out common code with a new macro
2008-01-28 21:47:42 +00:00
Raymond Hettinger
52716c94be
Let marshal built-up sets and frozensets one element at a time (without creating an intermediate tuple).
2008-01-28 21:34:30 +00:00
Raymond Hettinger
ecdcb58950
Make PySet_Add() work with frozensets.
...
Works like PyTuple_SetItem() to build-up values in a brand new frozenset.
Also, PyFrozenSet_New() is now guaranteed to produce a distinct new frozenset.
2008-01-28 20:34:33 +00:00
Thomas Heller
99120c4f7e
Revert rev. 59925, it breaks comtypes (I need to further examine this).
2008-01-28 08:44:13 +00:00
Christian Heimes
d7e1b2bd17
static PyObject* variables should use PyString_InternFromString() instead of PyObject_FromString() to store a python string in a function level static var.
2008-01-28 02:07:53 +00:00
Christian Heimes
908caac52e
Added clear cache methods to clear the internal type lookup cache for ref leak test runs.
2008-01-27 23:34:59 +00:00
Jeffrey Yasskin
3ea7b41b58
Moved Rational._binary_float_to_ratio() to float.as_integer_ratio() because
...
it's useful outside of rational numbers.
This is my first C code that had to do anything significant. Please be more
careful when looking over it.
2008-01-27 23:08:46 +00:00
Georg Brandl
56eadd9d0d
Add refcounting extension to build config.
2008-01-27 20:25:12 +00:00
Neal Norwitz
cf25eb14af
socket.error doesn't have a headers attribute like ProtocolError.
...
Handle that situation where we catch socket.errors.
2008-01-27 20:03:13 +00:00
Christian Heimes
5b25bc0598
Change isbasestring function as discussed on the cvs list a while ago
2008-01-27 19:01:45 +00:00
Neal Norwitz
ed444e52da
Try to handle socket.errors properly in is_unavailable
2008-01-27 18:19:04 +00:00
Georg Brandl
ce8fd9d2bc
Remove effectless expression statement.
2008-01-27 18:14:43 +00:00
Neal Norwitz
c5198090f3
Update the comment and remove the close. If we close we can't flush anymore.
...
We might still need to close after the for loop if flushing 6! times still
doesn't cause the signal/exception.
2008-01-27 18:09:48 +00:00
Neal Norwitz
41ada16cb7
Print periodic "still working" messages since this suite is slow.
2008-01-27 17:13:07 +00:00
Neal Norwitz
8250fbeac6
Reduce buffer size since we do not need 1k
2008-01-27 17:12:15 +00:00
Neal Norwitz
183c5346fe
Catch socket errors that are often the cause of transient failures.
...
Many of these exceptions are due to resource unavailable, so the
existing code should be able to handle many more spurious errors.
2008-01-27 17:11:11 +00:00
Neal Norwitz
9846de1dfb
Retry connection in case it fails to reduce flakiness
2008-01-27 17:10:58 +00:00
Neal Norwitz
041ee5d373
Add a tiny sleep and additional flush to force the file to really be synced.
2008-01-27 17:10:50 +00:00
Neal Norwitz
b3c8243c47
Update to newer version of ffi. Fixes crashes and test failures of longdouble
2008-01-27 17:10:43 +00:00
Neal Norwitz
e9057ff1a9
Initialize variable to prevent warning on some platform/config.
2008-01-27 17:10:35 +00:00
Neal Norwitz
c44af337ce
Add assertion that we do not blow out newl
2008-01-27 17:10:29 +00:00
Neal Norwitz
e7bb9188f4
Whitespace cleanup
2008-01-27 17:10:14 +00:00
Raymond Hettinger
9bba7b7085
Removed an unnecessary and confusing paragraph from the namedtuple docs.
2008-01-27 10:47:55 +00:00
Raymond Hettinger
63c77b6175
Docstring nit
2008-01-27 10:13:57 +00:00
Neal Norwitz
cfb41c4985
Add stdarg include for va_list to get this to compile on cygwin
2008-01-27 07:41:33 +00:00
Neal Norwitz
e1027f9034
Use int for the sign rather than a char. char can be signed or unsigned.
...
It's system dependent. This might fix the problem with test_rfind failing.
2008-01-27 07:37:38 +00:00
Neal Norwitz
448654f1f8
Mostly reformat. Also set an error and return NULL if neither MS_WINDOWS
...
nor UNIX is defined. This may have caused problems on cygwin.
2008-01-27 07:36:03 +00:00
Jeffrey Yasskin
3e1a373616
Make rational.gcd() public and allow Rational to take decimal strings, per
...
Raymond's advice.
2008-01-27 05:40:35 +00:00
Neal Norwitz
46c61b2c1d
Try to prevent this test from being flaky. We might need a sleep in here
...
which isn't as bad as it sounds. The close() *should* raise an exception,
so if it didn't we should give more time to sync and really raise it.
Will backport.
2008-01-27 05:02:34 +00:00