Commit Graph

11566 Commits

Author SHA1 Message Date
Gregory P. Smith e5a8dc684c docstring cut n paste correction 2007-08-23 06:37:46 +00:00
Kurt B. Kaiser 9a3b014f31 os.getcwd() is returning str8; sys.path items are str. 2007-08-23 06:17:40 +00:00
Kurt B. Kaiser e071277939 Conform to py3k dict.{keys, items, values} with some advice from 2b3
M    idlelib/configHandler.py
M    idlelib/ColorDelegator.py
M    idlelib/Delegator.py
M    idlelib/ObjectBrowser.py
M    idlelib/PyShell.py
M    idlelib/Debugger.py
M    idlelib/configDialog.py
M    idlelib/StackViewer.py
M    idlelib/keybindingDialog.py
M    idlelib/tabpage.py
M    idlelib/EditorWindow.py
M    idlelib/WindowList.py
M    idlelib/RemoteDebugger.py
M    idlelib/dynOptionMenuWidget.py
2007-08-23 05:25:55 +00:00
Kurt B. Kaiser ad66742e34 Fix raise with 2to3
M    idlelib/configHandler.py
M    idlelib/tabpage.py
M    idlelib/EditorWindow.py
M    idlelib/rpc.py
M    idlelib/IOBinding.py
M    idlelib/RemoteDebugger.py
M    idlelib/TreeWidget.py
2007-08-23 01:06:15 +00:00
Collin Winter e45be28be6 Convert raise statements in Lib/plat-{mac,os2emx}. 2007-08-23 00:01:55 +00:00
Guido van Rossum cfe02a498b Fixes by John Reese and Jacques Frechet that make test_xmlrpc pass.
(Note that test_xmlrpc isn't touched by the fixes!)  There were two
separate issues; (a) BaseHTTPServer was using a TextIOWrapper which
was swallowing some of the POST body; (b) the getheaders() API was
changed but (due to integration of 2.6 code) the code wasn't modified.
2007-08-22 23:45:42 +00:00
Alex Martelli ae211f9abf Implement the round functionality for PEP 3141, and add tests for it. 2007-08-22 23:21:33 +00:00
Kurt B. Kaiser 2d7f6a079d Switch to absolute imports to support direct execution of modules. Many
IDLE modules have main() or test() functions which are essential for testing.


M    idlelib/AutoCompleteWindow.py
M    idlelib/UndoDelegator.py
M    idlelib/Bindings.py
M    idlelib/AutoComplete.py
M    idlelib/configHandler.py
M    idlelib/HyperParser.py
M    idlelib/ColorDelegator.py
M    idlelib/ObjectBrowser.py
M    idlelib/ZoomHeight.py
M    idlelib/PyShell.py
M    idlelib/ParenMatch.py
M    idlelib/Debugger.py
M    idlelib/configDialog.py
M    idlelib/StackViewer.py
M    idlelib/ReplaceDialog.py
M    idlelib/ScriptBinding.py
M    idlelib/GrepDialog.py
M    idlelib/EditorWindow.py
M    idlelib/FormatParagraph.py
M    idlelib/OutputWindow.py
M    idlelib/aboutDialog.py
M    idlelib/IdleHistory.py
M    idlelib/PathBrowser.py
M    idlelib/ClassBrowser.py
M    idlelib/CallTips.py
M    idlelib/FileList.py
M    idlelib/idle.py
M    idlelib/CodeContext.py
M    idlelib/SearchDialog.py
M    idlelib/RemoteObjectBrowser.py
M    idlelib/RemoteDebugger.py
M    idlelib/TreeWidget.py
M    idlelib/run.py
M    idlelib/Percolator.py
M    idlelib/macosxSupport.py
2007-08-22 23:01:33 +00:00
Alex Martelli 86d8b3497f Implement the trunc builtin for PEP 3141 2007-08-22 22:39:42 +00:00
Collin Winter a65e94c1bf Convert raise statements in bsddb. 2007-08-22 21:45:20 +00:00
Collin Winter 865ea89201 Fix raise statements in hotshot. 2007-08-22 21:45:02 +00:00
Kurt B. Kaiser 7a4dbaf837 Replace file() with open() 2007-08-22 21:34:28 +00:00
Kurt B. Kaiser 2d726df26e Use buffer of type 'bytes' to accumulate from socket. 2007-08-22 21:33:27 +00:00
Gregory P. Smith e20a2c1397 stop leaving log.0000001 __db.00* and xxx.db turds in developer
sandboxes when bsddb3 tests are run.
2007-08-22 21:28:15 +00:00
Kurt B. Kaiser 4d9620a687 Fix bug introduced at r54854 to mass replace string fcns with methods :-) 2007-08-22 19:41:43 +00:00
Gregory P. Smith 0e6012cbf3 Eat some low hanging fruit... let the test suite run. 2007-08-22 19:23:36 +00:00
Kurt B. Kaiser ea03c11655 Fix some debugging print statements 2007-08-22 18:57:50 +00:00
Guido van Rossum b7f136e73e Make IOBase (and hence all other classes in io.py) use ABCMeta as its metaclass,
so you can use their class .register() method to register virtual subclasses.
2007-08-22 18:14:10 +00:00
Kurt B. Kaiser bfc672b169 Remove some old comments adequately covered in the code. 2007-08-22 18:10:19 +00:00
Kurt B. Kaiser 3a4e24b999 1. Fix File Open: don't encode filename to UTF-8 bytes
2. Get test() code working.
2007-08-22 18:06:14 +00:00
Guido van Rossum 23cfc9845c Convert sunaudio.py to bytes. (It has no unit test of its own!)
Fix test_ossaudiodev by closing the dsp properly (it can't be opened
multiple times on my box).
2007-08-21 22:49:52 +00:00
Kurt B. Kaiser 003b09883e eliminate "from ... import *" in a function. 2007-08-21 19:54:18 +00:00
Lars Gustäbel 3741effcf8 Fall back to 'ascii' encoding if sys.getfilesystemencoding() returns
None. Remove encoding and errors argument from pax create methods in
TarInfo, pax always uses UTF-8.
Adapt the documentation and tests to the new string/unicode concept.
2007-08-21 12:17:05 +00:00
Guido van Rossum 4566c71e0e Fix fallout from making __private variables in threading.py _protected.
(Maybe we need to pick less obvious names for some of those?)
2007-08-21 03:36:47 +00:00
Guido van Rossum c1e315d2b0 Rename __whatever variables defined by ABCMeta to _abc_whatever, so as
to simplify legitimate use of these.
2007-08-20 19:29:24 +00:00
Guido van Rossum d06489945f Get rid of all __private variables and methods in the threading module.
These have mostly just gotten in the way of legitimate unanticipated use.
2007-08-20 19:25:41 +00:00
Guido van Rossum 61e21b52f1 Merged revisions 57152-57220 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r57155 | brett.cannon | 2007-08-17 11:51:57 -0700 (Fri, 17 Aug 2007) | 2 lines

  Clarify the comment about setting the PYTHON variable for the Doc Makefile.
........
  r57156 | brett.cannon | 2007-08-17 11:59:58 -0700 (Fri, 17 Aug 2007) | 3 lines

  Remove news entry for test.test_support.guard_warnings_filter as it has been
  removed.
........
  r57158 | facundo.batista | 2007-08-17 12:16:44 -0700 (Fri, 17 Aug 2007) | 9 lines


  Added a flag (_send_traceback_header) to the SimpleXMLRPCServer class
  that allows sending back exception/stack trace information about
  internal server errors (this flag defaults to False to avoid sending
  such information unless explicitly enabled).  Added tests to verify
  behavior of this new feature (these tests are skipped on win32 because
  of problems with WSAEWOULDBLOCK). Renamed HTTPTestCase to
  SimpleServerTestCase. [GSoC - Alan McIntyre]
........
  r57160 | brett.cannon | 2007-08-17 13:16:15 -0700 (Fri, 17 Aug 2007) | 2 lines

  Make test_warnings re-entrant.
........
  r57175 | georg.brandl | 2007-08-17 23:05:56 -0700 (Fri, 17 Aug 2007) | 2 lines

  Fix PDB command descriptions.
........
  r57182 | brett.cannon | 2007-08-18 11:30:36 -0700 (Sat, 18 Aug 2007) | 3 lines

  Remove Mikael as the maintainer of BeOS at his request.  With no maintainer
  should the port be deprecated in 2.6?
........
  r57199 | georg.brandl | 2007-08-19 11:43:50 -0700 (Sun, 19 Aug 2007) | 2 lines

  Fix stray backticks.
........
  r57211 | hyeshik.chang | 2007-08-19 23:49:18 -0700 (Sun, 19 Aug 2007) | 2 lines

  Add cheot-ga-keut composed make-up sequence support in EUC-KR codec.
........
  r57216 | guido.van.rossum | 2007-08-20 08:18:04 -0700 (Mon, 20 Aug 2007) | 4 lines

  Add a hack (originally devised in a slightly different form by Thomas Wouters)
  to prevent spurious tracebacks when a daemon thread's cleanup happens to wake
  up when the world around it has already been destroyed.
........
2007-08-20 19:06:03 +00:00
Hye-Shik Chang 9604286ee1 Fix xmlrpc unittest. While it now passes on Linux, it still fails
on FreeBSD due to the difference of socket blocking mode inheritance.
2007-08-19 10:49:11 +00:00
Neal Norwitz faa54a3929 Code review of the new buffer protocol. Mostly add questions that should
be answered with the comments removed.

There are many places that require checks when doing arithmetic for memory
sizes when allocating memory.  Otherwise, overflow is possible with
a subsequent crash.

Fix SF #1777057 which was a result of not initializing the new BufferError
properly.  Had to update the test for exceptions for BufferError too.
2007-08-19 04:23:20 +00:00
Guido van Rossum 1836358c01 Fix an unfinished though in my own test code.
(testNewlinesInput and testNewlinesOutput are mine, not Tony's.)
2007-08-18 22:05:58 +00:00
Guido van Rossum 8358db22fa New I/O code from Tony Lownds implement newline feature correctly,
and implements .newlines attribute in a 2.x-compatible fashion.
2007-08-18 21:39:55 +00:00
Guido van Rossum 3de862df45 Make the cleanup between -R passes deal better with ABC registries,
*restoring* selected registries instead of *resetting* them all.  Also
change the default for the huntrleaks parameter to None everywhere, as
its other value is a list of three elements, so it is not a bool.
2007-08-18 00:10:33 +00:00
Guido van Rossum 787794f8e2 Fix _dump_registry() to use the correct prefix for the private
methods.  Reset the negative cache *before* resetting the invalidation
counter, hoping this may plug a race condition (but then again, this
whole module isn't coded to be thread-safe).
2007-08-18 00:08:26 +00:00
Guido van Rossum 2673de5741 Allow -R4:3 instead of -R4:3: -- I never use the 3rd arg. 2007-08-17 22:58:14 +00:00
Guido van Rossum 4e7eba7cfa Change the usage() function. Don't print the entire multi-page
docstring when there's a command line syntax error.
2007-08-17 18:39:15 +00:00
Walter Dörwald 19e62387b9 Fix stupid typo in Lib/encodings/utf_32.py which led to failing tests
on big endian machines.

Update documentation: UTF-32 codecs will be in 2.6.
2007-08-17 16:23:21 +00:00
Skip Montanaro eb33e5ae79 Remove support for BeOS 2007-08-17 12:57:41 +00:00
Neal Norwitz 5ef262c35f Simplify expression 2007-08-17 04:15:19 +00:00
Guido van Rossum 540d987d34 Fix the IPv6 pton/ntop tests. Why weren't these failing on Linux? No IPv6? 2007-08-17 03:51:09 +00:00
Neal Norwitz 62e3a9aed5 Remove output file for test that was already removed 2007-08-17 03:08:12 +00:00
Skip Montanaro 289bc05709 some RiscOS stuff I missed before (was only looking for "RISCOS") 2007-08-17 02:30:27 +00:00
Skip Montanaro ceaafa66ef forgot this when removing RISCOS stuff 2007-08-17 01:40:16 +00:00
Guido van Rossum af554a0e17 First merge from the trunk straight into the py3k branch. I'm not
using the message generated by svnmerge, because it contains a lot of
stuff about the Doc tree, which I'm not merging this time due to the
way the Doc tree was initially added.  I am however adding roman.py
which was added later to Doc/tools.  I'll try to diff the two Doc
trees separately to see if there's stuff I missed.
2007-08-16 23:48:43 +00:00
Walter Dörwald 41980caf64 Apply SF patch #1775604: This adds three new codecs (utf-32, utf-32-le and
ut-32-be). On narrow builds the codecs combine surrogate pairs in the unicode
object into one codepoint on encoding and create surrogate pairs for
codepoints outside the BMP on decoding. Lone surrogates are passed through
unchanged in all cases.

Backport to the trunk will follow.
2007-08-16 21:55:45 +00:00
Jeremy Hylton 5f22af167f Remove last(?) use of httplib.HTTPS, which caused test_socket_ssl to fail.
Refactor the urllib open_http() and open_https() to use the same
internal logic.  The only difference between the two is the call to
constructor an HTTPConnection object.
2007-08-16 17:55:18 +00:00
Skip Montanaro 7a98be2efb Remove RISCOS support 2007-08-16 14:35:24 +00:00
Martin v. Löwis 47383403a0 Implement PEP 3131. Add isidentifier to str. 2007-08-15 07:32:56 +00:00
Guido van Rossum 32c4ac0143 Down with str8!
Change various socket APIs to use bytes or str instead str8.
2007-08-15 03:56:40 +00:00
Martin v. Löwis ff398c6f95 Format bools properly in %d. 2007-08-14 21:57:32 +00:00
Collin Winter 3eed765223 Bug #1772489: make dir() work on traceback objects again. 2007-08-14 17:53:54 +00:00
Jeremy Hylton 3a38c91342 Remove Python 1.5 compatibility layer from httplib.
The two clients in the std library have been updated to use the newer
interface.  A couple of minor changes to the httplib tests were
needed.

Also, reformat some long lines in the httplib tests.
2007-08-14 17:08:07 +00:00
Jeremy Hylton 5d8a88a442 Change xmlrpclib to use the newer httplib interface.
Note that it's hard to test xmlrpclib, because the server it attempts
to connect to doesn't seem to support the expected interfaces.  Many
of the links via xmlrpc.com are dead, so I couldn't find another
server to use for tests.
2007-08-14 16:47:39 +00:00
Guido van Rossum 956e359579 The dbm module should use bytes for keys. This makes test_shelve pass. 2007-08-14 15:42:45 +00:00
Martin v. Löwis 5bcf109c73 Fix test_gdbm. 2007-08-14 09:24:24 +00:00
Martin v. Löwis 967f1e3b85 Remove string.{letters,lowercase,uppercase}. 2007-08-14 09:23:10 +00:00
Guido van Rossum 5424df2f7e Patch suggested Paul Colomiets fixes test_threaded_import.py. 2007-08-13 19:06:38 +00:00
Guido van Rossum c934128162 Improved patches for sndhdr and imghdr by Victor Stinner, who writes:
- fix "h[sbseek] == b'\1'" and "ratecode = ord(h[sbseek+4])" in test_voc()
 - avoid division by zero
 - use startswith method: replace h[:2] == b'BM' by h.startswith(b'BM')
 - use aifc.open() instead of old aifc.openfp()
 - use ord(b'P') instead of ord('P')
2007-08-13 17:50:00 +00:00
Guido van Rossum 4c269c5928 Fix two obvious 2.xisms. 2007-08-13 17:39:20 +00:00
Martin v. Löwis 4d9ed9fc33 Enable basic load/store again. 2007-08-13 13:30:04 +00:00
Hye-Shik Chang caf871ad32 Fix a failing test on FreeBSD: ttys are seekable in FreeBSD, too. 2007-08-13 13:21:33 +00:00
Hye-Shik Chang 49d90bc9ef Fix a test failure on non-UTF-8 locales: bad_coding2.py is encoded
in utf-8.
2007-08-13 13:11:39 +00:00
Lars Gustäbel ead70565fc Retouch my last change after a comment on style from Guido. 2007-08-13 09:05:16 +00:00
Martin v. Löwis 0f98d8f8ea Allow str8 in .write(). 2007-08-13 06:26:48 +00:00
Martin v. Löwis 98ff898c46 Expect that source strings are Unicode. 2007-08-13 06:03:15 +00:00
Martin v. Löwis e83395ee79 Make assertion error be more verbose. 2007-08-13 06:02:38 +00:00
Martin v. Löwis 163b717cd3 Fix typo. 2007-08-13 06:02:09 +00:00
Barry Warsaw 72937f3216 Compare what's read from files against proper byte literals. Neither of these
modules have unittests AFAICT, and I'm not improving things here, but these
changes make a bunch of email package tests succeed, and command line testing
against real files seems to make things better.

Added an __main__ section to imghdr.py so that it can be run from the command
line similarly to sndhdr.py.  Someone else can figure out a better -m way of
doing this.

In sndhdr.py do a couple of very minor cleanups, and use a with statement to
not wait for gc to close the file.
2007-08-12 14:37:20 +00:00
Martin v. Löwis 646049ec30 Don't try to convert str to Unicode anymore. 2007-08-12 07:06:14 +00:00
Neal Norwitz 9b2a26989d Get pystone working with lazy map. 2007-08-12 07:02:50 +00:00
Kurt B. Kaiser cbbe98f04f 1. Catch TypeError exception when writing to OutputWindow
2. PyShell: shell isn't working due to encoding issues.  Temporarily direct
   exceptions to the terminal.  Also, trap exceptions occurring during write()
   instead of passing.

Checking (2)  in temporarily to aid finding the encoding problem in
IOBinding.py
2007-08-12 01:52:35 +00:00
Neal Norwitz 801c89be5d Add -s/--start option that makes it easier to run the tests in batches
when one test fails and you want to start running from that point onwards.
2007-08-12 01:31:40 +00:00
Neal Norwitz 016880229a Kill execfile(), use exec() instead 2007-08-12 00:43:29 +00:00
Neal Norwitz bb217d9ed8 Make sure to flush output when writing dots during -R runs 2007-08-12 00:00:44 +00:00
Neal Norwitz f7f28fc46b Fix problem when exec'ing a string with a coding 2007-08-11 21:31:25 +00:00
Neal Norwitz 03fc7799b0 Remove unnecessary import 2007-08-11 19:27:13 +00:00
Neal Norwitz 1e50a9f7cc Fix test_wsgiref that used StringIO and a BufferedReader rather than
real files.  This code assumed that fileno() would succeed which wasn't
the case.
2007-08-11 18:37:05 +00:00
Guido van Rossum 9264ecd799 Quick fix for a new problem here -- using string.lowercase somehow caused
problems.
2007-08-11 16:40:13 +00:00
Martin v. Löwis d78d3b4541 Fall back to ascii if the locale module cannot be loaded. 2007-08-11 15:36:45 +00:00
Martin v. Löwis d1cd4d4176 Set sys.stdout.encoding properly.
Always set LC_CTYPE on interpreter startup.
Add device_encoding function.
2007-08-11 14:02:14 +00:00
Martin v. Löwis 79c320898d Change shelve to require a bytes-oriented dict as
the underlying storage, and yet provide string keys.
2007-08-11 06:57:14 +00:00
Neal Norwitz 8dfc4a9bac Remove support for __members__ and __methods__. There still might be
some cleanup to do on this.  Particularly in Python/traceback.c with
getting rid of the getattr if possible and Demo/*metaclasses/Enum.py.
2007-08-11 06:39:53 +00:00
Martin v. Löwis 32ca442b13 Fix test_bsddb3. 2007-08-11 06:13:20 +00:00
Kurt B. Kaiser 7378df7822 Fix what appears to be a very old bug. Tkinter in struni is more intolerant
of non-existant text widget 'marks', it seems.
2007-08-11 04:20:51 +00:00
Guido van Rossum efdca3e071 Use an event variable to wait for the server to be ready, rather than sleep(0.1). 2007-08-10 21:28:41 +00:00
Kurt B. Kaiser 6ae6ba09ea Remove the None tag from tagdefs dict for now, appears inoperative and
causes a _tkinter error in py3k.
2007-08-10 19:45:35 +00:00
Jeremy Hylton e6b59c5550 Make sure the mock object passed to finish_request() is buffered. 2007-08-10 19:13:33 +00:00
Jeremy Hylton 7ffe2998cd Allow rfc822 to process headers from an incoming HTTP request. 2007-08-10 18:49:32 +00:00
Jeremy Hylton 4b878bd3d5 Style 2007-08-10 18:49:01 +00:00
Gerhard Häring 6d21456137 Make the sqlite tests pass. 2007-08-10 18:15:11 +00:00
Guido van Rossum bd4a63e091 A small tweak to avoid calling traceback.format_exception_only() with
a bogus (tuple) value.  This should fix the "make install" issue Neal
reported.
2007-08-10 17:36:34 +00:00
Lars Gustäbel 5590d8cc8a RFC 1952 requires the FNAME field to be Latin-1. Do not include
filenames that cannot be represented that way.
2007-08-10 12:02:32 +00:00
Martin v. Löwis cccc58d993 Fix dbshelve and much of dbtables. 2007-08-10 08:36:56 +00:00
Martin v. Löwis 9b01862d32 Wrap set_location. 2007-08-10 07:47:16 +00:00
Kurt B. Kaiser e1b4a1613b Fix circular import issue 2007-08-10 02:45:06 +00:00
Kurt B. Kaiser f2335a9da0 Fix filter() issues 2007-08-10 02:41:21 +00:00
Guido van Rossum 283f3ffc24 Remove spurious (and unneeded) import of StringIO. 2007-08-10 01:01:28 +00:00
Guido van Rossum f39317a972 Hack to avoid a nasty recursion issue when Python is invoked
in verbose mode: pre-import the Latin-1 and UTF-8 codecs
2007-08-09 22:51:04 +00:00
Kurt B. Kaiser 66aaf74e52 Fix remaining map() issues.
M    idlelib/PyShell.py
M    idlelib/EditorWindow.py
M    idlelib/rpc.py
M    idlelib/OutputWindow.py
M    idlelib/RemoteObjectBrowser.py
2007-08-09 18:00:23 +00:00
Kurt B. Kaiser 60455b22de Use relative imports 2007-08-09 17:15:54 +00:00
Guido van Rossum c76a250f3e Merged revisions 56782-56847 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

................
  r56808 | kurt.kaiser | 2007-08-07 14:15:45 -0700 (Tue, 07 Aug 2007) | 2 lines

  Replace sys.exitfunc call with atexit call
................
  r56835 | thomas.wouters | 2007-08-08 09:20:30 -0700 (Wed, 08 Aug 2007) | 8 lines


  Tests for dict comprehensions I forgot to 'svn add' when committing the
  actual feature.

  I was _sure_ I had checked in these new tests already, but I guess the
  checkin failed and I didn't notice.
................
  r56847 | guido.van.rossum | 2007-08-09 07:03:34 -0700 (Thu, 09 Aug 2007) | 30 lines

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

  ........
    r56762 | georg.brandl | 2007-08-06 00:37:58 -0700 (Mon, 06 Aug 2007) | 2 lines

    Place #ifdef Py_USING_UNICODE around decode_unicode().
  ........
    r56763 | georg.brandl | 2007-08-06 00:39:09 -0700 (Mon, 06 Aug 2007) | 2 lines

    Replace unnecessary function call.
  ........
    r56764 | georg.brandl | 2007-08-06 00:52:20 -0700 (Mon, 06 Aug 2007) | 2 lines

    Patch #1765839: add link to https+proxy urllib2 opener.
  ........
    r56797 | georg.brandl | 2007-08-07 00:13:24 -0700 (Tue, 07 Aug 2007) | 2 lines

    Bug #1769002: fix a now-wrong sentence in the tutorial.
  ........
    r56830 | georg.brandl | 2007-08-08 06:03:41 -0700 (Wed, 08 Aug 2007) | 3 lines

    Revert the fix for #1548891, it broke backwards compatibility with arbitrary read buffers.
    Fixes #1730114.
  ........
    r56833 | georg.brandl | 2007-08-08 06:50:02 -0700 (Wed, 08 Aug 2007) | 2 lines

    Fix compilation warning.
  ........
................
2007-08-09 14:26:58 +00:00
Guido van Rossum 34d1928766 SF patch# 1770008 by Christian Heimes (plus some extras).
Completely get rid of StringIO.py and cStringIO.c.

I had to fix a few tests and modules beyond what Christian did, and
invent a few conventions.  E.g. in elementtree, I chose to
write/return Unicode strings whe no encoding is given, but bytes when
an explicit encoding is given.  Also mimetools was made to always
assume binary files.
2007-08-09 01:03:29 +00:00
Martin v. Löwis 918f49e645 Fix most of the bsddb3 tests. 2007-08-08 22:08:30 +00:00
Guido van Rossum eb29e9ab2b Fix core dump in an endcase of b.strip() that I missed. 2007-08-08 21:55:33 +00:00
Thomas Heller 2fb5ac745b Fix the ctypes tests. Patch from Victor Stinner. He writes:
The problem is that ctypes c_char (and c_char_p) creates unicode string
instead of byte string. I attached a proposition (patch) to change this
behaviour (use bytes for c_char).

So in next example, it will display 'bytes' and not 'str':
  from ctypes import c_buffer, c_char
  buf = c_buffer("abcdef")
  print (type(buf[0]))

Other behaviour changes:
 - repr(c_char) adds a "b"
   eg. repr(c_char('x')) is "c_char(b'x')" instead of "c_char('x')"
 - bytes is mutable whereas str is not:
   this may break some modules based on ctypes
2007-08-08 18:47:32 +00:00
Jeremy Hylton df5f6b551a Fix several failing tests in test_urllib2net.
The HTTPResponse object is being passed to BufferedReader, but it
wasn't designed to be used that way.  These changes extend the hacks
that have already been made in urllib2 to get the tests to pass.

The hacks need to be removed and proper support for use with the io
library.  That's a project for another day.
2007-08-08 17:36:33 +00:00
Guido van Rossum 6a10e02aa6 Switch wsgiref to io.{StringIO,BytesIO}. This shuts up the test failures.
(I'm not sure about it actually working though.)
2007-08-08 17:01:45 +00:00
Collin Winter ec8e7168c4 Convert some usages of types.StringType to just str (since types.StringType has gone away). 2007-08-08 03:59:26 +00:00
Guido van Rossum 75c26bc6a7 BZ2File.read(0) should return b"" rather than raising ValueError.
This fixes test_tarfile.py.
I've added a unit test for the correct bz2 behavior.
2007-08-07 23:29:20 +00:00
Guido van Rossum a05577059d Remove the coding line, and convert umlauted characters to \x escapes.
All code in the stdlib should be ASCII only, unless (a) it's test
input for testing the *parsing* of unicode, or (b) it's an author's
name in a comment.
2007-08-07 23:19:53 +00:00
Guido van Rossum 55b15c9f05 Fix the test_minidom failure.
We just need to force the encoding when no encoding is passed to toxml()
or toprettyxml(), rather than relying on the default encoding (which is
unreliable).
2007-08-07 23:03:33 +00:00
Guido van Rossum bdba5cf694 Change the repr() of frozenset instances (and set subclasses)
from name([e1, e2, ...]) to name({e1, e2, ...}).
This makes more sense now we have the set notation.
2007-08-07 22:44:20 +00:00
Lars Gustäbel b506dc32c1 Completed str/unicode unification.
All tests pass, but maybe some tests have become unnecessary now.
Removed PaxUnicodeTest, added MiscTest.

TarFile.extractfile() returns a binary file object which can be used
with a TextIOWrapper for text I/O.
2007-08-07 18:36:16 +00:00
Guido van Rossum cd869d8d41 SF patch# 1769016 by James Brotchie.
Change plistlib to use bytes instead of strings.
Fix test_plistlib accordingly.
2007-08-07 14:26:40 +00:00
Martin v. Löwis ca8dd9182e Fix test case by converting dbm keys to bytes. 2007-08-07 07:15:50 +00:00
Neal Norwitz f9b95d4dda Patch #1768976, Fix for failing test_scriptpackages (untested but looks good) 2007-08-07 05:42:45 +00:00
Martin v. Löwis e6568694bb Change dumbdbm to use bytes keys. 2007-08-07 05:37:39 +00:00
Guido van Rossum 806c2469cb Merged revisions 56753-56781 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

................
  r56760 | neal.norwitz | 2007-08-05 18:55:39 -0700 (Sun, 05 Aug 2007) | 178 lines

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

  ........
    r56485 | facundo.batista | 2007-07-21 17:13:00 -0700 (Sat, 21 Jul 2007) | 5 lines


    Selectively enable tests for asyncore.readwrite based on the presence
    of poll support in the select module (since this is the only case in
    which readwrite can be called). [GSoC - Alan McIntyre]
  ........
    r56488 | nick.coghlan | 2007-07-22 03:18:07 -0700 (Sun, 22 Jul 2007) | 1 line

    Add explicit relative import tests for runpy.run_module
  ........
    r56509 | nick.coghlan | 2007-07-23 06:41:45 -0700 (Mon, 23 Jul 2007) | 5 lines

    Correctly cleanup sys.modules after executing runpy relative import
    tests
    Restore Python 2.4 ImportError when attempting to execute a package
    (as imports cannot be guaranteed to work properly if you try it)
  ........
    r56519 | nick.coghlan | 2007-07-24 06:07:38 -0700 (Tue, 24 Jul 2007) | 1 line

    Tweak runpy test to do a better job of confirming that sys has been manipulated correctly
  ........
    r56520 | nick.coghlan | 2007-07-24 06:58:28 -0700 (Tue, 24 Jul 2007) | 1 line

    Fix an incompatibility between the -i and -m command line switches as reported on python-dev by PJE - runpy.run_module now leaves any changes it makes to the sys module intact after the function terminates
  ........
    r56523 | nick.coghlan | 2007-07-24 07:39:23 -0700 (Tue, 24 Jul 2007) | 1 line

    Try to get rid of spurious failure in test_resource on the Debian buildbots by changing the file size limit before attempting to close the file
  ........
    r56533 | facundo.batista | 2007-07-24 14:20:42 -0700 (Tue, 24 Jul 2007) | 7 lines


    New tests for basic behavior of smtplib.SMTP and
    smtpd.DebuggingServer. Change to use global host & port number
    variables. Modified the 'server' to take a string to send back in
    order to vary test server responses. Added a test for the reaction of
    smtplib.SMTP to a non-200 HELO response. [GSoC - Alan McIntyre]
  ........
    r56538 | nick.coghlan | 2007-07-25 05:57:48 -0700 (Wed, 25 Jul 2007) | 1 line

    More buildbot cleanup - let the OS assign the port for test_urllib2_localnet
  ........
    r56539 | nick.coghlan | 2007-07-25 06:18:58 -0700 (Wed, 25 Jul 2007) | 1 line

    Add a temporary diagnostic message before a strange failure on the alpha Debian buildbot
  ........
    r56543 | martin.v.loewis | 2007-07-25 09:24:23 -0700 (Wed, 25 Jul 2007) | 2 lines

    Change location of the package index to pypi.python.org/pypi
  ........
    r56551 | georg.brandl | 2007-07-26 02:36:25 -0700 (Thu, 26 Jul 2007) | 2 lines

    tabs, newlines and crs are valid XML characters.
  ........
    r56553 | nick.coghlan | 2007-07-26 07:03:00 -0700 (Thu, 26 Jul 2007) | 1 line

    Add explicit test for a misbehaving math.floor
  ........
    r56561 | mark.hammond | 2007-07-26 21:52:32 -0700 (Thu, 26 Jul 2007) | 3 lines

    In consultation with Kristjan Jonsson, only define WINVER and _WINNT_WIN32
    if (a) we are building Python itself and (b) no one previously defined them
  ........
    r56562 | mark.hammond | 2007-07-26 22:08:54 -0700 (Thu, 26 Jul 2007) | 2 lines

    Correctly detect AMD64 architecture on VC2003
  ........
    r56566 | nick.coghlan | 2007-07-27 03:36:30 -0700 (Fri, 27 Jul 2007) | 1 line

    Make test_math error messages more meaningful for small discrepancies in results
  ........
    r56588 | martin.v.loewis | 2007-07-27 11:28:22 -0700 (Fri, 27 Jul 2007) | 2 lines

    Bug #978833: Close https sockets by releasing the _ssl object.
  ........
    r56601 | martin.v.loewis | 2007-07-28 00:03:05 -0700 (Sat, 28 Jul 2007) | 3 lines

    Bug #1704793: Return UTF-16 pair if unicodedata.lookup cannot
    represent the result in a single character.
  ........
    r56604 | facundo.batista | 2007-07-28 07:21:22 -0700 (Sat, 28 Jul 2007) | 9 lines


    Moved all of the capture_server socket setup code into the try block
    so that the event gets set if a failure occurs during server setup
    (otherwise the test will block forever).  Changed to let the OS assign
    the server port number, and client side of test waits for port number
    assignment before proceeding. The test data in DispatcherWithSendTests
    is also sent in multiple send() calls instead of one to make sure this
    works properly. [GSoC - Alan McIntyre]
  ........
    r56611 | georg.brandl | 2007-07-29 01:26:10 -0700 (Sun, 29 Jul 2007) | 2 lines

    Clarify PEP 343 description.
  ........
    r56614 | georg.brandl | 2007-07-29 02:11:15 -0700 (Sun, 29 Jul 2007) | 2 lines

    try-except-finally is new in 2.5.
  ........
    r56617 | facundo.batista | 2007-07-29 07:23:08 -0700 (Sun, 29 Jul 2007) | 9 lines


    Added tests for asynchat classes simple_producer & fifo, and the
    find_prefix_at_end function. Check behavior of a string given as a
    producer.  Added tests for behavior of asynchat.async_chat when given
    int, long, and None terminator arguments. Added usepoll attribute to
    TestAsynchat to allow running the asynchat tests with poll support
    chosen whether it's available or not (improves coverage of asyncore
    code). [GSoC - Alan McIntyre]
  ........
    r56620 | georg.brandl | 2007-07-29 10:38:35 -0700 (Sun, 29 Jul 2007) | 2 lines

    Bug #1763149: use proper slice syntax in docstring.
     (backport)
  ........
    r56624 | mark.hammond | 2007-07-29 17:45:29 -0700 (Sun, 29 Jul 2007) | 4 lines

    Correct use of Py_BUILD_CORE - now make sure it is defined before it is
    referenced, and also fix definition of _WIN32_WINNT.
    Resolves patch 1761803.
  ........
    r56632 | facundo.batista | 2007-07-30 20:03:34 -0700 (Mon, 30 Jul 2007) | 8 lines


    When running asynchat tests on OS X (darwin), the test client now
    overrides asyncore.dispatcher.handle_expt to do nothing, since
    select.poll gives a POLLHUP error at the completion of these tests.
    Added timeout & count arguments to several asyncore.loop calls to
    avoid the possibility of a test hanging up a build. [GSoC - Alan
    McIntyre]
  ........
    r56633 | nick.coghlan | 2007-07-31 06:38:01 -0700 (Tue, 31 Jul 2007) | 1 line

    Eliminate RLock race condition reported in SF bug #1764059
  ........
    r56636 | martin.v.loewis | 2007-07-31 12:57:56 -0700 (Tue, 31 Jul 2007) | 2 lines

    Define _BSD_SOURCE, to get access to POSIX extensions on OpenBSD 4.1+.
  ........
    r56653 | facundo.batista | 2007-08-01 16:18:36 -0700 (Wed, 01 Aug 2007) | 9 lines


    Allow the OS to select a free port for each test server. For
    DebuggingServerTests, construct SMTP objects with a localhost argument
    to avoid abysmally long FQDN lookups (not relevant to items under
    test) on some machines that would cause the test to fail. Moved server
    setup code in the server function inside the try block to avoid the
    possibility of setup failure hanging the test.  Minor edits to conform
    to PEP 8. [GSoC - Alan McIntyre]
  ........
    r56681 | matthias.klose | 2007-08-02 14:33:13 -0700 (Thu, 02 Aug 2007) | 2 lines

    - Allow Emacs 22 for building the documentation in info format.
  ........
    r56689 | neal.norwitz | 2007-08-02 23:46:29 -0700 (Thu, 02 Aug 2007) | 1 line

    Py_ssize_t is defined regardless of HAVE_LONG_LONG.  Will backport
  ........
    r56727 | hyeshik.chang | 2007-08-03 21:10:18 -0700 (Fri, 03 Aug 2007) | 3 lines

    Fix gb18030 codec's bug that doesn't map two-byte characters on
    GB18030 extension in encoding. (bug reported by Bjorn Stabell)
  ........
    r56751 | neal.norwitz | 2007-08-04 20:23:31 -0700 (Sat, 04 Aug 2007) | 7 lines

    Handle errors when generating a warning.
    The value is always written to the returned pointer if getting it was
    successful, even if a warning causes an error. (This probably doesn't matter
    as the caller will probably discard the value.)

    Will backport.
  ........
................
2007-08-06 23:33:07 +00:00
Guido van Rossum 4626458cc5 SF patch# 1767398 by Adam Hupp.
Fix csv to read/write bytes from/to binary files.
Fix the unit tests to test this and to use with TemporaryFile().
2007-08-06 19:32:18 +00:00
Brett Cannon dd766d53a2 Move tempfile over to the io module. Makes test_threaded_import pass.
Thanks Paul Colomiets.
2007-08-05 22:23:10 +00:00
Martin v. Löwis 64ce5052e1 Make bsddb use bytes as keys and values. Add StringKeys
and StringValues classes. Fix test suite.
2007-08-05 15:39:16 +00:00
Guido van Rossum 33d2689fc9 Merged revisions 56492-56752 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

........
  r56497 | kurt.kaiser | 2007-07-22 14:55:16 -0700 (Sun, 22 Jul 2007) | 4 lines

  In the case of syntax errors, in py3k format_exception_only()
  was including line number and position in the final line of the
  exception notification, duplicating info in previous lines.
........
  r56501 | kurt.kaiser | 2007-07-22 19:35:50 -0700 (Sun, 22 Jul 2007) | 2 lines

  Hum, needed a newline in the last change.
........
  r56536 | kurt.kaiser | 2007-07-24 19:06:48 -0700 (Tue, 24 Jul 2007) | 5 lines

  Not all instantiations of SyntaxError set the args attribute.
  e.g. symtable.c
  Modify format_exception_only() to get SyntaxError attributes directly
  instead of unpacking 'args'.
........
  r56537 | kurt.kaiser | 2007-07-24 19:13:03 -0700 (Tue, 24 Jul 2007) | 3 lines

  Update doctest strings: traceback.py no longer prints redundant location
  information in the last line of the exception display.
........
  r56627 | kurt.kaiser | 2007-07-29 21:06:57 -0700 (Sun, 29 Jul 2007) | 2 lines

  Interactive interpreter emulator (code.py) failing to print exceptions.
........
  r56628 | kurt.kaiser | 2007-07-29 21:41:02 -0700 (Sun, 29 Jul 2007) | 2 lines

  Eliminate extra lines before and after tracebacks.
........
  r56638 | kurt.kaiser | 2007-07-31 19:36:45 -0700 (Tue, 31 Jul 2007) | 3 lines

  Refactor syntax error display in shell and edit windows; move
  colorize_syntax_error() to EditorWindow; update to py3k.
........
  r56685 | neal.norwitz | 2007-08-02 22:20:23 -0700 (Thu, 02 Aug 2007) | 10 lines

  Remove several h/w and o/s specific modules that are undocumented, obsolete,
  and/or not widely used:
   linuxaudiodev.c, sunaudiodev.c Lib/plat-sunos5/SUNAUDIODEV.py
   Lib/audiodev.py Tools/audiopy/audiopy

  Move Lib/toaiff.py to Demo.

  See PEP 3108 for most of the details.
........
  r56686 | neal.norwitz | 2007-08-02 22:21:48 -0700 (Thu, 02 Aug 2007) | 4 lines

  Missed one module that should have been removed since it relied
  on audiodev which was removed.
........
  r56748 | neal.norwitz | 2007-08-04 19:19:04 -0700 (Sat, 04 Aug 2007) | 1 line

  Make from X import * outside module scope an error.
........
  r56750 | neal.norwitz | 2007-08-04 19:35:01 -0700 (Sat, 04 Aug 2007) | 1 line

  Use READONLY consistently instead of RO
........
2007-08-05 15:29:28 +00:00
Jeremy Hylton 77553ab531 Fix test for new version of urllib that uses HTTPConnection directly.
Changes the way the httplib classes are stubbed out.
2007-08-04 19:23:09 +00:00
Jeremy Hylton 39b198d835 Change urllib to use HTTPConnection rather than old HTTP class.
The HTTP class is a backwards compatibility layer for the Python 1.5
API.  (The only remaining use in the std library is xmlrpclib.)

The current change makes urllib issue HTTP/1.0 requests with
HTTPConnection, because is accesses HTTPResponse.fp directly instead
of using the read() method.  Using fp directly interacts poorly with
persistent connections.  There are probably better solutions than the
current one, but this is a start.
2007-08-04 19:22:00 +00:00
Guido van Rossum f066c1ba37 Make test_tokenize really pass -- don't add extra output. 2007-08-04 17:55:43 +00:00
Guido van Rossum cfbbf48e3e Make test_tokenize pass again:
Add code to test_roundtrip() that figures out the encoding
from the first two lines of the file.
(We need to refactor this again to make it available to
all places that need this, e.g. linecache.py.)
2007-08-04 17:43:15 +00:00
Jeremy Hylton 3e18615496 Fix test: readline() now returns bytes 2007-08-04 03:46:11 +00:00
Jeremy Hylton 66dc8c59be Fix tests that tried to sneak strings through httplib.
The httplib interface returns bytes for now.
2007-08-04 03:42:26 +00:00
Jeremy Hylton 04319c78d6 Make sure LineAndFileWrapper gets bytes() as its first argument.
This change fixes a test in test_urllib.
2007-08-04 03:41:19 +00:00
Jeremy Hylton 4e7855d7fd Use BytesIO instead of StringIO. 2007-08-04 03:34:03 +00:00
Jeremy Hylton 0ee5eeb8ff Fix several more paths from the SSL code.
In particular, watch out for comparing b"" to "".  They're not equal,
but you can start at the code asking whether buf == "" for a long time
before realizing that it will never be True.
2007-08-04 03:25:17 +00:00
Jeremy Hylton 97043c3c02 HTTPResponse should not inherit from io.IOBase.
I'm not sure why I thought it should originally, but it introduces an
__del__() method on the response which cause the close() to be called
too soon using the HTTP compat class.

Also, remove some stale comments.  The HTTPResponse calls makefile()
immediately, so there is no risk of it closing the socket.
2007-08-04 02:34:24 +00:00
Guido van Rossum 4a7fd90d9c Fix failure do to outlawing complex floordiv/mod. 2007-08-03 21:15:23 +00:00
Jeremy Hylton ec0c508b0a Fix an absurdly invasive test.
Checks that an io object somewhere in the stack of wrappers is
actually closed.  --This line, and those below, will be ignored--

M    test_urllib2net.py
2007-08-03 21:03:02 +00:00
Jeremy Hylton 8fff7924a4 Fix tests to use bytes() where the actual sockets return bytes().
Use io.BytesIO() instead of StringIO.StringIO().  FakeSocket still
accepts regular strings and coverts them to bytes internally.
2007-08-03 20:56:14 +00:00
Guido van Rossum 9648d62fd5 Make test_complex pass again now that floordiv and mod are illegal. 2007-08-03 20:40:44 +00:00
Jeremy Hylton 5accbdb812 Make sure socket.close() doesn't interfere with socket.makefile().
If a makefile()-generated object is open and its parent socket is
closed, the parent socket should remain open until the child is
closed, too.  The code to support this is moderately complex and
requires one extra slots in the socket object.

This change fixes httplib so that several urllib2net test cases pass
again.

Add SocketCloser class to socket.py, which encapsulates the
refcounting logic for sockets after makefile() has been called.

Move SocketIO class from io module to socket module.  It's only use is
to implement the raw I/O methods on top of a socket to support
makefile().

Add unittests to test_socket to cover various patterns of close and
makefile.
2007-08-03 20:40:09 +00:00
Jeremy Hylton d2ef864f81 Treat HTTP status line as ISO-8859-1 as in httplib module. 2007-08-03 20:32:27 +00:00
Jeremy Hylton cf2f41919c Hack: Fix some test_urllib2.net tests by getting them access to the
raw socket so they can check the timeout value.  Should change the
code under test to expose the timeout in a more direct way.
2007-08-03 20:31:38 +00:00
Jeremy Hylton fb35f65e8b A few local changes for consistency of string literals. 2007-08-03 20:30:33 +00:00
Guido van Rossum c0f2d2d345 SF patch# 1762940 by Joe Gregorio.
Fix test_cookielib and test_urllib2.
(The changes to urllib make urllib.quote() work correctly for Unicode
strings; but they don't fix test_urllib.)
2007-08-03 19:19:24 +00:00
Guido van Rossum 15863ea07a SF patch# 1764815 by Paul Colomiets.
Fix for test_socketserver.
Use io.BytesIO instead of io.StringIO, and adjust tests.
2007-08-03 19:03:39 +00:00
Guido van Rossum ad8d30092c SF patch# 1766592 by Paul Colomiets.
Fix test_zipimport.
2007-08-03 18:40:49 +00:00
Jeremy Hylton e5d0e8431f Make consistent use of "" for string literals in new classes. 2007-08-03 13:45:24 +00:00
Jeremy Hylton 811fc14935 Fix status line parsing for http response. 2007-08-03 13:30:02 +00:00
Guido van Rossum 4737482fad Add a default __prepare__() method to 'type', so it can be called
using super().  (See recent conversation on python-3000 with Talin
and Phillip Eby about PEP 3115 chaining rules.)
2007-08-02 16:48:17 +00:00
Guido van Rossum a6bcefca81 When testing all stdlib modules, ignore test_pep263.py which is encoded
in KOI8-R.
2007-08-01 18:06:13 +00:00
Guido van Rossum 70d2b890de Tests for @abstractproperty by Jeffrey Yasskin.
(The previous changes to abc.py were also by him).
Put back a comment about using super() for properties
(I didn't realize this worked).
2007-08-01 17:52:23 +00:00
Guido van Rossum b31339fa02 Add @abstractproperty. 2007-08-01 17:32:28 +00:00
Walter Dörwald e78178e2c0 Bytes (which are the input for decoding) are mutable now. If a decoding
error callback changes the bytes object in the exception the decoder might
use memory that's no longer in use. Change unicode_decode_call_errorhandler()
so that it fetches the adresses of the bytes array (start and end) from the
exception object and passes them back to the caller.
2007-07-30 13:31:40 +00:00
Brett Cannon 2dbde5ea44 In cases where dealing with base64, do the conversion but then get the ASCII
string representation for use in the XML.

Also strip out some unneeded encoding/decoding steps.
2007-07-30 03:50:35 +00:00
Brett Cannon 96d7e8369c Don't try to use a bytes sequence for file paths. Also force equivalency tests
to be between str8 and str.
2007-07-30 01:34:07 +00:00
Martin v. Löwis 447d33ead6 Implement PEP 3120. 2007-07-29 18:10:01 +00:00
Brett Cannon 5de17db361 Testing against a different default encoding is meaningless as the default
encoding can only be UTF-8 now.
2007-07-29 02:57:38 +00:00
Brett Cannon d38d078566 Expat parser no longer has a returns_unicode attribute since everything is
Unicode now.
2007-07-29 02:56:27 +00:00
Martin v. Löwis 48f4cf9b94 Use BytesIO instead of cStringIO.StringIO. 2007-07-28 17:58:14 +00:00
Martin v. Löwis c582bfca26 Fix quopri to operate consistently on bytes. 2007-07-28 17:52:25 +00:00
Martin v. Löwis f30bb0eba2 Patch #1762412: Fix test case for struni branch. 2007-07-28 11:40:46 +00:00
Guido van Rossum 3e1f85eb5d Fix the minidom test.
In order to do this, I added an optional encoding argument to io.StringIO.
The toprettyxml() function returns bytes when you specify an encoding now.
2007-07-27 18:03:11 +00:00
Guido van Rossum 3992db81b6 SF patch# 1759922 by Alexandre Vassalotti.
Fix one of the two failing tests for minidom.
2007-07-27 17:26:00 +00:00
Guido van Rossum 624ab7c28a Make test_sgmllib pass on OSX. Hopefully it still passes everywhere else too. 2007-07-27 17:12:11 +00:00
Guido van Rossum ea8344797e SF patch# 1757839 by Alexandre Vassalotti (part 2).
Change a bunch of .assert_(X == Y) to .assertEqual(X, Y).
2007-07-27 05:17:50 +00:00
Guido van Rossum f7a94e4b44 SF patch# 1761465 by Jeffrey Yasskin.
Fix test_aepack and test_applesingle.
2007-07-27 04:41:00 +00:00
Guido van Rossum 67feb09d06 Delete redundant read() and close() methods from SocketIO class. 2007-07-27 04:38:24 +00:00
Brett Cannon 1eb79cfd6d Move xdrlib over to the bytes type. 2007-07-26 03:19:46 +00:00
Brett Cannon d24fffe7c6 Move shelve over to BytesIO as pickle.(Pickler | Unpickler) expect binary
files, not text files.

test_shelve still fails thanks to bsddb not having been fixed.
2007-07-26 03:07:02 +00:00
Guido van Rossum 51a883bf87 Make test_wave.py pass.
I have no illusion that this fixes all issues with this module.
2007-07-23 21:28:30 +00:00
Guido van Rossum 005ebb1f7c Tweaks to make the codecmaps tests pass again.
(To run these, you need to pass -uurlfetch to regrtest.py or runtests.sh.)
2007-07-23 18:06:59 +00:00
Guido van Rossum 4ca9471831 SF patch# 1759016 by Joe Gregorio, who writes:
1. Removed "returns_unicode" attribute, associated code
   in the module to support that attribute, and all tests
   associated with it.
2. Parsed data is now returned as unicode strings.
3. Changed input tests to use io.BytesIO instead
   of StringIO, to reflect the byte processing
   nature of expat.
2007-07-23 17:42:32 +00:00
Guido van Rossum f520c05456 Don't use cwnon-ASCII characters in the source; use \ooo escapes.
(This doesn't fix test_cookielib, just removes the SyntaxError.)
2007-07-23 03:46:37 +00:00
Guido van Rossum accecdf969 Don't use a sleep to wait for the server to be ready; this caused
problems on my OSX laptop.  use a condition variable instead.
2007-07-23 01:49:28 +00:00
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