Commit Graph

4238 Commits

Author SHA1 Message Date
Ka-Ping Yee 131216290b Give up trying to keep dynamically loaded extensions up to date:
the import.c machinery has soundly defeated my every attempt.
2001-04-12 13:37:39 +00:00
Ka-Ping Yee b910efe8a9 Robustify getcomments() so it doesn't crash on empty files. 2001-04-12 13:17:17 +00:00
Ka-Ping Yee fd540695e7 Remove forking. Doesn't work in Windows. 2001-04-12 12:54:36 +00:00
Ka-Ping Yee 662469619a Typo fixes and small touches. 2001-04-12 11:59:50 +00:00
Ka-Ping Yee 9aa0d90947 Properly qualify methods inherited from classes in other modules.
Fix so that docother() doesn't blow up.
Eliminate man() function since doc() and man() did nearly the same thing.
Various other code cleanup and refactoring to reduce duplication.
Simplify and rewrite freshimport() so modules are always up to date,
    even within packages (where reload() doesn't work).
Add finalization callback to the server (so that if the server fails to
    start for some reason, the main thread isn't left hanging).
2001-04-12 10:50:23 +00:00
Steve Purcell 15d8927f7e - New fail*() methods, and comprehensive set of assert*() synonyms
- TestCase.failureException defines the exception that indicates a test failure
- Docstrings for TestLoader class
- Added exc_info() hack back in
2001-04-12 09:05:01 +00:00
Jeremy Hylton 5c9aad6043 Only treat an AugAssign as def if its the target is a Name.
Fixes last bug found with test_scope.py.
2001-04-12 07:06:25 +00:00
Jeremy Hylton 3f76b7e6e4 Fix unpackSequence() to use _nameOp() rather than LOAD_FAST 2001-04-12 06:52:27 +00:00
Jeremy Hylton 660cc77abb Inside a class scope always use LOAD_NAME, STORE_NAME, DEL_NAME 2001-04-12 06:49:00 +00:00
Jeremy Hylton 364f9b9e2f Preliminary support for nested scopes
XXX Still doesn't work right for classes
XXX Still doesn't do sufficient error checking
2001-04-12 06:40:42 +00:00
Jeremy Hylton 53ee2a94c7 Define constants for types of scopes 2001-04-12 06:39:24 +00:00
Tim Peters 711088d9b8 Fix for SF bug #415514: "%#x" % 0 caused assertion failure/abort.
http://sourceforge.net/tracker/index.php?func=detail&aid=415514&group_id=5470&atid=105470
For short ints, Python defers to the platform C library to figure out what
%#x should do.  The code asserted that the platform C returned a string
beginning with "0x".  However, that's not true when-- and only when --the
*value* being formatted is 0.  Changed the code to live with C's inconsistency
here.  In the meantime, the problem does not arise if you format a long 0 (0L)
instead.  However, that's because the code *we* wrote to do %#x conversions on
longs produces a leading "0x" regardless of value.  That's probably wrong too:
we should drop leading "0x", for consistency with C, when (& only when) formatting
0L.  So I changed the long formatting code to do that too.
2001-04-12 00:35:51 +00:00
Tim Peters 4642cb9ac9 Reverting the "unixware7" patch: atan2(0, 1) should be 0, regardless of
platform.  If it returns pi on the unixware7 platform, they have a bug in
their libm atan2.
2001-04-12 00:24:41 +00:00
Guido van Rossum ac6985f42f SOCKET.py and TERMIOS.py are no longer used in this release. 2001-04-11 23:43:09 +00:00
Guido van Rossum 2242f2fbd0 Unixware 7 support by Billy G. Allie (SF patch 413011) 2001-04-11 20:58:20 +00:00
Jeremy Hylton 84ec1f9159 typo 2001-04-11 16:43:13 +00:00
Jeremy Hylton 01d12937df [finishing fix from earlier checkins]
Call set_lineno() in visitDiscard(), which will generate linenos for
discard statements, e.g. the statement "1/0"

Fixes SF bug #409587
2001-04-11 16:36:25 +00:00
Jeremy Hylton d91bbba89d Add support for extra (*) arguments to preorder.
Change default dispatch to use extended call syntax in place of apply.
2001-04-11 16:26:05 +00:00
Jeremy Hylton 9ab019bee7 Generate docstrings.
Fixes SF buf #217004

Add method fixDocstring() to CodeGenerator.  It converts the Discard
node containing the docstring into an assignment to __doc__.
2001-04-11 16:24:30 +00:00
Jeremy Hylton 4c1f42733c Add lineno attributes to Discard nodes 2001-04-11 16:22:26 +00:00
Jeremy Hylton 5af105eec9 Make sure the docstring is always entered as the first element in the
consts, even if it is None.

Simplify _lookupName() by removing lots of redundant tests.
2001-04-11 16:21:51 +00:00
Jeremy Hylton ceccc3c037 Test cases for examples of ext call error handling.
Fix to SF bug #414743 based on Michael Hudson's patch #414750.
2001-04-11 13:53:35 +00:00
Moshe Zadka 7667680d70 Idiotic braino caused HTTP openers to ignore proxies.
This fixes 413135
2001-04-11 07:44:53 +00:00
Ka-Ping Yee 285a7e59f3 Add a close_request method to the BaseServer so that the TCPServer class
can close the request connection when it's done handling it.
2001-04-11 04:02:05 +00:00
Guido van Rossum bceccf5f43 Updated version of RISCOS support. SF patch 411213 by Dietmar Schwertberger 2001-04-10 22:07:43 +00:00
Guido van Rossum 40f3c7fdf0 The lower() and tkraise() methods were calling the Canvas widget
wrongly.  Fixed this.

This closes SF bug #412682.
2001-04-10 21:13:06 +00:00
Fred Drake 9a9d219f07 mapping(): Remove this function since it does not add anything to the API. 2001-04-10 19:11:23 +00:00
Fred Drake bf43691ccb Use the WeakKeyDictionary and WeakValueDictionary classes directly
instead of using the mapping() function.
2001-04-10 19:09:35 +00:00
Thomas Heller f6cdead8e9 Since bdist_wininst.py contains the installer executable, it had to be
rebuild.
2001-04-10 18:57:07 +00:00
Guido van Rossum e9901f325e Fix two unqualified except: clauses.
This came out of SF bug #411881.
2001-04-10 15:44:33 +00:00
Guido van Rossum 6274fff287 Fix an unqualified except:.
This came out of SF bug #411881.
2001-04-10 15:42:02 +00:00
Guido van Rossum 9c673f35d2 Try an except: after an import into "except ImportError".
This came out of SF bug #411881.

Note that there's another unqualified except: still.
2001-04-10 15:37:12 +00:00
Guido van Rossum 75ebb29f88 Some other tests, when failing, don't always remove their TESTFN file.
Try to do it for them, so our mkdir() operation doesn't fail.
2001-04-10 15:01:20 +00:00
Guido van Rossum a5af2148ee When doing the quick test to see whether large files are supported,
catch IOError as well as OverflowError.  I found that on Tru64 Unix
this was raised; probably because the OS (or libc) doesn't support
large files but the architecture is 64 bits!
2001-04-10 14:50:51 +00:00
Guido van Rossum bfce016a30 When zlib can't be imported, zipfile raises RuntimeError, which causes
the test to be marked as failing rather than skipped.  Add an explicit
"import zlib" to prevent this.
2001-04-10 14:46:39 +00:00
Ka-Ping Yee 41763b9603 Fix typo in instantiation of ErrorDuringImport. 2001-04-10 12:22:01 +00:00
Ka-Ping Yee 5a804edd3c Fix synopsis() so it can handle binary module files.
Avoid ever using popen on Windows, since it's broken there.
Factor out the business of getting the summary line into splitdoc().
Use the modulename() routine in inspect.
Show all members of modules and classes rather than filtering on leading '_'.
Small typo and formtating fixes.
Don't show warnings when running "pydoc -k".
2001-04-10 11:46:02 +00:00
Ka-Ping Yee 4d6fc7fae1 Add getmodulename() and getmoduleinfo() routines to inspect filenames. 2001-04-10 11:43:00 +00:00
Tim Peters 44714007e8 test_pickle works on sizeof(long)==8 boxes again.
pickle.py
    The code implicitly assumed that all ints fit in 4 bytes, causing all
    sorts of mischief (from nonsense results to corrupted pickles).
    Repaired that.
marshal.c
    The int marshaling code assumed that right shifts of signed longs
    sign-extend.  Repaired that.
2001-04-10 05:02:52 +00:00
Tim Peters e089c68871 Test full range of native ints. This exposes two more binary pickle
bugs on sizeof(long)==8 machines.  pickle.py has no idea what it's
doing with very large ints, and variously gets things right by accident,
computes nonsense, or generates corrupt pickles.  cPickle fails on
cases 2**31 <= i < 2**32:  since it *thinks* those are 4-byte ints
(the "high 4 bytes" are all zeroes), it stores them in the (signed!) BININT
format, so they get unpickled as negative values.
2001-04-10 03:41:41 +00:00
Tim Peters c32d824467 Mechanical fiddling for easier reading: every "if" test was enclosed in
parens, but no "while" test.  Removed the former.
2001-04-10 02:48:53 +00:00
Jeremy Hylton dbdb28e8be Add globals to list of names returned by get_names().
Fix func arg processing to handle args in tuples.
In test code, skip names beginning with '.'.
2001-04-09 20:11:59 +00:00
Tim Peters 461922a005 Pickles have a number of storage formats for various sizes and kinds of
integers, but the std tests don't exercise most of them.  Repair that.

CAUTION:  I expect this to fail on boxes with sizeof(long)==8, in the
part of test_cpickle (but not test_pickle) trying to do a binary mode
(not text mode) load of the embedded BINDATA pickle string.  Once that
hypothesized failure is confirmed, I'll fix cPickle.c.
2001-04-09 20:07:05 +00:00
Tim Peters c58440fcef No functional change -- just added whitespace in places so I could follow
the logic better.  Will be adding some additional tests later today.
2001-04-09 17:16:31 +00:00
Steve Purcell 17a781bc69 * Remove exc_info() kludge -- it actually messed up the Jython output
* Fixed TestLoader.loadTestsFromName() for nested packages
* Corrected the command-line usage summary
2001-04-09 15:37:31 +00:00
Moshe Zadka 5d87d47295 fixing 408085 - redirect from https becomes http
Even though relative redirects are illegal, they are common
urllib treated every relative redirect as though it was to http,
even if the original was https://
As long as we're compensating for server bugs, might as well do
it properly.
2001-04-09 14:54:21 +00:00
Jeremy Hylton f870c952f9 Add two arguments to Scope constructor, module scope and class name
Add mangling support
Add get_children() and add_child() methods to Scope
Skip nodes when If test is a false constant
Add test code that checks results against symtable module
2001-04-09 13:57:32 +00:00
Jeremy Hylton 8b966dcf03 Add preliminary module symbol table constructor 2001-04-09 04:35:35 +00:00
Jeremy Hylton 0e8468c8ba remove global decl about unused variable 2001-04-09 04:31:50 +00:00
Jeremy Hylton 80e29bd139 Add support for future statements 2001-04-09 04:28:48 +00:00