Bob Ippolito [Fri, 4 Aug 2006 23:59:21 +0000 (23:59 +0000)]
Fix #1530559, struct.pack raises TypeError where it used to convert.
Passing float arguments to struct.pack when integers are expected
now triggers a DeprecationWarning.
Fix the 'compiler' package to generate correct code for MAKE_CLOSURE.
In the 2.5 development cycle, MAKE_CLOSURE as changed to take free
variables as a tuple rather than as individual items on the stack.
Closes patch #1534084.
Neal Norwitz [Fri, 4 Aug 2006 05:09:28 +0000 (05:09 +0000)]
Bug #1333982: string/number constants were inappropriately stored
in the byte code and co_consts even if they were not used, ie
immediately popped off the stack.
Neal Norwitz [Fri, 4 Aug 2006 04:58:47 +0000 (04:58 +0000)]
Bug #1191458: tracing over for loops now produces a line event
on each iteration. I'm not positive this is the best way to handle
this. I'm also not sure that there aren't other cases where
the lnotab is generated incorrectly. It would be great if people
that use pdb or tracing could test heavily.
Also:
* Remove dead/duplicated code that wasn't used/necessary
because we already handled the docstring prior to entering the loop.
* add some debugging code into the compiler (#if 0'd out).
Thomas Heller [Wed, 2 Aug 2006 11:35:31 +0000 (11:35 +0000)]
A few nore words about what ctypes does.
Document that using the wrong calling convention can also raise
'ValueError: Procedure called with the wrong number of arguments'.
Neal Norwitz [Wed, 2 Aug 2006 06:46:21 +0000 (06:46 +0000)]
Patch #1519025 and bug #926423: If a KeyboardInterrupt occurs during
a socket operation on a socket with a timeout, the exception will be
caught correctly. Previously, the exception was not caught.
Tim Peters [Wed, 2 Aug 2006 05:20:08 +0000 (05:20 +0000)]
_Stream.close(): Try to kill struct.pack() warnings when
writing the crc to file on the "PPC64 Debian trunk" buildbot
when running test_tarfile.
This is again a case where the native zlib crc is an unsigned
32-bit int, but the Python wrapper implicitly casts it to
signed C long, so that "the sign bit looks different" on
different platforms.
Tim Peters [Wed, 2 Aug 2006 04:12:36 +0000 (04:12 +0000)]
Try to squash struct.pack warnings on the "amd64 gentoo trunk"
buildbot (& possibly other 64-bit boxes) during test_gzip.
The native zlib crc32 function returns an unsigned 32-bit integer,
which the Python wrapper implicitly casts to C long. Therefore the
same crc can "look negative" on a 32-bit box but "look positive" on
a 64-bit box. This patch papers over that platform difference when
writing the crc to file.
It may be better to change the Python wrapper, either to make
the result "look positive" on all platforms (which means it may
have to return a Python long at times on a 32-bit box), or to
keep the sign the same across boxes. But that would be a visible
change in what users see, while the current hack changes no
visible behavior (well, apart from stopping the struct deprecation
warning).
Note that the module-level write32() function is no longer used.
Ronald Oussoren [Tue, 1 Aug 2006 21:00:57 +0000 (21:00 +0000)]
This fixes bug #1527397: PythonLauncher runs scripts with the wrong working
directory. It also fixes a bug where PythonLauncher failed to launch scripts
when the scriptname (or the path to the script) contains quotes.
[Patch #1520905] Attempt to suppress core file created by test_subprocess.py.
Patch by Douglas Greiman.
The test_run_abort() testcase produces a core file on Unix systems,
even though the test is successful. This can be confusing or alarming
to someone who runs 'make test' and then finds that the Python
interpreter apparently crashed.
[Bug #1514540] Instead of putting the standard types in a section, put them in a chapter of their own. This means string methods will now show up in the ToC. (Should the types come before or after the functions+exceptions+constants chapter? I've put them after, for now.)
Is the explanation of the 'stacklevel' parameter clear? Please feel free
to edit it.
I don't have LaTeX installed on this machine, so haven't verified that the
markup is correct. Will check tonight, or maybe the automatic doc build will
tell me.
Tim Peters [Mon, 31 Jul 2006 02:53:03 +0000 (02:53 +0000)]
ZipFile.close(): Kill the other struct.pack deprecation
warning on Windows.
Afraid I can't detect a pattern to when the pack formats decide
to use a signed or unsigned format code -- appears nearly
arbitrary to my eyes. So I left all the pack formats alone and
changed the special-case data values instead.
Add PyErr_WarnEx() so C code can pass the stacklevel to warnings.warn().
This provides the proper warning for struct.pack().
PyErr_Warn() is now deprecated in favor of PyErr_WarnEx().
As mentioned by Tim Peters on python-dev.
Fred Drake [Sun, 30 Jul 2006 05:49:49 +0000 (05:49 +0000)]
remove possibly-outdated comment on what GUI toolkit is most commonly used;
it is hard to know whether this is right, and it does not add valuable reference information
at any rate
Add a comment to the csv reader documentation that explains why the
treatment of newlines changed in 2.5. Pulled almost verbatim from a comment
by Andrew McNamara in <http://python.org/sf/1465014>.
Fred Drake [Sat, 29 Jul 2006 20:04:42 +0000 (20:04 +0000)]
SF bug #1193966: Weakref types documentation misplaced
The information about supporting weakrefs with types defined in C extensions
is moved to the Extending & Embedding manual. Py_TPFLAGS_HAVE_WEAKREFS is
no longer mentioned since it is part of Py_TPFLAGS_DEFAULT.
[Patch #1490989 from Skip Montanaro] Mention debugging builds in the API documentation. I've changed Skip's patch to point to Misc/SpecialBuilds and fiddled with the markup a bit.