Commit graph

1315 commits

Author SHA1 Message Date
Jeremy Hylton
8e43cd7929 verify that warnings are issued for bogus uses of global 2001-02-28 01:51:01 +00:00
Andrew M. Kuchling
6efc6e7832 Patch #404680: disables the nis module and enables the dl module when
building under Cygwin.  Makes some fixes to the dlmodule in order to
    compile with Cygwin.
2001-02-27 20:54:23 +00:00
Jeremy Hylton
5941d191de add from __future__ import nested_scopes to strings passed to compile 2001-02-27 20:23:58 +00:00
Martin v. Löwis
5e1633365d Patch #403985: Add support for weak-keyed dictionaries 2001-02-27 18:36:56 +00:00
Ka-Ping Yee
6397c7c9a9 inspect: a module for getting information out of live Python objects 2001-02-27 14:43:21 +00:00
Jeremy Hylton
29906eef3a Preliminary support for future nested scopes
compile.h: #define NESTED_SCOPES_DEFAULT 0 for Python 2.1
           __future__ feature name: "nested_scopes"

symtable.h: Add st_nested_scopes slot.  Define flags to track exec and
    import star.

Lib/test/test_scope.py: requires nested scopes

compile.c: Fiddle with error messages.

    Reverse the sense of ste_optimized flag on
    PySymtableEntryObjects.  If it is true, there is an optimization
    conflict.

    Modify get_ref_type to respect st_nested_scopes flags.

    Refactor symtable_load_symbols() into several smaller functions,
    which use struct symbol_info to share variables.  In new function
    symtable_update_flags(), raise an error or warning for import * or
    bare exec that conflicts with nested scopes.  Also, modify handle
    for free variables to respect st_nested_scopes flag.

    In symtable_init() assign st_nested_scopes flag to
    NESTED_SCOPES_DEFAULT (defined in compile.h).

    Add preliminary and often incorrect implementation of
    symtable_check_future().

    Add symtable_lookup() helper for future use.
2001-02-27 04:23:34 +00:00
Fred Drake
3c823aa4b6 Make sure ConfigParser uses .optionxform() consistently; this affects
.has_option(), .remove_option(), and .set().

This closes SF tracker #232913.
2001-02-26 21:55:34 +00:00
Tim Peters
ffc215a279 Add __future__.py to std library, + dull test to verify that assignments
therein are of the proper form.
2001-02-26 21:14:49 +00:00
Barry Warsaw
c1e100f215 Additional tests for current, PEP described semantics:
- func.__dict__ is None until the first attribute is assigned

- del func.__dict__ is equivalent to func.__dict__ = None

- disallowing assignment to function attribute through unbound method
  (it was always illegal to assign through bound method).

- verifying that setting attribute explicitly on underlying function
  via meth.im_func is okay.
2001-02-26 18:07:26 +00:00
Barry Warsaw
22e4182d60 Describe -s a little more generically. 2001-02-23 18:31:40 +00:00
Tim Peters
0009c4ea59 Whitespace normalization. 2001-02-21 07:29:48 +00:00
Andrew M. Kuchling
9a0f98e0a1 Add test case from bug #124981: zlib decompress of sync-flushed data
fails
2001-02-21 02:17:01 +00:00
Andrew M. Kuchling
bc8f72cccc Patch #103854: raises an exception if a non-Attr node is passed to
NamedNodeMap.setNamedItem().  Martin, should I sync the PyXML tree, too,
 or do you want to do it?  (I don't know if you're wrapping the 0.6.4
 release right now.)
2001-02-21 01:30:26 +00:00
Andrew M. Kuchling
8b94b1c74a Added test for patch #103473: test an unquoted cookie value containing '=' 2001-02-21 01:17:54 +00:00
Jeremy Hylton
121b6eb018 SF patch #103749: implicit tuple + default arg 2001-02-19 23:53:42 +00:00
Jeremy Hylton
f828e2d737 Add simple section for assert, including assert w/ lambdas 2001-02-19 15:54:52 +00:00
Jeremy Hylton
4779399e9f Add test for syntax error on "x = 1 + 1".
Move check_syntax() function into test_support.
2001-02-19 15:35:26 +00:00
Fredrik Lundh
c0c7ee3a65 detect attempts to repeat anchors (fixes bug #130748) 2001-02-18 21:04:48 +00:00
Tim Peters
8ac3627b91 sre_{parse, compile} no longer define __all__. 2001-02-18 14:44:42 +00:00
Fredrik Lundh
f2989b22ff - restored 1.5.2 compatibility (sorry, eric)
- removed __all__ cruft from internal modules (sorry, skip)
- don't assume ASCII for string escapes (sorry, per)
2001-02-18 12:05:16 +00:00
Skip Montanaro
78349072f7 removed __all__ from several modules 2001-02-18 03:30:53 +00:00
Tim Peters
0e6d213177 Whitespace normalization. 2001-02-15 23:56:39 +00:00
Skip Montanaro
0de65807e6 bunch more __all__ lists
also modified check_all function to suppress all warnings since they aren't
relevant to what this test is doing (allows quiet checking of regsub, for
instance)
2001-02-15 22:15:14 +00:00
Andrew M. Kuchling
8e6d44eedc Patch #103748 from Toby Dickenson: fix typo in test_zlib that turns one
test case into a no-op because ''.join('hello world') == 'hello world'
2001-02-14 17:46:20 +00:00
Fred Drake
cc1f951b4c Test section name using some strange characters, including a backslash
(SF bug #132288).
2001-02-14 15:30:31 +00:00
Tim Peters
60e23f4cfc Change doctest exception example to one whose detail hasn't changed since 1.5.2. 2001-02-14 00:43:21 +00:00
Tim Peters
ea4f931cb9 Teach doctest about newer "(most recent call last)" traceback spelling. 2001-02-13 20:54:42 +00:00
Fred Drake
95b96d3941 Added options that use square brackets in their names; this ensures that
GNOME-style internationalized options can be parsed using ConfigParser
(SF bug #131635).

Converted the tests to use test_support.verify() instead of output
comparison to work.
2001-02-12 17:23:20 +00:00
Tim Peters
76c066b103 test_pty started failing on Windows, but if and only if test___all__ was
run first.  Indirectly due to Skip adding check_all("pty") to test___all__:
that caused the expected ImportError due to pty.py trying to import the
non-existent FCNTL to get handled by test___all__, leaving a partial
module object for pty in sys.modules, which caused the later import of
pty via test_pty to succeed.  Then test_tpy died with an AttributeError,
due to trying to access attributes of pty that didn't exist.  regrtest
viewed that as a failure rather than the appropriate "test skipped".
Fixed by deleting partial module objects in test___all__ when test___all__
handles an ImportError.
2001-02-12 03:27:31 +00:00
Skip Montanaro
c62c81e013 __all__ for several more modules 2001-02-12 02:00:42 +00:00
Marc-André Lemburg
ef0a032883 Patch by Finn Bock to make test_unicode.py work for Jython. 2001-02-10 14:09:31 +00:00
Tim Peters
9ae2148ada Moved SequenceMatcher from ndiff into new std library module difflib.py.
Guido told me to do this <wink>.
Greatly expanded docstrings, and fleshed out with examples.
New std test.
Added new get_close_matches() function for ESR.
Needs docs, but LaTeXification of the module docstring is all it needs.
\CVS: ----------------------------------------------------------------------
2001-02-10 08:00:53 +00:00
Tim Peters
6db54c69a4 Add std test for doctest. 2001-02-10 01:36:47 +00:00
Jeremy Hylton
cafd495dfe In O_writelines: Replace use of string.joinfields with "".join. 2001-02-09 23:44:22 +00:00
Jeremy Hylton
11db72a5c3 update to use new symtable interface 2001-02-09 22:57:10 +00:00
Jeremy Hylton
97a01674b2 update test cases for recent compiler changes: exec/import * in nested
functinos and cell vars with */** parameters
2001-02-09 22:56:46 +00:00
Tim Peters
10fb386399 Whitespace normalization. 2001-02-09 20:17:14 +00:00
Eric S. Raymond
dbbbaf2696 joinfields -> join. 2001-02-09 17:05:53 +00:00
Eric S. Raymond
83ff749827 String method conversion. 2001-02-09 12:03:45 +00:00
Eric S. Raymond
2846b0ab41 String method conversion.
(This one was trivial -- no actual string. references in it!)
2001-02-09 12:00:47 +00:00
Eric S. Raymond
fc170b1fd5 String method conversion. 2001-02-09 11:51:27 +00:00
Eric S. Raymond
d8c628bd59 String method conversion.
(This one was trivial -- no actual string. references in it!)
2001-02-09 11:46:37 +00:00
Skip Montanaro
352674d01c a few more __all__ lists 2001-02-07 23:14:30 +00:00
Skip Montanaro
cc012e92b2 test for presence of __builtins__ in names before deleting it, enabling this
to work with Jython (ugh! I hate that name!).  This closes patch 103665.
2001-02-07 22:46:55 +00:00
Martin v. Löwis
fe28ca09a5 Add xml declaration into toxml testcase. 2001-02-06 01:16:48 +00:00
Skip Montanaro
269b83bc05 added several more __all__ lists 2001-02-06 01:07:02 +00:00
Jeremy Hylton
de6024872a Fix test 9 (caught by ?!ng)
Add tests for unbound locals (Nick Mathewson)
2001-02-05 17:35:20 +00:00
Tim Peters
d66595fe42 Renamed _testXXX to _testcapiXXX. Jack is my hero -- good call! 2001-02-04 03:09:53 +00:00
Jeremy Hylton
5e7cb240af Add minimal interface to symtable: _symtable module. 2001-02-02 18:24:26 +00:00
Tim Peters
9ea17ac595 Patch derived from Trent's 101162: a Python/C API testing framework.
STILL NEEDS UNIX BUILD CHANGES.
2001-02-02 05:57:15 +00:00