Commit Graph

34121 Commits

Author SHA1 Message Date
Guido van Rossum 3b116a3187 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.
  ........
................
2007-05-10 17:35:11 +00:00
Walter Dörwald c3ab0a75d1 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).
2007-05-10 15:02:49 +00:00
Guido van Rossum 5205653a9e 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.
........
2007-05-10 14:04:07 +00:00
Walter Dörwald a4c612845a Fix punycode codec and tests. 2007-05-10 12:36:25 +00:00
Guido van Rossum 5c4501af57 Don't insist on cStringIO. 2007-05-09 23:47:07 +00:00
Guido van Rossum 62b8871561 Don't insist on cStringIO. 2007-05-09 23:45:09 +00:00
Guido van Rossum e2c8f2d581 Fix code depending on exception unpacking. 2007-05-09 23:43:17 +00:00
Guido van Rossum 7fe7d1ac4d Don't insist on cStringIO. 2007-05-09 23:42:18 +00:00
Guido van Rossum a5c313dc4d Add to an XXX comment. 2007-05-09 23:41:10 +00:00
Guido van Rossum 0e02abb791 Random modifications that slightly improve the chances of this not blowing up.
Walter will fix it for real.
2007-05-09 23:40:37 +00:00
Guido van Rossum ccf4f0f68d Use AsCharBuffer to get a C string out of a Python string. 2007-05-09 23:38:34 +00:00
Guido van Rossum 83857e3bf3 Use AsCharBuffer to get C strings out of Python strings. 2007-05-09 23:37:01 +00:00
Guido van Rossum 63eac15927 The NULL pointer for empty strings turns out to be a pain.
At least for the buffer API, return "" in that case.
2007-05-09 23:36:14 +00:00
Guido van Rossum d70539abef Be more robust around bytes for e[st]#? formats. 2007-05-09 23:35:09 +00:00
Guido van Rossum 6262cc79d7 More uniform approach to getting (UTF8) bytes out of a string. 2007-05-09 23:29:27 +00:00
Guido van Rossum 33f3124fb1 Support PEP-263-style coding declarations.
Default to UTF-8 per PEP-3120.
2007-05-09 23:24:46 +00:00
Guido van Rossum cd6ae68943 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"!
2007-05-09 19:52:16 +00:00
Walter Dörwald 0925e419df Forwardport checkin:
Fix a segfault when b"" was passed to b2a_qp() -- it was using strchr()
instead of memchr().
2007-05-09 18:23:50 +00:00
Guido van Rossum 3699582e03 Fix trivial bug in idna encoding. 2007-05-09 17:38:24 +00:00
Walter Dörwald 00048f0c22 test_codeccallbacks.py passes again. 2007-05-09 10:44:06 +00:00
Walter Dörwald 580ceedd06 Mention type in the exception message. 2007-05-09 10:39:19 +00:00
Guido van Rossum e6d3904c22 Make test_marshal pass. Not my best work. :-( 2007-05-09 00:01:30 +00:00
Guido van Rossum bc14efbd08 Make the StringIO test pass.
The buffer object now special-cases Unicode when concatenating.  Sigh.
2007-05-08 23:08:31 +00:00
Guido van Rossum cfe5f20fe8 Got test_pickletools and test_pickle working.
(Alas, test_cpickle is still broken.)
2007-05-08 21:26:54 +00:00
Guido van Rossum f9e91c9c58 Given that ord() of a bytes object of length 1 is defined, it should
never return a negative number.
2007-05-08 21:05:48 +00:00
Guido van Rossum 2b08b38dea Fix a few places where a str instead of a bytes object was used. 2007-05-08 20:18:39 +00:00
Guido van Rossum 57b93ad56d repr(b"\0") should return b"\x00", not the (unusual) b"\0". 2007-05-08 19:09:34 +00:00
Guido van Rossum e5e80b8c56 Kill u"..." string quotes. Thought I already did that. 2007-05-08 18:51:25 +00:00
Guido van Rossum b8142c3e64 Got test_exceptions.py working. 2007-05-08 17:49:10 +00:00
Guido van Rossum 74302dbd3c Get rid of 'file' built-in. Get rid of types.StringType and friends. 2007-05-08 17:20:32 +00:00
Guido van Rossum 317e774965 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
........
2007-05-08 15:18:31 +00:00
Guido van Rossum 617dbc4d64 Checkpoint. A b it closer to working pickles and pickletools.
Added 'Y' getargs opcode which requires a bytes object.
2007-05-07 23:57:08 +00:00
Guido van Rossum 805365ee39 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).
........
2007-05-07 22:24:25 +00:00
Guido van Rossum 598d98a7e8 Initialized merge tracking via "svnmerge" with revisions "1-55006" from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk
2007-05-07 22:13:07 +00:00
Guido van Rossum 32c38e7420 Fix some trivial things in cPickle due to the renaming of the string types. 2007-05-07 17:15:57 +00:00
Neal Norwitz 6cb726a9f2 Verify checkins to py3k branches go to 3000 list. 2007-05-07 06:59:22 +00:00
Walter Dörwald a14c4bbbaa Check whether the strlen() result overflows Py_ssize_t. 2007-05-06 10:00:02 +00:00
Walter Dörwald 9bc47120d3 Add two more space tests. 2007-05-05 16:04:46 +00:00
Walter Dörwald 20badb31b4 Remove duplicate tests. 2007-05-05 15:57:18 +00:00
Walter Dörwald 51ab414627 Change PyUnicode_EncodeUTF7() to return a bytes object. 2007-05-05 14:43:36 +00:00
Walter Dörwald ce32db3ab5 Silence gcc warnings.
Use correct type for copy target pointer.
2007-05-05 14:26:59 +00:00
Walter Dörwald 071b9da146 When creating a unicode object from a char * characters
are always < 256 => remove the test.
2007-05-05 14:21:20 +00:00
Walter Dörwald db290f0162 Fix %c overflow test. 2007-05-05 14:12:24 +00:00
Walter Dörwald 67e83886d9 test_unicode.py passes again 9except for problems
with the idna codec.
2007-05-05 12:26:27 +00:00
Walter Dörwald acaa5a16d6 Add PyUnicode_FromString(), which create a unicode object from a
const char * (i.e. 0-terminated latin-1 encoded bytes).
2007-05-05 12:00:46 +00:00
Guido van Rossum 1255ed62bf Much more pickling now works. 2007-05-04 20:30:19 +00:00
Guido van Rossum 2e6a4b37ba Checkpoint. Make pickle.py read/write bytes.
Fix strict.py so it reads/writes bytes and accepts both string types as format.
2007-05-04 19:56:22 +00:00
Walter Dörwald 612344f127 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.
2007-05-04 19:28:21 +00:00
Guido van Rossum c2b87a6dff Don't use StringType -- always test for basestring. 2007-05-04 17:44:47 +00:00
Guido van Rossum 7fcf224ec8 Add 8-bit chr() back as chr8(). 2007-05-04 17:43:11 +00:00