Neal Norwitz [Tue, 28 Aug 2007 06:29:09 +0000 (06:29 +0000)]
Apply this change from 2.6. Hopefully it doesn't cause a conflict.
I really want to test the buildbots. This change is necessary
to get the test to be more stable and not crash due to previous
processes exitting.
Guido van Rossum [Tue, 28 Aug 2007 03:29:45 +0000 (03:29 +0000)]
Patch # 1033 by Adam Hupp:
1) tempfile.TemporaryFile, NamedTemporaryFile, and SpooledTemporaryFile
now pass newline and encoding to the underlying io.open call.
2) test_tempfile is updated
3) test_csv is updated to use the new arguments.
Guido van Rossum [Tue, 28 Aug 2007 03:11:34 +0000 (03:11 +0000)]
Make test_cgi pass. I changed the internal file created by make_file()
to be a text file. (XXX It should use UTF-8 as the encoding.)
I also removed the unised 'binary' argument from the make_file() signature.
XXX I am under no illusion that this is now working; I're pretty sure
it would be more principled if it always read binary data. But that's
for someone who actually cares about this module.
Guido van Rossum [Mon, 27 Aug 2007 22:27:41 +0000 (22:27 +0000)]
Force test_xmlrpc to pass. I'm not happy with how I did this, but I don't
see a better way; the 'Binary' class is poorly specified so it's unclear
what behavior is relied upon.
Guido van Rossum [Mon, 27 Aug 2007 17:39:33 +0000 (17:39 +0000)]
Changes to io.py and socket.py by Christian Heimes.
- Replace all asserts by ValuleErrors or TypeErrors as appropriate.
- Add _checkReadable, _checkWritable methods; these check self.closed too.
- Add a test that everything exported by io.py exists, and is either
an exception or an IOBase instance (except for the open function).
- Default buffering to 1 if isatty() (I had to tweak this to enforce
the *default* bit -- GvR).
Neal Norwitz [Mon, 27 Aug 2007 03:22:50 +0000 (03:22 +0000)]
This adds a leak, but fixes a crash. The leaking code is:
"{0:.{precision}s}".format('hello world', precision=5)
I pretty sure it's because of the 'precision' keyword.
Still need to investigate further.
Neal Norwitz [Sun, 26 Aug 2007 23:14:58 +0000 (23:14 +0000)]
Manually apply most of patch 1031 to try to get python to build on Windows.
I skipped the adding of libraries because it was harder and I'm less
confident about getting it right. Also I'm not sure why they are required
now and weren't required before.
Guido van Rossum [Sun, 26 Aug 2007 19:14:15 +0000 (19:14 +0000)]
Pass PyBUF_CHARACTER instead of PyBUF_SIMPLE to PyObject_GetBuffer().
This makes the failing tests (test_unicodedata and, on OSX, test_hashlib) pass.
XXX However, I'm not sure that this is the right thing to do;
this behavior means that Unicode strings are automatically hashed as their
UTF-8 encoding. Is that what we want?
Guido van Rossum [Sat, 25 Aug 2007 13:43:02 +0000 (13:43 +0000)]
Remove the email package for now.
Once Barry and the email-sig have a working new version
we'll add it back.
If it doesn't make the 3.0a deadline (release August 31), too bad.
Eric Smith [Sat, 25 Aug 2007 02:26:07 +0000 (02:26 +0000)]
Implementation of PEP 3101, Advanced String Formatting.
Known issues:
The string.Formatter class, as discussed in the PEP, is incomplete.
Error handling needs to conform to the PEP.
Need to fix this warning that I introduced in Python/formatter_unicode.c:
Objects/stringlib/unicodedefs.h:26: warning: `STRINGLIB_CMP' defined but not used
Need to make sure sign formatting is correct, more tests needed.
Need to remove '()' sign formatting, left over from an earlier version of the PEP.