Commit graph

14737 commits

Author SHA1 Message Date
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