test_resource calls resource.setrlimit() to change the file size limits.
This fails on Cygwin, which supports setrlimit() and getrlimit(), just not
changing that particular setting. (The same would apply to any other
platform that has those functions but not that particular feature.)
Since getrlimit() works and setrlimit() can be used for other reasons, a
check for ValueError was added to that part of the test.
supported as the second argument. This has the same meaning as
for isinstance(), i.e. issubclass(X, (A, B)) is equivalent
to issubclass(X, A) or issubclass(X, B). Compared to isinstance(),
this patch does not search the tuple recursively for classes, i.e.
any entry in the tuple that is not a class, will result in a
TypeError.
This closes SF patch #649608.
This patch allows ZipFile.writestr() to be called with
an archive file name instead of a ZipInfo instance:
z = ZipFile("myarchive.zip", "w")
z.writestr("foo/baz/file.ext", data)
z.close()
I found the old writestr() method very inconvenient
for simple (but common) things.
If called with a file name instead of a ZipInfo
instance, the date_time is set to the current date/time,
which makes sense to me for anonymous data.
TARGET_API_MAC_OS8 (or !TARGET_API_MAC_CARBON) is gone. Also some
TARGET_API_MAC_OSX conditional code is gone, because it is no longer
used on OSX-only Python (only in MacPython-OS9).
The bug is a reference to co_first_lineno that should be
co_firstlineno. The only other substantial change is to speed up
localtrace_count() by avoiding *costly* calls to inspect module.
It's trivial to get the filename and lineno directly from the frame.
Otherwise, delete commented out debug code and reflow very long lines.
* rename oss_t to lad_t, Ladtype to OSSType,
* rename lad_*() methods to oss_*()
* rename lad_methods list to oss_methods
Patch and impetus supplied by Nicholas FitzRoy-Dale <wzdd@lardcave.net>.
Most of these patches are from Thomas Heller, with long lines folded
by Tim. The change to test_descr.py is from Guido. See the bug report.
Not a bugfix candidate -- METH_CLASS is new in 2.3.
attribute, and modify _munge_whitespace() to recognize Unicode strings
and use unicode_whitespace_trans to munge them. Still need to add a
test to make sure I've really fixed the bug.
this can result in significantly smaller files. All classes as well as the
open function now accept an optional binary parameter, which defaults to
False for backward compatibility. Added a small test suite, updated the
libref documentation (including documenting the exported classes and fixing
a few other nits) and added a note about the change to Misc/NEWS.