]> granicus.if.org Git - python/log
python
18 years agoAllow encoding names to be unicode strings.
Guido van Rossum [Thu, 17 May 2007 18:56:39 +0000 (18:56 +0000)]
Allow encoding names to be unicode strings.

18 years agoFix tests for string encodings.
Walter Dörwald [Thu, 17 May 2007 18:35:58 +0000 (18:35 +0000)]
Fix tests for string encodings.

18 years agoMerged revisions 55342-55406 via svnmerge from
Guido van Rossum [Thu, 17 May 2007 18:20:34 +0000 (18:20 +0000)]
Merged revisions 55342-55406 via svnmerge from
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).
........

18 years agoFix io.StringIO for wide Python builds.
Walter Dörwald [Wed, 16 May 2007 12:53:48 +0000 (12:53 +0000)]
Fix io.StringIO for wide Python builds.

18 years agoFix io.StringIO: String are stored encoded (using "unicode-internal" as the
Walter Dörwald [Wed, 16 May 2007 12:47:53 +0000 (12:47 +0000)]
Fix io.StringIO: String are stored encoded (using "unicode-internal" as the
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.

18 years agoMake test_subprocess pass. The subprocess module now reads and writes
Guido van Rossum [Tue, 15 May 2007 23:18:55 +0000 (23:18 +0000)]
Make test_subprocess pass.  The subprocess module now reads and writes
bytes instead of strings.  We'll see how long that lasts.

18 years agoMake test_sys pass.
Guido van Rossum [Tue, 15 May 2007 22:32:02 +0000 (22:32 +0000)]
Make test_sys pass.

18 years agoMake test_strop pass. (But shouldn't we kill strop?)
Guido van Rossum [Tue, 15 May 2007 21:42:18 +0000 (21:42 +0000)]
Make test_strop pass.  (But shouldn't we kill strop?)

18 years agoMake test_re pass.
Guido van Rossum [Tue, 15 May 2007 21:39:58 +0000 (21:39 +0000)]
Make test_re pass.

18 years agoIt's ok for __hex__ or __oct__ to return unicode.
Guido van Rossum [Tue, 15 May 2007 21:32:59 +0000 (21:32 +0000)]
It's ok for __hex__ or __oct__ to return unicode.
Don't insist that float('1'*10000) raises an exception.

18 years agoMake test_fileio.py work.
Guido van Rossum [Tue, 15 May 2007 21:25:12 +0000 (21:25 +0000)]
Make test_fileio.py work.

18 years agoMake test_str.py pass.
Guido van Rossum [Tue, 15 May 2007 21:10:24 +0000 (21:10 +0000)]
Make test_str.py pass.

18 years agoMake tset_float pass. float(<unicode>) was never very good -- it used
Guido van Rossum [Tue, 15 May 2007 20:43:51 +0000 (20:43 +0000)]
Make tset_float pass.  float(<unicode>) was never very good -- it used
a fixed-length buffer of 256 bytes.

18 years agoAdd what looks like a necessary call to PyErr_NoMemory() when PyMem_MALLOC()
Guido van Rossum [Tue, 15 May 2007 20:39:12 +0000 (20:39 +0000)]
Add what looks like a necessary call to PyErr_NoMemory() when PyMem_MALLOC()
fails.

18 years agoKill two innocuous compiler warnings.
Guido van Rossum [Tue, 15 May 2007 20:37:11 +0000 (20:37 +0000)]
Kill two innocuous compiler warnings.

18 years agoObsubmit.
Guido van Rossum [Tue, 15 May 2007 20:34:04 +0000 (20:34 +0000)]
Obsubmit.

18 years agoFix the picklevalue test; it broke due to the change in default protocol.
Guido van Rossum [Tue, 15 May 2007 19:52:52 +0000 (19:52 +0000)]
Fix the picklevalue test; it broke due to the change in default protocol.

18 years agoMerged revisions 55328-55341 via svnmerge from
Guido van Rossum [Tue, 15 May 2007 18:46:22 +0000 (18:46 +0000)]
Merged revisions 55328-55341 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

........
  r55329 | brett.cannon | 2007-05-14 16:36:56 -0700 (Mon, 14 May 2007) | 3 lines

  Implement the removal of tuple parameter unpacking (PEP 3113).
  Thanks, Tony Lownds for the patch.
........
  r55331 | neal.norwitz | 2007-05-14 16:40:30 -0700 (Mon, 14 May 2007) | 1 line

  Update to use Python 3.0
........
  r55332 | brett.cannon | 2007-05-14 16:47:18 -0700 (Mon, 14 May 2007) | 2 lines

  Mention PEP 3113.  And thanks to Tony Lownds for the PEP 3113 patch.
........
  r55333 | neal.norwitz | 2007-05-14 16:57:06 -0700 (Mon, 14 May 2007) | 1 line

  Fix exception printing (no more exceptions module)
........
  r55334 | neal.norwitz | 2007-05-14 17:11:10 -0700 (Mon, 14 May 2007) | 1 line

  Remove popen* functions from os
........
  r55335 | neal.norwitz | 2007-05-14 18:03:38 -0700 (Mon, 14 May 2007) | 1 line

  Get rid of most of popen.  There are still some uses I need to cleanup.
........
  r55336 | neal.norwitz | 2007-05-14 21:11:34 -0700 (Mon, 14 May 2007) | 1 line

  Remove a few more remnants of the compiler package
........
  r55337 | neal.norwitz | 2007-05-14 22:28:27 -0700 (Mon, 14 May 2007) | 1 line

  Get test_[cx]pickle working on 64-bit platforms (avoid overflow int/long)
........

18 years agoMerged revisions 55325-55327 via svnmerge from
Guido van Rossum [Mon, 14 May 2007 22:51:27 +0000 (22:51 +0000)]
Merged revisions 55325-55327 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

................
  r55326 | guido.van.rossum | 2007-05-14 15:07:35 -0700 (Mon, 14 May 2007) | 2 lines

  Don't use err.message, use err.args[0].
................
  r55327 | guido.van.rossum | 2007-05-14 15:11:37 -0700 (Mon, 14 May 2007) | 259 lines

  Merged revisions 54988-55226,55228-55323 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r54995 | neal.norwitz | 2007-04-26 23:45:32 -0700 (Thu, 26 Apr 2007) | 3 lines

    This gets the test working on Solaris.  It seems a little hokey to me,
    but the test passed on Linux and Solaris, hopefully other platforms too.
  ........
    r55002 | georg.brandl | 2007-04-27 12:20:00 -0700 (Fri, 27 Apr 2007) | 2 lines

    Version fix (bug #1708710)
  ........
    r55021 | neal.norwitz | 2007-04-29 16:53:24 -0700 (Sun, 29 Apr 2007) | 1 line

    There really are some tests that are problematic.
  ........
    r55024 | kristjan.jonsson | 2007-04-30 08:17:46 -0700 (Mon, 30 Apr 2007) | 1 line

    Complete revamp of PCBuild8 directory.  Use subdirectories for each project under the main pcbuild solution.  Now make extensive use of property sheets to simplify project configuration. x64 build fully supported, and the process for building PGO version (Profiler Guided Optimization) simplified. All projects are now present, except _ssl, which needs to be reimplemented.  Also, some of the projects that require external libraries need extra work to fully compile on x64.
  ........
    r55025 | thomas.heller | 2007-04-30 08:44:17 -0700 (Mon, 30 Apr 2007) | 4 lines

    Make sure to call PyErr_NoMemory() in several places where
    PyMem_Malloc() could potentially fail.

    Will backport to the release25-maint branch.
  ........
    r55027 | thomas.heller | 2007-04-30 09:04:57 -0700 (Mon, 30 Apr 2007) | 8 lines

    When accessing the .value attribute of a c_wchar_p instance, and the
    instance does not point to a valid wchar_t zero-terminated string,
    raise a ValueError.  c_char_p does this already.

    The ValueError message now contains the correct pointer address.

    Will backport to release25-maint.
  ........
    r55036 | georg.brandl | 2007-04-30 23:04:11 -0700 (Mon, 30 Apr 2007) | 2 lines

    Bug #1710295: exceptions are now new-style classes.
  ........
    r55038 | georg.brandl | 2007-04-30 23:08:15 -0700 (Mon, 30 Apr 2007) | 2 lines

    Patch #1710352: add missing public functions to locale.__all__.
  ........
    r55041 | vinay.sajip | 2007-05-01 03:20:03 -0700 (Tue, 01 May 2007) | 1 line

    Added new optional credentials argument to SMTPHandler.__init__, and smtp.login() is now called in SMTPHandler.emit() if credentials are specified.
  ........
    r55042 | vinay.sajip | 2007-05-01 03:21:45 -0700 (Tue, 01 May 2007) | 1 line

    Added documentation for new optional credentials argument to SMTPHandler.__init__().
  ........
    r55070 | neal.norwitz | 2007-05-01 21:47:55 -0700 (Tue, 01 May 2007) | 3 lines

    Stop using PyMem_FREE while the GIL is not held.  For details see:
    http://mail.python.org/pipermail/python-dev/2007-May/072896.html
  ........
    r55080 | armin.rigo | 2007-05-02 12:23:31 -0700 (Wed, 02 May 2007) | 6 lines

    Fix for #1303614 and #1174712:
    - __dict__ descriptor abuse for subclasses of built-in types
    - subclassing from both ModuleType and another built-in types

    Thanks zseil for the patch.
  ........
    r55083 | georg.brandl | 2007-05-02 13:02:29 -0700 (Wed, 02 May 2007) | 3 lines

    Actually raise an exception before calling ast_error_finish.
    Triggers an assertion otherwise.
  ........
    r55087 | neal.norwitz | 2007-05-02 23:47:18 -0700 (Wed, 02 May 2007) | 1 line

    Handle a couple of uncaught errors.  This should be backported
  ........
    r55090 | neal.norwitz | 2007-05-03 00:20:57 -0700 (Thu, 03 May 2007) | 4 lines

    Remove dead code.  This code couldn't be reached because earlier in
    the function there is another check for z != Py_None.
  ........
    r55092 | thomas.heller | 2007-05-03 05:02:08 -0700 (Thu, 03 May 2007) | 1 line

    Fix building _ctypes.pyd for x64 / Windows.
  ........
    r55093 | thomas.heller | 2007-05-03 05:05:20 -0700 (Thu, 03 May 2007) | 1 line

    Don't truncate pointers to integers (on win64 platform).
  ........
    r55094 | walter.doerwald | 2007-05-03 08:13:55 -0700 (Thu, 03 May 2007) | 3 lines

    Clarify the behaviour of PyUnicode_DecodeUTF16(): A BOM is only skipped
    in native order mode, and only if it's the first two bytes.
  ........
    r55101 | kristjan.jonsson | 2007-05-03 13:04:53 -0700 (Thu, 03 May 2007) | 2 lines

    Fix pcbuild8 after recent overhaul:  Added the version resource to python26.dll. Adjust stacksize to 2Mb and made large address aware for 32 bits, and set stacksize to 3Mb for 64 bits.
    Todo:  Set .dll optimized load addresses, and side-by-side packaging of the python26.dll.
  ........
    r55102 | kristjan.jonsson | 2007-05-03 13:09:56 -0700 (Thu, 03 May 2007) | 1 line

    Fix those parts in the testsuite that assumed that sys.maxint would cause overflow on x64.  Now the testsuite is well behaved on that platform.
  ........
    r55103 | kristjan.jonsson | 2007-05-03 13:27:03 -0700 (Thu, 03 May 2007) | 11 lines

    Fix problems in x64 build that were discovered by the testsuite:
    - Reenable modules on x64 that had been disabled aeons ago for Itanium.
    - Cleared up confusion about compilers for 64 bit windows.  There is only Itanium and x64.  Added macros MS_WINI64 and MS_WINX64 for those rare cases where it matters, such as the disabling of modules above.
    - Set target platform (_WIN32_WINNT and WINVER) to 0x0501 (XP) for x64, and 0x0400 (NT 4.0) otherwise, which are the targeted minimum platforms.
    - Fixed thread_nt.h.  The emulated InterlockedCompareExchange function didn?\194?\180t work on x64, probaby due to the lack of a "volatile" specifier.  Anyway, win95 is no longer a target platform.
    - Itertools module used wrong constant to check for overflow in count()
    - PyInt_AsSsize_t couldn't deal with attribute error when accessing the __long__ member.
    - PyLong_FromSsize_t() incorrectly specified that the operand were unsigned.

    With these changes, the x64 passes the testsuite, for those modules present.
  ........
    r55107 | kristjan.jonsson | 2007-05-03 17:25:08 -0700 (Thu, 03 May 2007) | 1 line

    Revert compiler comment to AMD64 for x64/AMD64 builds.
  ........
    r55115 | thomas.heller | 2007-05-04 00:14:39 -0700 (Fri, 04 May 2007) | 4 lines

    Fix some ctypes test crashes, when running with a debug Python
    version on win64 by using proper argtypes and restype function
    attributes.
  ........
    r55117 | thomas.heller | 2007-05-04 01:20:41 -0700 (Fri, 04 May 2007) | 4 lines

    On 64-bit Windows, ffi_arg must be 8 bytes long.  This fixes the
    remaining crashes in the ctypes tests, when functions return float or
    double types.
  ........
    r55120 | kristjan.jonsson | 2007-05-04 08:48:15 -0700 (Fri, 04 May 2007) | 1 line

    Update the pcbuild8 solution.  Straightened out the _ctypes project by using a .vsproj file and a masm64.rules file to avoid redundancy
  ........
    r55121 | kristjan.jonsson | 2007-05-04 10:28:06 -0700 (Fri, 04 May 2007) | 1 line

    Minor fix of PCBuild8/_ctypes vcproj, moving include dir into the .vsprops file.
  ........
    r55129 | thomas.heller | 2007-05-04 12:54:22 -0700 (Fri, 04 May 2007) | 3 lines

    Do not truncate 64-bit pointers to 32-bit integers.

    Fixes SF #1703286, will backport to release25-maint.
  ........
    r55131 | thomas.heller | 2007-05-04 12:56:32 -0700 (Fri, 04 May 2007) | 1 line

    Oops, these tests do not run on Windows CE.
  ........
    r55140 | brett.cannon | 2007-05-04 18:34:02 -0700 (Fri, 04 May 2007) | 2 lines

    Deprecate BaseException.message as per PEP 352.
  ........
    r55154 | georg.brandl | 2007-05-05 11:55:37 -0700 (Sat, 05 May 2007) | 2 lines

    Bug #1713535: typo in logging example.
  ........
    r55158 | vinay.sajip | 2007-05-06 10:53:37 -0700 (Sun, 06 May 2007) | 1 line

    Updates of recent changes to logging.
  ........
    r55165 | neal.norwitz | 2007-05-07 00:02:26 -0700 (Mon, 07 May 2007) | 1 line

    Verify changes to the trunk go to the normal checkins list
  ........
    r55169 | kristjan.jonsson | 2007-05-07 09:46:54 -0700 (Mon, 07 May 2007) | 1 line

    As per Armin Rigo's suggestion, remove special handing from intobject.c to deal with the peculiarities of classobject's implementation of the number protocol.  The nb_long method of classobject now falls back to nb_int if there is no __long__ attribute present.
  ........
    r55197 | collin.winter | 2007-05-08 21:14:36 -0700 (Tue, 08 May 2007) | 9 lines

    Fix a bug in test.test_support.open_urlresource().

    If the call to requires() doesn't precede the filesystem check, we get the following situation:
    1. ./python Lib/test/regrtest.py test_foo # test needs urlfetch, not enabled, so skipped
    2. ./python Lib/test/regrtest.py -u urlfetch test_foo # test runs
    3. ./python Lib/test/regrtest.py test_foo # test runs (!)

    By moving the call to requires() *before* the filesystem check, the fact that fetched files are cached on the local disk becomes an implementation detail, rather than a semantics-changing point of note.
  ........
    r55198 | neal.norwitz | 2007-05-08 23:43:15 -0700 (Tue, 08 May 2007) | 1 line

    Add markup for True/False.  Will backport
  ........
    r55205 | walter.doerwald | 2007-05-09 11:10:47 -0700 (Wed, 09 May 2007) | 4 lines

    Backport checkin:
    Fix a segfault when b"" was passed to b2a_qp() -- it was using strchr()
    instead of memchr().
  ........
    r55241 | neal.norwitz | 2007-05-10 22:55:15 -0700 (Thu, 10 May 2007) | 6 lines

    Don't ever report a failure when the sum of the reference count differences
    are zero.  This should help reduce the false positives.

    The message about references leaking is maintained to provide as much
    info as possible rather than simply suppressing the message at the source.
  ........
    r55242 | neal.norwitz | 2007-05-10 23:23:01 -0700 (Thu, 10 May 2007) | 1 line

    Fix typo in docstring (the module is popen2, not 3).
  ........
    r55244 | neal.norwitz | 2007-05-10 23:56:52 -0700 (Thu, 10 May 2007) | 1 line

    Remove trailing whitespace in docstring
  ........
    r55245 | neal.norwitz | 2007-05-10 23:57:33 -0700 (Thu, 10 May 2007) | 1 line

    Deprecate os.popen* and popen2 module in favor of the subprocess module.
  ........
    r55247 | neal.norwitz | 2007-05-11 00:13:30 -0700 (Fri, 11 May 2007) | 1 line

    Deprecate os.popen* and popen2 module in favor of the subprocess module. (forgot the doc)
  ........
    r55253 | georg.brandl | 2007-05-11 02:41:37 -0700 (Fri, 11 May 2007) | 3 lines

    Remove an XXX that is unnecessary.
  ........
    r55258 | georg.brandl | 2007-05-11 04:04:26 -0700 (Fri, 11 May 2007) | 2 lines

    Patch #1714700: clarify os.linesep vs. tfiles opened in text mode.
     (backport)
  ........
    r55259 | georg.brandl | 2007-05-11 04:43:56 -0700 (Fri, 11 May 2007) | 2 lines

    Update DDJ link.
  ........
    r55273 | raymond.hettinger | 2007-05-11 10:59:59 -0700 (Fri, 11 May 2007) | 1 line

    Better tests for posixpath.commonprefix
  ........
    r55287 | georg.brandl | 2007-05-12 14:06:41 -0700 (Sat, 12 May 2007) | 2 lines

    Bug #1046945: document SWIG options of distutils.
  ........
    r55290 | georg.brandl | 2007-05-13 01:04:07 -0700 (Sun, 13 May 2007) | 2 lines

    Add bz2 to content encodings.
  ........
    r55297 | neal.norwitz | 2007-05-13 13:45:05 -0700 (Sun, 13 May 2007) | 3 lines

    Remove Amoeba doc which was removed in version 1.0! according to Misc/HISTORY.
    Hopefully Guido won't shed a tear. :-)
  ........
    r55298 | neal.norwitz | 2007-05-13 13:54:19 -0700 (Sun, 13 May 2007) | 1 line

    Remove references to stdwin which was removed long ago.
  ........
    r55299 | neal.norwitz | 2007-05-13 14:13:42 -0700 (Sun, 13 May 2007) | 3 lines

    Remove support for freebsd[23] which haven't been released since 2000
    or earlier.  http://www.freebsd.org/releases/index.html
  ........
    r55320 | raymond.hettinger | 2007-05-14 13:52:31 -0700 (Mon, 14 May 2007) | 1 line

    Small speedup.
  ........
................

18 years agoMerged revisions 55270-55324 via svnmerge from
Guido van Rossum [Mon, 14 May 2007 22:03:55 +0000 (22:03 +0000)]
Merged revisions 55270-55324 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

........
  r55271 | fred.drake | 2007-05-11 10:14:47 -0700 (Fri, 11 May 2007) | 3 lines

  remove jpeg, panel libraries for SGI; there is more IRIX stuff left over,
  I guess that should be removed too, but will leave for someone who is sure
........
  r55280 | fred.drake | 2007-05-11 19:11:37 -0700 (Fri, 11 May 2007) | 1 line

  remove mention of file that has been removed
........
  r55301 | brett.cannon | 2007-05-13 17:38:05 -0700 (Sun, 13 May 2007) | 4 lines

  Remove rexec and Bastion from the stdlib.  This also eliminates the need for
  f_restricted on frames.  This in turn negates the need for
  PyEval_GetRestricted() and PyFrame_IsRestricted().
........
  r55303 | brett.cannon | 2007-05-13 19:22:22 -0700 (Sun, 13 May 2007) | 2 lines

  Remove the md5 and sha modules.
........
  r55305 | george.yoshida | 2007-05-13 19:45:55 -0700 (Sun, 13 May 2007) | 2 lines

  fix markup
........
  r55306 | neal.norwitz | 2007-05-13 19:47:57 -0700 (Sun, 13 May 2007) | 1 line

  Get the doc building again after some removals.
........
  r55307 | neal.norwitz | 2007-05-13 19:50:45 -0700 (Sun, 13 May 2007) | 1 line

  Get test_pyclbr passing again after getstatus was removed from commands.  This "test case" was weird since it was just importing a seemingly random module.  Remove the import
........
  r55322 | brett.cannon | 2007-05-14 14:09:20 -0700 (Mon, 14 May 2007) | 3 lines

  Remove the compiler package.  Will eventually need a mechanism to byte compile
  an AST.
........

18 years agoChange PyUnicode_EncodeCharmap() to return bytes objects
Walter Dörwald [Sat, 12 May 2007 13:23:53 +0000 (13:23 +0000)]
Change PyUnicode_EncodeCharmap() to return bytes objects
(which simplifies the implementation a little, because
bytes objects are resizable in place).

18 years agoFix string test (was testing str twice).
Walter Dörwald [Sat, 12 May 2007 13:13:55 +0000 (13:13 +0000)]
Fix string test (was testing str twice).

18 years agoChange PyUnicode_EncodeRawUnicodeEscape() to return bytes
Walter Dörwald [Sat, 12 May 2007 12:03:26 +0000 (12:03 +0000)]
Change PyUnicode_EncodeRawUnicodeEscape() to return bytes
objects (PyUnicode_AsRawUnicodeEscapeString() still returns
str8 objects).

18 years agoReuse static global hexdigits array.
Walter Dörwald [Sat, 12 May 2007 11:13:47 +0000 (11:13 +0000)]
Reuse static global hexdigits array.

18 years agoChange PyUnicode_EncodeUnicodeEscape() to return a bytes object.
Walter Dörwald [Sat, 12 May 2007 11:08:06 +0000 (11:08 +0000)]
Change PyUnicode_EncodeUnicodeEscape() to return a bytes object.
However PyUnicode_AsUnicodeEscapeString() (which is used by
Objects/fileobject.c::file_repr()) still returns a str8 object.
Give unicode_repr() it's own implementation which returns a str8
object (it was formerly just calling unicodeescape_string()
which was used to implement PyUnicode_EncodeUnicodeEscape() too),
because once repr() is required to return unicode objects it
needs its own implementation anyway.

18 years agoThere's no longer a u prefix for unicode objects
Walter Dörwald [Fri, 11 May 2007 19:57:05 +0000 (19:57 +0000)]
There's no longer a u prefix for unicode objects
=> drop it.

Fix idna test (encode() returns bytes now).

18 years agoSimplify PyObject_Unicode(NULL) by using
Walter Dörwald [Fri, 11 May 2007 17:25:52 +0000 (17:25 +0000)]
Simplify PyObject_Unicode(NULL) by using
PyUnicode_FromString().

18 years agoMerged revisions 55225-55227,55229-55269 via svnmerge from
Guido van Rossum [Fri, 11 May 2007 16:50:42 +0000 (16:50 +0000)]
Merged revisions 55225-55227,55229-55269 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

................
  r55238 | guido.van.rossum | 2007-05-10 16:46:05 -0700 (Thu, 10 May 2007) | 9 lines

  Merged revisions 55227 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r55227 | guido.van.rossum | 2007-05-10 10:20:15 -0700 (Thu, 10 May 2007) | 2 lines

    Fix a bug in test_c_api() that caused a negative refcount.
  ........
................
  r55246 | neal.norwitz | 2007-05-11 00:01:52 -0700 (Fri, 11 May 2007) | 1 line

  Remove commands.getstatus() it is obsolete.
................
  r55248 | neal.norwitz | 2007-05-11 00:29:05 -0700 (Fri, 11 May 2007) | 2 lines

  Remove bsddb185 support.
................
  r55249 | neal.norwitz | 2007-05-11 00:29:50 -0700 (Fri, 11 May 2007) | 1 line

  Remove bsddb185 module too
................
  r55250 | neal.norwitz | 2007-05-11 00:32:13 -0700 (Fri, 11 May 2007) | 1 line

  bsddb185: Gotta remove from the file checked in, not Setup
................
  r55251 | neal.norwitz | 2007-05-11 00:53:26 -0700 (Fri, 11 May 2007) | 1 line

  Remove obsolete IRIX modules (as much as I could find, there is probably more)
................
  r55252 | neal.norwitz | 2007-05-11 00:55:35 -0700 (Fri, 11 May 2007) | 1 line

  Remove SGI turd.
................
  r55254 | georg.brandl | 2007-05-11 03:11:01 -0700 (Fri, 11 May 2007) | 2 lines

  Add a case for set comprehensions to the "cannot assign to" switch.
................
  r55255 | georg.brandl | 2007-05-11 03:11:25 -0700 (Fri, 11 May 2007) | 2 lines

  Fix wrong imports.
................
  r55261 | georg.brandl | 2007-05-11 07:37:48 -0700 (Fri, 11 May 2007) | 2 lines

  Remove removed tex files.
................
  r55262 | georg.brandl | 2007-05-11 08:28:41 -0700 (Fri, 11 May 2007) | 2 lines

  Commit PEP 3132 implementation.
................
  r55264 | georg.brandl | 2007-05-11 08:50:19 -0700 (Fri, 11 May 2007) | 2 lines

  Check in the inevitable AST version number and format Py_ssize_t with %zd.
................
  r55265 | neal.norwitz | 2007-05-11 09:12:22 -0700 (Fri, 11 May 2007) | 1 line

  Remove mention of os.popen* and popen2.* since these will be removed.
................
  r55266 | neal.norwitz | 2007-05-11 09:19:57 -0700 (Fri, 11 May 2007) | 1 line

  Get doc to build again (almost, the doc is fine)
................
  r55267 | neal.norwitz | 2007-05-11 09:21:02 -0700 (Fri, 11 May 2007) | 1 line

  Really get doc to build (remove use of string module)
................
  r55269 | neal.norwitz | 2007-05-11 09:29:43 -0700 (Fri, 11 May 2007) | 1 line

  Add some notes to cleanup later
................

18 years agoRemove support for u"..." literals.
Guido van Rossum [Fri, 11 May 2007 16:26:27 +0000 (16:26 +0000)]
Remove support for u"..." literals.

18 years agoEnhance the punycode decoder so that it can decode
Walter Dörwald [Fri, 11 May 2007 10:32:57 +0000 (10:32 +0000)]
Enhance the punycode decoder so that it can decode
unicode objects.

Fix the idna codec and the tests.

18 years agoFix the array tests. Only a minor change to the C code was required.
Guido van Rossum [Thu, 10 May 2007 18:41:30 +0000 (18:41 +0000)]
Fix the array tests.  Only a minor change to the C code was required.

18 years agoFix some miscellaneous places that incorrectly insisted on str8.
Guido van Rossum [Thu, 10 May 2007 18:04:33 +0000 (18:04 +0000)]
Fix some miscellaneous places that incorrectly insisted on str8.

18 years agoMerged revisions 55228 via svnmerge from
Guido van Rossum [Thu, 10 May 2007 17:35:11 +0000 (17:35 +0000)]
Merged revisions 55228 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

................
  r55228 | guido.van.rossum | 2007-05-10 10:25:43 -0700 (Thu, 10 May 2007) | 9 lines

  Merged revisions 55227 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r55227 | guido.van.rossum | 2007-05-10 10:20:15 -0700 (Thu, 10 May 2007) | 2 lines

    Fix a bug in test_c_api() that caused a negative refcount.
  ........
................

18 years agoUse io.BytesIO instead of StringIO.StringIO in all
Walter Dörwald [Thu, 10 May 2007 15:02:49 +0000 (15:02 +0000)]
Use io.BytesIO instead of StringIO.StringIO in all
spots where bytes are read and written (StringIO.StringIO
doesn't work, because it promotes bytes to str).

18 years agoMerged revisions 55184-55224 via svnmerge from
Guido van Rossum [Thu, 10 May 2007 14:04:07 +0000 (14:04 +0000)]
Merged revisions 55184-55224 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

........
  r55186 | guido.van.rossum | 2007-05-08 10:37:51 -0700 (Tue, 08 May 2007) | 2 lines

  Don't die if /dev/tty doesn't exist; just skip that part of the test.
........
  r55204 | guido.van.rossum | 2007-05-09 10:55:11 -0700 (Wed, 09 May 2007) | 3 lines

  Fix a segfault when b"" was passed to b2a_qp() -- it was using strchr()
  instead of memchr().  Please backport; the original code was clearly wrong.
........
  r55221 | neal.norwitz | 2007-05-09 22:49:20 -0700 (Wed, 09 May 2007) | 1 line

  Always skip compiler and tranformer tests for now since they currently fail.
........

18 years agoFix punycode codec and tests.
Walter Dörwald [Thu, 10 May 2007 12:36:25 +0000 (12:36 +0000)]
Fix punycode codec and tests.

18 years agoDon't insist on cStringIO.
Guido van Rossum [Wed, 9 May 2007 23:47:07 +0000 (23:47 +0000)]
Don't insist on cStringIO.

18 years agoDon't insist on cStringIO.
Guido van Rossum [Wed, 9 May 2007 23:45:09 +0000 (23:45 +0000)]
Don't insist on cStringIO.

18 years agoFix code depending on exception unpacking.
Guido van Rossum [Wed, 9 May 2007 23:43:17 +0000 (23:43 +0000)]
Fix code depending on exception unpacking.

18 years agoDon't insist on cStringIO.
Guido van Rossum [Wed, 9 May 2007 23:42:18 +0000 (23:42 +0000)]
Don't insist on cStringIO.

18 years agoAdd to an XXX comment.
Guido van Rossum [Wed, 9 May 2007 23:41:10 +0000 (23:41 +0000)]
Add to an XXX comment.

18 years agoRandom modifications that slightly improve the chances of this not blowing up.
Guido van Rossum [Wed, 9 May 2007 23:40:37 +0000 (23:40 +0000)]
Random modifications that slightly improve the chances of this not blowing up.
Walter will fix it for real.

18 years agoUse AsCharBuffer to get a C string out of a Python string.
Guido van Rossum [Wed, 9 May 2007 23:38:34 +0000 (23:38 +0000)]
Use AsCharBuffer to get a C string out of a Python string.

18 years agoUse AsCharBuffer to get C strings out of Python strings.
Guido van Rossum [Wed, 9 May 2007 23:37:01 +0000 (23:37 +0000)]
Use AsCharBuffer to get C strings out of Python strings.

18 years agoThe NULL pointer for empty strings turns out to be a pain.
Guido van Rossum [Wed, 9 May 2007 23:36:14 +0000 (23:36 +0000)]
The NULL pointer for empty strings turns out to be a pain.
At least for the buffer API, return "" in that case.

18 years agoBe more robust around bytes for e[st]#? formats.
Guido van Rossum [Wed, 9 May 2007 23:35:09 +0000 (23:35 +0000)]
Be more robust around bytes for e[st]#? formats.

18 years agoMore uniform approach to getting (UTF8) bytes out of a string.
Guido van Rossum [Wed, 9 May 2007 23:29:27 +0000 (23:29 +0000)]
More uniform approach to getting (UTF8) bytes out of a string.

18 years agoSupport PEP-263-style coding declarations.
Guido van Rossum [Wed, 9 May 2007 23:24:46 +0000 (23:24 +0000)]
Support PEP-263-style coding declarations.
Default to UTF-8 per PEP-3120.

18 years agoI don't know how come bytes.join() was a class method, but that's clearly
Guido van Rossum [Wed, 9 May 2007 19:52:16 +0000 (19:52 +0000)]
I don't know how come bytes.join() was a class method, but that's clearly
a mistake.  It's not a regular (instance) method. b".".join([b"a", b"b"])
now returns b"a.b" -- it used to return b"ab"!

18 years agoForwardport checkin:
Walter Dörwald [Wed, 9 May 2007 18:23:50 +0000 (18:23 +0000)]
Forwardport checkin:
Fix a segfault when b"" was passed to b2a_qp() -- it was using strchr()
instead of memchr().

18 years agoFix trivial bug in idna encoding.
Guido van Rossum [Wed, 9 May 2007 17:38:24 +0000 (17:38 +0000)]
Fix trivial bug in idna encoding.

18 years agotest_codeccallbacks.py passes again.
Walter Dörwald [Wed, 9 May 2007 10:44:06 +0000 (10:44 +0000)]
test_codeccallbacks.py passes again.

18 years agoMention type in the exception message.
Walter Dörwald [Wed, 9 May 2007 10:39:19 +0000 (10:39 +0000)]
Mention type in the exception message.

18 years agoMake test_marshal pass. Not my best work. :-(
Guido van Rossum [Wed, 9 May 2007 00:01:30 +0000 (00:01 +0000)]
Make test_marshal pass.  Not my best work. :-(

18 years agoMake the StringIO test pass.
Guido van Rossum [Tue, 8 May 2007 23:08:31 +0000 (23:08 +0000)]
Make the StringIO test pass.
The buffer object now special-cases Unicode when concatenating.  Sigh.

18 years agoGot test_pickletools and test_pickle working.
Guido van Rossum [Tue, 8 May 2007 21:26:54 +0000 (21:26 +0000)]
Got test_pickletools and test_pickle working.
(Alas, test_cpickle is still broken.)

18 years agoGiven that ord() of a bytes object of length 1 is defined, it should
Guido van Rossum [Tue, 8 May 2007 21:05:48 +0000 (21:05 +0000)]
Given that ord() of a bytes object of length 1 is defined, it should
never return a negative number.

18 years agoFix a few places where a str instead of a bytes object was used.
Guido van Rossum [Tue, 8 May 2007 20:18:39 +0000 (20:18 +0000)]
Fix a few places where a str instead of a bytes object was used.

18 years agorepr(b"\0") should return b"\x00", not the (unusual) b"\0".
Guido van Rossum [Tue, 8 May 2007 19:09:34 +0000 (19:09 +0000)]
repr(b"\0") should return b"\x00", not the (unusual) b"\0".

18 years agoKill u"..." string quotes. Thought I already did that.
Guido van Rossum [Tue, 8 May 2007 18:51:25 +0000 (18:51 +0000)]
Kill u"..." string quotes.  Thought I already did that.

18 years agoGot test_exceptions.py working.
Guido van Rossum [Tue, 8 May 2007 17:49:10 +0000 (17:49 +0000)]
Got test_exceptions.py working.

18 years agoGet rid of 'file' built-in. Get rid of types.StringType and friends.
Guido van Rossum [Tue, 8 May 2007 17:20:32 +0000 (17:20 +0000)]
Get rid of 'file' built-in.  Get rid of types.StringType and friends.

18 years agoMerged revisions 55180-55183 via svnmerge from
Guido van Rossum [Tue, 8 May 2007 15:18:31 +0000 (15:18 +0000)]
Merged revisions 55180-55183 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

........
  r55182 | neal.norwitz | 2007-05-07 23:03:06 -0700 (Mon, 07 May 2007) | 1 line

  Fix refleaks when using range with large values
........

18 years agoCheckpoint. A b it closer to working pickles and pickletools.
Guido van Rossum [Mon, 7 May 2007 23:57:08 +0000 (23:57 +0000)]
Checkpoint.  A b it closer to working pickles and pickletools.
Added 'Y' getargs opcode which requires a bytes object.

18 years agoMerged revisions 55007-55179 via svnmerge from
Guido van Rossum [Mon, 7 May 2007 22:24:25 +0000 (22:24 +0000)]
Merged revisions 55007-55179 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

........
  r55077 | guido.van.rossum | 2007-05-02 11:54:37 -0700 (Wed, 02 May 2007) | 2 lines

  Use the new print syntax, at least.
........
  r55142 | fred.drake | 2007-05-04 21:27:30 -0700 (Fri, 04 May 2007) | 1 line

  remove old cruftiness
........
  r55143 | fred.drake | 2007-05-04 21:52:16 -0700 (Fri, 04 May 2007) | 1 line

  make this work with the new Python
........
  r55162 | neal.norwitz | 2007-05-06 22:29:18 -0700 (Sun, 06 May 2007) | 1 line

  Get asdl code gen working with Python 2.3.  Should continue to work with 3.0
........
  r55164 | neal.norwitz | 2007-05-07 00:00:38 -0700 (Mon, 07 May 2007) | 1 line

  Verify checkins to p3yk (sic) branch go to 3000 list.
........
  r55166 | neal.norwitz | 2007-05-07 00:12:35 -0700 (Mon, 07 May 2007) | 1 line

  Fix this test so it runs again by importing warnings_test properly.
........
  r55167 | neal.norwitz | 2007-05-07 01:03:22 -0700 (Mon, 07 May 2007) | 8 lines

  So long xrange.  range() now supports values that are outside
  -sys.maxint to sys.maxint.  floats raise a TypeError.

  This has been sitting for a long time.  It probably has some problems and
  needs cleanup.  Objects/rangeobject.c now uses 4-space indents since
  it is almost completely new.
........
  r55171 | guido.van.rossum | 2007-05-07 10:21:26 -0700 (Mon, 07 May 2007) | 4 lines

  Fix two tests that were previously depending on significant spaces
  at the end of a line (and before that on Python 2.x print behavior
  that has no exact equivalent in 3.0).
........

18 years agoInitialized merge tracking via "svnmerge" with revisions "1-55006" from
Guido van Rossum [Mon, 7 May 2007 22:13:07 +0000 (22:13 +0000)]
Initialized merge tracking via "svnmerge" with revisions "1-55006" from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

18 years agoFix some trivial things in cPickle due to the renaming of the string types.
Guido van Rossum [Mon, 7 May 2007 17:15:57 +0000 (17:15 +0000)]
Fix some trivial things in cPickle due to the renaming of the string types.

18 years agoVerify checkins to py3k branches go to 3000 list.
Neal Norwitz [Mon, 7 May 2007 06:59:22 +0000 (06:59 +0000)]
Verify checkins to py3k branches go to 3000 list.

18 years agoCheck whether the strlen() result overflows Py_ssize_t.
Walter Dörwald [Sun, 6 May 2007 10:00:02 +0000 (10:00 +0000)]
Check whether the strlen() result overflows Py_ssize_t.

18 years agoAdd two more space tests.
Walter Dörwald [Sat, 5 May 2007 16:04:46 +0000 (16:04 +0000)]
Add two more space tests.

18 years agoRemove duplicate tests.
Walter Dörwald [Sat, 5 May 2007 15:57:18 +0000 (15:57 +0000)]
Remove duplicate tests.

18 years agoChange PyUnicode_EncodeUTF7() to return a bytes object.
Walter Dörwald [Sat, 5 May 2007 14:43:36 +0000 (14:43 +0000)]
Change PyUnicode_EncodeUTF7() to return a bytes object.

18 years agoSilence gcc warnings.
Walter Dörwald [Sat, 5 May 2007 14:26:59 +0000 (14:26 +0000)]
Silence gcc warnings.

Use correct type for copy target pointer.

18 years agoWhen creating a unicode object from a char * characters
Walter Dörwald [Sat, 5 May 2007 14:21:20 +0000 (14:21 +0000)]
When creating a unicode object from a char * characters
are always < 256 => remove the test.

18 years agoFix %c overflow test.
Walter Dörwald [Sat, 5 May 2007 14:12:24 +0000 (14:12 +0000)]
Fix %c overflow test.

18 years agotest_unicode.py passes again 9except for problems
Walter Dörwald [Sat, 5 May 2007 12:26:27 +0000 (12:26 +0000)]
test_unicode.py passes again 9except for problems
with the idna codec.

18 years agoAdd PyUnicode_FromString(), which create a unicode object from a
Walter Dörwald [Sat, 5 May 2007 12:00:46 +0000 (12:00 +0000)]
Add PyUnicode_FromString(), which create a unicode object from a
const char * (i.e. 0-terminated latin-1 encoded bytes).

18 years agoMuch more pickling now works.
Guido van Rossum [Fri, 4 May 2007 20:30:19 +0000 (20:30 +0000)]
Much more pickling now works.

18 years agoCheckpoint. Make pickle.py read/write bytes.
Guido van Rossum [Fri, 4 May 2007 19:56:22 +0000 (19:56 +0000)]
Checkpoint.  Make pickle.py read/write bytes.
Fix strict.py so it reads/writes bytes and accepts both string types as format.

18 years agoChange UnicodeDecodeError objects so that the 'object' attribute
Walter Dörwald [Fri, 4 May 2007 19:28:21 +0000 (19:28 +0000)]
Change UnicodeDecodeError objects so that the 'object' attribute
is a bytes object.

Add 'y' and 'y#' format specifiers that work like 's' and 's#'
but only accept bytes objects.

18 years agoDon't use StringType -- always test for basestring.
Guido van Rossum [Fri, 4 May 2007 17:44:47 +0000 (17:44 +0000)]
Don't use StringType -- always test for basestring.

18 years agoAdd 8-bit chr() back as chr8().
Guido van Rossum [Fri, 4 May 2007 17:43:11 +0000 (17:43 +0000)]
Add 8-bit chr() back as chr8().

18 years agoMake the BOM constants in codecs.py bytes.
Walter Dörwald [Fri, 4 May 2007 13:05:09 +0000 (13:05 +0000)]
Make the BOM constants in codecs.py bytes.

Make the buffered input for decoders a bytes object.

Fix some of the codec tests.

18 years agoChange PyUnicode_EncodeUTF16() so that it returns
Walter Dörwald [Fri, 4 May 2007 10:48:27 +0000 (10:48 +0000)]
Change PyUnicode_EncodeUTF16() so that it returns
bytes objects instead of str8 objects.

18 years agoUse basestring instead of (str, str8) to test whether
Walter Dörwald [Fri, 4 May 2007 07:18:10 +0000 (07:18 +0000)]
Use basestring instead of (str, str8) to test whether
cls is a module *name*.

18 years agoIt's ok for __repr__ to return unicode.
Guido van Rossum [Fri, 4 May 2007 05:14:29 +0000 (05:14 +0000)]
It's ok for __repr__ to return unicode.

18 years agotest_exceptions.py passes, except for pickling of course.
Guido van Rossum [Fri, 4 May 2007 05:06:43 +0000 (05:06 +0000)]
test_exceptions.py passes, except for pickling of course.

18 years agoMake test_types.py pass.
Guido van Rossum [Fri, 4 May 2007 05:04:37 +0000 (05:04 +0000)]
Make test_types.py pass.

18 years agoMake all of test_bytes pass (except pickling, which is too badly busted).
Guido van Rossum [Fri, 4 May 2007 05:00:04 +0000 (05:00 +0000)]
Make all of test_bytes pass (except pickling, which is too badly busted).

18 years agoAdd trailing null bytes to a few more places.
Guido van Rossum [Fri, 4 May 2007 04:27:16 +0000 (04:27 +0000)]
Add trailing null bytes to a few more places.

18 years agoCompare and hash unicode objects like their UTF-8 representations.
Guido van Rossum [Fri, 4 May 2007 04:17:33 +0000 (04:17 +0000)]
Compare and hash unicode objects like their UTF-8 representations.
Accept Unicode characters < 256 for 'c' format.

18 years agoMore coding by random modification.
Guido van Rossum [Fri, 4 May 2007 00:41:39 +0000 (00:41 +0000)]
More coding by random modification.
Encoding now return bytes instead of str8.
eval(), exec(), compile() now accept unicode or bytes.

18 years agoTemporary fix: Module names are still 8bit strings. This
Walter Dörwald [Thu, 3 May 2007 21:11:35 +0000 (21:11 +0000)]
Temporary fix: Module names are still 8bit strings. This
change allows test_support.run_unittest(__name__) to work
again. However the proper fix would be module names that
are real unicode strings.

18 years agoFix various spots where int/long and str/unicode unification
Walter Dörwald [Thu, 3 May 2007 21:05:51 +0000 (21:05 +0000)]
Fix various spots where int/long and str/unicode unification
lead to type checks like isinstance(foo, (str, str)) or
isinstance(foo, (int, int)).

18 years agoFix type name (str has been renamed to str8).
Walter Dörwald [Thu, 3 May 2007 20:49:27 +0000 (20:49 +0000)]
Fix type name (str has been renamed to str8).

18 years agoGet rid of all #ifdef Py_USING_UNICODE (it is always present now).
Guido van Rossum [Thu, 3 May 2007 17:49:24 +0000 (17:49 +0000)]
Get rid of all #ifdef Py_USING_UNICODE (it is always present now).
(With the help of unifdef from freshmeat.)

18 years agoKill unichr() itself.
Guido van Rossum [Thu, 3 May 2007 17:22:56 +0000 (17:22 +0000)]
Kill unichr() itself.

18 years agoRename 'unicode' to 'str' in its tp_name field. Rename 'str' to 'str8'.
Guido van Rossum [Thu, 3 May 2007 17:18:26 +0000 (17:18 +0000)]
Rename 'unicode' to 'str' in its tp_name field. Rename 'str' to 'str8'.
Change all occurrences of unichr to chr.

18 years agoRip out all the u"..." literals and calls to unicode().
Guido van Rossum [Wed, 2 May 2007 19:09:54 +0000 (19:09 +0000)]
Rip out all the u"..." literals and calls to unicode().

18 years agoCheckpoint. Manipulated things so that string literals are always
Guido van Rossum [Fri, 27 Apr 2007 23:53:51 +0000 (23:53 +0000)]
Checkpoint.  Manipulated things so that string literals are always
unicode, and a few other compensating changes, e.g. str <- unicode,
chr <- unichr, and repr() of a unicode string no longer starts
with 'u'.  Lots of unit tests are broken, but some basic things
work, in particular distutils works so the extensions can be built,
and test_builtin.py works.