Commit graph

24178 commits

Author SHA1 Message Date
Guido van Rossum
679113702c Now that TestCase is a new-style class, change loadTestsFromModule and
loadTestsFromName to accept new-style classes too!
2002-09-30 19:25:56 +00:00
Barry Warsaw
42d1d3edc0 __contains__(): Change the second argument to `name' for consistency.
I seriously doubt this will break any deployed code.

Docstring consistency with the updated .tex files.
2002-09-30 18:17:35 +00:00
Martin v. Löwis
4535b18f7c Add Tim Rice, for SCO patches. 2002-09-30 16:23:15 +00:00
Martin v. Löwis
21ee4091e1 Patch #615069: Fix build problems on SCO Open Server 5. Backported to 2.2. 2002-09-30 16:19:48 +00:00
Barry Warsaw
174aa49a88 With help from Martin v. Loewis, clarification is added for the
semantics of header chunks using byte and Unicode strings.
Specifically,

append(): When the given string is a byte string, charset (whether
specified explicitly in the argument list or implicitly via the
constructor default) is the encoding of the byte string, and a
UnicodeError will be raised if the string cannot be decoded with that
charset.  If s is a Unicode string, then charset is a hint specifying
the character set of the characters in the string.  In this case, when
producing an RFC 2822 compliant header using RFC 2047 rules, the
Unicode string will be encoded using the following charsets in order:
us-ascii, the charset hint, utf-8.

__init__(): Use the global USASCII Charset instance when the charset
argument is None.  Also, clarification in the docstring.

Also, use True/False where appropriate.
2002-09-30 15:51:31 +00:00
Jason Tishler
884554dfe5 Patch #544740: test_commands test fails under Cygwin
Relax regular expression to handle spaces in user and group names.
2002-09-30 15:44:41 +00:00
Skip Montanaro
b45b9feafb fix a couple nits related to my understanding of ReST. Use of
``void (*)(PyObject *)``

isn't quite the same as

    void (*)(PyObject \*)

but I gather ``...`` is preferable stylistically in most cases than
... \*...
2002-09-30 15:25:13 +00:00
Barry Warsaw
d20b66537c The ansi_x3.4_1968 encoding is an alias for ascii, but isn't known in
Python 2.1.3.  However it's required by the email tests suite, so poke
it into the encodings aliases if it's missing.  The is apparently the
approved API for doing so.

Now we can remove the hexversion shortcircuits in the test suite.
2002-09-30 15:23:17 +00:00
Skip Montanaro
a2a07bce89 fix a couple nits with my use of ReST 2002-09-30 15:23:01 +00:00
Martin v. Löwis
d61888b60a Patch #596576: Always use cc to link on NetBSD. Will backport to 2.2. 2002-09-30 11:17:27 +00:00
Guido van Rossum
bc01c3248d Added -b tag option to limit output to a specific branch only.
Use -b HEAD to limit output to the trunk (skip all branch revisions).
2002-09-29 04:37:36 +00:00
Tony Lownds
f2324b9e89 Finding a suitable interpreter to spawn needed tweaking on the Mac 2002-09-29 00:34:10 +00:00
Guido van Rossum
bffa52f07f Whitespace normalization (get rid of tabs). 2002-09-29 00:25:51 +00:00
Tony Lownds
af7a302c78 Mac users now see correct modifiers in the Key Binding Entry window. 2002-09-29 00:23:08 +00:00
Tony Lownds
6565b261b6 Change key binding to avoid conflict. 2002-09-29 00:10:15 +00:00
Barry Warsaw
d63071b05f Make the tests pass under Python 2.1 but only by cheating. Python 2.1
doesn't know about the ansi-x3.4-1968 charset so skip two tests that
rely on that (msg_32.txt and msg_33.txt).
2002-09-28 21:22:52 +00:00
Barry Warsaw
eecdc742f5 Add a test for SHORTEST encoding of utf-8 headers, and also update
some of the test values which change because of this.
2002-09-28 21:04:19 +00:00
Barry Warsaw
c202d93e0e Use True/False everywhere, and other code cleanups. 2002-09-28 21:02:51 +00:00
Barry Warsaw
f776e6922c Code cleanup and add docstrings. 2002-09-28 20:52:26 +00:00
Barry Warsaw
5bdb2bee37 Use True/False everywhere, and other code cleanups. 2002-09-28 20:49:57 +00:00
Barry Warsaw
e03e8f09eb Use True/False everywhere. 2002-09-28 20:44:58 +00:00
Barry Warsaw
4ece778bbc is_multipart(): Use isinstance() instead of type equality. 2002-09-28 20:41:39 +00:00
Barry Warsaw
c494549566 Docstring and code cleanups, e.g. use True/False everywhere. 2002-09-28 20:40:25 +00:00
Barry Warsaw
bba6b0243e __init__(): Minor code cleanup. 2002-09-28 20:27:28 +00:00
Barry Warsaw
5f253279d6 Add a pychecker suppression. 2002-09-28 20:25:15 +00:00
Barry Warsaw
7f232121c9 (py-pychecker-run): Fix calculation of last command to include the
filename of the current buffer.
2002-09-28 18:17:56 +00:00
Barry Warsaw
56835dd961 Use True/False everywhere. 2002-09-28 18:04:55 +00:00
Barry Warsaw
5932c9bedd Added a feature suggested by Martin v Loewis, where a new header
encoding flag SHORTEST means to return the shortest encoding between
base64 and qp.  This is used for the header_enc for utf-8.  SHORTEST
isn't legal for body_enc.

Also some code cleanup:

- use True/False everywhere
- use == instead of `is' in a few places
- added _unicode() and make consistent the "is unicode" checks
- update docstrings
2002-09-28 17:47:56 +00:00
Fred Drake
176916a989 Allow internal whitespace in keys.
Closes SF bug #583248; backporting to r22-maint branch.
2002-09-27 16:21:18 +00:00
Fred Drake
2ca041fde0 items(): New method, provided by Gustavo Niemeyer in SF bug #545096. 2002-09-27 15:49:56 +00:00
Fred Drake
309db061af Added regression test for SF bug #561822: has_option() case sensitive. 2002-09-27 15:35:23 +00:00
Fred Drake
c2ff9051d2 has_option(): Use the option name transform consistently.
Closes SF bug #561822.

Integrate the "code cleanup and general bug fix patch" (SF bug #545096),
contributed by Gustavo Niemeyer.  This is the portion of that patch that
does not add new functionality.
2002-09-27 15:33:11 +00:00
Kurt B. Kaiser
46466b4c92 Revert Rev 1.6
"Merge Py Idle changes:
Rev 1.7 [Python-idle] loewis
Convert characters from the locale's encoding on output.
Reject characters outside the locale's encoding on input."

Not compatible with Python 2.2.1.  Forwardport as a SF patch.
2002-09-27 00:34:31 +00:00
Kurt B. Kaiser
84f4803f4f Fix Bug 612886 copy/paste menu items fail
(cut vs. Cut etc.)
Fix Bug 613006 Ctrl-x Unix Binding Clears Selection
	(do-nothing does something :)
Leave some debugging prints behind, commented out
M EditorWindow.py
M config-keys.def
M configHandler.py
2002-09-26 22:13:22 +00:00
Skip Montanaro
d404bee2e2 try executing 'less' in a parenthesized subshell - prevents systems like
Solaris from squawking if less isn't available.  See
http://python.org/sf/612111 for details.
2002-09-26 21:44:57 +00:00
Guido van Rossum
479f3d3d2a Oops, must convert hyphens to underscores in keys of aliases dict. 2002-09-26 20:08:23 +00:00
Barry Warsaw
09f7424f3a test_unicode_error(): Comment this test out, since we still have
controversy.
2002-09-26 17:21:53 +00:00
Barry Warsaw
9c74569ec9 Fixing some RFC 2231 related issues as reported in the Spambayes
project, and with assistance from Oleg Broytmann.  Specifically,
added some new tests to make sure we handle RFC 2231 encoded
parameters correctly.  Two new data files were added which contain RFC
2231 encoded parameters.
2002-09-26 17:21:02 +00:00
Barry Warsaw
15aefa94d0 Fixing some RFC 2231 related issues as reported in the Spambayes
project, and with assistance from Oleg Broytmann.  Specifically,

get_param(), get_params(): Document that these methods may return
parameter values that are either strings, or 3-tuples in the case of
RFC 2231 encoded parameters.  The application should be prepared to
deal with such return values.

get_boundary(): Be prepared to deal with RFC 2231 encoded boundary
parameters.  It makes little sense to have boundaries that are
anything but ascii, so if we get back a 3-tuple from get_param() we
will decode it into ascii and let any failures percolate up.

get_content_charset(): New method which treats the charset parameter
just like the boundary parameter in get_boundary().  Note that
"get_charset()" was already taken to return the default Charset
object.

get_charsets(): Rewrite to use get_content_charset().
2002-09-26 17:19:34 +00:00
Guido van Rossum
9b1a80baf4 Patch for the DEC Alpha under Linux, by Lee Busby. 2002-09-26 16:52:02 +00:00
Martin v. Löwis
67c4cb1f13 Disable big charsets in UCS-4 builds. Works around #599377.
Will backport to 2.2
2002-09-26 16:39:20 +00:00
Martin v. Löwis
eb42b026db Add encoding name in LookupError. Fixes #615013. Will backport to 2.2. 2002-09-26 16:01:24 +00:00
Thomas Heller
6d817ad43d Again, I did check in too many changes. Sorry. 2002-09-26 13:19:48 +00:00
Fred Drake
4613876ee3 Add deprecation notices to the documentation to reflect recent additions to
PEP 4.
2002-09-25 22:13:27 +00:00
Barry Warsaw
6f30a8ab62 __version__: Bump to 2.4
Move the imports of Parser and Message inside the
message_from_string() and message_from_file() functions.  This way
just "import email" won't suck in most of the submodules of the
package.

Note: this will break code that relied on "import email" giving you a
bunch of the submodules, but that was never documented and should not
have been relied on.
2002-09-25 22:07:50 +00:00
Fred Drake
d80032b009 Update some comments about what version of the documentation tools
code to use.
2002-09-25 21:41:22 +00:00
Neal Norwitz
d957f39fef Back out previous change.
Quotes aren't necessary in case statements.  Spotted by Neil Schemenauer.
2002-09-25 21:26:19 +00:00
Neal Norwitz
dcfaaf2b28 Fix SF # 614587, configure.in patch from Tim Rice
Need to quote $GCC in case it isn't set.
2002-09-25 20:38:34 +00:00
Tim Peters
d8a9d2a0e9 SF bug 613233: test_threadedtempfile hangs
A possibility to deadlock (on the hidden import lock) was created here
in 2.3, seemingly when tempfile.py started to call functions in
random.py.  The cure is "the usual":  don't spawn threads as a side
effect of importing, when the spawned threads themselves do imports
(directly or indirectly), and the code that spawned the threads is
waiting for the threads to finish (they can't finish, because they're
waiting for the import lock the spawner still holds).  Worming around
this is why the "test_main" mechanism was introduced in regrest, so
it's a straightforward fix.

NOT a bugfix candidate; the problem was introduced in 2.3.
2002-09-25 20:32:28 +00:00
Neal Norwitz
7dfb6e295b Fix SF # 591713, Fix "file:" URL to have right no. of /'s, by Bruce Atherton
Add a test too.  urljoin() would make file:/tmp/foo instead of file:///tmp/foo

Bugfix candidate, I will backport.
2002-09-25 19:20:12 +00:00