| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Add test for file.readinto().
|
| |
|
| |
|
|
|
|
| |
Bugfix candidate.
|
|
|
|
|
|
| |
under 2.0, 2.1 and 2.2.
Bugfix candidate.
|
| |
|
|
|
|
| |
methods in dict-proxy objects.
|
|
|
|
|
|
|
|
|
|
| |
This fixes the symptom, but PRINT_ITEM has no way to know what (if
anything) PyFile_WriteObject() writes unless the object being printed
is a string. When the object isn't a string, this fix retains the
guess that softspace should be set after PyFile_WriteObject().
We might want to say that it's the job of filelike-object write methods
to leave the file's softspace in the correct state. That would probably
be better -- but everyone relies on PRINT_ITEM to guess for them now.
|
| |
|
| |
|
|
|
|
| |
Closes SF patch 494871.
|
|
|
|
| |
converted to use unittest
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
One more time on this turkey, but duller instead of cleverer.
Curious: The docs say __getslice__ has been deprecated since 2.0, but
list.__getitem__ still doesn't work if you pass it a slice. This makes
it a lot clearer to emulate a list by *being* a list <wink>.
Bugfix candidate. Michael, just pile this patch on top of the others
that went by -- no need to try to pick these apart.
|
| |
|
|
|
|
| |
is "ignore". Fixes #529104.
|
|
|
|
| |
[ 516299 ] urlparse can get fragments wrong
|
|
|
|
|
|
|
|
|
|
|
| |
The proper fix is not quite what was submitted; it's really better to
take the class of the object passed rather than calling PyMethod_New
with NULL pointer args, because that can then cause other core dumps
later.
I also added a testcase for the fix to classmethods() in test_descr.py.
I've already applied this to the 2.2 branch.
|
| |
|
|
|
|
| |
add test case for bug #482460
|
|
|
|
|
|
| |
realloc slowdown. Some tests with shorter expressions lead me to the conclusion that it will eventually finish, but it may take a few weeks:-)
2.2.1 candidate.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
As promised in my response to the bug report, I'm not really fixing
it; in fact, one could argule over what the proper fix should do.
Instead, I'm adding a little magic that raises TypeError if you try to
pickle an instance of a class that has __slots__ but doesn't define or
override __getstate__. This is done by adding a bozo __getstate__
that always raises TypeError.
Bugfix candidate (also the checkin to typeobject.c, of course).
|
|
|
|
| |
Bugfix candidate.
|
|
|
|
|
|
|
|
|
|
|
|
| |
and (b) stop trying to prevent file growth.
Beef up the file.truncate() docs.
Change test_largefile.py to stop assuming that f.truncate() moves the
file pointer to the truncation point, and to verify instead that it leaves
the file position alone. Remove the test for what happens when a
specified size exceeds the original file size (it's ill-defined, according
to the Single Unix Spec).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dropping MS's inadequate _chsize() function. This was inspired by
SF patch 498109 ("fileobject truncate support for win32"), which I
rejected.
libstdtypes.tex: Someone who knows should update the availability
blurb. For example, if it's available on Linux, it would be good to
say so.
test_largefile: Uncommented the file.truncate() tests, and reworked to
do more. The old comment about "permission errors" in the truncation
tests under Windows was almost certainly due to that the file wasn't open
for *write* access at this point, so of course MS wouldn't let you
truncate it. I'd be appalled if a Unixish system did.
CAUTION: Someone should run this test on Linux (etc) too. The
truncation part was commented out before. Note that test_largefile isn't
run by default.
|
|
|
|
|
|
|
| |
Adapter from SF patch 528038; fixes SF bug 527816.
The wrapper for __nonzero__ should be wrap_inquiry rather than
wrap_unaryfunc, since the slot returns an int, not a PyObject *.
|
|
|
|
|
|
| |
There's no actual patch there. It's an objection that Guido's example
doesn't actually generator "leaves", so change the comment that says
it does.
|
|
|
|
|
| |
It seems that the new class HTTP11 in httplib.test() isn't
discoverable by pyclbr, which causes this test to fail.
|
| |
|
|
|
|
|
|
|
|
|
| |
mmap_find_method(): this obtained the string to find via s#, but it
ignored its length, acting as if it were \0-terminated instead.
Someone please run on Linux too (the extended test_mmap works on Windows).
Bugfix candidate.
|
|
|
|
|
|
| |
[ 526039 ] devious code can crash structseqs
Bugfix candidate.
|
|
|
|
|
|
|
|
| |
(the types come from different modules on different platforms).
Added tests for pickling these types.
May be a bugfix candidate.
|
|
|
|
|
|
|
|
| |
[ 496873 ] structseqs unpicklable
by adding a __reduce__ method to structseqs.
Will also commit this to the 2.2.1 branch momentarily.
|
|
|
|
| |
when no arguments are passed
|
|
|
|
|
|
| |
copy the sign too. Added a test to test_descr to ensure that it does.
Bugfix candidate.
|
|
|
|
|
|
|
|
|
|
| |
Due to the bizarre definition of _PyLong_Copy(), creating an instance
of a subclass of long with a negative value could cause core dumps
later on. Unfortunately it looks like the behavior of _PyLong_Copy()
is quite intentional, so the fix is more work than feels comfortable.
This fix is almost, but not quite, the code that Naofumi Honda added;
in addition, I added a test case.
|
|
|
|
|
|
| |
- make array.array a type
- add Py_UNICODE arrays
- support +=, *=
|
|
|
|
|
|
|
| |
- Use substring search, not re search for user-agent and paths.
- Consider * entry last. Unquote, then requote URLs.
- Treat empty Disallow as "allow everything".
Add test cases. Fixes #523041
|
|
|
|
|
|
| |
There were never tests for the fact that list() always returns a *new*
list object, even when the argument is a list, while tuple() may
return a reference to the argument when it is a tuple. Now there are.
|
|
|
|
|
|
|
|
|
|
|
| |
Lib/
os.py
os2emxpath.py // added - OS/2 EMX specific path manipulation routines
popen2.py
site.py
Lib/test/
test_fcntl.py
test_longexp.py
|
|
|
|
|
| |
run the test suite afterwards. Either that, or whether '__doc__' shows
up is platform-dependent!
|
| |
|
|
|
|
|
|
|
|
| |
Fix exit races in test_thread.py and test_threaded_import.py.
I suspect the bug is provokable only under Linux (where child threads
seem to get lots of cycles before they get killed after the main thread
exits), or on multi-processor machines running other OSes.
Bugfix candidate.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix for the UTF-8 decoder: it will now accept isolated surrogates
(previously it raised an exception which causes round-trips to
fail).
Added new tests for UTF-8 round-trip safety (we rely on UTF-8 for
marshalling Unicode objects, so we better make sure it works for
all Unicode code points, including isolated surrogates).
Bumped the PYC magic in a non-standard way -- please review. This
was needed because the old PYC format used illegal UTF-8 sequences
for isolated high surrogates which now raise an exception.
|