summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* There's no need to default file to sys.stdout -- print(file=None) alreadyGuido van Rossum2007-05-221-2/+0
| | | | selects sys.stdout.
* The HTMLCalendar outputs bytes now, so fix the testWalter Dörwald2007-05-221-2/+4
| | | | accordingly (bytes.strip() always requires an argument).
* Remove have_unicode checks and merge those tests into theWalter Dörwald2007-05-227-200/+61
| | | | | normal code (or drop them if they only repeat previous tests).
* Remove unused import.Walter Dörwald2007-05-221-1/+1
|
* Remove tests for have_unicode.Walter Dörwald2007-05-221-7/+4
|
* The unicode builtin is gone now. Fix setup.py so thatWalter Dörwald2007-05-221-19/+6
| | | | unicodedata and the CJK codecs are built again.
* Make test_zipfile pass.Guido van Rossum2007-05-224-146/+177
| | | | | | | | | | The zipfile module now does all I/O in binary mode using bytes. (Maybe we should support wrapping a TextIOWrapper around it when text mode reading is requested?) Even the password is a bytes array now. Had to fix py_compile.py to use bytes while I was at it. The _struct needed a patch to support bytes, str8 and str for the 's' and 'p' formats.
* linecache.py was still struggling with unicode vs. non-unicode.Guido van Rossum2007-05-221-2/+3
|
* Oops. unicode() builtin was still around.Guido van Rossum2007-05-221-1/+0
|
* Sockets facelift. APIs that could return binary data (e.g. aton() andGuido van Rossum2007-05-215-516/+200
| | | | | | | | | recv()) now return bytes, not str or str8. The socket.py code is redone; it now subclasses _socket.socket and instead of having its own _fileobject for makefile(), it uses io.SocketIO. Some stuff in io.py was moved around to make this work. (I really need to rethink my policy regarding readline() and read(-1) on raw files; and readline() on buffered files ought to use peeking(). Later.)
* Make test_format.py pass again (error messages have changed).Walter Dörwald2007-05-211-22/+6
| | | | | | Remove duplicate tests. Test str and str8 in test_both().
* Make test_repr.py pass again after repr(range(1)) changed.Guido van Rossum2007-05-211-1/+1
|
* Make test_inspect pass once again.Guido van Rossum2007-05-212-2/+3
|
* Update name of test.Walter Dörwald2007-05-211-1/+1
|
* Rename test_xrange.py to test_range.py and fix theWalter Dörwald2007-05-213-7/+4
| | | | type name in various spots.
* repr(range(10)) now returns 'range(0, 10)' for clarity.Walter Dörwald2007-05-212-11/+4
|
* Remove unused variables.Walter Dörwald2007-05-202-2/+1
|
* Add a few simple repr tests.Walter Dörwald2007-05-201-0/+5
|
* Change range_repr() to use %R for the start/stop/step attributes.Walter Dörwald2007-05-201-30/+6
|
* Add a format specifier %R to PyUnicode_FromFormat(), which embedsWalter Dörwald2007-05-1912-149/+125
| | | | | | | | | | | | the result of a call to PyObject_Repr() into the string. This makes it possible to simplify many repr implementations. PyUnicode_FromFormat() uses two steps to create the final string: A first pass through the format string determines the size of the final string and a second pass creates the string. To avoid calling PyObject_Repr() twice for each %R specifier, PyObject_Repr() is called during the size calculation step and the results are stored in an array (whose size is determined at the start by counting %R specifiers).
* Use test_support.unlink() instead of os.unlink().Guido van Rossum2007-05-181-4/+3
|
* Fix the cleanup so that we're not left with shelftemp.db.* files.Guido van Rossum2007-05-181-12/+10
| | | | This does nothing to fix the tests though...
* Make test_socket pass. There was an unchecked error when a UnicodeGuido van Rossum2007-05-182-24/+24
| | | | hostname was passed.
* Add functions PyUnicode_Append() and PyUnicode_AppendAndDel() that mirrorWalter Dörwald2007-05-1849-255/+385
| | | | | | | | | | | | | | | PyString_Concat() and PyString_ConcatAndDel() (the name PyUnicode_Concat() was already taken). Change PyObject_Repr() to always return a unicode object. Update all repr implementations to return unicode objects. Add a function PyObject_ReprStr8() that calls PyObject_Repr() and converts the result to an 8bit string. Use PyObject_ReprStr8() where using PyObject_Repr() can't be done straightforward.
* Add missing #define.Walter Dörwald2007-05-181-0/+1
|
* Fix test: u prefixes are gone now. Test 'a' and b'a' instead.Walter Dörwald2007-05-181-2/+1
|
* Add 'U'/'U#' format characters to Py_BuildValue (and thusWalter Dörwald2007-05-186-113/+376
| | | | | | | | | | | | | | to PyObject_CallFunction()) that take a char * (and a size in the case of 'U#') and create a unicode object out of it. Add functions PyUnicode_FromFormat() and PyUnicode_FromFormatV() that work similar to PyString_FromFormat(), but create a unicode object (also a %U format character has been added, that takes a PyObject *, which must point to a unicode object). Change the encoding and reason attributes of UnicodeEncodeError, UnicodeDecodeError and UnicodeTranslateError to be unicode objects.
* Revert last checkin: _PyUnicode_New() allocates spaceWalter Dörwald2007-05-181-1/+1
| | | | for one more character anyway.
* Allocate one more character, so that the terminatingWalter Dörwald2007-05-181-1/+1
| | | | nullbyte can be copied.
* Change some uses of cStringIO.StringIO to io.StringIO.Guido van Rossum2007-05-1819-89/+26
| | | | This is undoubtedly insufficient and in some cases just as broken as before.
* Protect abs__file__() from changes to sys.modules while it's running.Guido van Rossum2007-05-181-1/+1
|
* Make all the multibyte codec tests pass.Guido van Rossum2007-05-1710-1227/+1225
| | | | | | | | Changes to io.py, necessary to make this work: - Redid io.StringIO as a TextIOWrapper on top of a BytesIO instance. - Got rid of _MemoryIOMixin, folding it into BytesIO instead. - The read() functions that take -1 to mean "eveything" now also take None. - Added readline() support to BufferedIOBase. :-(
* Make test_codecs work. The CJK codecs now use bytes instead of str8 forGuido van Rossum2007-05-172-29/+32
| | | | their encoded input/output.
* Make test_new pass.Guido van Rossum2007-05-172-1/+6
|
* Make test_locale pass.Guido van Rossum2007-05-171-0/+1
| | | | XXX Should we just rip out this BSD Rune compatibility hack?
* Make test__locale pass. Stupid bug in the original code: used 'is' for '=='.Guido van Rossum2007-05-171-1/+1
|
* Allow encoding names to be unicode strings.Guido van Rossum2007-05-171-0/+5
|
* Fix tests for string encodings.Walter Dörwald2007-05-171-2/+2
|
* Merged revisions 55342-55406 via svnmerge fromGuido van Rossum2007-05-1750-5861/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r55360 | guido.van.rossum | 2007-05-15 14:57:59 -0700 (Tue, 15 May 2007) | 2 lines obcheckin. ........ r55361 | guido.van.rossum | 2007-05-15 14:59:18 -0700 (Tue, 15 May 2007) | 2 lines Get rid of strop module. ........ r55367 | brett.cannon | 2007-05-15 21:06:28 -0700 (Tue, 15 May 2007) | 2 lines Remove the 'pure' module. ........ r55369 | brett.cannon | 2007-05-15 21:07:31 -0700 (Tue, 15 May 2007) | 2 lines Remove the lib-old directory (already empty). ........ r55370 | neal.norwitz | 2007-05-15 21:30:40 -0700 (Tue, 15 May 2007) | 1 line Get rid of a bunch more references to strop ........ r55374 | brett.cannon | 2007-05-15 21:39:00 -0700 (Tue, 15 May 2007) | 2 lines Complete the removal of IRIX-specific modules. ........ r55379 | brett.cannon | 2007-05-15 22:31:54 -0700 (Tue, 15 May 2007) | 2 lines Update removed IRIX modules based on what is gone from removing plat-irix6. ........ r55388 | brett.cannon | 2007-05-16 14:34:52 -0700 (Wed, 16 May 2007) | 2 lines Clean up the docstring for the compiler resource. ........ r55406 | brett.cannon | 2007-05-17 11:05:37 -0700 (Thu, 17 May 2007) | 2 lines Remove BaseException.message (deprecated in Python 2.6). ........
* Fix io.StringIO for wide Python builds.Walter Dörwald2007-05-161-6/+11
|
* Fix io.StringIO: String are stored encoded (using "unicode-internal" as theWalter Dörwald2007-05-162-19/+33
| | | | | | | | | encoding) which makes the buffer mutable. Strings are encoded on the way in and decoded on the way out. Use io.StringIO in test_codecs.py. Fix the base64_codec test in test_codecs.py.
* Make test_subprocess pass. The subprocess module now reads and writesGuido van Rossum2007-05-152-27/+16
| | | | bytes instead of strings. We'll see how long that lasts.
* Make test_sys pass.Guido van Rossum2007-05-152-6/+5
|
* Make test_strop pass. (But shouldn't we kill strop?)Guido van Rossum2007-05-151-1/+1
|
* Make test_re pass.Guido van Rossum2007-05-151-14/+2
|
* It's ok for __hex__ or __oct__ to return unicode.Guido van Rossum2007-05-152-4/+3
| | | | Don't insist that float('1'*10000) raises an exception.
* Make test_fileio.py work.Guido van Rossum2007-05-151-1/+1
|
* Make test_str.py pass.Guido van Rossum2007-05-153-17/+15
|
* Make tset_float pass. float(<unicode>) was never very good -- it usedGuido van Rossum2007-05-152-22/+30
| | | | a fixed-length buffer of 256 bytes.
* Add what looks like a necessary call to PyErr_NoMemory() when PyMem_MALLOC()Guido van Rossum2007-05-151-1/+1
| | | | fails.