Neal Norwitz [Thu, 15 Dec 2005 05:25:09 +0000 (05:25 +0000)]
Revert r41662 and the part of 41552 that originally caused the problem
(calling ftell(stdin) doesn't seem defined). So we won't test errors
from ftell unless we can do it portably.
Walter Dörwald [Wed, 14 Dec 2005 23:32:22 +0000 (23:32 +0000)]
If quopri uses the implementations from binascii do the tests a second time
using the Python implementations of the functions. This imcreases code
coverage and makes sure that both implementations do the same thing.
The .py files appear to have been checked in with Windows or inconsistent line
endings. The current check-in disrupts the 'svn blame', but hopefully it is
irrelevant for freshly imported code.
Armin Rigo [Wed, 14 Dec 2005 18:05:14 +0000 (18:05 +0000)]
When regenerating files like Python-ast.h, take care that the generated
comment based on 'sys.args[0]' does not depend on the path. For Python
builds from a remote directory ("/path/to/configure; make") the previous
logic used to include the "/path/to" portion in Python-ast.h. Then svn
would consider this file to be locally modified.
Fred Drake [Wed, 14 Dec 2005 06:20:35 +0000 (06:20 +0000)]
move the xml package implementation to xmlcore, and adjust the tests to
test that package, not the xmlcore/PyXML switcheroo fiasco in the xml
module/package
From a suggestion on c.l.py: modernize the introduction to the tutorial.
* Remove talk of shell scripting, replacing it by some more current examples
* Mention C++ and Java as well as C
Raymond H., please feel free to rewrite or revert as you see fit.
If the changes are OK, they could be backported to the 2.4-maint branch.
If a line had multiple semi-colons and ended with a semi-colon, we would
loop too many times and access a NULL node. Exit the loop early if
there are no more children.
Jeremy Hylton [Sat, 10 Dec 2005 18:50:16 +0000 (18:50 +0000)]
Add const to several API functions that take char *.
In C++, it's an error to pass a string literal to a char* function
without a const_cast(). Rather than require every C++ extension
module to put a cast around string literals, fix the API to state the
const-ness.
I focused on parts of the API where people usually pass literals:
PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type
slots, etc. Predictably, there were a large set of functions that
needed to be fixed as a result of these changes. The most pervasive
change was to make the keyword args list passed to
PyArg_ParseTupleAndKewords() to be a const char *kwlist[].
One cast was required as a result of the changes: A type object
mallocs the memory for its tp_doc slot and later frees it.
PyTypeObject says that tp_doc is const char *; but if the type was
created by type_new(), we know it is safe to cast to char *.
Hye-Shik Chang [Sat, 10 Dec 2005 17:44:27 +0000 (17:44 +0000)]
Patch #1276356: Implement new resource "urlfetch" for regrtest.
This enables even impatient people to run tests that require remote
files such as test_normalization and test_codecmaps_*.
[Bug #792570] Under Windows, socket.read() seems to run into trouble when
asked to read tens of megabytes of data. On my Mac, it hits MemoryErrors
when reading around 15Mb in one chunk. The fix is to read the body in several
parts, not as one big piece.
It would be nice to fix the underlying socket.read() problem, too.
Walter Dörwald [Fri, 25 Nov 2005 15:22:10 +0000 (15:22 +0000)]
SF patch #1364545: test_cmd_line.py relied on english error messages when
invoking the Python interpreter (which didn't work on non-english Windows
versions). Check return codes instead.
Neal Norwitz [Thu, 24 Nov 2005 23:28:37 +0000 (23:28 +0000)]
Fix typo in comment.
Delete globals which contain variable information at the end of the test.
This makes the test stable (no reported leaks) when running regrtest -R
to find reference leaks.
Neal Norwitz [Thu, 24 Nov 2005 22:00:56 +0000 (22:00 +0000)]
Move registration of the codec search function to the module scope
so it is only executed once. Otherwise the same search function is
repeated added to the codec search path when regrtest is run with -R
and leaks are reported.