| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
SF bug #678265.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for xrange and list objects).
* list.__reversed__ now checks the length of the sequence object before
calling PyList_GET_ITEM() because the mutable could have changed length.
* all three implementations are now tranparent with respect to length and
maintain the invariant len(it) == len(list(it)) even when the underlying
sequence mutates.
* __builtin__.reversed() now frees the underlying sequence as soon
as the iterator is exhausted.
* the code paths were rearranged so that the most common paths
do not require a jump.
|
|
|
|
| |
was academic and it was potentially confusing to use.
|
|
|
|
|
|
|
|
| |
(Championed by Bob Ippolito.)
The update() method for mappings now accepts all the same argument forms
as the dict() constructor. This includes item lists and/or keyword
arguments.
|
|
|
|
|
|
|
|
|
|
| |
are within proper boundaries as specified in the docs.
This can break possible code (datetime module needed changing, for instance)
that uses 0 for values that need to be greater 1 or greater (month, day, and
day of year).
Fixes bug #897625.
|
|
|
|
|
|
|
| |
__getitem__() and __setitem__().
Simplifies the API, reduces the code size, adds flexibility, and makes
deques work with bisect.bisect(), random.shuffle(), and random.sample().
|
| |
|
|
|
|
|
|
|
|
| |
* Add doctests for the examples in the library reference.
* Add two methods, left() and right(), modeled after deques in C++ STL.
* Apply the new method to asynchat.py.
* Add comparison operators to make deques more substitutable for lists.
* Replace the LookupErrors with IndexErrors to more closely match lists.
|
|
|
|
|
|
|
|
|
| |
Invoke the standard error handlers for non-200 responses.
Always supply a "Connection: close" header to prevent the server from
leaving the connection open. Downstream users of the socket may
attempt recv()/read() with no arguments, which would block if the
connection were kept open.
|
|
|
|
| |
user-defined iterator.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow the user to create Tkinter.Tcl objects which are
just like Tkinter.Tk objects except that they do not
initialize Tk. This is useful in circumstances where the
script is being run on machines that do not have an X
server running -- in those cases, Tk initialization fails,
even if no window is ever created.
Includes documentation change and tests.
Tested on Linux, Solaris and Windows.
Reviewed by Martin von Loewis.
|
|
|
|
|
|
|
|
|
|
| |
(re-using an existing test object class) no longer triggered the
original segfault when the fix was backed out; restoring the local
test object class to make the test effective
the assignment of the ref created at the end does not affect the test,
since the segfault happended before weakref.ref() returned; removing
the assignment
|
| |
|
|
|
|
| |
From SF patch #852334.
|
|
|
|
| |
sentinel variable
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
fairly simpleminded adaptation of Zope3's test.py -T flag.
I also changed some booleans to use True/False where appropriate.
|
|
|
|
|
| |
comes from and show the differences from lists).
* Add a rotate() method.
|
|
|
|
| |
* Let deques support reversed().
|
| |
|
| |
|
|
|
|
| |
characters instead of character pointers to determine space requirements.
|
|
|
|
|
|
|
|
|
| |
the same object to be collected by the cyclic GC support if they are
only referenced by a cycle. If the weakref being collected was one of
the weakrefs without callbacks, some local variables for the
constructor became invalid and have to be re-computed.
The test caused a segfault under a debug build without the fix applied.
|
|
|
|
|
| |
PyWeakref_NewProxy() constructors from the C API
- elaborate the getweakrefcount() and getweakrefs() tests slightly
|
|
|
|
| |
(SF patch 876178, patch by mwh, unittest by perky)
|
|
|
|
|
|
| |
* Add unittests, newsitem, and whatsnew
* Apply to Queue.py mutex.py threading.py pydoc.py and shlex.py
* Docs are forthcoming
|
| |
|
|
|
|
| |
codec in multibytecodec consumers.
|
|
|
|
|
| |
meaning they must have been checked in to CVS from a Linuxish box with
Windowish \r\n line endings to begin with.
|
| |
|
|
|
|
|
| |
Several style fixes are suggested by Martin v. Loewis and
Marc-Andre Lemburg. Thanks!
|
|
|
|
| |
(Contributed by Dmitry Vasiliev.)
|
|
|
|
| |
separaters on str.split() and str.rsplit().
|
| |
|
| |
|
|
|
|
| |
loops to run (default remains 50,000 if no argument is specified).
|
| |
|
| |
|
|
|
|
| |
using specialized splitter for 1 char sep.
|
|
|
|
|
| |
test__locale: add typical POSIX-style full locale names.
test_locale: use en_US.US-ASCII on FreeBSD.
|
| |
|
|
|
|
| |
sorted() becomes a regular function instead of a classmethod.
|
|
|
|
| |
Replace lots of assert_(x == y) with assertEqual(x, y).
|
|
|
|
|
| |
SF feature request #801847.
Original patch is written by Sean Reifschneider.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
John J. Lee writes: "the patch makes it possible to implement
functionality like HTTP cookie handling, Refresh handling,
etc. etc. using handler objects. At the moment urllib2's handler
objects aren't quite up to the job, which results in a lot of
cut-n-paste and subclassing. I believe the changes are
backwards-compatible, with the exception of people who've
reimplemented build_opener()'s functionality -- those people would
need to call opener.add_handler(HTTPErrorProcessor).
The main change is allowing handlers to implement
methods like:
http_request(request)
http_response(request, response)
In addition to the usual
http_open(request)
http_error{_*}(...)
"
Note that the change isn't well documented at least in part because
handlers aren't well documented at all. Need to fix this.
Add a bunch of new tests. It appears that none of these tests
actually use the network, so they don't need to be guarded by a
resource flag.
|