Two itimer tests and an interprocess signal test fail on FreeBSD 6 if
any test that starts a thread runs before test_signal. Since FreeBSD7
does not show this behavior, the bug is most likely a platform bug,
so this patch just skips the failing tests on freebsd6.
Instead of spaces between the filename and date (or whatever the string
is that follows the filename, if any) use tabs. This is what the unix
'diff' command does, for example, and difflib was intended to follow
the 'standard' way of doing diffs. This improves compatibility with
patch tools. The docs and examples are also changed to recommended that
the date format used be the ISO 8601 format, which is what modern diff
tools emit by default.
Patch by Anatoly Techtonik.
Fixed a typo in the email.encoders module so that messages output using
an ISO-2022 character set will use a content-transfer-encoding of
7bit consistently. Previously if the input data had any eight bit
characters the output data would get marked as 8bit even though it
was actually 7bit.
* PyCObject_AsVoidPtr() can now open capsules. This addresses
most of the remaining backwards-compatibility concerns about
the conversion of Python 2.7 from CObjects to capsules.
* CObjects were marked Pending Deprecation.
* Documentation about this pending deprecation was added to
cobject.h.
* The capsule source files were added to the legacy PC build
processes.
Also rewrite the Decimal __hash__ method so that it doesn't rely on
float('inf') being valid: float('inf') could raise an exception on
platforms not using IEEE 754 arithmetic.
Float to decimal comparison operations now return a result based on
the numeric values of the operands. Decimal.__hash__ has also been
fixed so that Decimal and float values that compare equal have equal
hash value.
argument `-` which tells it to read files to compile from stdin. Each line
is read on demand and the named file is compiled immediately. (Original
patch by Piotr Ożarowski).
-- Diese und die folgenden Zeilen werden ignoriert --
M Misc/NEWS
A Modules/_ctypes/libffi/m4
A Modules/_ctypes/libffi/m4/ltsugar.m4
A Modules/_ctypes/libffi/m4/libtool.m4
A Modules/_ctypes/libffi/m4/ltversion.m4
A Modules/_ctypes/libffi/m4/lt~obsolete.m4
A Modules/_ctypes/libffi/m4/ltoptions.m4
A Modules/_ctypes/libffi/ChangeLog.libffi
M Modules/_ctypes/libffi/configure
M Modules/_ctypes/libffi/Makefile.in
M Modules/_ctypes/libffi/fficonfig.h.in
M Modules/_ctypes/libffi/src/arm/sysv.S
M Modules/_ctypes/libffi/src/powerpc/ffitarget.h
M Modules/_ctypes/libffi/src/powerpc/aix.S
M Modules/_ctypes/libffi/src/powerpc/ffi.c
M Modules/_ctypes/libffi/src/powerpc/sysv.S
M Modules/_ctypes/libffi/src/powerpc/ffi_darwin.c
M Modules/_ctypes/libffi/src/powerpc/aix_closure.S
A Modules/_ctypes/libffi/src/closures.c
D Modules/_ctypes/libffi/src/darwin/ffitarget.h
M Modules/_ctypes/libffi/src/sh64/ffi.c
M Modules/_ctypes/libffi/src/sh64/sysv.S
M Modules/_ctypes/libffi/src/x86/ffi64.c
M Modules/_ctypes/libffi/src/x86/ffitarget.h
M Modules/_ctypes/libffi/src/x86/win32.S
M Modules/_ctypes/libffi/src/x86/darwin.S
M Modules/_ctypes/libffi/src/x86/ffi.c
M Modules/_ctypes/libffi/src/x86/sysv.S
A Modules/_ctypes/libffi/src/x86/win64.S
M Modules/_ctypes/libffi/src/x86/unix64.S
A Modules/_ctypes/libffi/src/types.c
A Modules/_ctypes/libffi/src/avr32
A Modules/_ctypes/libffi/src/avr32/ffitarget.h
A Modules/_ctypes/libffi/src/avr32/ffi.c
A Modules/_ctypes/libffi/src/avr32/sysv.S
M Modules/_ctypes/libffi/src/frv/ffi.c
M Modules/_ctypes/libffi/src/s390/sysv.S
M Modules/_ctypes/libffi/src/pa/ffi.c
A Modules/_ctypes/libffi/src/raw_api.c
A Modules/_ctypes/libffi/src/java_raw_api.c
A Modules/_ctypes/libffi/src/debug.c
M Modules/_ctypes/libffi/src/sparc/ffi.c
M Modules/_ctypes/libffi/src/sparc/v8.S
M Modules/_ctypes/libffi/src/mips/ffitarget.h
M Modules/_ctypes/libffi/src/mips/n32.S
M Modules/_ctypes/libffi/src/mips/o32.S
M Modules/_ctypes/libffi/src/mips/ffi.c
A Modules/_ctypes/libffi/src/dlmalloc.c
M Modules/_ctypes/libffi/src/sh/ffi.c
M Modules/_ctypes/libffi/src/sh/sysv.S
AM Modules/_ctypes/libffi/depcomp
AM Modules/_ctypes/libffi/compile
M Modules/_ctypes/libffi/config.guess
AM Modules/_ctypes/libffi/ltmain.sh
M Modules/_ctypes/libffi/config.sub
AM Modules/_ctypes/libffi/mdate-sh
M Modules/_ctypes/libffi/configure.ac
A Modules/_ctypes/libffi/doc
A Modules/_ctypes/libffi/doc/libffi.texi
A Modules/_ctypes/libffi/doc/stamp-vti
A Modules/_ctypes/libffi/doc/libffi.info
A Modules/_ctypes/libffi/doc/version.texi
A Modules/_ctypes/libffi/texinfo.tex
A Modules/_ctypes/libffi/man
A Modules/_ctypes/libffi/man/ffi_call.3
A Modules/_ctypes/libffi/man/Makefile.in
A Modules/_ctypes/libffi/man/ffi.3
A Modules/_ctypes/libffi/man/Makefile.am
A Modules/_ctypes/libffi/man/ffi_prep_cif.3
A Modules/_ctypes/libffi/ChangeLog.libgcj
M Modules/_ctypes/libffi/LICENSE
M Modules/_ctypes/libffi/include/ffi.h.in
M Modules/_ctypes/libffi/include/Makefile.in
M Modules/_ctypes/libffi/include/ffi_common.h
M Modules/_ctypes/libffi/include/Makefile.am
A Modules/_ctypes/libffi/libtool-version
A Modules/_ctypes/libffi/ChangeLog
A Modules/_ctypes/libffi/testsuite
A Modules/_ctypes/libffi/testsuite/Makefile.in
A Modules/_ctypes/libffi/testsuite/libffi.call
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_multi_ushort.c
A Modules/_ctypes/libffi/testsuite/libffi.call/stret_medium.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_uint16.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c
A Modules/_ctypes/libffi/testsuite/libffi.call/struct1.c
A Modules/_ctypes/libffi/testsuite/libffi.call/return_uc.c
A Modules/_ctypes/libffi/testsuite/libffi.call/struct3.c
A Modules/_ctypes/libffi/testsuite/libffi.call/nested_struct1.c
A Modules/_ctypes/libffi/testsuite/libffi.call/struct5.c
A Modules/_ctypes/libffi/testsuite/libffi.call/err_bad_abi.c
A Modules/_ctypes/libffi/testsuite/libffi.call/nested_struct3.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_7_1_byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/nested_struct5.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_double.c
A Modules/_ctypes/libffi/testsuite/libffi.call/struct7.c
A Modules/_ctypes/libffi/testsuite/libffi.call/return_sl.c
A Modules/_ctypes/libffi/testsuite/libffi.call/nested_struct7.c
A Modules/_ctypes/libffi/testsuite/libffi.call/struct9.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_sint.c
A Modules/_ctypes/libffi/testsuite/libffi.call/nested_struct9.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_pointer.c
A Modules/_ctypes/libffi/testsuite/libffi.call/many_win32.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_20byte1.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_multi_sshortchar.c
A Modules/_ctypes/libffi/testsuite/libffi.call/return_fl.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_sint64.c
A Modules/_ctypes/libffi/testsuite/libffi.call/many.c
A Modules/_ctypes/libffi/testsuite/libffi.call/strlen.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_3byte2.c
A Modules/_ctypes/libffi/testsuite/libffi.call/return_ldl.c
A Modules/_ctypes/libffi/testsuite/libffi.call/stret_large.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_multi_schar.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_multi_uchar.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_9byte1.c
A Modules/_ctypes/libffi/testsuite/libffi.call/err_bad_typedef.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_19byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_float.c
A Modules/_ctypes/libffi/testsuite/libffi.call/closure_fn1.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split.c
A Modules/_ctypes/libffi/testsuite/libffi.call/problem1.c
A Modules/_ctypes/libffi/testsuite/libffi.call/return_fl1.c
A Modules/_ctypes/libffi/testsuite/libffi.call/closure_fn3.c
A Modules/_ctypes/libffi/testsuite/libffi.call/return_dbl2.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_sshort.c
A Modules/_ctypes/libffi/testsuite/libffi.call/return_fl3.c
A Modules/_ctypes/libffi/testsuite/libffi.call/closure_fn5.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_double.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_2byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/promotion.c
A Modules/_ctypes/libffi/testsuite/libffi.call/nested_struct.c
A Modules/_ctypes/libffi/testsuite/libffi.call/float2.c
A Modules/_ctypes/libffi/testsuite/libffi.call/nested_struct10.c
A Modules/_ctypes/libffi/testsuite/libffi.call/return_ll1.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_4byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/float4.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_6byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_longdouble.c
A Modules/_ctypes/libffi/testsuite/libffi.call/huge_struct.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_8byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_multi_sshort.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_uint32.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_sint16.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_double_va.c
A Modules/_ctypes/libffi/testsuite/libffi.call/return_sc.c
A Modules/_ctypes/libffi/testsuite/libffi.call/float.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_20byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_float.c
A Modules/_ctypes/libffi/testsuite/libffi.call/struct2.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_pointer_stack.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_5_1_byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/struct4.c
A Modules/_ctypes/libffi/testsuite/libffi.call/nested_struct2.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_24byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/struct6.c
A Modules/_ctypes/libffi/testsuite/libffi.call/nested_struct4.c
A Modules/_ctypes/libffi/testsuite/libffi.call/closure_loc_fn0.c
A Modules/_ctypes/libffi/testsuite/libffi.call/struct8.c
A Modules/_ctypes/libffi/testsuite/libffi.call/nested_struct6.c
A Modules/_ctypes/libffi/testsuite/libffi.call/testclosure.c
A Modules/_ctypes/libffi/testsuite/libffi.call/nested_struct8.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_64byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/return_ul.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_uint.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_dbls_struct.c
A Modules/_ctypes/libffi/testsuite/libffi.call/strlen_win32.c
A Modules/_ctypes/libffi/testsuite/libffi.call/pyobjc-tc.c
A Modules/_ctypes/libffi/testsuite/libffi.call/stret_large2.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_multi_ushortchar.c
A Modules/_ctypes/libffi/testsuite/libffi.call/return_dbl.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_schar.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_uchar.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_uint64.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_ulonglong.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_1_1byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/return_ll.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_3_1byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_12byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_4_1byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_3byte1.c
A Modules/_ctypes/libffi/testsuite/libffi.call/ffitest.h
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_6_1_byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_16byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_18byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/closure_fn0.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_9byte2.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_longdouble_va.c
A Modules/_ctypes/libffi/testsuite/libffi.call/return_dbl1.c
A Modules/_ctypes/libffi/testsuite/libffi.call/closure_fn2.c
A Modules/_ctypes/libffi/testsuite/libffi.call/closure_stdcall.c
A Modules/_ctypes/libffi/testsuite/libffi.call/return_fl2.c
A Modules/_ctypes/libffi/testsuite/libffi.call/stret_medium2.c
A Modules/_ctypes/libffi/testsuite/libffi.call/closure_fn4.c
A Modules/_ctypes/libffi/testsuite/libffi.call/negint.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_ushort.c
A Modules/_ctypes/libffi/testsuite/libffi.call/call.exp
A Modules/_ctypes/libffi/testsuite/libffi.call/closure_fn6.c
A Modules/_ctypes/libffi/testsuite/libffi.call/float1.c
A Modules/_ctypes/libffi/testsuite/libffi.call/float3.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_5byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_7byte.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_pointer.c
A Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_sint32.c
A Modules/_ctypes/libffi/testsuite/config
A Modules/_ctypes/libffi/testsuite/config/default.exp
A Modules/_ctypes/libffi/testsuite/lib
A Modules/_ctypes/libffi/testsuite/lib/target-libpath.exp
A Modules/_ctypes/libffi/testsuite/lib/wrapper.exp
A Modules/_ctypes/libffi/testsuite/lib/libffi-dg.exp
A Modules/_ctypes/libffi/testsuite/Makefile.am
A Modules/_ctypes/libffi/testsuite/libffi.special
A Modules/_ctypes/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc
A Modules/_ctypes/libffi/testsuite/libffi.special/unwindtest.cc
A Modules/_ctypes/libffi/testsuite/libffi.special/special.exp
A Modules/_ctypes/libffi/testsuite/libffi.special/ffitestcxx.h
M Modules/_ctypes/libffi/README
A Modules/_ctypes/libffi/libffi.pc.in
M Modules/_ctypes/libffi/Makefile.am
M Modules/_ctypes/libffi/missing
A Modules/_ctypes/libffi/ChangeLog.v1
M Modules/_ctypes/libffi/aclocal.m4
M Modules/_ctypes/libffi.diff
set to an non existent program name and Python is unable to retrieve the real
program name.
Fix also sysconfig: if sys.executable is an empty string, use the current
working directory.
(SIGINT). If an error occurs while importing the site module, the error is
printed and Python exits. Initialize the GIL before importing the site
module.
base64 transfer-encoded payload *after* decoding it; it no longer does.
email had a special method in utils, _bdecode, specifically to do this,
so it must have served a purpose at some point, yet it is clearly wrong
per RFC. Fixed with Barry's approval, but no backport. Email package
minor version number is bumped, now version 4.0.1.
Patch by Joaquin Cuenca Abela.
code using struct.pack, attempt to convert to an integer first using
the argument's __int__ method (if present). Also raise a
DeprecationWarning for any such usage of __int__.
This fixes a regression from 2.6, where some (but not all) integer
conversion codes already used __int__.
Docs still need some updating to make getopt and optparse match the wording promised in the PEP.
There are also probably a number of :class:ArgumentParser etc. links that could be added to the argparse documentation.
MutableMapping, and thereby lost functionality because the replacement
functionality was implemented incorrectly or incompletely). Since bsddb
isn't in py3k, this patch just goes back to using DictMixin in order to
correct the regression.
Noted by Joseph Armbruster; patch by Jessica McKellar.
The original code was 'for (;;) {...}', where ... ended
with a 'return -2' statement and did not contain a 'break' or 'continue'
statement. Therefore, the body of the loop is always executed once.
Once upon a time there was a 'continue' in the loop, but it was removed in
rev36346, committed by mwh on Wed Jul 7 17:44:12 2004.
message/rfc822 it turns it into an object whose body consists of
a list containing a single Message object. HeaderParser, on the
other hand, just copies the body as a string. Generator.flatten
has a special handler for the message mime type that expected the
body to be the one item list. This fails if the message was parsed
by HeaderParser. So we now check to see if the body is a string
first, and if so just we just emit it.
of the 'canonical' and 'is_canonical' methods) now consistently accept
integer arguments wherever a Decimal instance is accepted. Thanks
Juan José Conti for the patch.
writeback=True values are written to the backing store when assigned to
the shelf. Add test to confirm that this happens. Doc patch and added
test by Robert Lehmann. I also fixed the cross references to the sync
and close methods.
close method refers to an identifier in the global module namespace.
This means that when __del__ is called during interpreter shutdown (if,
for example, the calling program still has a pointer to the shelf),
sometimes that global identifier would wind up being None, causing
mysterious 'ignored' exceptions. This patch checks for the possible None
value first before using the global, thus avoiding the error messages.
in XML processing instructions and comments. These raw characters are
allowed by the XML specification, and are necessary when outputting e.g.
PHP code in a processing instruction. Patch by Neil Muller.
and read operations on write-only file objects. On Windows, the system C
library would return a bogus result; on Solaris, it was possible to crash
the interpreter. Patch by Stefan Krah.
In Python 2.x, exceptions in finally blocks are not normalized. Since with
statements are implemented using finally blocks, ceval.c had to be tweaked to
distinguish between with finally blocks and normal ones.
A test for the finalization of generators containing with statements was also
added.
specified, rather than fall through to AF_PACKET (in the `socket` module).
Also, raise ValueError rather than TypeError when an unknown TIPC address
type is specified. Patch by Brian Curtin.
file position when calling `truncate()`. It would previously change the
file position to the given argument, which goes against the tradition of
ftruncate() and other truncation APIs. Patch by Pascal Chambon.
:class:`zipfile.ZipExtFile` class used to represent files stored inside
an archive. The new implementation is significantly faster and can
be wrapped in a :class:`io.BufferedReader` object for more speedups.
It also solves an issue where interleaved calls to `read()` and
`readline()` give wrong results. Patch by Nir Aides.
private memory allocation scheme in dtoa.c, along with a piece of code
that caches powers of 5 for future use. This makes it easier to
detect dtoa.c memory leaks with Valgrind or similar tools.
Patch by Stefan Krah.
- Issue #7714: Use ``gcc -dumpversion`` to detect the version of GCC on
MacOSX.
- Make configure look for util.h as well as libutil.h. The former
is the header file that on OSX contains the defition of openpty.
(Needed to compile for OSX 10.4 on OSX 10.6)
- Use the correct definition of CC to compile the pythonw executable
could crash in many places because of the PyByteArray_AS_STRING() macro
returning NULL. The macro now returns a statically allocated empty
string instead.
Also remove some now unused variables, and add comments clarifying the
possible outputs of the parsing section of _Py_dg_strtod. Thanks
Eric Smith for reviewing.
headers in multipart/signed MIME parts, which fixes one of the sources of
invalid modifications to such parts by Generator. Patch and tests by
Martin von Gagern.
Py3K warnings are DeprecationWarning by default this was causing -3 to
essentially be a no-op. Now DeprecationWarning is only silenced if -3 is not
used.
Closes issue #7700. Thanks Ezio Melotti and Florent Xicluna for patch help.
This was originally suggested by Guido, discussed on the stdlib-sig mailing
list, and given the OK by Guido directly to me. What this change essentially
means is that Python has taken a policy of silencing warnings that are only
of interest to developers by default. This should prevent users from seeing
warnings which are triggered by an application being run against a new
interpreter before the app developer has a chance to update their code.
Closes issue #7319. Thanks to Antoine Pitrou, Ezio Melotti, and Brian Curtin
for helping with the issue.
renaming of `cPickle` to `pickle`. The warning was annoying since there's
no alternative to cPickle if you care about performance. Patch by Florent
Xicluna.
binaries running clean prereq after checkout.
1. So, fix the insane make call in build.sh - seems to solve it.
2. Fix a missing redirection.
3. Check in the rsync opts that actually work during upload.
to integer PyArg_Parse* format codes into a TypeError. Add a
DeprecationWarning for floats passed with the 'L' format code, which
didn't previously have a warning.
The previous implementation used execv(2) to run the real interpreter, which means that
you cannot use the arch(1) tool to select the architecture you want to use for a
universal build because that only affects the python/pythonw wrapper and not the actual
interpreter.
The new version uses posix_spawnv with a number of OSX-specific options that ensure that
the real interpreter is started using the same CPU architecture as the wrapper, and that
means that 'arch -ppc python' now actually works.
I've also changed the way that the wrapper looks for the framework: it is now linked to
the framework rather than hardcoding the framework path. This should make it easier to
provide pythonw support in tools like virtualenv.
self-test. Because of a change to the way tracebacks are printed,
this self-test was failing. The test is run (and passes) during normal
regression testing. So instead of running the failing self-test this
patch makes doctest emit a usage message. This is better behavior anyway
since passing in arguments is the real reason to run doctest as a command.
Bug discovery and initial patch by Florent Xicluna.
any errors that might occur during coercion of the left operand and
turning them into a TypeError with a message text that was confusing in
the given context. This patch lets any errors through, as was already
done during coercion of the right hand side.
This is for consistency with imitation file objects like StringIO and BytesIO.
This commit also adds a few tests, where they were lacking for concerned
methods.
default.
TarFile's errorlevel argument controls how errors are
handled that occur during extraction. There are three
possible levels 0, 1 and 2. If errorlevel is set to 1 or 2
fatal errors (e.g. a full filesystem) are raised as
exceptions. If it is set to 0, which is the default value,
extraction errors are suppressed, and error messages are
written to the debug log instead. But, if the debug log is
not activated, which is the default as well, all these
errors go unnoticed.
The original intention was to imitate GNU tar which tries
to extract as many members as possible instead of stopping
on the first error. It turns out that this is no good
default behaviour for a tar library. This patch simply
changes the default value for the errorlevel argument from
0 to 1, so that fatal extraction errors are raised as
EnvironmentError exceptions.
missing proper end-of-line termination. Patch and tests by
Scott Dial. The new tests include a test harness which will
make it easier to add additional tests.
`storbinary()` method of FTP and FTP_TLS objects gains an optional `rest`
argument. Patch by Pablo Mouzo.
(note: the patch also adds a test for the rest argument in retrbinary())
(Note that an empty archive is not the same as an empty file. An
empty archive contains no members and is correctly terminated with an
EOF block full of zeros. An empty file contains no data at all.)
The problem was that although tarfile was able to create empty
archives, it failed to open them raising a ReadError. On the other
hand, tarfile opened empty files without error in most read modes and
presented them as empty archives. (However, some modes still raised
errors: "r|gz" raised ReadError, but "r:gz" worked, "r:bz2" even
raised EOFError.)
In order to get a more fine-grained control over the various internal
error conditions I now split up the HeaderError exception into a
number of meaningful sub-exceptions. This makes it easier in the
TarFile.next() method to react to the different conditions in the
correct way.
The visible change in its behaviour now is that tarfile will open
empty archives correctly and raise ReadError consistently for empty
files.
On MacOSX 10.6 the CoreFoundation framework must be initialized on the main
thread, the constructor function in that framework will cause an SIGABRT when
it is called on any other thread.
Because a number of extension link (indirectly) to CoreFoundation and the
Python core itself didn't the interpreter crashed when importing some
extensions, such as _locale, on a secondary thread.
This fix ensures that Python is linked to CoreFoundation on OSX, which results
in the CoreFoundation constructor being called when Python is loaded. This
does not require code changes.
string <-> float conversions; this makes sure that the result of the round
operation is correctly rounded, and hence displays nicely using the new float
repr.
a connection with another process, rather than looping endlessly. The
default timeout is 20 seconds, which should be amply sufficient for
local connections.
unpickled. This fixes crashes under Windows when trying to run
test_multiprocessing in verbose mode.
Additionally, Test_TextTestRunner hadn't been enabled in test_unittest.
from a gcc inline assembler peculiarity. (gcc's "A" constraint
apparently means 'rax or rdx' in 64-bit mode, not edx:eax
or rdx:rax as one might expect.)