Commit Graph

3829 Commits

Author SHA1 Message Date
Skip Montanaro 03d9014992 added a few more __all__ lists
test___all__.py: fail silently in check_all if the module can't be imported
2001-01-25 15:29:22 +00:00
Skip Montanaro 438bb94789 fail more completely by deleting dbhash from sys.modules if bsddb can't be
loaded - prevents second import later from succeeding spuriously - mostly of
use in regression tests where the module might get imported more than once
2001-01-25 13:47:00 +00:00
Tim Peters d52269bfd0 Fix bugs introduced by rewrite (in particular, time-based initialization
got broken).  Also added new method .jumpahead(N).  This finally gives us
a semi-decent answer to how Python's RNGs can be used safely and efficiently
in multithreaded programs (although it requires the user to use the new
machinery!).
2001-01-25 06:23:18 +00:00
Tim Peters d7b5e88e8e Reworked random.py so that it no longer depends on, and offers all the
functionality of, whrandom.py.  Also closes all the "XXX" todos in
random.py.  New frequently-requested functions/methods getstate() and
setstate().  All exported functions are now bound methods of a hidden
instance.  Killed all unintended exports.  Updated the docs.
FRED:  The more I fiddle the docs, the less I understand the exact
intended use of the \var, \code, \method tags.  Please review critically.
GUIDO:  See email.  I updated NEWS as if whrandom were deprecated; I
think it should be.
2001-01-25 03:36:26 +00:00
Guido van Rossum 42756df91c Fix the test output, now that escapes in repr() of string and Unicode
are different (Ping didn't test this).
2001-01-24 21:49:57 +00:00
Guido van Rossum 0fc8b74fc5 Fix the test output, now that escapes in repr() of string and Unicode
are different (Ping couldn't test this).
2001-01-24 21:46:18 +00:00
Andrew M. Kuchling d305f515f9 New asynchat.py from Sam Rushing: this foregoes using the regex module
to find the prefix of strings, thus removing a warning, and simply
   uses straightforward string slicing.
2001-01-24 21:10:55 +00:00
Ka-Ping Yee fa004ad36c Show '\011', '\012', and '\015' as '\t', '\n', '\r' in strings.
Switch from octal escapes to hex escapes for other nonprintable characters.
2001-01-24 17:19:08 +00:00
Neil Schemenauer 84d14baf94 There is no more Modules/Makefile, use toplevel Makefile. 2001-01-24 17:17:20 +00:00
Andrew M. Kuchling af6963c2f0 Updated version of asyncore.py from Sam Rushing:
Adds support for using select.poll() if it's available

    Move a 'map is None' test out of an else branch and into the right place
2001-01-24 15:50:19 +00:00
Andrew M. Kuchling 506f0b1fc6 Part of patch #102409: special cases for Cygwin:
Lib/distutils/command/build_ext.py(build_ext.finalize_options): Add
    Cygwin specific code to append Python's library directory to the
    extension's list of library directories.

    (build_ext.get_libraries): Add Cygwin specific code to append Python's
    (import) library to the extension's list of libraries.
2001-01-24 15:43:09 +00:00
Tim Peters 1baf829835 test___all__ was failing on WIndows because locale.py doesn't really
know which names it exports.  Didn't fix its ignorance, but patched
over the consequence.
2001-01-24 10:13:46 +00:00
Fredrik Lundh 06d126803c Move uchhash functionality into unicodedata (after the recent
crop of changes, the files are small enough to do this).  Also
adds "name" and "lookup" functions to unicodedata.
2001-01-24 07:59:11 +00:00
Skip Montanaro 17ab123cf1 a few more modules get __all__ 2001-01-24 06:27:27 +00:00
Barry Warsaw f44939105a __all__: removed "error", "abort", "readonly", as these are not
exportable module attributes (they're attributes on the IMAP class).
Fixed the case typo on Time2Internaldate.

Does anybody run the test suite any more? <wink>
2001-01-24 04:16:09 +00:00
Barry Warsaw 24f3acab3b It's "gopherlib" not "gopher". 2001-01-24 04:13:02 +00:00
Eric S. Raymond cfa4096618 Fixed autoraise glitches. 2001-01-23 15:49:34 +00:00
Skip Montanaro 2dd4276559 added a few more __all__ lists
fixed typo in ihooks docstring
2001-01-23 15:35:05 +00:00
Eric S. Raymond f79cb2db3e Expose the autoraise capability. Improve the documentation. 2001-01-23 13:49:44 +00:00
Eric S. Raymond f7f185116a Rewrite webbrowser.py to fix various bugs following Ka-Ping Yee's
complaints.  The new version moves most of its initialization to
package load time; it's simpler, faster, smaller, and adds support for
Mozilla and Links.  Interpretation of the BROWSER variable now works
and is documented.  The open_new entry point and methods are marked
"deprecated; may be removed in 2.1".
2001-01-23 13:16:32 +00:00
Tim Peters f87d857080 Restore alphabetic order. Also try to import rlcompleter and curses, but
don't fail if they're not available.
2001-01-23 09:50:30 +00:00
Jeremy Hylton 578ceee042 Add simple test of list comprehension that uses a name that isn't
otherwise used in the same code block.  (Not sure this is the right
place, but there is no test_list_comprehensions.py.)
2001-01-23 01:51:40 +00:00
Guido van Rossum d0f5e70016 - Use "exec ... in dict" to avoid having to walk on eggshells; locals
no don't have to start with underscore.

- Add spaces after commas in argument lists.

- Only test dbhash if bsddb can be imported.  (Wonder if there are
  more like this?)
2001-01-22 23:37:04 +00:00
Tim Peters 763cb0aa44 Typo repair. 2001-01-22 22:43:35 +00:00
Tim Peters e935816164 Reorganize pickle/cPickle testing so the tests pass regardless of the order
they're run.
2001-01-22 22:05:20 +00:00
Fred Drake d74804db41 The "user" module cannot reasonably be tested. Moved to the end (and
commented it out), and added an explanation as to *why*.

Added period to docstring.
2001-01-22 19:38:37 +00:00
Guido van Rossum 7f9b5e014b OK, changed my mind once more on this. The comparison hierarchy is
now

    None < all numeric types < all other types

so that once again

    map(max, Squares(3), Squares(2))

equals

    [0, 1, 4]
2001-01-22 19:30:07 +00:00
Guido van Rossum d9bae8b95a Numeric-smelling objects now once again compare smaller than
non-numeric ones, so 4 < None again in the 'map' test.
2001-01-22 16:01:24 +00:00
Guido van Rossum 31584cb43d Finn Bock (SF patch #103349):
Allow pickle.py to be using with Jython unicode strings
2001-01-22 14:53:29 +00:00
Guido van Rossum f317a18a4a Finn Bock (SF patch #103345): Avoid outdated exec form in
test_class.py.
2001-01-22 14:51:41 +00:00
Tim Peters 0c94724cc7 Patch #103342: Make shutil.copytree more useful under Jython. 2001-01-21 20:00:00 +00:00
Tim Peters d304f44906 Patch #103343: Allow the important test_pkg to succeed under Jython. 2001-01-21 19:51:53 +00:00
Martin v. Löwis db786876b6 In format(), consider sign only after grouping.
Suggested by Kevin Jacobs in bug report #129417.
2001-01-21 18:52:33 +00:00
Tim Peters 08dabf0a73 Patch #103344: Sort dicts from extcall for easier comparison with Jython. 2001-01-21 18:52:02 +00:00
Tim Peters dfc538acae Whitespace normalization. 2001-01-21 04:49:16 +00:00
Tim Peters 384fd106e8 Bug #128475: mimetools.encode (sometimes) fails when called from a thread.
pythonrun.c:  In Py_Finalize, don't reset the initialized flag until after
the exit funcs have run.
atexit.py:  in _run_exitfuncs, mutate the list of pending calls in a
threadsafe way.  This wasn't a contributor to bug 128475, it just burned
my eyeballs when looking at that bug.
2001-01-21 03:40:37 +00:00
Skip Montanaro eccd02a40d more __all__ updates 2001-01-20 23:34:12 +00:00
Skip Montanaro e78b92a062 added some tests for urlencode 2001-01-20 20:22:30 +00:00
Skip Montanaro e99d5ea25b added __all__ lists to a number of Python modules
added test script and expected output file as well
this closes patch 103297.
__all__ attributes will be added to other modules without first submitting
a patch, just adding the necessary line to the test script to verify
more-or-less correct implementation.
2001-01-20 19:54:20 +00:00
Skip Montanaro c955f89225 docstring typo 2001-01-20 19:12:54 +00:00
Guido van Rossum 6bd6835c1f I've been using gdb a lot lately -- I'm missing 'bt' as a command in
pdb (pdb calls it 'where').  Added 'bt' as an alias for 'where'.
2001-01-20 17:57:37 +00:00
Skip Montanaro 663f6c2ad2 rewrite of robotparser.py by Bastian Kleineidam. Closes patch 102229. 2001-01-20 15:59:25 +00:00
Skip Montanaro a5d23a19e6 modify urlencode so sequences in the dict are treated as multivalued
parameters.  This closes the code part of patch 103314.
2001-01-20 15:56:39 +00:00
Fredrik Lundh f60560626c Better error message if ucnhash cannot be found (obscure attribute
errors aren't that helpful), or doesn't contain what's expected from
it.  Also tweaked the test script so it compiles even if ucnhash is
missing.
2001-01-20 11:15:25 +00:00
Guido van Rossum 0a5f91f1d9 Now that Marc-Andre has retracted unistr(), remove the tests. 2001-01-19 21:57:52 +00:00
Guido van Rossum 48eb9cd62f A hack to augment sys.path with the build/lib.<platform> directory
created by Andrew's setup.py script, *if* we're actually running from
the build directory.  (The test for that: whether the sys.path[-1]
ends in "/Modules".)

This has one disadvantage: it imports a fair amount of code from the
distutils package, just in order to be able to calculate the correct
pathname.  See if I care. :-)
2001-01-19 21:54:59 +00:00
Guido van Rossum a8e14d4d03 Use a saner test filename, to work on Windows. 2001-01-19 21:06:50 +00:00
Moshe Zadka ccc2e3d05d OK, checking in patch 103329.
Please check it against your nearest pop server --
mine doesn't support APOP (I checked I'm getting the same error
message, though)
2001-01-19 19:56:27 +00:00
Barry Warsaw 2e9b396740 Add some regression tests of coredump bugs in funcobject.c 2.31. Also
added a test of a coredump that would occur when del'ing
func_defaults (put here for convenience).
2001-01-19 19:55:12 +00:00
Guido van Rossum a1374e429b Change verify() function to raise TestFailed, not AssertionError.
(I realize that I didn't really test this, because all the tests
succeed, so verify() never raised an AssertionError -- but the test
suite still succeeds, so I'm not too worried.)
2001-01-19 19:01:56 +00:00