Commit Graph

11246 Commits

Author SHA1 Message Date
Collin Winter d745c436fb Fix test_largefile by changing some string literals to byte literals. 2007-07-23 00:51:28 +00:00
Collin Winter f86f285bdd Fix test_poplib failures. 2007-07-23 00:24:10 +00:00
Guido van Rossum 33e7a8e813 Make close() (all versions) ignore IOError from flush().
This makes test_resource.py pass, and I think it's the right thing
to do: if you're closing a file after encountering an I/O error
there's nothing you can do about it.  If you want the error, you
can call flush() yourself.
2007-07-22 20:38:07 +00:00
Guido van Rossum ca73d496ec Remove this test; it checked for a single old bug and I don't think that
its failure means much, now that the handling of unicode and bytes has
changed so much.
2007-07-22 20:13:35 +00:00
Guido van Rossum f8761c781b Make test_compile not fail.
I *think* it's okay no longer to require that compiling a Unicode
string with a coding declaration fails; it seems appropriate to
just ignore it.
2007-07-22 20:01:13 +00:00
Martin v. Löwis 95c95ce5be Merged revisions 56483-56491 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

........
  r56486 | kurt.kaiser | 2007-07-22 05:27:08 +0200 (So, 22 Jul 2007) | 2 lines

  Fix typo introduced at r55797
........
  r56487 | kurt.kaiser | 2007-07-22 07:48:45 +0200 (So, 22 Jul 2007) | 2 lines

  Exception attr accessed via args in py3k.
........
  r56489 | martin.v.loewis | 2007-07-22 15:32:44 +0200 (So, 22 Jul 2007) | 2 lines

  Regenerate.
........
  r56490 | martin.v.loewis | 2007-07-22 15:34:06 +0200 (So, 22 Jul 2007) | 2 lines

  Port Mac modules to PEP 3123.
........
  r56491 | martin.v.loewis | 2007-07-22 16:35:53 +0200 (So, 22 Jul 2007) | 1 line

  Port to PEP 3123.
........
2007-07-22 14:41:55 +00:00
Guido van Rossum b972a78e17 SF patch# 1757683 by Alexandre Vassalotti. Add support for
seeking/writing beyond EOF to io.BytesIO.
2007-07-21 00:25:15 +00:00
Guido van Rossum d4eda825c7 SF patch# 1757839 by Alexandre Vassalotti -- make test_mailbox and
test_old_mailbox pass.
2007-07-21 00:21:26 +00:00
Guido van Rossum bf4806bac5 SF patch# 1757758 by Alexandre Vassalotti, fixing test_ucn. 2007-07-21 00:15:34 +00:00
Collin Winter b8b108f306 Make doctest pass by specifying the right encoding. 2007-07-20 18:08:03 +00:00
Guido van Rossum fb56d8f347 Fix test_uuid.py.
Add a note that this module is thread-unsafe. :-(
2007-07-20 17:45:09 +00:00
Guido van Rossum 25d0bd687f Delete failing test that was checking that a slot declaration with
a non-ASCII character in it should fail.  Because of PEP 3131 this
test is bogus anyway.  Also some cosmetic cleanup.
2007-07-20 17:10:16 +00:00
Martin v. Löwis 3a2e5ce575 Make audioop and its tests use bytes throughout. 2007-07-20 07:36:26 +00:00
Martin v. Löwis b1a9f2772b Fix test_doctest: drop u prefixes; explicitly declare
encoding as latin-1 if we want it to fail.
2007-07-20 07:13:39 +00:00
Guido van Rossum 36e0a92442 Merged revisions 56443-56466 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

................
  r56454 | kurt.kaiser | 2007-07-18 22:26:14 -0700 (Wed, 18 Jul 2007) | 2 lines

  Make relative imports explicit for py3k
................
  r56455 | kurt.kaiser | 2007-07-18 23:12:15 -0700 (Wed, 18 Jul 2007) | 2 lines

  Was modifying dict during iteration.
................
  r56457 | guido.van.rossum | 2007-07-19 07:33:19 -0700 (Thu, 19 Jul 2007) | 2 lines

  Fix failing test.
................
  r56466 | guido.van.rossum | 2007-07-19 20:58:16 -0700 (Thu, 19 Jul 2007) | 35 lines

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

  ........
    r56439 | georg.brandl | 2007-07-17 23:37:55 -0700 (Tue, 17 Jul 2007) | 2 lines

    Use "Unix" as platform name, not "UNIX".
  ........
    r56441 | guido.van.rossum | 2007-07-18 10:19:14 -0700 (Wed, 18 Jul 2007) | 3 lines

    SF patch# 1755885 by Kurt Kaiser: show location of Unicode escape errors.
    (Slightly tweaked for style and refcounts.)
  ........
    r56444 | kurt.kaiser | 2007-07-18 12:58:42 -0700 (Wed, 18 Jul 2007) | 2 lines

    Fix failing unicode test caused by change to ast.c at r56441
  ........
    r56451 | georg.brandl | 2007-07-18 15:36:53 -0700 (Wed, 18 Jul 2007) | 2 lines

    Add description for wave.setcomptype() values
  ........
    r56456 | walter.doerwald | 2007-07-19 06:04:38 -0700 (Thu, 19 Jul 2007) | 3 lines

    Document that codecs.lookup() returns a CodecInfo object.
    (fixes SF bug #1754453).
  ........
    r56463 | facundo.batista | 2007-07-19 16:57:38 -0700 (Thu, 19 Jul 2007) | 6 lines


    Added a select.select call in the test server loop to make sure the
    socket is ready to be read from before attempting a read (this
    prevents an error 10035 on some Windows platforms). [GSoC - Alan
    McIntyre]
  ........
................
2007-07-20 04:05:57 +00:00
Guido van Rossum f66263c20a Fix test_cookie.py. 2007-07-20 00:30:38 +00:00
Guido van Rossum 99603b0c1e Getting rid of cPickle. Mmm, feels good! 2007-07-20 00:22:32 +00:00
Guido van Rossum be6fe5476c Make test_datetime.py pass by killing all references to cPickle in it. 2007-07-19 23:55:34 +00:00
Guido van Rossum f93254d299 Fix test_pickle, by reverting the string opcodes (S, T, U) to returning
strings, in Latin-1.  Bytes are once more pickled through bytes.__reduce__,
but now it returns "latin-1" as the second parameter.

Unfortunately this breaks datetime pickling.  I'll have to investigate
further; reverting Martin's changes doesn't seem to help.
2007-07-19 22:19:35 +00:00
Guido van Rossum 814661e0d4 Fix test_zipfile.py. (Why was it passing before?)
The usual str/bytes issues.

BTW, perhaps zipfp.open() should behave more like io.open()?
2007-07-18 22:07:29 +00:00
Guido van Rossum 697a84b16c Make test_unicode pass after the lexer was fixed to turn unicode errors
into syntax errors.
2007-07-18 21:02:47 +00:00
Guido van Rossum 7eb6ca54a7 Make test_parser pass after merge. 2007-07-18 21:00:22 +00:00
Guido van Rossum df4a743ac0 Fix test_asyncore after merge. It needs to use bytes. 2007-07-18 20:57:44 +00:00
Guido van Rossum b5a755e46c Merged revisions 56301-56442 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

................
  r56322 | kurt.kaiser | 2007-07-12 11:35:03 -0700 (Thu, 12 Jul 2007) | 2 lines

  Replace obscure code which was failing in py3k.
................
  r56323 | kurt.kaiser | 2007-07-12 11:44:12 -0700 (Thu, 12 Jul 2007) | 3 lines

  1. Remove new division option
  2. Update IDLE version to 3.0x
................
  r56327 | kurt.kaiser | 2007-07-12 12:20:20 -0700 (Thu, 12 Jul 2007) | 5 lines

  Fix another instance of this defect in Tkinter, and one in IDLE.

  Patch 1724999 by Ali Gholami Rudi -- avoid complaints about dict size
  change during iter in destroy call.
................
  r56339 | georg.brandl | 2007-07-13 03:07:25 -0700 (Fri, 13 Jul 2007) | 2 lines

  Fix #1753310: regrtest -x doesn't work anymore
................
  r56361 | kurt.kaiser | 2007-07-13 18:25:24 -0700 (Fri, 13 Jul 2007) | 2 lines

  convert a map() iterator to a list to get this working.
................
  r56362 | kurt.kaiser | 2007-07-13 18:53:45 -0700 (Fri, 13 Jul 2007) | 2 lines

  Was modifying dict during iteration.
................
  r56376 | collin.winter | 2007-07-14 11:56:19 -0700 (Sat, 14 Jul 2007) | 1 line

  Add an example of class decorators to test_grammar.
................
  r56377 | collin.winter | 2007-07-14 12:00:17 -0700 (Sat, 14 Jul 2007) | 1 line

  Add a basic example of dictcomps to test_grammar.
................
  r56413 | neal.norwitz | 2007-07-17 00:21:18 -0700 (Tue, 17 Jul 2007) | 149 lines

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

  ........
    r56204 | ronald.oussoren | 2007-07-08 23:02:21 -0700 (Sun, 08 Jul 2007) | 2 lines

    Patch 1693258: Fix for duplicate "preferences" menu-OS X
  ........
    r56207 | ronald.oussoren | 2007-07-09 01:41:15 -0700 (Mon, 09 Jul 2007) | 4 lines

    Patch 1673122: be explicit about which libtool to use, to avoid name clashes
    when a users install GNU libtool early in his PATH
  ........
    r56280 | georg.brandl | 2007-07-11 12:41:49 -0700 (Wed, 11 Jul 2007) | 2 lines

    Fix #1752132: wrong comment in opcode description.
  ........
    r56293 | georg.brandl | 2007-07-12 01:05:45 -0700 (Thu, 12 Jul 2007) | 3 lines

    Patch #1752270, #1750931: complain if urllib2 add_handler called
    without handler.
  ........
    r56296 | georg.brandl | 2007-07-12 01:11:29 -0700 (Thu, 12 Jul 2007) | 2 lines

    Patch #1739696: use code.co_code only if really necessary
  ........
    r56298 | georg.brandl | 2007-07-12 01:38:00 -0700 (Thu, 12 Jul 2007) | 3 lines

    Patch #1673759: add a missing overflow check when formatting floats
    with %G.
  ........
    r56302 | georg.brandl | 2007-07-12 02:06:41 -0700 (Thu, 12 Jul 2007) | 2 lines

    Patch #1731659: improve time.strptime docs.
  ........
    r56304 | georg.brandl | 2007-07-12 02:24:04 -0700 (Thu, 12 Jul 2007) | 2 lines

    Patch #1731169: clean up expected skips list.
  ........
    r56306 | georg.brandl | 2007-07-12 02:37:49 -0700 (Thu, 12 Jul 2007) | 3 lines

    Bug #1637365: add subsection about "__name__ == __main__" to the
    Python tutorial.
  ........
    r56308 | georg.brandl | 2007-07-12 02:59:22 -0700 (Thu, 12 Jul 2007) | 5 lines

    Patch #1675424: Added tests for uncovered code in the zipfile module.
      The KeyError raised by Zipfile.getinfo for nonexistent names now has
      a descriptive message.
  ........
    r56340 | facundo.batista | 2007-07-13 03:43:44 -0700 (Fri, 13 Jul 2007) | 6 lines


    Added tests for basic behavior of DateTime, Binary, and Fault classes
    and the escape function. Check that marshalling recursive sequences &
    dicts raises TypeError. Check that marshalling out-of-range ints
    raises OverflowError [Alan McIntyre - GSoC]
  ........
    r56345 | raymond.hettinger | 2007-07-13 05:09:41 -0700 (Fri, 13 Jul 2007) | 1 line

    Correct the docs for takewhile().  Improve the recipe for nth().  Should be backported
  ........
    r56348 | thomas.heller | 2007-07-13 06:59:39 -0700 (Fri, 13 Jul 2007) | 4 lines

    Repair COMError.  Since exceptions are new style classes now, setting
    the methods and docstring after the type creation does not work, they
    must be in the dictionary before creating the type.
  ........
    r56349 | thomas.heller | 2007-07-13 07:18:06 -0700 (Fri, 13 Jul 2007) | 1 line

    Add tests for _ctypes.COMError.
  ........
    r56350 | thomas.heller | 2007-07-13 09:50:43 -0700 (Fri, 13 Jul 2007) | 4 lines

    Do not try to load the GLUT library in the ctypes tests.  This test
    adds little value, but has a large problem on OS X, as explained in
    SF# 1581906.
  ........
    r56352 | thomas.heller | 2007-07-13 10:12:23 -0700 (Fri, 13 Jul 2007) | 3 lines

    Fix for SF# 1701409: segfault in c_char_p of ctypes.  The repr output
    of c_char_p and c_wchar_p has changed as a sideeffect.
  ........
    r56355 | thomas.heller | 2007-07-13 10:46:54 -0700 (Fri, 13 Jul 2007) | 3 lines

    Fix for SF# 1649098: avoid zero-sized array declaration in structure.
  ........
    r56357 | thomas.heller | 2007-07-13 12:51:55 -0700 (Fri, 13 Jul 2007) | 3 lines

    PyType_stgdict() returns a borrowed reference which must not be
    Py_DECREF'd.
  ........
    r56360 | barry.warsaw | 2007-07-13 15:12:58 -0700 (Fri, 13 Jul 2007) | 10 lines

    In response to this SF bug:

    [ 1752723 ] email.message_from_string: initial line gets discarded

    I added a test to assert that when the first line of text passed to
    message_from_string() contains a leading space, the message ends up with the
    appropriate FirstHeaderLineIsContinuationDefect on its defects list.

    The bug is invalid.
  ........
    r56364 | georg.brandl | 2007-07-14 10:12:23 -0700 (Sat, 14 Jul 2007) | 2 lines

    Bug #1753406: missing \versionadded for subprocess.check_call.
  ........
    r56366 | georg.brandl | 2007-07-14 10:32:41 -0700 (Sat, 14 Jul 2007) | 2 lines

    Clarify webbrowser.open description.
  ........
    r56380 | andrew.kuchling | 2007-07-14 13:58:21 -0700 (Sat, 14 Jul 2007) | 1 line

    Typo fix
  ........
    r56382 | andrew.kuchling | 2007-07-14 14:56:19 -0700 (Sat, 14 Jul 2007) | 7 lines

    Avoid exception if there's a stray directory inside a Maildir folder.

    The Maildir specification doesn't seem to say anything about this
    situation, and it can happen if you're keeping a Maildir mailbox in
    Subversion (.svn directories) or some similar system.  The patch just
    ignores directories in the cur/, new/, tmp/ folders.
  ........
    r56392 | facundo.batista | 2007-07-14 15:41:45 -0700 (Sat, 14 Jul 2007) | 6 lines


    First version.  Includes tests for helper functions: read, write,
    _exception, readwrite, closeall, compact_traceback; and for classes
    dispatcher, dispatcher_with_send, and file_wrapper.
    [Alan McIntyre - GSoC]
  ........
    r56399 | facundo.batista | 2007-07-15 13:30:39 -0700 (Sun, 15 Jul 2007) | 5 lines


    Changed the used port and commented out some tests that uses
    a non documented function that appers to uses resources
    not present in Windows.
  ........
    r56412 | facundo.batista | 2007-07-16 19:19:39 -0700 (Mon, 16 Jul 2007) | 6 lines


    Prevent asyncore.dispatcher tests from hanging by adding loop counters
    to server & client, and by adding asyncore.close_all calls in
    tearDown. Also choose correct expected logging results based on the
    value of __debug__  [Alan McIntyre - GSoC]
  ........
................
  r56442 | guido.van.rossum | 2007-07-18 10:26:38 -0700 (Wed, 18 Jul 2007) | 14 lines

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

  ........
    r56439 | georg.brandl | 2007-07-17 23:37:55 -0700 (Tue, 17 Jul 2007) | 2 lines

    Use "Unix" as platform name, not "UNIX".
  ........
    r56441 | guido.van.rossum | 2007-07-18 10:19:14 -0700 (Wed, 18 Jul 2007) | 3 lines

    SF patch# 1755885 by Kurt Kaiser: show location of Unicode escape errors.
    (Slightly tweaked for style and refcounts.)
  ........
................
2007-07-18 18:15:48 +00:00
Martin v. Löwis 10a60b3ec0 Change Py_BuildValue to generate Unicode objects for
's' and 'c' codes.
Change pickle to dump bytes objects using the 'S'
code, and to load the 'S' code as byte objects.
Change datetime and array to generate and expect
bytes objects in reduce/unreduce.
2007-07-18 02:28:27 +00:00
Guido van Rossum a8c360ee76 SF patch# 1755229 by Amaury Forgeot d'Arc: fix _winreg module and tests.
Untested.
2007-07-17 20:50:43 +00:00
Guido van Rossum 52b8976a03 Minimal changes to make ftplib work. Basically, this opens the stream in
text mode and encodes commands being sent.  The default encoding is ASCII,
there's a class/instance variable 'encoding' you could set to change it.
2007-07-17 20:45:57 +00:00
Guido van Rossum 93adc5dfaf (1) SF patch# 1755214 by Amaury Forgeot d'Arc which makes some tests
pass on Windows.

(2) Fix a typo in makefile() where using a text mode would attempt to set
    self.mode instead of text.mode.
2007-07-17 20:41:19 +00:00
Collin Winter dc40ae6b24 Fix two bugs from the map->itertools.imap switch. 2007-07-17 00:39:32 +00:00
Collin Winter 2c8fef07f6 Fix a bug in distutils.core's error handling. 2007-07-17 00:38:21 +00:00
Guido van Rossum e63bae6b09 Make the test of chr() overflow pass.
(Sigh. There are so many redundant tests.)
2007-07-17 00:34:25 +00:00
Collin Winter 72e110c1cd Fix a bug from the map->itertools.imap conversion. 2007-07-17 00:27:30 +00:00
Guido van Rossum 2698631d57 Make test_pickletools.py pass. 2007-07-17 00:19:46 +00:00
Guido van Rossum 1c5a98a360 Fix for cProfile.
SF patch# 1755176 by Amaury Forgeot d'Arc.
2007-07-16 23:36:05 +00:00
Guido van Rossum d77d6992a5 Change a bunch of file encodings from Latin-1 to UTF-8.
Remove the encoding from Tix.py (it doesn't seem to need one).
Note: we still have to keep the "coding: utf-8" declaration
for files that aren't pure ASCII, as the default per PEP 3120
hasn't been implemented yet.
2007-07-16 23:10:57 +00:00
Guido van Rossum 6a2ccd0273 Fix for one particular test (test_file). There are still four errors.
(This is not the fix suggested by Hasan Diwan in SF patch# 1753889.)
2007-07-16 20:51:57 +00:00
Guido van Rossum 27ae52362c Fix test_uu.py by inserting an explicit conversion from bytes to str
into uu.py.  (This is *not* SF patch 1754339, which I rejected.)
2007-07-16 19:50:03 +00:00
Guido van Rossum 456fe5d3ca Fix a weird use of try/finally to close a file.
(There are more places that don't close 'f' at all if an error occurs,
but none have a bogus try/finally pattern.)
2007-07-16 19:42:05 +00:00
Guido van Rossum b358a2c423 SF patch# 1752647 by Joe Gregorio.
Fixes to make test_mmap.py pass unit tests.
Moves the interface from being string based to being bytes based.
2007-07-16 19:29:02 +00:00
Guido van Rossum 88079f472e Use the encoding specification when reading the source file. 2007-07-15 14:02:52 +00:00
Guido van Rossum b7d3e65b3b Improve error handling; don't die from unicode errors or syntax errors. 2007-07-15 13:01:48 +00:00
Guido van Rossum 8ac004e698 Make chr() and ord() return/accept surrogate pairs in narrow builds.
The domain of chr() and the range of ord() are now always [0 ... 0x10FFFF].
2007-07-15 13:00:05 +00:00
Thomas Heller 49c12ac04e Fix ctypes tests on OS X. 2007-07-14 18:51:36 +00:00
Thomas Heller 19b52545df c_char, c_char_p objects and c_char array structure fields return
their value now as str, no longer str8.
2007-07-13 12:52:51 +00:00
Thomas Heller 27384da6e8 Do not accept str8 type in function calls any longer.
Accept bytes instead of str8 in the (unexposed in ctypes) BSTR type.
2007-07-13 12:07:59 +00:00
Thomas Heller 84d66a0843 Remove all the Python 2.3 compatibility markers (the Python 3 ctypes
version is not compatible with Python 2.x anymore).
Remove backwards compatibility code.
2007-07-13 11:49:15 +00:00
Thomas Heller e5095e187b Structure fields of type c_char array or c_wchar array accept bytes or
(unicode) string.
2007-07-13 11:19:35 +00:00
Thomas Heller 745f5e2de7 No crashes on Linux in the ctypes test suite any longer, so we can
remove the 'crash-protection'.
2007-07-12 20:10:18 +00:00
Thomas Heller f4f771fe0f Fix segfault on Linux. 2007-07-12 20:06:41 +00:00
Thomas Heller 8750384dbc More easy fixes. The ctypes unittests pass now (on Windows). 2007-07-12 19:58:41 +00:00
Thomas Heller d660fabd24 binascii.hexlify returns a bytes object; we must convert it to str
before we can pass it to re.sub.
2007-07-12 19:56:28 +00:00
Thomas Heller 0d8a1fd78d Simple fixes. 2007-07-12 19:54:27 +00:00
Thomas Heller d68d131d29 Simple fixes. 2007-07-12 19:45:20 +00:00
Thomas Heller f0d8b6eee9 Simple fixes. 2007-07-12 19:42:59 +00:00
Thomas Heller 3821e31d19 c_void_p.from_param accepts bytes. Fix test_prototypes. 2007-07-12 19:38:33 +00:00
Thomas Heller 3d79dd9edf c_char_p.from_param accepts bytes. Fix test_parameters. 2007-07-12 19:33:24 +00:00
Thomas Heller 7a76e8f67c Fix another test. 2007-07-12 19:24:59 +00:00
Thomas Heller 9ccf468323 test_slicing does not segfault under linux anymore, so we can run this
test by default.
2007-07-12 19:22:10 +00:00
Thomas Heller 7775c716fc Accept bytes as parameter to foreign functions without prototype.
These are passed as byte strings (unicode strings are passed as wide
character strings).
2007-07-12 19:19:43 +00:00
Thomas Heller 60831316df Accept bytes for c_wchar_p instances and c_wchar array instances.
ctypes.create_unicode_buffer also accepts bytes now.

Revert some tests in test_unicode: Since string literals are unicode
now, conversion takes place when byte literals are passed as unicode
parameters.
2007-07-12 19:06:25 +00:00
Thomas Heller 2c5e96465f Accept bytes in c_char_p and c_wchar_p types. 2007-07-12 15:41:51 +00:00
Thomas Heller 3af4266d07 ctypes.c_char and ctypes.c_wchar now accept initialization from byte objects. 2007-07-12 14:58:32 +00:00
Thomas Heller f7c6d86832 Use a unicode string as unique_key instead of 8-bit string. 2007-07-12 13:55:37 +00:00
Thomas Heller 7c1ebe33b8 Fix a ctypes test. 2007-07-12 12:05:40 +00:00
Thomas Heller 1f498ef63d Fix a ctypes test. 2007-07-12 11:59:52 +00:00
Thomas Heller b0f48abd87 Skip testing the special file "/dev/tty" on Windows. This test does
weird things if someone has a "\dev" directory on the current drive.
2007-07-12 11:29:02 +00:00
Guido van Rossum e409b97950 Make this a pure-ASCII file. This used to have a Latin-1 coding and
contain several string literals using non-ASCII characters.  Because
of the pain of displaying those characters, it's better to use \xXX
escapes for these instead of typing the accented characters.

Apologies if I missed something; it didn't look like there was anything
that depended on this file being encoded in Latin-1 or containing non-ASCII
characters.
2007-07-12 09:25:21 +00:00
Guido van Rossum fc0ffb7243 Merged revisions 56265-56300 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

........
  r56274 | georg.brandl | 2007-07-11 08:10:46 -0700 (Wed, 11 Jul 2007) | 2 lines

  Fix #1751965, typo in isinstance.
........
2007-07-12 08:55:44 +00:00
Guido van Rossum a5d0c260ac Fix for tet_bigmem.py (the failure was caused by a spurious reference
to 'file', which no longer exists).
Fix inspired by Christian Heimes, SF# 1752195.
2007-07-12 08:11:23 +00:00
Guido van Rossum 652f446d42 Fixes for str/uni/bytes for gettext.py. test_gettext.py passes.
Fix by Christian Heimes, SF# 1751958, who writes:

  I tested the fixes with the Zope3 zope.app.locales packages.
  The mo files are loaded and parsed w/o any problem.
  The translation with gettext.gettext is working as expected.
2007-07-12 08:04:06 +00:00
Guido van Rossum 076da0957b Fix asynchat to use bytes instead of strings.
Fix by Alexandre Vassalotti, SF# 1752173.
2007-07-12 07:58:54 +00:00
Guido van Rossum bdab7d3cb6 Fix test_poll.py. By Christian Heimes. 2007-07-11 20:43:16 +00:00
Thomas Heller acb470c05f Fix the test; solution found by Christian Heimes. Thanks! 2007-07-11 19:34:54 +00:00
Thomas Heller f5af466d3a Fix one more ctypes test, and disable the tests that were segfaulting.
Thanks to Christian Heimes for finding these tests.
2007-07-11 14:51:58 +00:00
Thomas Heller c92159aaea dict.keys() returns an iterable, convert it into a list. 2007-07-11 14:49:26 +00:00
Thomas Heller 13eb6cad7e Fix some more ctypes tests. 2007-07-11 13:50:53 +00:00
Guido van Rossum 992d4a3e6e Merged revisions 56154-56264 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

................
  r56155 | neal.norwitz | 2007-07-03 08:59:08 +0300 (Tue, 03 Jul 2007) | 1 line

  Get this test working after converting map to return an iterator
................
  r56202 | neal.norwitz | 2007-07-09 04:30:09 +0300 (Mon, 09 Jul 2007) | 37 lines

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

  ........
    r56129 | georg.brandl | 2007-06-30 04:01:01 -0700 (Sat, 30 Jun 2007) | 2 lines

    Document smtp.SMTPAuthenticationError.
  ........
    r56137 | georg.brandl | 2007-07-01 01:11:35 -0700 (Sun, 01 Jul 2007) | 2 lines

    Fix a few webbrowser.py problems.
  ........
    r56143 | georg.brandl | 2007-07-02 04:54:28 -0700 (Mon, 02 Jul 2007) | 2 lines

    Remove duplicate sentence from alarm() doc.
  ........
    r56170 | mark.hammond | 2007-07-03 19:03:10 -0700 (Tue, 03 Jul 2007) | 3 lines

    copy built files to the PCBuild directory, where tools like
    distutils or external build processes can find them.
  ........
    r56176 | kurt.kaiser | 2007-07-05 15:03:39 -0700 (Thu, 05 Jul 2007) | 10 lines

    Many calls to tk.call involve an arglist containing a single tuple.
    Calls using METH_OLDARGS unpack this tuple; calls using METH_VARARG
    don't.  Tcl's concatenation of args was affected; IDLE doesn't start.

    Modify Tkapp_Call() to unpack single tuple arglists.

    Bug 1733943
    Ref http://mail.python.org/pipermail/python-checkins/2007-May/060454.html
  ........
    r56177 | neal.norwitz | 2007-07-05 21:13:39 -0700 (Thu, 05 Jul 2007) | 1 line

    Fix typo in comment
  ........
................
  r56251 | neal.norwitz | 2007-07-11 10:01:01 +0300 (Wed, 11 Jul 2007) | 1 line

  Get working with map returning an iterator (had to fix whitespace too)
................
  r56255 | thomas.wouters | 2007-07-11 13:41:37 +0300 (Wed, 11 Jul 2007) | 6 lines


  Clean up merge glitch or copy-paste error (the entire module was duplicated,
  except the first half even had some more copy-paste errors, referring to
  listcomps and genexps instead of setcomps)
................
  r56256 | thomas.wouters | 2007-07-11 15:16:01 +0300 (Wed, 11 Jul 2007) | 14 lines


  Dict comprehensions. Still needs doc changes (like many python-3000 features
  ;-). It generates bytecode similar to:

  x = {}
  for k, v in (generator here):
    x[k] = v

  except there is no tuple-packing and -unpacking involved. Trivial
  measurement suggests it's significantly faster than dict(generator here) (in
  the order of 2 to 3 times as fast) but I have not done extensive
  measurements.
................
  r56263 | guido.van.rossum | 2007-07-11 15:36:26 +0300 (Wed, 11 Jul 2007) | 3 lines

  Patch 1724999 by Ali Gholami Rudi -- avoid complaints about dict size
  change during iter in destroy call.
................
2007-07-11 13:09:30 +00:00
Thomas Heller 9004427589 Fix some simple ctypes tests. 2007-07-11 12:25:26 +00:00
Guido van Rossum e61fd5b5ed Patch by Christian Heimes to change self.assert_(x == y) into
self.assertEqual(x, y).  (Christian used self.failUnlessEqual(),
but the double negative makes it hard to grok, so I changed it.)
2007-07-11 12:20:59 +00:00
Guido van Rossum 55b4a7b6dc Make test_descr.py pass. Had to disable a few tests, remove references
to 'file', and fix a bunch of subtleties in the behavior of objects
related to overriding __str__.  Also disabled a few tests that I couldn't
see how to fix but that seemed to be checking silly stuff only.
2007-07-11 09:28:11 +00:00
Guido van Rossum f074b640f9 Fix test_cmd_line.py. Fix by Christian Heimes. 2007-07-11 06:56:16 +00:00
Guido van Rossum 535a5ef196 Fix test_file.py. It was passing on OSX for the wrong reason
(somehow OSX marks I/O devices as seekable).
2007-07-10 20:59:22 +00:00
Guido van Rossum 558ca84730 Fix test_hashlib regression caused by my fixing hexdigest() to return
a text string instead of bytes.  (This being hex digits it *should*
be a text string -- that it wasn't before was a misunderstanding on
my part of the C code.)
2007-07-10 20:31:05 +00:00
Guido van Rossum 3f42908051 Make hmac use bytes. Make test_hmac pass. 2007-07-10 13:35:52 +00:00
Guido van Rossum dc12288e11 Make test_genericpath pass. 2007-07-10 12:09:13 +00:00
Guido van Rossum 98f1375f0e Make test_posixpath.py pass. 2007-07-10 12:07:30 +00:00
Guido van Rossum 469734b996 Set closed flag *after* calling flush(). 2007-07-10 12:00:45 +00:00
Guido van Rossum 47f17d0175 Make test_marshal pass. There was a bizarre recursion limit exceeded error,
caused by not closing a file.
2007-07-10 11:37:44 +00:00
Guido van Rossum d10b2dc4fc Be even more lenient when catching errors from readlines(). 2007-07-10 11:34:31 +00:00
Guido van Rossum 4b5386f398 Add proper tests for closed files to various I/O operations,
restoring a disabled test.
This was necessary to make test_pickle.py pass.
2007-07-10 09:12:49 +00:00
Guido van Rossum 2b6a97e69c Add the function/method name to assertRaises. 2007-07-10 09:10:40 +00:00
Guido van Rossum a098294446 Make test_urllib.py pass. Mostly str/bytes issues.
Also fix mac toolbox glue to accept str, str8, bytes for
255-byte strings.
2007-07-10 08:30:03 +00:00
Guido van Rossum 6718062538 Fix test_socket.py. Simple str/bytes issue with IPV6 addresse. 2007-07-10 07:29:12 +00:00
Guido van Rossum 7165cb1a48 Made test_file pass. This meant adding support for read(-1) and read()
to even the most basic file object (I also added readall() which may
be a better API).  Also, not all the tests requiring specific failure
modes could be saved.  And there were the usual str/bytes issues.
I made sure test_io.py still passes (io.py is now most thoroughly
tested by combining test_file.py and test_io.py).
2007-07-10 06:54:34 +00:00
Guido van Rossum 5ed033b5a2 Change hashlib to return bytes from digest() instead of str8. 2007-07-09 14:29:40 +00:00
Guido van Rossum 65b6a80f19 Make test_uuid passed.
Change the UUID properties to use @property.
Change the UUID API so that .bytes and .bytes_le return, and the
corresponding arguments to __init__() require, values of type 'bytes'.
2007-07-09 14:03:08 +00:00
Guido van Rossum 9a63470fd7 Make test_tempfile.py work. Make SpooledTempFile work in text and binary mode. 2007-07-09 10:24:45 +00:00
Guido van Rossum b4e87e3792 Make test_optparse pass. 2007-07-09 10:08:42 +00:00
Guido van Rossum a222e4cc71 Fix the last remaining problem with test_multibytecodec.py;
the problem was writing a file in text mode instead of in binary mode.
2007-07-09 09:18:12 +00:00
Guido van Rossum 89687b9ba8 Two necessary fixes (but not enough to make tests pass):
- Use os.urandom() as the only source of random bytes.
- Don't reference socket._fileobject; use io.BufferedReader instead.
2007-07-03 21:07:17 +00:00