Commit Graph

6925 Commits

Author SHA1 Message Date
Martin v. Löwis 5357c6511d Convert empty string literal to string. Speed up creation of idmap. 2002-10-14 20:03:40 +00:00
Guido van Rossum bbc0568a5c Fix for 1.33: urlsplit() should only add '//' if scheme != ''.
Will add test and backport.
2002-10-14 19:59:54 +00:00
Barry Warsaw 67f8f2fe2a append(): Fixing the test for convertability after consultation with
Ben.  If s is a byte string, make sure it can be converted to unicode
with the input codec, and from unicode with the output codec, or raise
a UnicodeError exception early.  Skip this test (and the unicode->byte
string conversion) when the charset is our faux 8bit raw charset.
2002-10-14 16:52:41 +00:00
Barry Warsaw a74771c0b9 Two new tests for splitting (or not splitting) 8-bit header data. 2002-10-14 15:26:17 +00:00
Barry Warsaw 1a6ea3398e Bump the __version__ 2002-10-14 15:24:18 +00:00
Barry Warsaw 5e3bcff651 __init__(): Fix an invariant, that the charset item in a chunk tuple
must be a Charset instance, not a string.  The bug here was that
self._charset wasn't being converted to a Charset instance so later
.append() calls which used the default charset would break.

_split(): If the charset of the chunk is '8bit', return the chunk
unchanged.  We can't safely split it, so this is the avenue of least
harm.
2002-10-14 15:13:17 +00:00
Barry Warsaw 6c2bc46355 _split_header(): If we have a header which is a byte string containing
8-bit data, we cannot split it safely, so return the original string
unchanged.

_is8bitstring(): Helper function which returns True when we have a
byte string that contains non-ascii characters (i.e. mysterious 8-bit
data).
2002-10-14 15:09:30 +00:00
Barry Warsaw 7cd724049f CHARSETS: Add faux '8bit' encoding for representing raw 8-bit data for
which we know nothing else.
2002-10-14 15:06:55 +00:00
Guido van Rossum 0d976551fb Add finditer to __all__ (when defining it at all).
SF bug 585882.  Will forward-port.
2002-10-14 12:22:17 +00:00
Greg Ward 78cc051617 Fix copyright date: the core of this code actually dates back to 1999
(rev. 1.4 of distutils/fancy_getopt.py).
2002-10-13 19:23:18 +00:00
Martin v. Löwis 6f6873baa1 Patch #611760: read archives with comments. 2002-10-13 13:54:50 +00:00
Martin v. Löwis b24e3477dc Patch #621891: Add askopenfile{name}s. 2002-10-13 10:28:04 +00:00
Martin v. Löwis 2ec362717b Patch #621205: Tkinter updates for tk8.4. 2002-10-13 10:22:08 +00:00
Barry Warsaw 0c358258c9 _encode_chunks(), encode(): Don't modify self._chunks. As Ben says:
Also, it fixes a really egregious error in Header.encode() (really
    in Header._encode_chunks()) that could cause a header to grow and
    grow each time encode() was called if output_codec was different
    from input_codec.

Also, fix a typo.
2002-10-13 04:06:28 +00:00
Barry Warsaw ab9439fdd4 Update the urls and other information about the add-on Japanese,
Korean, and Chinese codecs.
2002-10-13 04:00:45 +00:00
Neal Norwitz 520cdf733a SF # 539360, webbrowser.py and konqueror, by Andy McKay
Fix Konqueror so it can start when calling open().
The assert needed to be on the raw URL, not openURL 'url...'

Will backport.
2002-10-11 22:04:22 +00:00
Jeremy Hylton e190663742 Typo in docstring 2002-10-11 17:27:55 +00:00
Jeremy Hylton 96f1129de8 Fix for SF bug #599836: Don't duplicate headers.
If the request object has a header, it should override the default
header provided by the OpenerDirector.
2002-10-11 17:26:46 +00:00
Fred Drake a0f453b2b1 Allow restricted code to get byteorder, getdefaultencoding(),
getrefcount(), maxunicode, and version_info.
2002-10-11 16:20:45 +00:00
Jeremy Hylton 83d0fd2fd1 Trying alphabet again 2002-10-11 16:05:07 +00:00
Jeremy Hylton a325c42b2d Sort names alphabetically. 2002-10-11 15:55:17 +00:00
Jeremy Hylton 69dc0c5bf5 Add hexversion to list of safe sys names (SF bug 621447).
Bug fix candidate.
2002-10-11 15:51:29 +00:00
Jeremy Hylton 3bd6fde4e3 Use fdopen() to create file from fd. 2002-10-11 14:36:24 +00:00
Michael W. Hudson 549ab8a98d A test for the recent overflow-in-format-crash bug.
Only runs when sys.maxint == 2**32 - 1; different things go wrong
on a 64-bit box.
2002-10-11 13:46:32 +00:00
Neal Norwitz 8dd28eb973 SF # 585913, Adds Galeon support to webbrowser.py 2002-10-10 22:49:29 +00:00
Martin v. Löwis e893f2f3b4 Remove more DOS support. 2002-10-10 18:17:08 +00:00
Barry Warsaw c986e54733 Bump version number to 2.4.2 to pick up the latest minor bug fixes. 2002-10-10 15:19:46 +00:00
Barry Warsaw dc8087b26e New tests to verify that charsets are case insensitive, and that by
default get_body_encoding() cannot be SHORTEST.
2002-10-10 15:14:22 +00:00
Barry Warsaw ee07cb1d70 get_content_charset(): RFC 2046 $4.1.2 says charsets are not case
sensitive.  Coerce the argument to lower case.
2002-10-10 15:13:26 +00:00
Barry Warsaw 14fc464ec9 __init__(): RFC 2046 $4.1.2 says charsets are not case sensitive.
Coerce the argument to lower case.  Also, since body encodings can't
be SHORTEST, default the CHARSETS failobj's second item to BASE64.
2002-10-10 15:11:20 +00:00
Martin v. Löwis 6ce1315bd3 Patch #612602: Streamline configure methods. 2002-10-10 14:36:13 +00:00
Kurt B. Kaiser 5afa1dfb72 M CallTips.py Add support for getting calltip from subprocess,
refactor a bit and clean up.

M PyShell.py       Cosmetic changes, delete blank lines, add # on some
                   blank lines.

M rpc.py           Add more debugging capability

M run.py           Add support for getting calltip from subprocess
                   Move import statements
2002-10-10 08:25:24 +00:00
Neal Norwitz 853ddd5cb9 SF #614596, fix for urllib2.AbstractBasicAuthHandler, John Williams (johnw42)
Make the regex case insensitive for some web sites which use Realm.
2002-10-09 23:17:04 +00:00
Skip Montanaro 628e3bf6cf MacOSX linker doesn't understand -R flag at all, no matter how you feed it
the flag.  Punt and return a -L flag instead (returning "" gums up the
command to be forked).
2002-10-09 21:37:18 +00:00
Guido van Rossum 06e2a5e052 Add special consideration for rlcompleter. As a side effect of
initializing GNU readline, setlocale(LC_CTYPE, "") is called, which
changes the <ctype.h> macros to use the "default" locale (which isn't
the *initial* locale -- the initial locale is the "C" locale in which
only ASCII characters are printable).  When the default locale is e.g.
Latin-1, the repr() of string objects can include 8-bit characters
with the high bit set; I believe this is due to the recent
PRINT_MULTIBYTE_STRING changes to stringobject.c.  This in turn screws
up test_pyexpat and test_rotor, which depend on the repr() of 8-bit
strings with high bit characters.

The solution (for now) is to force the LC_CTYPE locale to "C" after
importing rlcompleter.  This is the locale required by the test suite
anyway.
2002-10-09 18:17:06 +00:00
Martin v. Löwis 8b10f8988f Remove more DOS support. 2002-10-09 17:23:29 +00:00
Tim Peters 26bc25a6c4 Don't try to access sys.getwindowsversion unless it exists (ntpath is
imported on systems other than Windows, and in particular is imported
by test___all__; the compile farm reported that all Linux tests failed
due to this; isn't anyone in PythonDevLand running CVS on Linux?!).
2002-10-09 07:56:04 +00:00
Tim Peters 2a182dbf3f Logic for determining whether skipping test_pep277 is expected: whether
ths "should be" skipped depends on os.path.supports_unicode_filenames,
not really on the platform.  Fiddled the expected-skip constructor
appropriately.
2002-10-09 01:07:11 +00:00
Tim Peters cfac1d4a18 The
list(xrange(sys.maxint / 4))
test.  Changed 4 to 2.

The belief is that this test intended to trigger a bit of code in
listobject.c's NRESIZE macro that's looking for arithmetic overflow.  As
written, it doesn't achieve that, though, and leaves it up to the platform
realloc() as to whether it wants to allocate 2 gigabytes.  Some platforms
say "sure!", although they don't appear to mean it, and disaster ensues.

Changing 4 to 2 (just barely) manages to trigger the arithmetic overflow
test instead, leaving the platform realloc() out of it.

I'll backport this to the 2.2 branch next.
2002-10-08 21:01:07 +00:00
Mark Hammond 8696ebcd28 Add os.path.supports_unicode_filenames for all platforms,
sys.getwindowsversion() on Windows (new enahanced Tim-proof <wink>
version), and fix test_pep277.py in a few minor ways.
Including doc and NEWS entries.
2002-10-08 02:44:31 +00:00
Barry Warsaw 08c82b8086 openfile(): Go back to opening the files in text mode. This undoes
the change in revision 1.11 (test_email.py) in response to SF bug
#609988.  We now think that was the wrong fix and that WinZip was the
real culprit there.
2002-10-07 17:27:55 +00:00
Barry Warsaw 487fe6ac39 _parsebody(): Use get_content_type() instead of the deprecated
get_type().  Also, one of the regular expressions is constant so might
as well make it a module global.  And, when splitting up digests,
handle lineseps that are longer than 1 character in length
(e.g. \r\n).
2002-10-07 17:27:35 +00:00
Martin v. Löwis 45bb87bc13 Use escaped Unicode literals, according to PEP 8. 2002-10-07 17:27:15 +00:00
Barry Warsaw 1d475d3452 Bump the version to 2.4.1 (not 2.5 as previously mentioned) to sync it
with the standalone mimelib package.
2002-10-07 17:20:25 +00:00
Martin v. Löwis e9ce0b0fea Patch #448038: Add move(). Report errors from copytree as in shutil.Error. 2002-10-07 13:23:24 +00:00
Martin v. Löwis bb20bb6bdb Patch #619493: Prefer rpmbuild over rpm if available. Backported to 2.2. 2002-10-07 05:57:21 +00:00
Guido van Rossum 9cce029e48 Add test_pep277 to the expected skips on Linux. (This test seems to
be skipped everywhere except on Windows NT and descendants, but I'm
only going to add it to the skip list for the platform I can test.)
2002-10-06 20:36:31 +00:00
Martin v. Löwis 49c05d39e3 Patch #572031: AUTH method LOGIN for smtplib
(most of the patch hides in rev. 1.59). Backported to 2.2.
2002-10-06 17:55:08 +00:00
Guido van Rossum b03fac2ded Make sure the email test suite can be run both stand-alone and under
supervision of regrtest.py.  Will backport to 2.2.2.
2002-10-06 14:37:11 +00:00
Kurt B. Kaiser c9a5b5c72e Apply Josh Robb's Patch:
[ 617097 ] EditorWindow.py: underline recent files

Added a couple of mods to reduce the indentation level.

Note that the recent files menu doesn't update until
Idle is restarted, pre-existing bug, at least on Linux.
2002-10-06 01:57:45 +00:00
Tim Peters 1ee401fcf6 This test fails on Win98, which is fine, but when it failed it left
a junk directory behind that caused 4 other tests to fail later.  Now
it cleans up after itself, and the 4 bogus later failures don't happen.
2002-10-05 17:54:56 +00:00
Kurt B. Kaiser beb6bd9659 Josh Robb's Patch
[ 617109 ] WindowList.py: fix win98 quit.
2002-10-04 21:54:41 +00:00
Kurt B. Kaiser a1dee06983 Apply Josh Robb's Patch
[ 617125 ] EditorWindow.py: Fix the wrap
(used 'none' instead of NONE)
2002-10-04 21:33:57 +00:00
Guido van Rossum c8c6065231 When looking for an alias, first look for the normalized name (which
still may contain dots), then if that doesn't exist look for the name
with dots replaced by underscores.  This is a little more forgiving.
2002-10-04 20:49:05 +00:00
Raymond Hettinger bfcdb8734e .iterkeys() is not needed. 2002-10-04 20:01:48 +00:00
Marc-André Lemburg 8dc5ff2e5a Undo the removal. Guido mentioned that the encoding name is in active
by some email headers.
2002-10-04 16:30:42 +00:00
Marc-André Lemburg 68fc27385d Remove unneeded alias. 2002-10-04 15:57:03 +00:00
Marc-André Lemburg a40ea75625 Fix doc-string. 2002-10-04 11:58:24 +00:00
Marc-André Lemburg 9d158bb66f Adapt lookup names to new more general encoding name normalization
scheme.
2002-10-04 11:51:39 +00:00
Marc-André Lemburg 7012673d67 Extending the encoding name normalization to handle more non-alphanumeric
characters.
2002-10-04 11:45:38 +00:00
Marc-André Lemburg c7cdd7182a Pulling Mark Alexander's contribution from CVS. 2002-10-04 09:30:06 +00:00
Mark Hammond 7995eb22f1 Tests for pep277 - Unicode file names on Windows NT. 2002-10-03 23:14:10 +00:00
Michael W. Hudson adf1606161 Updates to track Grammar changes. The patch to token.py loosens the regexp to
allow "testlist1" to be snagged.
2002-10-03 09:42:01 +00:00
Mark Hammond c2e85bd4e2 Patch 594001: PEP 277 - Unicode file name support for Windows NT. 2002-10-03 05:10:39 +00:00
Guido van Rossum eb287a2662 Fix an endcase bug: initial_indent was ignored when the text was short
enough to fit in one line.
2002-10-02 15:47:32 +00:00
Michael W. Hudson fb4d6ecd07 Fix for the recursion_level bug Armin Rigo reported in sf
patch #617312, both on the trunk and the 22-maint branch.

Also added a test case, and ported the test_trace I wrote for HEAD
to 2.2.2 (with all those horrible extra 'line' events ;-).
2002-10-02 13:13:45 +00:00
Barry Warsaw 0ac885e821 test__all__(): Fix the import list. 2002-10-01 17:57:06 +00:00
Skip Montanaro 70e1d9b59d save the verbose argument as an instance attributes. Subclasses of
CCompiler may rely on the presence of self.verbose (SciPy's distutils
appears to).
2002-10-01 17:39:59 +00:00
Guido van Rossum cc3a6df506 Commit fix for SF 603831.
Strangely, two out of three patches there seem already committed; but
the essential one (get rid of the assert in object_filenames in
ccompiler.py) was not yet applied.

This makes the build procedure for Twisted work again.

This is *not* a backport candidate despite the fact that identical
code appears to exist in 2.2.2; Twisted builds fine there, so there
must have been a change elsewhere.
2002-10-01 04:14:17 +00:00
Barry Warsaw 2d7fab1a45 Docstring consistency with the updated .tex files. 2002-10-01 00:52:27 +00:00
Barry Warsaw 1f84ff1d40 _structure(): Swap fp and level arguments. 2002-10-01 00:51:47 +00:00
Barry Warsaw 0ebc5c96c5 Docstring consistency with the updated .tex files. 2002-10-01 00:44:13 +00:00
Barry Warsaw 12272a2f22 Docstring consistency with the updated .tex files. 2002-10-01 00:05:24 +00:00
Barry Warsaw 48330687f3 Docstring consistency with the updated .tex files. 2002-09-30 23:07:35 +00:00
Barry Warsaw 0031982c21 Docstring consistency with the updated .tex files. 2002-09-30 22:15:00 +00:00
Barry Warsaw 03a7559654 Docstring consistency with the updated .tex files. 2002-09-30 21:29:10 +00:00
Barry Warsaw fd2e8f7ea6 Docstring consistency with the updated .tex files. 2002-09-30 21:24:00 +00:00
Barry Warsaw 419b284b7c __all__: Updated 2002-09-30 20:41:33 +00:00
Barry Warsaw 057b8428d0 Docstring consistency with the updated .tex files. 2002-09-30 20:07:22 +00:00
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 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
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
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 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
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
Thomas Heller 6d817ad43d Again, I did check in too many changes. Sorry. 2002-09-26 13:19:48 +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
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
Guido van Rossum b7a88e533d Add yet another alias for ASCII found in the field. Will backport to
2.2.2.
2002-09-25 16:44:34 +00:00
Fred Drake 04d9a80fef Add regression test for a bug found in the version of the markupbase
module used in the Zope TAL implementation.  The bug was already fixed
in the Python standard library, but the regression test would be good
to keep around.
2002-09-25 16:29:17 +00:00
Thomas Heller d8ce87ad84 On Windows, select() does not accept empty lists.
Patch suggested by Guido, fixes SF item 611464.

Bugfix candidate, will backport to release22-maint myself.
2002-09-24 17:30:31 +00:00
Barry Warsaw 4d895fa125 Brett's fixes for various bugs and coding issues. Closes SF patch #
593560, with some minor cleanups, line folding and whitespace
normalization by Barry.
2002-09-23 22:46:49 +00:00
Guido van Rossum fd2ede2aa8 Add the bulk of SF patch 595111 by Attila Babo.
This adds new methods heading(), setheading(), position(),
window_width(), window_height(), setx(), and sety(), to make this more
functionality-compatible with Logo turtle graphics (Attila's last
words, not mine :-).  I had to fix the sety() code which was broken in
Attila's patch.

I'm not adopting the functionality change that Attila claimed was a
bugfix (no output without tracing), because I disagree that it's a
bug.
2002-09-23 16:55:05 +00:00
Kurt B. Kaiser b976419946 Fix bug I created during merge from Python-idle.
Also, decided IDENTCHARS is better as global, after all.
2002-09-23 04:10:37 +00:00
Tony Lownds e49dd4c64b Blank line missing. 2002-09-23 01:11:57 +00:00
Tony Lownds 8b1b8d62a2 Work around Mac OS X transient window issues 2002-09-23 01:04:05 +00:00
Tony Lownds e555fc76a7 Work around Mac OS X platform encoding issues. 2002-09-23 01:01:20 +00:00
Tony Lownds f18efa5643 Added new standard keybinding set for Macs. 2002-09-23 00:57:10 +00:00
Martin v. Löwis 73b9b6679e Update Canvas before computing width. Draw turtle at end of drawing circle.
Fixes #612595. Will backport to 2.2.
2002-09-22 13:00:26 +00:00
Martin v. Löwis a6026c6a0f Back out multifile.py 1.19 and 1.20. Fixes #514676. 2002-09-22 09:01:08 +00:00
Jeremy Hylton f0cfdf7314 Fiddle comments and variable names in whichmodule(). 2002-09-19 23:00:12 +00:00
Jeremy Hylton 065a5ab8fb whichmodule() should skip dummy package entries in sys.modules.
This fixes the charming, but unhelpful error message for
>>> pickle.dumps(type.__new__)
Can't pickle <built-in method __new__ of type object at 0x812a440>: it's not the same object as datetime.math.__new__

Bugfix candidate.
2002-09-19 22:57:26 +00:00
Kurt B. Kaiser 16849a7e53 SF Bug #611225.
Bring idle.pyw into alignment with idle.py, eliminate calling deleted
module IdleConf.py
2002-09-19 19:54:55 +00:00
Marc-André Lemburg 7ccd30fa43 Fix a problem in site.py which triggers in case sys.path is empty.
Bugfix candidate for 2.2.2.
2002-09-19 11:11:27 +00:00
Martin v. Löwis 01824bf50c Patch #484994: Improve PanedWindow. 2002-09-19 08:12:55 +00:00
Guido van Rossum c34c4fc3ab Suppress hex/oct constant warnings in <string> on 64-bit platforms,
because there test_grammar.py pulls them out of strings there.
2002-09-19 00:42:16 +00:00
Barry Warsaw 40363b63f0 Open the test files in binary mode so the \r\n files won't cause
failures on Windows.  Closes SF bug # 609988.
2002-09-18 22:17:57 +00:00
Kurt B. Kaiser f027eac92b Merge Py Idle:
Removing config-mac.txt, not used in Idlefork
2002-09-18 17:30:36 +00:00
Kurt B. Kaiser 628339807e Merge Py Idle changes:
Missed adding "import types" while merging PyShell by hand....
2002-09-18 17:07:05 +00:00
Kurt B. Kaiser 5fab9c67eb Merge Py Idle changes:
Rev 1.4 fdrake
Use string.ascii_letters instead of string.letters (SF bug #226706)

Rev 1.5 doerwalter
(string methods)
2002-09-18 03:30:12 +00:00
Kurt B. Kaiser 2a5e350265 Merge Py Idle changes:
Rev 1.6 GvR
Finally fix SF bug #441172, using a variant of patch ##443626:
canceling an edit operation would not revert the value of the field.
The fix takes care to destroy the Entry object, as suggested in the
patch.

Rev 1.7 Geiger Ho / GvR
(previously applied - Idlefork Rev 1.3)

Rev 1.8 doerwalter
(string methods)
2002-09-18 03:26:47 +00:00
Kurt B. Kaiser 089a64a749 Merge Py Idle changes:
Rev 1.3 nnorwitz
Remove unnecessary imports
2002-09-18 03:17:38 +00:00
Kurt B. Kaiser 7879ad0c4f Merge Py Idle changes:
Rev 1.17 doerwalter
(string methods)
2002-09-18 03:15:56 +00:00
Kurt B. Kaiser d1ec940ffc Merge PyIdle changes:
Rev 1.3 doerwalter
(string methods)
2002-09-18 03:14:11 +00:00
Kurt B. Kaiser 06a0987fa8 Merge Py Idle changes:
Rev 1.2 doerwalter
(string methods)
2002-09-18 03:12:18 +00:00
Kurt B. Kaiser 0f4402dcf7 Merge Py Idle changes:
Rev 1.3 tim_one
Convert a pile of obvious "yes/no" functions to return bool.
2002-09-18 03:10:10 +00:00
Kurt B. Kaiser 05bab1ee93 Merge Py Idle changes:
Rev 1.11 GvR
Fix for SF bug #448835.

Fix this to work with the new (still undocumented) tabnanny API.

I'm afraid Stephen will have to add this fix to the IDLE fork code
base as well.

Rev 1.12 rhettinger
(skip, done differently in Idlefork)

Rev 1.13 time_one
(skip, NA)
2002-09-18 03:05:19 +00:00
Kurt B. Kaiser ce86b10eb8 Merge Py Idle changes:
Rev 1.5 tim_one
Convert a pile of obvious "yes/no" functions to return bool

Rev 1.6 GvR
Rev 1.7 Gvr
(Already merged Idlefork ReplaceDialog.py 1.3.2.1 and 1.4)

Rev 1.8 doerwalter
(string methods)

Rev 1.9 nnorwitz
Remove unnecessary imports
2002-09-18 02:56:10 +00:00
Kurt B. Kaiser 837d15c5b5 Merge Py Idle changes:
Rev 1.35 fdrake
Use string.ascii_letters instead of string.letters (SF bug #226706).
Move computation of sets of characters out of the body of the function
that uses them.

Rev 1.36 tim_one
Convert a pile of obvious "yes/no" functions to return bool

Rev 1.37
(skip, done differently in Idlefork)

Rev 1.38 loewis
Patch #590913: PEP 263 support.

Rev 1.39 loewis
Convert characters from the locale's encoding on output.
Reject characters outside the locale's encoding on input.

Rev 1.40 doerwalter
(string methods)

Rev 1.41
(skipped, done by GvR in rpc)
2002-09-18 02:29:59 +00:00
Fred Drake d679e09970 write(): Special case the common situation of a stream that's only
being used to dump output (no seeks), so we can avoid a lot
          of extra checks being made.
2002-09-17 18:10:34 +00:00
Kurt B. Kaiser 254eb5380f Merge Py Idle changes:
Rev 1.10 doerwalter
(string methods)
2002-09-17 03:55:13 +00:00