Commit Graph

7239 Commits

Author SHA1 Message Date
Guido van Rossum a01fa26396 The MRO conflict error message depends on dictionary hash order.
Avoid depending on this in the test.
2002-11-27 04:00:59 +00:00
Fred Drake 4dd0f7ef7a Add a way to say "use any resource except A". For example, to run
allow the use of any resource except bsddb, give the option
"-uall,-bsddb".
2002-11-26 21:44:56 +00:00
Martin v. Löwis 8c8aa5d666 Rename want_objects to wantobjects throughout, for consistency. 2002-11-26 21:39:48 +00:00
Fred Drake 94e7bb7dd6 Use "is" to test type objects, not "==". 2002-11-26 21:28:23 +00:00
Andrew M. Kuchling acd5cb2ff0 Fix for bug #410541: bdist builds bogus .zips
This adds a --relative option to the bdist_dumb command that defaults
to false; if true, the .tar.gz or .zip will be assembled using relative
paths.
2002-11-26 17:45:19 +00:00
Andrew M. Kuchling 40f23e0ddf Part of the fix for bug #410541: add ensure_relative() function 2002-11-26 17:42:48 +00:00
Michael W. Hudson 98bbc49c54 This is my patch:
[ 635933 ] make some type attrs writable

Plus a couple of extra tests beyond what's up there.

It hasn't been as carefully reviewed as it perhaps should, so all readers
are encouraged, nay exhorted, to give this a close reading.

There are still a couple of oddities related to assigning to __name__,
but I intend to solicit python-dev's opinions on these.
2002-11-26 14:47:27 +00:00
Martin v. Löwis ffad633af9 Patch #518625: Return objects in Tkinter. 2002-11-26 09:28:05 +00:00
Guido van Rossum d32047f038 A tweaked version of Jeremy's patch #642489, to produce better error
messages about MRO conflicts.  (Tweaks here: don't print the message,
but compare it with an expected string.)
2002-11-25 21:38:52 +00:00
Raymond Hettinger 35e48d2426 SF 643115: Set._update() had a special case for dictionaries which allowed
non-true values to leak in.  This threw-off equality testing which depends
on the underlying dictionaries having both the same keys and values.
2002-11-25 20:43:55 +00:00
Walter Dörwald 00445d2393 Fix typo in comment. 2002-11-25 17:58:02 +00:00
Gustavo Niemeyer 1456fde6a0 Fixed bug
[#495695] webbrowser.py: selection of browser

* Lib/webbrowser.py
  Only include graphic browsers in _tryorder if DISPLAY is set. Also,
  included skipstone support, as suggested by Fred in the mentioned bug.

* Misc/NEWS
  Mention fix and skipstone inclusion.
2002-11-25 17:25:04 +00:00
Martin v. Löwis d5169bad94 Regenerate from Unicode 3.2.0 to include all First/Last ranges. 2002-11-24 23:10:08 +00:00
Tim Peters 1babdfc48a Reduced memory burden by iterating over the normalization test input
file directly (instead of sucking it all into a list of lines first).
2002-11-24 19:19:09 +00:00
Tim Peters 1b445d3fcf Fiddled things so that test_normalization is expected to be skipped if
and only if the test input file doesn't exist.
2002-11-24 18:53:11 +00:00
Martin v. Löwis 65730a4de8 Delete bsddb from sys.modules if _bsddb cannot be imported. 2002-11-24 08:26:01 +00:00
Tim Peters d332c085ea Skip test_normalization on Windows until it's at least clear why the
data it needs doesn't exist in the project.  If it's a huge file,
maybe the test should be changed to be one of the -u thingies.
2002-11-24 02:40:40 +00:00
Tim Peters b9ac505110 Split long line.
XXX If NormalizationTest.txt is required to run this test, why isn't it
checked into the project?
2002-11-24 02:37:29 +00:00
Tim Peters 77c06fbf94 Whitespace normalization. 2002-11-24 02:35:35 +00:00
Martin v. Löwis 677bde2dd1 Patch #626485: Support Unicode normalization. 2002-11-23 22:08:15 +00:00
Martin v. Löwis 74a530d42d Update character names. 2002-11-23 19:41:01 +00:00
Martin v. Löwis ef7fe2e813 Implement names for CJK unified ideographs. Add name to KeyError output.
Verify that the lookup for an existing name succeeds.
2002-11-23 18:01:32 +00:00
Martin v. Löwis 8579efc86c Add test cases for Hangul syllables. Update output. 2002-11-23 17:11:42 +00:00
Neal Norwitz ca2953ea5c Remove duplicate test 2002-11-23 16:57:00 +00:00
Martin v. Löwis 529ec6a1ee Regenerate. Fixes #618012. 2002-11-23 12:09:28 +00:00
Martin v. Löwis b2c7affbaa Merge with bsddb3 2002.11.23.10.42.36 2002-11-23 11:26:07 +00:00
Just van Rossum a797d8150d Patch #642500 with slight modifications: allow keyword arguments in
dict() constructor. Example:
  >>> dict(a=1, b=2)
  {'a': 1, 'b': 2}
  >>>
2002-11-23 09:45:04 +00:00
Thomas Heller 450cafae28 (This is hopefully the last large, funny checkin message for
bdist_wininst.py we will see.)

Removed the base64 encoded binary contents, wininst.exe must be in the
same directory as this file now.

wininst.exe must be recompiled and commited each time the sources in
PC/bdist_wininst are changed.
2002-11-22 21:08:34 +00:00
Thomas Heller 3a23c3fae1 get_python_version was not imported. 2002-11-22 20:57:20 +00:00
Fred Drake 8bec48316b Two bugs:
- assertRaises() wasn't being called correctly
- test_warning() no longer applies
2002-11-22 20:13:43 +00:00
Tim Peters 78e35f9311 Move Windows Python away from bsddb 1.85 and toward Sleepycat's latest.
The bsddb subproject is gone.
The _bsddb subproject is new.
There are problems here, but I'm out of time to work on this now.  If
anyone can address an XXX comment or two in readme.txt, please do!
2002-11-22 20:00:34 +00:00
Guido van Rossum 44f602dd3b Comment out the warnings about mktemp(). These are too annoying, and
often unavoidable.
2002-11-22 15:56:29 +00:00
Fred Drake 132e0e824b Use False instead of 0. 2002-11-22 14:22:49 +00:00
Martin v. Löwis 4581cfa326 Patch #486438: Make module argument to testmod optional. 2002-11-22 08:23:09 +00:00
Martin v. Löwis f86e8ef33e Patch #550765: Add daemon_threads flag. 2002-11-22 08:08:44 +00:00
Piers Lauder e0273de432 added new IMAP4_stream class; added proxyauth command; added login_cram_md5 method 2002-11-22 05:53:04 +00:00
Raymond Hettinger 54405456e5 Implement dict() style constructor.
Already supported dict() and dict(mapping).
Now supports dict(itemsequence) and
Just van Rossum's new syntax for dict(keywordargs).

Also, added related unittests.

The docs already promise dict-like behavior
so no update is needed there.
2002-11-22 00:07:40 +00:00
Martin v. Löwis d899605e30 Patch #633547: Support plural forms. Do TODOs in test suite. 2002-11-21 21:45:32 +00:00
Guido van Rossum 21b60147e9 The _Event class should be more careful with releasing its lock when
interrupted.  A try/finally will do nicely.  Maybe other classes need
this too, but since they manipulate more state it's less clear that
that is always the right thing, and I'm in a hurry.

Backport candidate.
2002-11-21 21:08:39 +00:00
Andrew M. Kuchling fec3262691 Reflow comment 2002-11-21 20:41:07 +00:00
Martin v. Löwis 69ceb33bac Patch #642019: Recognize gcc-x.y as gcc. 2002-11-21 20:33:24 +00:00
Andrew M. Kuchling cdd215789c Bug #639118 from Ollie Oldham: archiver should use zipfile before zip
Previously archive_util.py attempted to spawn an
        external 'zip' program for the zip action, if this fails, an
        attempt to import zipfile.py is made...

        This bites folks who have 'old' or non-conforming zip
        programs on windows platforms.  This change tries the 'zipfile'
        module first, falling back to spawning a zip process if
        the module isn't available.
2002-11-21 18:33:28 +00:00
Tim Peters 97701b507b _RandomNameSequence(): style guide changes, small speedup, don't
put more in the critical section than absolutely needed, acquire
the mutex before the "try".
2002-11-21 15:59:59 +00:00
Tim Peters 6ef966e1ad _TemporaryFileWrapper: changed self.close_called to a proper bool. 2002-11-21 15:48:33 +00:00
Kurt B. Kaiser 4fc904708b Apply Nicolas Riley's Patch.
[ 634250 ] SearchDialogBase.py fix for Tk 8.4.1

SearchDialogBase refers to the grid 'col' option
considered ambiguous with Python 2.2.2 and Tk 8.4.1.
The correct name is 'column'.
2002-11-21 03:02:17 +00:00
Neal Norwitz 201626e00f Fix SF #640094, on win32 getpass runs into unix_getpass
Make sure we have a UNIX-compatible termios.
Apparently, McMillan Installer made a termios on windows
which caused unix_getpass() to be used instead of win_getpass().

Will backport.
2002-11-20 23:15:54 +00:00
Andrew M. Kuchling 2db92a6ee1 Add missing import 2002-11-20 16:10:29 +00:00
Walter Dörwald 7f82f7955e Add missing documentation for the PEP 293 functionality to
the codecs docstrings.
2002-11-19 21:42:53 +00:00
Walter Dörwald f171540ab8 Change int() so that passing a string, unicode, float or long argument
that is outside the integer range no longer raises OverflowError, but
returns a long object instead.

This fixes SF bug http://www.python.org/sf/635115
2002-11-19 20:49:15 +00:00
Martin v. Löwis 7a3bae410d Replace bsddb3 and _db occurrences. 2002-11-19 17:48:49 +00:00
Martin v. Löwis 1c6b1a2b4e Importing test suite from bsddb3 3.4.0 (with modifications). 2002-11-19 17:47:07 +00:00
Andrew M. Kuchling d448f66317 Add comment to Distutil files about requiring 1.5.2 compatibility, as
suggested by PEP 291.
2002-11-19 13:12:28 +00:00
Martin v. Löwis 6aa4a1f29c Import PyBSDDB 3.4.0. Rename historical wrapper to bsddb185. 2002-11-19 08:09:52 +00:00
Neil Schemenauer fe4f769fb8 Add __mod__ method to UserString. 2002-11-18 16:12:54 +00:00
Neil Schemenauer b981df9943 check for str.__mod__ 2002-11-18 16:12:11 +00:00
Neil Schemenauer ab9e4b76c2 check for unicode.__mod__ 2002-11-18 16:11:34 +00:00
Raymond Hettinger 311f419628 Improve comments. Clarify docs.
Replace "type(0)" with "int".
Replace "while 1" with "while True"
2002-11-18 09:01:24 +00:00
Raymond Hettinger 8ddc176e2e Improve DictMixin.
Replaced docstring with comments.  Prevents subclass contamination.
Added the missing __cmp__() method and a test for __cmp__().
Used try/except style in preference to has_key() followed by a look-up.
Used iteritem() where possible to save creating a long key list and
   to save redundant lookups.
Expanded .update() to look for the most helpful methods first and gradually
   work down to a mininum expected interface.
Expanded documentation to be more clear on how to use the class.
2002-11-18 04:34:10 +00:00
Eric S. Raymond 782d940866 Guard against error if .netrc is missing. 2002-11-17 17:53:12 +00:00
Neal Norwitz c4d047aad3 SF Patch #638825
Fix pychecker warnings, port arg was unused (it was always the default)
Need a global statement for _listener
2002-11-15 23:33:20 +00:00
Neal Norwitz d1cade0d1f SF Patch #638825 logging module
Fix pychecker warnings, remove unused imports and rename root
2002-11-15 23:31:28 +00:00
Tim Peters a1d004af04 Style guide reformats. I saw this test fail on a very heavily loaded
Win98SE box, but whatever the cause, it had scrolled off the DOS box.
(There was just the "test_queue failed" summary at the end of the
regrtest run.)
2002-11-15 19:08:50 +00:00
Raymond Hettinger 903bf90723 SF patch #520382: Expand shelve.py to have a full dictionary interface
and add a mixin to UserDict.py to make it easier to implement a full
dictionary interface.
2002-11-15 08:39:40 +00:00
Raymond Hettinger 7994716b6b SF patch #520382: Expand shelve.py to have a full dictionary interface
and add a mixin to UserDict.py to make it easier to implement a full
dictionary interface.
2002-11-15 06:46:14 +00:00
Guido van Rossum b9ba45894a Checking in Greg Ward's Optik, as optparse.py. This is the most
recent version from Greg's CVS.  I've changed the module docstring,
added a copyright notice, and renamed OptikError to OptParseError.

Still to do are documentation and unit tests.
2002-11-14 22:00:19 +00:00
Guido van Rossum 9a81892100 Fix or disable some tests that were affected by the new C3 MRO
algorithm, and add some new tests for the C3 algorithm.
2002-11-14 19:50:14 +00:00
Tim Peters c293704e93 This uses only one temp file at a time, so use test_support.TESTFN as
the name instead of enduring nanny "security warnings" from
tempfile.mktemp().
2002-11-14 16:23:29 +00:00
Guido van Rossum 3165786dd1 From SF patch 638299 [by Vinaj]: fileConfig() now takes an optional
defaults dictionary parameter which is passed to ConfigParser.
2002-11-14 12:52:17 +00:00
Neal Norwitz a4864a2464 Update the docstring to match the code. Will backport. 2002-11-14 03:31:32 +00:00
Neal Norwitz f539bdeb9c Sync Tix from Mike Clarkson, a maintainer 2002-11-14 02:43:40 +00:00
Andrew M. Kuchling a6483d2e9a Remove 'created by' lines; people can use CVS for this, and the information is often out of date 2002-11-14 02:25:42 +00:00
Neal Norwitz ef67956139 Fix typo in comment 2002-11-14 02:19:44 +00:00
Andrew M. Kuchling f6756e8dd4 Fix docstring typo; remove 'created' line 2002-11-14 01:58:48 +00:00
Andrew M. Kuchling 1cace1a30a [Bug #550364] Use sysconfig.get_python_version() 2002-11-14 01:44:35 +00:00
Andrew M. Kuchling 0ff98b9346 [Bug #550364] Add get_python_version() 2002-11-14 01:43:00 +00:00
Andrew M. Kuchling 9a38dcf057 [Bug #599248] ext module generation problem
If you have source files srcdir1/foo.c and srcdir2/foo.c, the
temporary .o for both files is written to build/temp.<platform>/foo.o.
This patch sets strip_dir to false for both calls to object_filename,
so now the object files are written to temp.<platform>/srcdir1/foo.o
and .../srcdir2/foo.o.

2.2 bugfix candidate
2002-11-14 01:29:00 +00:00
Eric S. Raymond b2db587b11 Make nntplib aware of ~/.netrc credentials; now they get used if they are
present and the caller has not specified a name/password pair.  This change
makes it less likely that a lazy coder will expose sensitive information in a
word-readable script.

Also, make the test a bit smarter.  If NNTPSERVER is defined in the environment
it will go talk to that server rather than look for a possibly nonexistent
local one named 'news'.  Maybe the osession initializer ought to look at
NNTPSERVER rather than requiring a host arg?  Must look around and see how
universal this convention is first.
2002-11-13 23:05:35 +00:00
Jeremy Hylton 4c8be8510b Add some simple tests of the persistence hooks. 2002-11-13 22:10:47 +00:00
Jeremy Hylton 5e0f4e73a9 Remove inst_persistent_id() WANNI (we ain't never needed it).
Add some simple tests of the persistence hooks.
2002-11-13 22:01:27 +00:00
Jeremy Hylton 0e1183ddff remove debugging print 2002-11-13 22:00:02 +00:00
Andrew M. Kuchling 3f1c9a916f Allow unknown keyword arguments to the Extension class, and warn about them. 2002-11-13 20:54:21 +00:00
Jeremy Hylton cd58b8f532 Add getstate and setstate implementation to concrete set classes. 2002-11-13 19:34:26 +00:00
Jeremy Hylton 77628658ca Remove some test code.
The buggy yahoo server was fixed, and the opalgroup test files are
gone.
2002-11-13 17:30:32 +00:00
Jeremy Hylton 22b3a49d3c Fix SF bug #637789: Handle Proxy-Connection header.
Also, remove unused local variable noted by pychecker.
2002-11-13 17:27:43 +00:00
Andrew M. Kuchling 33635aaf93 Back out part of rev. 1.53, restoring the use of the string module.
The two long lines have been reflowed differently; hopefully someone on
BeOS can test them.  Rev. 1.53 also converted string.atoi() to int(); I've
left that alone.
2002-11-13 17:03:05 +00:00
Guido van Rossum 455ab77f34 Get rid of #! lines, references to usage as __main__, README.txt, and
http://www.red-dove.com/python_logging.html.
2002-11-13 16:18:29 +00:00
Guido van Rossum 57102f861d Adding Vinay Sajip's logging package. 2002-11-13 16:15:58 +00:00
Raymond Hettinger c0b4034b81 Improved clarity and thoroughness of docstring.
Added design notes in comments.
Used better variable names.
Eliminated the unsavory "pool[-k:]" which was an aspiring bug (for k==0).
Used if/else to show the two algorithms in parallel style.
Added one more test assertion.
2002-11-13 15:26:37 +00:00
Fred Drake f2928eb017 Fix typo in comment. 2002-11-13 14:38:17 +00:00
Andrew M. Kuchling 8557156717 Update file 2002-11-13 13:26:59 +00:00
Andrew M. Kuchling ea002a1aff Docstring typo fix 2002-11-13 13:25:46 +00:00
Neal Norwitz 80a1bf4b5d Fix SF # 635969, No error "not all arguments converted"
When mwh added extended slicing, strings and unicode became mappings.
Thus, dict was set which prevented an error when doing:
	newstr = 'format without a percent' % string_value

This fix raises an exception again when there are no formats
and % with a string value.
2002-11-12 23:01:12 +00:00
Tim Peters b9099c3df4 SF patch 637176: list.sort crasher
Armin Rigo's Draconian but effective fix for

SF bug 453523: list.sort crasher

slightly fiddled to catch more cases of list mutation.  The dreaded
internal "immutable list type" is gone!  OTOH, if you look at a list
*while* it's being sorted now, it will appear to be empty.  Better
than a core dump.
2002-11-12 22:08:10 +00:00
Raymond Hettinger f24eb35d18 SF patch 629637: Add sample(population, k) method to the random module.
Used for random sampling without replacement.
2002-11-12 17:41:57 +00:00
Martin v. Löwis 3ae84b6389 Allow both string and Unicode objects in levels. 2002-11-09 20:19:12 +00:00
Martin v. Löwis 2411a2dd82 Don't try to convert the test filename to Unicode with -U. 2002-11-09 19:57:26 +00:00
Martin v. Löwis 838a359b95 Search for tix subdirectories. Fixes #564729. Will backport to 2.2. 2002-11-09 19:01:44 +00:00
Tim Peters 44a7910873 I already forgot what I changed -- it wasn't important <wink>. 2002-11-09 06:51:30 +00:00
Tim Peters 63c1081ae3 OK -- all tests pass on Windows now. The rest were due to 3 more
binary-vs-text-mode screwups.
2002-11-09 06:49:43 +00:00
Tim Peters 9de06bd605 More tests run on Windows now. Something is still wrong here, but no
idea what.  Added liberal XXX explanations for the next guy.
2002-11-09 06:45:31 +00:00
Tim Peters 499d09af92 Many changes to get this to pass on Windows, and to make it easier to
figure out what the code was doing.  The fixes were a combination of
closing open files before deletion, opening files in binary mode, and
plain skipping things that can't work on Windows (BaseTest.decompress
uses a process gimmick that doesn't exist on Windows, and, even if it
did, assumes a "bunzip2" executable is on PATH).
2002-11-09 06:31:56 +00:00
Tim Peters 3de75266aa Whitespace normalization. 2002-11-09 05:26:15 +00:00
Tim Peters e7130315a5 Comment out the test docstrings so we can at least tell which tests are
failing.
2002-11-09 05:22:41 +00:00
Tim Peters 230a60c6ec Whitespace normalization. 2002-11-09 05:08:07 +00:00
Tim Peters ae9cbee4da Open at least one binary file in binary mode. This allows a few of the
bz2 tests to pass on Windows; most are still failing.
2002-11-09 04:44:30 +00:00
Guido van Rossum 7cd83ca9ad Another attempt at making the set constructor both safe and fast. [SF
bug 628246]
2002-11-08 17:03:36 +00:00
Andrew M. Kuchling 91e77536e8 [Bug #233259] Ugly traceback for DistutilsPlatformError
Fixed by catching all exceptions that are subclasses of DistutilsError,
  so only the error message will be printed.  You can still get the
  whole traceback by enabling the Distutils debugging mode.
2002-11-08 16:18:24 +00:00
Andrew M. Kuchling 706867c20c Fix comment typo 2002-11-08 15:11:42 +00:00
Michael W. Hudson 006c75265f This is Richie Hindle's patch:
[ 631276 ] Exceptions raised by line trace function

It conflicted with the patches from Armin I just checked it, so I had
to so some bits by hand.
2002-11-08 13:08:46 +00:00
Martin v. Löwis 1f04610b49 Make strip behave as documented. Will backport to 2.2.3. 2002-11-08 12:09:59 +00:00
Tim Peters 0ec1ddcdcf _update(): Commented the new obscurity. Materialized into a tuple
instead of into a list for a bit of speed/space savings.  Reopened the
bug report too (628246), as I'm unclear on why we don't sort out the
cause of the TypeError instead.
2002-11-08 05:26:52 +00:00
Raymond Hettinger 1eb1fb814b Closes SF bug #628246.
The _update method detected mutable elements by trapping TypeErrors.
Unfortunately, this masked useful TypeErrors raised by the iterable
itself.  For cases where it is possible for an iterable to raise
a TypeError, the iterable is pre-converted to a list outside the
try/except so that any TypeErrors propagate through.
2002-11-08 05:03:21 +00:00
Thomas Heller 492620ae5e Use dynamic linking for the SHGetSpecialFolderPath function, it is not
always available on Windows NT. When the function cannot be loaded,
get_special_folder_path raises OSError, "function not available".

Compiled the exe, and rebuilt bdist_wininst.py.
2002-11-07 16:46:19 +00:00
Thomas Heller 8560bb8167 Fix a small bug when sys.argv[0] has an absolute path.
See http://mail.python.org/pipermail/distutils-sig/2002-November/003039.html
2002-11-07 16:41:38 +00:00
Gustavo Niemeyer fbceb01ef0 Fixed bug "[#466200] ability to specify a 'verify' script".
* Lib/distutils/command/bdist_rpm.py
  (bdist_rpm.initialize_options): Included verify_script attribute.
  (bdist_rpm.finalize_package_data): Ensure that verify_script is a filename.
  (bdist_rpm._make_spec_file): Included verify_script in script_options
  tuple.

* Misc/NEWS
  Mention change.
2002-11-06 18:44:26 +00:00
Walter Dörwald 4dbf192f2b Add next() and __iter__() methods to StreamReader, StreamReaderWriter
and StreamRecoder.

This closes SF bug #634246.
2002-11-06 16:53:44 +00:00
Walter Dörwald 07e147667c Make int("...") return a long if an int would overflow.
Also remove the 512 character limitation for int(u"...") and long(u"...").

This closes SF bug #629989.
2002-11-06 16:15:14 +00:00
Andrew M. Kuchling aca49b065b Fix NameError exception ('name' undefined) 2002-11-06 15:40:05 +00:00
Andrew M. Kuchling 9050a517c8 Fix docstring typos 2002-11-06 14:51:20 +00:00
Gustavo Niemeyer 4e7be06a65 Fixed bug #470582, using a modified version of patch #527371,
from Greg Chapman.

* Modules/_sre.c
  (lastmark_restore): New function, implementing algorithm to restore
  a state to a given lastmark. In addition to the similar algorithm used
  in a few places of SRE_MATCH, restore lastindex when restoring lastmark.
  (SRE_MATCH): Replace lastmark inline restoring by lastmark_restore(),
  function. Also include it where missing. In SRE_OP_MARK, set lastindex
  only if i > lastmark.

* Lib/test/re_tests.py
* Lib/test/test_sre.py
  Included regression tests for the fixed bugs.

* Misc/NEWS
  Mention fixes.
2002-11-06 14:06:53 +00:00
Finn Bock 57f0f3475e Skip the test_nocaret test when running as jython. Jython happens to add
a caret in this case too.
2002-11-06 11:45:15 +00:00
Finn Bock 41c570f2e7 Make the test pass for jython where there are no sys.executable. 2002-11-06 11:37:57 +00:00
Chui Tey 5a231c8f79 By default when getting the search menu, the currently highligted
text is the search term.
2002-11-06 02:18:45 +00:00
Barry Warsaw 210bd208eb Implement a `pp' command, which is like `p' except that it
pretty-prints the value of its expression argument.
2002-11-05 22:40:20 +00:00
Barry Warsaw da2525ed2a parse(), _parseheaders(), _parsebody(): A fix for SF bug #633527,
where in lax parsing, the first non-header line after a header block
(e.g. the first line not containing a colon, and not a continuation),
can be treated as the first body line, even without the RFC mandated
blank line separator.

rfc822 had this behavior, and I vaguely remember problems with this,
but can't remember details.  In any event, all the tests still pass,
so I guess we'll find out. ;/

This patch works by returning the non-header, non-continuation line
from _parseheader() and using that as the first header line prepended
to fp.read() if given.  It's usually None.

We use this approach instead of trying to seek/tell the file-like
object.
2002-11-05 21:44:06 +00:00
Barry Warsaw a0a00761a5 test_no_separating_blank_line(): A test for SF bug #633527, no
separating blank line between a header block and body text.

Tests both lax and strict parsing.
2002-11-05 21:36:17 +00:00
Barry Warsaw 847fdbbe71 A message with no separating blank line between the headers and the
body.  A test message for SF bug #633527.
2002-11-05 21:29:47 +00:00
Barry Warsaw 48b0a1c603 test_text_plain_in_a_multipart_digest(): A test of the fix for SF bug
#631350, where a subobject in a multipart/digest isn't a
message/rfc822.
2002-11-05 21:04:52 +00:00
Barry Warsaw 5c9130ec46 _parsebody(): A fix for SF bug #631350, where a subobject in a
multipart/digest isn't a message/rfc822.  This is legal, but counter
to recommended practice in RFC 2046, $5.1.5.

The fix is to look at the content type after setting the default
content type.  If the maintype is then message or multipart, attach
the parsed subobject, otherwise use set_payload() to set the data of
the other object.
2002-11-05 20:54:37 +00:00
Barry Warsaw 00e6a02ef8 Test case, distilled from SF bug #631350, where a subobject in a
multipart/digest isn't a message/rfc822.  This is legal, but counter
to recommended practice in RFC 2046, $5.1.5.
2002-11-05 20:53:18 +00:00
Tim Peters 9288f95cb5 Another round on SF patch 618135: gzip.py and files > 2G
The last round boosted "the limit" from 2GB to 4GB.  This round gets
rid of the 4GB limit.  For files > 4GB, gzip stores just the last 32
bits of the file size, and now we play along with that too.  Tested
by hand (on a 6+GB file) on Win2K.

Boosting from 2GB to 4GB was arguably enough "a bugfix".  Going beyond
that smells more like "new feature" to me.
2002-11-05 20:38:55 +00:00
Jeremy Hylton cd8fdbb3fa Repair inconsistent use of tabs and spaces. 2002-11-05 20:27:17 +00:00
Jeremy Hylton a5f4c071b5 Remove use of string module and reflow a couple of long lines. 2002-11-05 20:11:08 +00:00
Barry Warsaw 8f4dcbd3f6 Bump __version__ (yes, to 2.5 "minus") 2002-11-05 19:56:47 +00:00
Barry Warsaw 030ddf794f Jason Mastaler's patch to break the dependence on rfc822.py for the
address parsing routines.  Closes SF patch #613434.
2002-11-05 19:54:52 +00:00
Guido van Rossum e94d8fab56 Fix an old bug in poll(). When a signal is handled while we're
blocked in select(), this will raise select.error with errno set to
EINTR.  The except clauses correctly ignores this error, but the rest
of the logic will then call read() for all objects in select's *input*
list of read file descriptors.  Then when an object's read_handler()
is naive, it will call recv() on its socket, which will raise an
IOError, and then asyncore decides to close the socket.  To fix this,
we simply return in this case.

Backport candidate.
2002-11-05 18:41:20 +00:00
Michael W. Hudson 5da854fe51 This is Alex Martelli's patch
[ 633870 ] allow any seq assignment to a list slice

plus a very silly little test case of my own.
2002-11-05 17:38:05 +00:00
Gustavo Niemeyer f8ca8364c9 Patch implementing bz2 module.
* setup.py
  (PyBuildExt.detect_modules): Included bz2 module detection.

* Modules/bz2module.c
* Lib/test/test_bz2.py
* Doc/lib/libbz2.tex
  Included files implementing, testing, and documenting bz2 module.

* Doc/Makefile.deps
* Doc/lib/lib.tex
  Include references to libbz2.tex.

* Misc/NEWS
  (Library): Mention distutils' c++ linkage patch, and new bz2 module.
2002-11-05 16:50:05 +00:00
Gustavo Niemeyer 6b016852f8 This patch fixes the following bugs:
[#413582] g++ must be called for c++ extensions
[#454030] distutils cannot link C++ code with GCC

topdir = "Lib/distutils"

* bcppcompiler.py
  (BCPPCompiler.create_static_lib): Fixed prototype, removing extra_preargs
  and extra_postargs parameters. Included target_lang parameter.
  (BCPPCompiler.link): Included target_lang parameter.

* msvccompiler.py
  (MSVCCompiler.create_static_lib): Fixed prototype, removing extra_preargs
  and extra_postargs parameters. Included target_lang parameter.
  (MSVCCompiler.link): Included target_lang parameter.

* ccompiler.py
  (CCompiler): New language_map and language_order attributes, used by
  CCompiler.detect_language().

  (CCompiler.detect_language): New method, will return the language of
  a given source, or list of sources. Individual source language is
  detected using the language_map dict. When mixed sources are used,
  language_order will stablish the language precedence.

  (CCompiler.create_static_lib, CCompiler.link, CCompiler.link_executable,
   CCompiler.link_shared_object, CCompiler.link_shared_lib):
  Inlcuded target_lang parameter.

* cygwinccompiler.py
  (CygwinCCompiler.link): Included target_lang parameter.

* emxccompiler.py
  (EMXCCompiler.link): Included target_lang parameter.

* mwerkscompiler.py
  (MWerksCompiler.link): Included target_lang parameter.

* extension.py
  (Extension.__init__): New 'language' parameter/attribute, initialized
  to None by default. If provided will overlap the automatic detection
  made by CCompiler.detect_language(), in build_ext command.

* sysconfig.py
  (customize_compiler): Check Makefile for CXX option, and also the
  environment variable CXX. Use the resulting value in the 'compiler_cxx'
  parameter of compiler.set_executables().

* unixccompiler.py
  (UnixCCompiler): Included 'compiler_cxx' in executables dict, defaulting
  to 'cc'.
  (UnixCCompiler.create_static_lib): Included target_lang parameter.
  (UnixCCompiler.link): Included target_lang parameter, and made
  linker command use compiler_cxx, if target_lang is 'c++'.

* command/build_ext.py
  (build_ext.build_extension): Pass new ext.language attribute
  to compiler.link_shared_object()'s target_lang parameter. If
  ext.language is not provided, detect language using
  compiler.detect_language(sources) instead.

* command/config.py
  (config._link): Pass already available lang parameter as target_lang
  parameter of compiler.link_executable().
2002-11-05 16:12:02 +00:00
Michael W. Hudson 173f11da5d Some days, I think my comment of
/* this is harder to get right than you might think */

angered some God somewhere.  After noticing

    >>> range(5000000)[slice(96360, None, 439)]
    []

I found that my cute test for the slice being empty failed due to
overflow.  Fixed, and added simple test (not the above!).
2002-11-05 15:28:51 +00:00
Thomas Heller d7c14c6c9b Must now give the basename - not including directories - of the
install-script on the command line.

Recreated after recompilation of wininst.exe.
2002-11-05 10:06:19 +00:00
Raymond Hettinger 78a7aeeb1a SF 633560: tokenize.__all__ needs "generate_tokens" 2002-11-05 06:06:02 +00:00
Tim Peters a326f47a13 This stopped working on Windows, due to a reference to the non-existent
_locale.getdefaultlocale.  Guessing a leading underscore was intended,
but don't really understood this stuff (locale looks like Spanish for
the opposite of global to me <wink>).
2002-11-05 03:49:09 +00:00
Chui Tey 69371d6530 Set breakpoints on remote debugger 2002-11-04 23:39:45 +00:00
Chui Tey 72a8a3b2b8 Tidied up widget placement 2002-11-04 23:07:51 +00:00
Chui Tey a2adb0f6d9 Recalls breakpoints set in a file 2002-11-04 22:14:54 +00:00
Andrew M. Kuchling 29c8623e5c [Patch #588809] LDFLAGS support for build_ext.py, from Robert Weber
customize_compiler() now looks at various environment variables and uses
   their values to override the configured C compiler/preprocessor/linker
   binary and flags.
2002-11-04 19:53:24 +00:00
Tim Peters fb0ea525d5 Related to SF patch 618135: gzip.py and files > 2G.
Fixed the signed/unsigned confusions when dealing with files >= 2GB.
4GB is still a hard limitation of the gzip file format, though.

Testing this was a bitch on Win98SE due to frequent system freezes.  It
didn't freeze while running gzip, it kept freezing while trying to *create*
a > 2GB test file!  This wasn't Python's doing.  I don't know of a
reasonable way to test this functionality in regrtest.py, so I'm not
checking in a test case (a test case would necessarily require creating
a 2GB+ file first, using gzip to zip it, using gzip to unzip it again,
and then compare before-and-after; so >4GB free space would be required,
and a loooong time; I did all this "by hand" once).

Bugfix candidate, I guess.
2002-11-04 19:50:11 +00:00
Andrew M. Kuchling 47ca2bc661 [Patch #588809] Remove check of environment variables; sysconfig.py will do that now 2002-11-04 19:50:03 +00:00
Martin v. Löwis 574deae5b7 Patch #625823: Add symbolic constants for more commands. 2002-11-04 17:34:07 +00:00
Andrew M. Kuchling e2d1214c42 [Bug #620630] Flush stdout after logging every message. Without it,
when output is redirected to a file, compiler error messages show
   up before Distutils prints the command being invoked.
2002-11-04 14:27:43 +00:00
Andrew M. Kuchling 33a5edf89c Add get_distutil_options(); future setup.py files can use this to check
whether the Distutils being used supports a particularly capability.

   (This idea was originally suggested by Juergen Hermann as a method
    on the Distribution class.  I think it makes more sense as a
    function in core.py, and that's what this patch implements.)
2002-11-04 13:45:15 +00:00
Andrew M. Kuchling b6c316f134 [Bug #570655] Fix misleading option text 2002-11-04 13:33:07 +00:00
Martin v. Löwis 1da9c57c74 Patch #630829: Don't block on IAC, process suboptions. 2002-11-04 09:56:00 +00:00
Chui Tey a178cff979 [ 629984 ] Smaller font sizes not supported 2002-11-04 03:17:45 +00:00
Chui Tey 993e81a8a5 619127: Recent File Menu Not Updating 2002-11-04 03:11:10 +00:00
Martin v. Löwis f0a4668e6f Add getpreferredencoding. Support @euro modifiers. Fixes #554676.
The @euro part is backported to 2.2.3.
2002-11-03 17:20:12 +00:00
Neal Norwitz 26a1eefd0f Fix SF # 631066, running regrtest in user mode fails
Try to write to TESTFN, if that fails, try TESTFN in /tmp
If that fails, print a warning and go on.
Will backport.
2002-11-03 00:35:53 +00:00
Neal Norwitz e7629c85bc Skip test_dbm if we can't write to the file
Cleanup (remove) the file(s) after we are done with the test.
(Fixes problem on snake farm)
2002-11-02 18:25:08 +00:00
Raymond Hettinger 4f759d8504 Correct erroneous parenthesis placement in the delta from 1.63 to 1.64. 2002-11-02 02:02:46 +00:00
Finn Bock 57bc5fa60a Patch #631972: Adds an is_jython flag. 2002-11-01 18:02:03 +00:00
Fredrik Lundh 768c98bb0b patch #624180 (part 2 of 2):
use unquote on authentication strings, to allow users to embed
@ and : in user names and passwords (from Phillip Eby)
2002-11-01 17:14:16 +00:00
Finn Bock 218c5f9691 [SF bug 631713] use the import exeption message in the TestFailed
exception.
2002-11-01 11:33:00 +00:00
Greg Ward d1a72a0d5e Ad test_funky_hyphens() to test some screwy edge cases reported in SF
bug #596434.  (Alas, I don't think this completely covers that bug.)

Remove 'wrapper' argument from BaseTestCase.check_split() -- it's not
actually needed.
2002-10-31 16:11:18 +00:00
Thomas Heller 05c9335659 Fixes SF bug#614051: win32 build_ext problem. 2002-10-31 14:26:37 +00:00
Andrew M. Kuchling ccf4e421b8 Catch only ImportError 2002-10-31 13:39:33 +00:00
Andrew M. Kuchling ff4ad9a1ce Make the Distribution() constructor forgiving of unknown keyword
arguments, triggering a warning instead of raising an exception.  (In
1.5.2/2.0, it will print to stderr.)

Bugfix candidate for all previous versions.  This changes behaviour,
but the old behaviour wasn't very useful.  If Distutils version X+1
adds a new keyword argument, using the new keyword means your setup.py
file won't work with Distutils version X any more.
2002-10-31 13:22:41 +00:00
Raymond Hettinger d8ea2e080f Added missing class to __all__. 2002-10-30 06:20:37 +00:00
Raymond Hettinger a853cc6647 Added __all__. 2002-10-30 06:15:53 +00:00
Raymond Hettinger 39f02f98f5 Added missing names to __all__. 2002-10-30 06:09:58 +00:00
Raymond Hettinger 2b9bfb33ff Added new move() function to __all__. 2002-10-30 05:44:50 +00:00
Tim Peters fb05c4e5bb SF bug 630824: pydoc Helper keywords missing 'yield'
Wow, what a brittle subsystem!  Fixed, maybe, provided Fred doesn't
shuffle the docs around.

Bugfix candidate.
2002-10-30 05:21:00 +00:00
Raymond Hettinger edc853e2f4 Patrick K. O'Brien notices that kwlist was missing from __all__.
Added because it is part of the documented interface.
2002-10-30 05:17:22 +00:00
Guido van Rossum 2c9590f625 Added test for this fix to classobject.c:
Since properties are supported here, is possible that
instance_getattr2() raises an exception.  Fix all code that made this
assumption.

Backport candidate.
2002-10-29 19:08:29 +00:00
Fred Drake 6d8905012c Minor simplification. 2002-10-28 18:09:41 +00:00
Fred Drake 9142b19216 Remove unnecessary output file. 2002-10-28 17:59:24 +00:00
Fred Drake 32f3add267 Add a test of interaction between &amp; and extra replacements.
Remove extra noise from the output when there are no errors, and say more
in the exception when there are errors.
2002-10-28 17:58:48 +00:00
Fred Drake 407fea5197 Really do replacement of &amp; last to avoid bad interactions between &amp;
replacement and replacements based on the entities parameter.
2002-10-28 17:46:59 +00:00
Fred Drake f55222d98f Avoid calling __dict_replace() if we don't need to -- the call is much
more expensive than just doing to work needed, and these things seem
to always turn into a bottleneck eventually.
2002-10-28 17:29:01 +00:00
Martin v. Löwis 74b51ac1e5 Patch #613256: Add nescape method to xml.sax.saxutils. 2002-10-26 14:50:45 +00:00
Fred Drake 0eebd5cef9 Implement a safer and more predictable interpolation approach.
Closes SF bug #511737.
2002-10-25 21:52:00 +00:00
Fred Drake 98e3b29b59 Add tests for both raw and non-raw versions of the items() methods. 2002-10-25 20:42:44 +00:00
Fred Drake df393bd46a According to the docs, __name__ is not exposed via the API except
indirectly via %(__name__)s.  Not sure why, but maintain the
documented behavior for the new items() method.

Be a little more efficient about how we compute the list of options in
the ConfigParser.items() method.
2002-10-25 20:41:30 +00:00
Fred Drake 8811ce79f1 Remove useless output file. 2002-10-25 19:41:26 +00:00
Fred Drake c6f2891af8 Convert to PyUnit. 2002-10-25 19:40:49 +00:00
Fred Drake 3af0eb872a Added (very) minimal tests of the RawConfigParser class.
Moved the write() test to near the end of the file since it screws up
font-lock.  ;-(
2002-10-25 18:09:24 +00:00
Fred Drake fce6557c6b Re-factor: Use a RawConfigParser base class and make ConfigParser a
derived class that adds the ugly string interpolation code.  In the
process, changed all "__" methods and instance variables to "_".
2002-10-25 18:08:18 +00:00
Marc-André Lemburg 9cd87aaa54 Fix for bug #626172: crash using unicode latin1 single char
Python 2.2.3 candidate.
2002-10-23 09:02:46 +00:00
Kurt B. Kaiser 45186c4ce0 Implement Restoring Breakpoints in Subprocess Debugger
M Debugger.py
M EditorWindow.py
M PyShell.py

0. Polish PyShell.linecache_checkcache()
1. Move break clearing code to PyShell.PyShellEditorWindow from
   EditorWindow.
2. Add PyShellEditorWindow.breakpoints attribute to __init__, a list of
   line numbers which are breakpoints for that edit window.
3. Remove the code in Debugger which removes all module breakpoints when
   debugger is closed.  Want to be able to reload into debugger when
   restarted.
4. Moved the code which sets EditorWindow.text breakpoints from Debugger
   to PyShell.PyShellEditorWindow and refactored.
5. Implement reloading subprocess debugger with breakpoints from all open
   PyShellEditorWindows when debugger is opened or subprocess restarted.
6. Eliminate the break_set attribute, use the breakpoint list instead.
2002-10-23 04:48:08 +00:00
Greg Ward 4c486bc0c0 Add comment about inability to handle Unicode strings (hopefully a
temporary condition).
2002-10-22 18:31:50 +00:00
Fredrik Lundh 1303c7cb16 add support for basic authentication, based on patch #624180
by Phillip J. Eby
2002-10-22 18:23:00 +00:00
Raymond Hettinger 9ecf9ce161 Patches #626105:
Replaces the _center function in the calendar
module with the center method for strings.

For situations with uneven padding, the behavior is
slightly different in that the center method puts the
extra space on the right instead of the left.
2002-10-22 05:15:17 +00:00
Barry Warsaw 4111804548 test_body_encoding(): a new test for Charset.body_encode(), especially
one that tests the obscure bug reported in SF # 625509.
2002-10-21 05:43:58 +00:00
Barry Warsaw 34aa44538d test_body_encoding(): a new test 2002-10-21 05:31:08 +00:00
Barry Warsaw 3d57589f0f body_encode(): Fixed typo reported by Chris Lawrence, closing SF bug
#625509.  This isn't a huge problem because at the moment there are no
built-in charsets for which header_encoding is QP but body_encoding is
not.
2002-10-21 05:29:53 +00:00
Raymond Hettinger fca3bb6a29 Explicitly use floor division 2002-10-21 04:44:11 +00:00
Raymond Hettinger d058f08e03 Eliminate unused instance variable 2002-10-21 03:08:20 +00:00
Fredrik Lundh 37a0982278 point people to the Python bug tracker, rather than to a mail
account I hardly ever use...
2002-10-19 20:19:10 +00:00
Neal Norwitz 673cd824ba Fix SF # 624982, Potential AV in slot_sq_item, by Greg Chapman
Don't crash when getting value of a property raises an exception
2002-10-18 16:33:13 +00:00
Martin v. Löwis 9def6a3a77 Update to Unicode 3.2 database. 2002-10-18 16:11:54 +00:00
Martin v. Löwis e4913c9987 Patch #624936: Implement __contains__. 2002-10-18 08:58:14 +00:00
Neal Norwitz d8407a7031 Add new encoding for Ukrainian Cyrillic 2002-10-17 22:15:33 +00:00
Fred Drake 1e146e7876 Continue to work even though the test can be named test.test_regex
these days.
2002-10-17 22:13:28 +00:00
Fred Drake 7633d2393f Don't call warnings.resetwarnings(); that does bad things that cause
other tests to generate warning when they didn't before.  In
particular, this cancels not only filters set by -W, but also from
test.regrtest.
2002-10-17 22:09:03 +00:00
Fred Drake de4742b87f Remove spurious cruft from the output. 2002-10-17 20:36:08 +00:00
Guido van Rossum b390315872 Must catch TypeError from int(length). 2002-10-17 16:21:35 +00:00
Fred Drake f606e8d705 Added missing entries to __all__. 2002-10-16 21:21:39 +00:00
Fred Drake 707056580f Make sure we test urlsplit() / urlunsplit() directly, rather than
guessing that urlparse() / urlunparse() use them.

Add tests of urldefrag().
2002-10-16 21:02:36 +00:00
Thomas Heller 5b1614d568 Recreated after source changes. 2002-10-16 17:51:38 +00:00
Thomas Heller 0cf4269862 Recreated after source changes. 2002-10-15 19:45:25 +00:00
Martin v. Löwis 77ac429eff Patch #572628: Optional timeouts for put and get. 2002-10-15 15:11:13 +00:00
Thomas Heller d98d25e22d Revert the previous checkin - it didn't work anyway. 2002-10-15 14:51:58 +00:00
Guido van Rossum 6e5680fc83 For some reason (probably cut and paste), __ipow__ for new-style
classes was called with three arguments.  This makes no sense, there's
no way to pass in the "modulo" 3rd argument as for __pow__, and
classic classes don't do this.  [SF bug 620179]

I don't want to backport this to 2.2.2, because it could break
existing code that has developed a work-around.  Code in 2.2.2 that
wants to use __ipow__ and wants to be forward compatible with 2.3
should be written like this:

  def __ipow__(self, exponent, modulo=None):
      ...
2002-10-15 01:01:53 +00:00
Martin v. Löwis ff9284bc2e Allow Unicode strings as message and module name. 2002-10-14 21:06:02 +00:00
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