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
Neal Norwitz
6e070814b2
Eliminate the sleeps that assume the server will start in .5 seconds.
...
This should make the test less flaky. It also speeds up the test
by about 75% on my box (20+ seconds -> ~4 seconds).
2008-01-27 01:44:05 +00:00
Neal Norwitz
3d785e2c6a
Consistently use tempfile.tempdir for the db_home directory.
2008-01-26 23:14:17 +00:00
Neal Norwitz
7f47d93f52
On some systems (e.g., Ubuntu on hppa) the flush()
...
doesn't cause the exception, but the close() does.
Will backport.
2008-01-26 23:13:46 +00:00
Neal Norwitz
37184295dc
Reduce the race condition by signalling when the server is ready
...
and not trying to connect before.
2008-01-26 21:21:59 +00:00
Neal Norwitz
a121508fac
Always try to remove the test file even if close raises an exception
2008-01-26 21:02:45 +00:00
Neal Norwitz
739a3c40e6
Cleanup the code a bit. test_rfind is failing on PPC and PPC64 buildbots,
...
this might fix the problem.
2008-01-26 20:24:36 +00:00
Gregory P. Smith
d006380fe1
Update docs for new callpack params added in r60188
2008-01-26 18:51:05 +00:00
Christian Heimes
a2af21262a
Unit test fix from Giampaolo Rodola, #1938
2008-01-26 16:43:35 +00:00
Georg Brandl
6caad7d2cb
Move C API entries to the corresponding section.
2008-01-26 14:19:22 +00:00
Georg Brandl
0cdf9a36ec
#1473257 : add generator.gi_code attribute that refers to
...
the original code object backing the generator. Patch by Collin Winter.
2008-01-26 14:14:20 +00:00
Georg Brandl
29604a1b4c
#1940 : make it possible to use curses.filter() before curses.initscr()
...
as the documentation says.
2008-01-26 14:03:47 +00:00
Georg Brandl
2a7d991c6c
Clarify "b" mode under Unix.
2008-01-26 14:02:38 +00:00
Andrew M. Kuchling
0c3f1680b3
Add some items
2008-01-26 13:50:51 +00:00
Georg Brandl
a7364408cd
Fix markup again.
2008-01-26 13:41:21 +00:00
Georg Brandl
0522548d61
Slashes allowed on Windows.
2008-01-26 11:02:22 +00:00
Georg Brandl
422319937e
Add missing things in re docstring.
2008-01-26 11:00:18 +00:00
Georg Brandl
fe7dd50907
#1934 : fix os.path.isabs docs.
2008-01-26 09:43:35 +00:00
Raymond Hettinger
dee3f65d98
Revert PySet_Add() changes.
2008-01-26 09:31:11 +00:00
Raymond Hettinger
d375723365
Update test code for change to PySet_Add().
2008-01-26 08:41:13 +00:00
Raymond Hettinger
b423f02aa5
Let marshal build-up sets and frozensets one element at a time.
...
Saves the unnecessary creation of a tuple as intermediate container.
2008-01-26 08:37:28 +00:00
Neal Norwitz
08b50eb3d3
The OS X buildbot had errors with the unavailable exceptions disabled. Restore it.
2008-01-26 08:26:00 +00:00
Raymond Hettinger
7c1be2a3b1
Make PySet_Add() work with frozensets. Works like PyTuple_SetItem() to build-up values in a brand new frozenset.
2008-01-26 08:19:06 +00:00