Commit graph

6994 commits

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