Commit Graph

4430 Commits

Author SHA1 Message Date
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
Jeremy Hylton 42a0830713 Fix "import as" (has always skipping the as name)
Fix com_NEWLINE() so that is accepts arguments, which occurs for lines like:
    stmt; # note trailing semicolon
Add XXX about checking for assignment to list comps
2001-04-09 04:27:12 +00:00
Jeremy Hylton a384f737cc typo 2001-04-09 04:23:55 +00:00
Guido van Rossum 9cec8fba06 Make it clear that a bdb subclass must implement do_clear().
This was found by Neal Norwitz's PyChecker.
2001-04-08 15:05:16 +00:00
Tim Peters 7e01e284cb Whitespace normalization. 2001-04-08 07:44:07 +00:00
Tim Peters 6fd7120616 Fix from the Madusa mailing list:
http://groups.yahoo.com/group/medusa/message/333

It's clear that Medusa should not be checking for an empty buffer
via "buf is ''".  The patch merely changes "is" to "==".  However,
there's a mystery here all the same:  Python attempts to store null
strings uniquely, so it's unclear why "buf is ''" ever returned
false when buf actually was empty.  *Some* string operations produce
non-unique null strings, e.g.

>>> "abc"*0 is "abc"*0
0
>>>

but they're rare, and I don't see any such operations in asynchat.
2001-04-08 07:23:44 +00:00
Tim Peters cfc21fcf48 Remove useless imports, as reported by PyChecker. 2001-04-08 00:43:13 +00:00
Tim Peters 3664111fb1 Get rid of useless string import, as reported by Neal Norwitz's PyChecker.py
on c.l.py.
2001-04-08 00:38:42 +00:00
Greg Stein 76977bbcaf Add an uninstall method to the ImportManager.
This is the accepted portion of patch #402498.
2001-04-07 16:05:24 +00:00
Tim Peters eb26f95906 Since Guido fiddled Cookie.py to work with doctest, it's a Good Thing to
have the std test suite exercise the Cookie doctests too.
2001-04-06 21:20:58 +00:00
Guido van Rossum 58b6f5b53e Since this module already uses doctest-style examples, I figured I'd
add a self-test using doctest.  Results:

- The docstring needs to be a raw string because it uses \"...\".

- The oreo example was broken: the Set-Cookie output doesn't add
  quotes around "doublestuff".

- I had to change the example that prints the class of a Cookie.Cookie
  instance to avoid incorporating an arbitrary object address in the
  test output.

Pretty good score for both doctest and the doc string, I'd say!
2001-04-06 19:39:11 +00:00
Tim Peters f95423e265 Remove lines for asynchat & asyncore, as they've now got their own test. 2001-04-06 18:59:17 +00:00
Guido van Rossum dca060c55c After testing the test on Unix, several improvements:
- Use push() instead of send(), and make these calls in main().

- Sleep a second to give the server thread time to initialize itself.
2001-04-06 16:43:49 +00:00
Guido van Rossum 66172520ee Add test for asynchat. This also tests asyncore. 2001-04-06 16:32:22 +00:00
Guido van Rossum e4a1b6d7c4 Make the docstring a raw string, for pydoc.
(How many opre of these will we need? :-( )
2001-04-06 15:30:33 +00:00
Tim Peters b5d1392d92 Fix the fix (my error -- hasty pasty). 2001-04-05 22:38:32 +00:00
Tim Peters a29b6222fe One-liner critical fix from Jim Fulton: Eric's string-method crusade
got the order backwards in a line (for .find()).
2001-04-05 22:26:23 +00:00
Andrew M. Kuchling 37f0263811 Bug #412086, reported by Peter Wilson: The _curses module doesn't
define COLORS or COLOR_PAIRS until after start_color() is called,
    but they were never added to the curses module.  Fixed by adding
    a wrapper around start_color(), similar to the wrapper around initscr().
2001-04-05 16:08:41 +00:00
Andrew M. Kuchling 7880e5ecd7 Patch #413912 from Steve Majewski: Add .m to the list of extensions
in order to support Objective-C.
2001-04-05 15:46:48 +00:00
Fred Drake dc806704b5 Corrected default value of the DocumentType.internalSubset attribute based
on a clarification sent to the www-dom list.
2001-04-05 14:41:30 +00:00
Tim Peters 7d3bad66e4 Sf bug [ #412214 ] ZipFile constructor leaves files open.
This applies the patch Fred Drake created to fix it.
I'm checking it in since I had to apply the patch anyway in order
to test its behavior on Windows.
2001-04-04 18:56:49 +00:00
Fred Drake 33d2b84b2c CharacterData methods: Update self.length on changes instead of extended
the __getattr__() handler.

Text.splitText():  Update the length and nodeValue attributes.
2001-04-04 15:15:18 +00:00
Fred Drake 87432f42f9 Add support for the CharacterData methods, CDATASection. 2001-04-04 14:09:46 +00:00
Tim Peters c951bf9128 SF bug [#410708] Condition.wait() and KeyboardInterrupt.
http://sourceforge.net/tracker/?func=detail&aid=410708&group_id=5470&atid=105470
Added try/finally around Condition.wait() guts, so that the lock state gets
restored at the end no matter what happens.
2001-04-02 20:15:57 +00:00
Martin v. Löwis cb67ea1d6e Initialize Attr.value with empty string in createAttribute*, as per DOM
spec. Closes bug #412036.
Also reindent toprettyxml.
2001-03-31 16:30:40 +00:00
Andrew M. Kuchling f89d993e07 Back out the requirement to supply a version number 2001-03-31 02:41:01 +00:00
Eric S. Raymond f7eb4faf38 Fixes a fatal bug when the module has computed alternatives containing %s. 2001-03-31 01:50:52 +00:00
Tim Peters a19a168ccc Whitespace normalization. 2001-03-29 04:36:09 +00:00
Guido van Rossum 1417144f33 Based on info from Jens@digicool.com, add 'darwin1' to the list of
BSD-style OS'es.  Makes sense, really.
2001-03-28 01:14:56 +00:00
Martin v. Löwis 764dad5b13 Arghh. Fix typo. 2001-03-27 21:38:15 +00:00
Martin v. Löwis c9494ac0ff Use Guido's trick for always extracting the version number from a
CVS Revision string correctly, even under -kv.
2001-03-27 08:42:12 +00:00
Ka-Ping Yee f78a81b47b Fix some reloading problems (still more work needed).
Add hyperlinks to PEPs at http://www.python.org/peps/pep-%04d.html
Remove script directory (dirname of sys.argv[0]) from sys.path.
2001-03-27 08:13:42 +00:00
Fred Drake 3d9091ece1 Itamar Shtull-Trauring <itamar@maxnm.com>:
Add support to zipfile to support opening an archive represented by an
open file rather than a file name.
2001-03-26 15:49:24 +00:00
Fred Drake fc31f2692f Update auto-detection for Konqueror to include KDE 2 -- the kfm command is
gone; "konqueror" is the new name, and the command-line args are different.
kfmclient has not changed, though.
2001-03-26 15:06:15 +00:00
Barry Warsaw 2108bc7ab0 main(): Application of SF patch #405851, which allows this test to be
used by Jython.  The tests in this module expect C locale, so be
explicit about setting that (for CPython).  However, in Jython, there
is no C locale, so instead be explicit about setting the US locale.
Closes the patch.
2001-03-23 20:24:07 +00:00
Barry Warsaw 559f6680c2 In Jython, `@' is not allowed in module names. Extend the TESTFN test
to use "$test" when in Jython.  Closes SF patch #403668.
2001-03-23 18:04:02 +00:00
Barry Warsaw 62d248892f Two minor changes for better Jython compatibility. Finn Bock says:
Change 1: Not all 'modules' in sys.modules have a
    sensible __file__ attribute. Some of our java package
    can have the __file__ attribute set to None.

    Change 2: In jython we have the jython license file in
    <root> and the CPython license file in <root>/Lib. By
    reversing the search sequence jython will find and
    show the jython license file before the CPython file.

Closes SF patch #405853.
2001-03-23 17:53:49 +00:00
Barry Warsaw 6870bba459 Make socket.getservbyname test optional on socket module having that
attribute.  Jython does not have this function.

Closes SF patch #403667.
2001-03-23 17:40:16 +00:00
Andrew M. Kuchling 88b0884787 Change rfc822_escape() to ensure there's a consistent amount of whitespace
after each newline, instead of just blindly inserting a space at
   the start of each line.  (Improvement suggested by Thomas Wouters)
2001-03-23 17:30:26 +00:00
Barry Warsaw 7519e7af42 setlocale(): In _locale-missing compatibility function, string
comparison should be done with != instead of "is not".
2001-03-23 17:00:07 +00:00
Barry Warsaw dfdac1af4d Several changes for Jython portability. This closes SF patch
#403666.  Specifically,

In codestr, force `c' to be global.  It's unclear what the semantics
should be for a code object compiled at module scope, but bound and
run in a function.  In CPython, `c' is global (by accident?) while in
Jython, `c' is local.  The intent of the test clearly is to make `c'
global, so let's be explicit about it.

Jython also does not have a __builtins__ name in the module's
namespace, so we use a more portable alternative (though I'm not sure
why the test requires "__builtins__" in the g namespace).

Finally, skip the new.code() test if the new module doesn't have a
`code' attribute.  Jython will never have this.
2001-03-23 16:13:30 +00:00
Jeremy Hylton 101651c128 flesh out __all__
remove debugging code in if __debug__:

add get_children() method on SymbolTable
2001-03-23 15:41:14 +00:00
Ka-Ping Yee a9c6c8dab5 Extend isclass() to work for extension classes (by looking for __bases__). 2001-03-23 15:29:59 +00:00
Ka-Ping Yee e280c06d59 Browser compatibility fixes.
Show methods aliased into a class from other classes.
2001-03-23 14:05:53 +00:00
Ka-Ping Yee 987ec903d6 Small formatting improvements. 2001-03-23 13:35:45 +00:00
Ka-Ping Yee 3bda87991a Show inherited methods, with hyperlinks to the base class they came from.
Font adjustment to improve viewing in Windows (the default monospaced font,
    Courier New, seems to have no reasonable size in IE!)
Improve error handling.  Try very hard to distinguish between failure to
    find a module and failure during the module importing process.
Improve reloading behaviour.  (Still needs some work.)
Add '.' to sys.path when running as a script at the command-line.
Don't automatically assume '-g' based on the platform.  We'll just have
    the batch file supply -g.
2001-03-23 13:17:50 +00:00
Ka-Ping Yee 28c62bbdb2 Provide a StopTokenizing exception for conveniently exiting the loop. 2001-03-23 05:22:49 +00:00
Ka-Ping Yee f170d7fea7 Don't have trace() skip the top frame; return them all. 2001-03-23 05:14:10 +00:00
Fred Drake 6526bf863e When creating an attribute node using createAttribute() or
createAttributeNS(), use the parallel setAttributeNode() or
setAttributeNodeNS() to add the node to the document -- do not assume
that setAttributeNode() will operate properly for both.
2001-03-23 04:39:24 +00:00
Fred Drake b0fefc5121 Convert the weakref test suite to PyUNIT, and add tests that exercise weak
references on function objects and both bound and unbound methods.
2001-03-23 04:22:45 +00:00
Fred Drake 84a5934f8a When the regression test is run in verbose mode, make the PyUNIT-based
tests a little noisier, providing more progress information.
2001-03-23 04:21:17 +00:00
Ka-Ping Yee 37f7b38eb6 Fixes for various issues reported and discovered since Python 9:
Factor description of import errors into DocImportError.__str__.
Add "docother" and "fail" methods to Doc class.
Factor formatting of constants into "docother".
Increase max string repr limit to 100 characters.
Factor page generation into HTMLDoc.page.
Handle aliasing of names (objects appearing under an attribute
    name different from their intrinsic __name__) by passing the
    attribute name into each doc* method.
Handle methods at top level of modules (e.g. in random).
Try to do reloading efficiently.

Important fixes still to do:
    Module reloading is broken by the unfortunate property that
        failed imports leave an incomplete module in sys.  Still
        need to think of a good solution.
    Can't document modules in the current directory, due to the
        other unfortunate property that sys.path gets '.' when
        you run 'python' but it gets the script directory when
        you run a script.  Need to ponder to find a solution.
    The synopsis() routine does not work on .so modules.
    Aliases cause duplicate copies of documentation to appear.
        This is easy to fix, just more work.
    Classes appear as their intrinsic name, not their attribute name,
        in the class hierarchy.  This should be fixed.
    Inherited methods should be listed in class descriptions.
2001-03-23 00:12:53 +00:00
Fredrik Lundh 015415ed14 SRE 2.1b2: increase the chances that the sre test works on other
machines...
2001-03-22 23:48:28 +00:00
Jeremy Hylton 816e149c85 First cut at a high-level symbol table interface 2001-03-22 23:32:22 +00:00
Fredrik Lundh 987f1332fe SRE 2.1b2: forgot to update one output file (sorry, Fred!) 2001-03-22 23:29:04 +00:00
Guido van Rossum 14b90a498f Strip \r as trailing whitespace as part of soft line endings.
Inspired by SF patch #408597 (Walter Dörwald): quopri, soft line
breaks and CRLF.  (I changed (" ", "\t", "\r") into " \t\r".)
2001-03-22 22:30:21 +00:00
Guido van Rossum 3f69f21644 Add a wrapper function for ssl() on Windows. Inspired by SF patch
# 409287, ssl fix when using _socketobject, by Robin Dunn.

I took the opportunity to improve the way it deals with reload(socket)
for the socket function as well.
2001-03-22 22:12:17 +00:00
Guido van Rossum bfb9184ba8 This is SF patch #405952, by Anthony Baxter:
cmd.py uses raw_input(); eats SIGCLD:

  I discovered a rather nasty side effect of the standard cmd.py
  library today. If it's sitting inside raw_input(), any SIGCLDs that
  get sent to your application get silently eaten and ignored. I'm
  assuming that this is something that readline is thoughtfully doing
  for me.

  This patch adds an instance attr that allows the user to select to
  not use raw_input(), but instead use sys.stdin.readline()

[Changed slightly to catch EOFError only for raw_input().]
2001-03-22 21:59:20 +00:00
Fredrik Lundh 17741be466 SRE 2.1b1: don't do unicode tests under 1.5.2, or on unicode
strings/patterns.
2001-03-22 15:51:28 +00:00
Fredrik Lundh b25e1ad253 sre 2.1b2 update:
- take locale into account for word boundary anchors (#410271)
- restored 2.0's *? behaviour (#233283, #408936 and others)
- speed up re.sub/re.subn
2001-03-22 15:50:10 +00:00
Martin v. Löwis b374dd3a81 Synchronize with 1.6 of PyXML:
Retrieve relevant information at construction time, as it may be lost
when the exception is printed.
2001-03-22 15:34:02 +00:00
Andrew M. Kuchling ffb963c7f6 Use the get_contact*() accessors instead of get_maintainer*() 2001-03-22 15:32:23 +00:00
Thomas Wouters b0dbeef1c4 Allow the process of reading back what we wrote to a pty to transform
linefeeds into carriagereturn-linefeeds (which is apparently what IRIX
does.) Also add some comments, an extra test and reorganize it a bit.
2001-03-22 14:50:24 +00:00
Steve Purcell 5ddd1a8dcb Updated to latest PyUnit version (1.31 in PyUnit CVS); test_support.py
changed accordingly.
2001-03-22 08:45:36 +00:00
Andrew M. Kuchling 6e9c0baa65 Remove redundant import 2001-03-22 03:50:09 +00:00
Andrew M. Kuchling ac20f773f3 Back out conversion to string methods; the Distutils is intended to work
with 1.5.2
2001-03-22 03:48:31 +00:00
Andrew M. Kuchling a7f225d88a Call the write_pkg_info method 2001-03-22 03:10:05 +00:00
Andrew M. Kuchling a7210ed272 Add 'platforms' and 'keywords' attributes to the DistributionMetadata class,
along with options to print them.
Add a finalize_options() method to Distribution to do final processing
    on the platform and keyword attributes
Add DistributionMetadata.write_pkg_info() method to write a PKG-INFO file
    into the release tree.
2001-03-22 03:06:52 +00:00
Andrew M. Kuchling df66df0a28 Patch #407434: add rfc822_escape utility function 2001-03-22 03:03:41 +00:00
Guido van Rossum f6e47ad4bd Check that f.keys() == [] right after creation -- this prevents bugs
like the one I just fixed to come back and haunt us.
2001-03-22 00:40:23 +00:00
Tim Peters 24a4191160 Changed doctest to run tests in alphabetic order of name.
This makes verbose-mode output easier to dig thru, and removes an accidental
dependence on the order of dict.items() (made visible by recent changes to
dictobject.c).
2001-03-21 23:07:59 +00:00
Jeremy Hylton 09ccc3a22a Test that traceback module works with SyntaxErrors with or without carets. 2001-03-21 20:33:04 +00:00
Jeremy Hylton ed9d0ba482 Do not print caret when offset is None. 2001-03-21 20:29:18 +00:00
Jeremy Hylton 69e9e8bd51 Reformat and edit docstrings to follow modern conventions. Single
line summary followed by blank line and description.
2001-03-21 19:09:31 +00:00
Fred Drake 91751143eb Add test cases for the fnmatch module. 2001-03-21 18:29:25 +00:00
Fred Drake cd1b1dd6d2 Just import sys at the top instead of inside lots of functions.
Add some helpers for supporting PyUNIT-based unit testing.
2001-03-21 18:26:33 +00:00
Fred Drake 02538200b3 The unittest module from PyUNIT, by Steve Purcell. 2001-03-21 18:09:46 +00:00
Fred Drake 46d9fda008 Donovan Baarda <abo@users.sourceforge.net>:
Patch to make "\" in a character group work properly.

This closes SF bug #409651.
2001-03-21 18:05:48 +00:00
Moshe Zadka 22710823fb Fixed a bunch of Tabnanny errors 2001-03-21 17:24:49 +00:00
Jeremy Hylton 5c7a2513ec Add tests for recent changes:
- global stmt in class does not affect free vars in methods
- locals() works with free and cell vars
2001-03-21 16:44:39 +00:00
Martin v. Löwis b21cb5fa7d Patch #410231: Add the Python Tix library. 2001-03-21 07:42:07 +00:00
Tim Peters eba5130e4f Addrf simple test that import is case-sensitive. 2001-03-21 03:58:16 +00:00
Guido van Rossum d0926940b7 Add a deprecation warning to this module.
Importing it typically fails anyway (no TZ variable defined), so this
is no great loss.
2001-03-20 18:36:48 +00:00
Andrew M. Kuchling 44f5f8fb26 Bug #409419: delete seek() and tell() methods, so callers can use getattr()
to check for them (instead of calling them and then ignoring an
    IOError)
2001-03-20 15:51:14 +00:00
Moshe Zadka d3f193fe9d * Fixing the password-proxy bug
* Not sending content-type and content-length twice
2001-03-20 13:14:28 +00:00
Jeremy Hylton e241e29f3d Add test for a list comprehension that is nested in the left-hand part
of another list comp.  This caused crashes reported as SF bugs 409230
and 407800.

Note that the new tests are in a function so that the name lookup code
isn't affected by how many *other* list comprehensions are in the same
scope.
2001-03-19 20:42:11 +00:00
Guido van Rossum a8423a95b8 Add a whole lot of stuff to __all__.
(Excluding the logging stuff, which doesn't lend itself to use via
"from cgi import *" -- it manipulates globals.)
2001-03-19 13:40:44 +00:00
Tim Peters 9e6f278fc1 Repair test_doctest's expected-output file (Guido added some new output). 2001-03-18 20:14:25 +00:00
Skip Montanaro 64de1a4b08 add errorTab to __all__ on win*
closes bug #406642
2001-03-18 19:53:21 +00:00
Guido van Rossum 261d91a3f9 Make doctest's self-test succeed after the previous change. 2001-03-18 17:05:58 +00:00
Guido van Rossum af00a46599 Print a bunch of asterisks before the failure summary, to separate it
from the last failure report.
2001-03-18 16:58:44 +00:00
Tim Peters 0f33604e17 SF bug [ #409448 ] Complex division is braindead
http://sourceforge.net/tracker/?func=detail&aid=409448&group_id=5470&atid=105470
Now less braindead.  Also added test_complex.py, which doesn't test much, but
fails without this patch.
2001-03-18 08:21:57 +00:00
Andrew M. Kuchling 7620bbdcbf Fix bug #233253: the --define and --undef options didn't work, whether
specified on the command-line or in setup.cfg.  The option processing
   leaves them as strings, but they're supposed to be lists.
2001-03-17 20:15:41 +00:00
Andrew M. Kuchling 898f099dc6 Bug #409403: Signal an error if the distribution's metadata has no version 2001-03-17 19:59:26 +00:00
Thomas Heller d179be8b8b Distutils version number has been changed from 1.0.1 to 1.0.2pre
before this get forgotten again.
Should probably be set to 1.0.2 before final release of python 2.1

Does someone still release distutils separate from python?
2001-03-16 21:00:18 +00:00
Thomas Heller 5c5ea1a461 The bdist_wininst.py command has been recreated after wininst.exe
has been changed to include an uninstaller.
I forgot to mention in the uninstaller checkin that the logfile
name (used for uninstalling) has been changed from
<module>.log to <module>-wininst.log. This should prevent
conflicts with a distutils logfile serving the same purpose.

The short form of the --bdist-dir (-d) option has been removed
because it caused conflicts with the short form of the --dist-dir
option.
2001-03-16 20:57:37 +00:00
Fred Drake 669573726b Change RuntimeError to SGMLParseError, which subclasses RuntimeError
for backward compatibility.

Add support for SGML declaration syntax (<!....>) to some reasonable
degree.  This does not support everything allowed in SGML, but should
work with "real" HTML (internal subset in a DOCTYPE is not handled).
The content of the declaration is passed to the .handle_decl() method,
which can be overridden by subclasses.
2001-03-16 20:04:57 +00:00
Tim Peters 30edd2387d Whitespace normalization. 2001-03-16 08:29:48 +00:00
Ka-Ping Yee 3bda4f0878 Remove redundant "__future__:" from module docstring. 2001-03-15 10:45:44 +00:00
Fred Drake 904f2fcbd7 Import the exceptions that this module can raise. 2001-03-14 22:43:47 +00:00
Jeremy Hylton adcf8a05a4 Add doc string for run from profile.doc. (pydoc motivates me to write
good doc strings.)

Fix silly argument handling; was using *args but really wanted 1
optional arg.

XXX Should profile.doc be merged into the documentation and removed
from the Lib directory?
2001-03-14 20:01:19 +00:00
Sjoerd Mullender 538453e155 Moved clearing of "literal" flag. The flag is set in setliteral which
can be called from a start tag handler.  When the corresponding end
tag is read the flag is cleared.  However, it didn't get cleared when
the start tag was for an empty element of the type <tag .../>.  This
modification fixes the problem.
2001-03-14 17:03:30 +00:00
Fred Drake 62dfed96be Change "[%s]" % string.whitespace to r"\s" in regular expressions. 2001-03-14 16:18:56 +00:00
Skip Montanaro 44d5e0c418 updated __all__ to include several other names 2001-03-13 19:47:16 +00:00
Martin v. Löwis 126f2f62db Patch #407965: Improve Level 2 conformance of minidom
- addition of a DocumentFragment implementation and createDocumentFragment method
- proper setting of ownerDocument for all nodes
- setting of namespaceURI to None in Element as a class attribute
- addition of setAttributeNodeNS and removeAttributeNodeNS as aliases
  for setAttributeNode and removeAttributeNode
- support for inheriting from DOMImplementation to extend it with
  additional features (to override the Document class)
in pulldom:
- support for nodes (comment and PI) that occur before he document element;
  that became necessary as pulldom now delays creation of the document
  until it has the document element.
2001-03-13 10:50:13 +00:00
Guido van Rossum a8f7e59761 Oops. A RISCOS patch I forgot to check in. 2001-03-13 09:31:07 +00:00
Jeremy Hylton 5b44a67bdb Add test to verify that nested functions with free variables don't
cause the free variables to leak.
2001-03-13 02:01:12 +00:00
Fred Drake 521c83dd80 Multifile.read(): Fix a broken conversion to string methods.
This closes SF bug #407777.
2001-03-12 02:56:15 +00:00
Ka-Ping Yee 22fcae976a Make docstrings raw, since they contain literal backslashes. 2001-03-10 09:33:14 +00:00
Ka-Ping Yee a6e59719ec Fix findsource() to work for derived classes. 2001-03-10 09:31:55 +00:00
Fred Drake 63085d4d1e Import the nested_scopes feature twice, to exercise the patch introduced
to avoid segfaults when more than one feature is named in the future
statement.

This tests for regression of SF bug #407394.
2001-03-10 02:18:47 +00:00
Martin v. Löwis f115a0826d Replace setenv with putenv. Reported by Dietmar Schwertberger. 2001-03-07 09:08:11 +00:00
Martin v. Löwis a90f438d4a Unify _Environ processing on riscos with other platforms. 2001-03-07 09:05:45 +00:00
Skip Montanaro 81e4b1c5c8 fix typo in extending __all__ for riscos platform - closes bug 406296 2001-03-06 15:26:07 +00:00
Fred Drake ec6ec90dd2 Define & use NetrcParseError instead of improperly overloading SyntaxError.
Always has the lineno and filename of the source text.
2001-03-06 06:33:08 +00:00
Jack Jansen 282fed1363 Grr, splittag was also missing from __all__. 2001-03-05 13:45:38 +00:00
Jack Jansen 49985638fa Added url2pathname and pathname2url to __all__. 2001-03-05 13:41:14 +00:00
Tim Peters 243bff4708 Clean up junk files left behind by imp.load_source(). 2001-03-04 00:30:25 +00:00
Ka-Ping Yee feb6719851 Use r""" instead of """ for the docstring so that backslashes are preserved. 2001-03-02 23:31:43 +00:00
Guido van Rossum d1d053cc3f Patch by Itamar S.T. (SF#305470): add reset() method. 2001-03-02 13:35:37 +00:00
Fred Drake 53a79060bb When not copying a file because the output is up to date, make the message
slightly more brief, and more like the message that an extension will not
be built because the built copy is up to date.
2001-03-02 07:28:03 +00:00
Guido van Rossum b7fe432a88 Fix by Donn Cave for BeOS (SF #403642):
UNIX style fork/execve/wait are not fully compatible with thread
  support on BeOS.  For Python, that means neither fork() from import
  nor import from a fork work reliably. os._execvpe() does the latter,
  importing tempfile to set up a tantalizing target for hackers. This
  patch replaces both the tempfile name generation and the exec that
  uses it, in case we're on BeOS. Need this for
  setup:distutils:execvp(); symptoms are random crashes and internal
  BeOS error messages about th name, in case we're on BeOS. It's an
  issue because setup.py + distutils calls os.execvp(); symptoms are
  random crashes during setup.py, and internal BeOS error messages
  about thread IDs.
2001-03-02 07:04:51 +00:00
Guido van Rossum d74fb6b12a RISCOS changes by dschwertberger. 2001-03-02 06:43:49 +00:00
Guido van Rossum 4ba3d657ef Use != instead of <>. Sorry, Barry. 2001-03-02 06:42:34 +00:00
Ka-Ping Yee db8ed1517f Use '127.0.0.1' only on Mac; for other, sane platforms, use 'localhost'. 2001-03-02 05:58:17 +00:00
Guido van Rossum 228d80736c RISCOS files by dschwertberger 2001-03-02 05:58:11 +00:00
Ka-Ping Yee c92cdf7aa7 The sys.platform identifier for Windows is just 'win32' (for all varieties). 2001-03-02 05:54:35 +00:00
Guido van Rossum 7dcf84f2f8 Search /tmp before /var/tmp and /usr/tmp -- this seems preferred.
SF patch #404564, Gregor Hoffleit.
2001-03-02 05:51:16 +00:00
Ka-Ping Yee 4eb0c003f8 Make getsourcefile() succeed even if the filename doesn't end in '.py' --
as long as the filename also doesn't end in a suffix that indicates
    a binary file (according to the flags in imp.get_suffixes()).

Shrink try...except clauses and replace some of them with explicit checks.
2001-03-02 05:50:34 +00:00
Ka-Ping Yee 9054344d14 Replace literal '@test' with TESTFN. 2001-03-02 05:48:10 +00:00
Guido van Rossum ca956e2e47 When catching errors from os.rmdir(), test for os.error, not IOError! 2001-03-02 05:46:17 +00:00
Guido van Rossum b616e114f7 Believe it or not, but "more" on Windows requires "more <file" rather
than "more file".  Since tempfilepager() is only used on Windows, it
seems, do this unconditionally -- on Unix, it always invokes something
else.
2001-03-02 04:27:08 +00:00
Tim Peters fd85a4e600 Typo repair. 2001-03-02 03:11:53 +00:00
Tim Peters d74bc432b2 Make names in __future__.py bind to class instances instead of 2-tuples.
Suggested on c.l.py by William Tanksley, and I like it.
2001-03-02 02:53:08 +00:00
Ka-Ping Yee 239432a545 Clean up the handling of getsourcefile/getabsfile.
Remove __main__ from the index of built-in modules.
Miscellaneous compatibility fixes.
2001-03-02 02:45:08 +00:00
Ka-Ping Yee c113c24e19 Clarify the purpose of getsourcefile().
Add getabsfile() for getting a most-normalized path.
2001-03-02 02:08:53 +00:00
Ka-Ping Yee 0a8c29be4b Clarify synopsis line a bit.
Remove -no-about-splash option (not understood by all Netscapes).
2001-03-02 02:01:40 +00:00
Tim Peters fc35de409b test_global was broken by some recent checkin. Repairing. 2001-03-02 01:48:16 +00:00
Ka-Ping Yee 7a25765f48 When seeking the module for an object, compare absolute (not relative) paths. 2001-03-02 01:19:39 +00:00
Ka-Ping Yee a2fe103c9b Use imp.get_suffixes to determine a module name in modulename(file).
When possible, display strings containing backslashes using r'' notation.
2001-03-02 01:19:14 +00:00
Guido van Rossum 9aa643cf69 Test interaction of global and nested scopes -- thanks to Samuele Pedroni. 2001-03-01 20:35:45 +00:00
Ka-Ping Yee d977e35dd0 Also accept .so as an extension for module files. 2001-03-01 19:31:25 +00:00
Ka-Ping Yee 4f64c13582 Better __credits__. 2001-03-01 17:11:17 +00:00
Ka-Ping Yee 244c593598 Add __author__ and __credits__ variables. 2001-03-01 13:56:40 +00:00
Ka-Ping Yee 8b58b84d72 Add __author__ variable.
Robustify: don't rely on modules being present in sys.modules.
2001-03-01 13:56:16 +00:00
Ka-Ping Yee 66efbc7481 Docstring improvements.
Add checks for .pyo and .pyd.
Collapse docfunction, docmethod, docbuiltin into the one method docroutine.
Small formatting fixes.
Link the segments of a package path in the title.
Link to the source file only if it exists.
Allow modules (e.g. repr.py) to take precedence over built-ins (e.g. repr()).
Add interruptible synopsis scanner (so we can do searches in the background).
Make HTTP server quit.
Add small GUI for controlling the server and launching searches (like -k).
    (Tested on Win2k, Win98, and Linux.)
2001-03-01 13:55:20 +00:00
Moshe Zadka 8a18e99008 Checking in patch 404826 -- urllib2 enhancements and documentations.
(please not that the library reference does *not* include the
urllib2 documnetation -- that will wiat for Fred)
2001-03-01 08:40:42 +00:00
Tim Peters 251083142f Whitespace normalization. 2001-03-01 08:31:39 +00:00
Skip Montanaro 40fc16059f final round of __all__ lists (I hope) - skipped urllib2 because Moshe may be
giving it a slight facelift
2001-03-01 04:27:19 +00:00
Skip Montanaro 58eadbaf12 move import into function to avoid having to add an __all__ list... 2001-03-01 04:13:51 +00:00
Ka-Ping Yee 59ade08079 Add getlineno() routine to account for LINENO optimization. 2001-03-01 03:55:35 +00:00
Fred Drake 5c015344a6 Add tests for the .copy() methods of both weak dictionary classes. 2001-03-01 03:06:53 +00:00
Fred Drake 9d2c85dec7 Change WeakDictionary to WeakValueDictionary in a couple more places.
WeakValueDictionary.copy(),
WeakKeyDictionary.copy():  Actually return the copy!
2001-03-01 03:06:03 +00:00
Ka-Ping Yee 1d384634bf Normalize case of paths in sys.path to avoid duplicates on Windows.
Handle <... at 001B6378> like <... at 0x120f80> (%p is platform-dependent).
Fix RCS version tag handling.
Move __main__ behaviour into a function, pydoc.cli().
2001-03-01 00:24:32 +00:00
Jeremy Hylton 2922ea8235 Add test case for global stmt at module level.
Fix test_grammar so that it ignores warning about global stmt at
module level in exec.
2001-02-28 23:49:19 +00:00
Jeremy Hylton 42efed0fc3 update output to reflect exception that is now raised 2001-02-28 23:24:22 +00:00
Jeremy Hylton 150a6640f5 Fix filter for SyntaxErrors 2001-02-28 22:50:15 +00:00
Guido van Rossum 3756fa3e11 Move a comment around to where it belongs (the code had alrady been
moved).
2001-02-28 22:26:36 +00:00
Fred Drake 9c98a428ef Move some constant initialization from FTP.__init__() and FTP.connect()
to the class namespace.

Allow FTP.close() to be called more than once without tossing cookies.
(This seems to be a fairly common idiom for .close() methods, so let's
try to be consistent.)
2001-02-28 21:46:37 +00:00
Guido van Rossum 9e26318975 Add a new API:
warn_explicit(message, category, filename, lineno, module, registry)

The regular warn() call calculates a bunch of values and calls
warn_explicit() with these.

This will be used to issue better syntax warnings.
2001-02-28 21:43:40 +00:00
Andrew M. Kuchling 3a95850323 Leave #! lines featuring /usr/bin/env alone 2001-02-28 20:59:33 +00:00
Andrew M. Kuchling 6335773434 Placate tabnanny 2001-02-28 19:40:27 +00:00
Fred Drake 3e038e5e25 Define lots of constants for indexes into the structures for the file
header and central directory structures, and use them as appropriate.
The point being to make it easier to tell what is getting pulled out
where; magic numbers are evil!

Change the computation of the ZipInfo.file_offset field to use the
length of the relevant "extra" field -- there are two different ones,
and the wrong one had been used.  ;-(

This closes SF tracker patch #403276, but more verbosely than the
proposed patch.
2001-02-28 17:56:26 +00:00
Jeremy Hylton 62e2c7e3df Add regression test for future statements. This adds eight files, but
seven are not tests in their own right; these files are mentioned in
regrtest.
2001-02-28 17:48:06 +00:00
Tim Peters 85ba673b0a Whitespace normalization. 2001-02-28 08:26:44 +00:00
Fred Drake 6e7e485d5d Added regression test for SF tracker bug #403871: AttributeError in
ZipFile.__del__() when there was an IOError opening the underlying
    file in ZipFile.__init__().

    This is an odd test: since the exception is in the __del__() method,
    it is not propogated.  This test will trigger it but regrtest.py
    does not detect the failure (not sure why); we are dependent on it
    actually being noticed by a user to get a new bug report if it ever
    fails.  ;-(

    On the other hand, this makes sure that code gets exercised, so
    a failure could be noticed!
2001-02-28 05:34:16 +00:00
Fred Drake 90eac285c8 Fix SF tracker bug #403871: AttributeError in ZipFile.__del__() when
there was an IOError opening the underlying file in ZipFile.__init__().
2001-02-28 05:29:34 +00:00
Jeremy Hylton 8e43cd7929 verify that warnings are issued for bogus uses of global 2001-02-28 01:51:01 +00:00
Skip Montanaro ff443a51eb added missing element to __all__ 2001-02-28 01:03:48 +00:00
Skip Montanaro 6c0a0e1538 added some elements missing from __all__ 2001-02-28 01:00:58 +00:00
Ka-Ping Yee 457aab237f Macintosh compatibility. 2001-02-27 23:36:29 +00:00
Ka-Ping Yee 5e2b173333 Acknowledgements. 2001-02-27 23:35:09 +00:00
Ka-Ping Yee 40c49919fb Fix $Revision$ processing so it doesn't get eaten by CVS! 2001-02-27 22:46:01 +00:00
Ka-Ping Yee 09d7d9a552 Add $Revision: $ tag. 2001-02-27 22:43:48 +00:00
Ka-Ping Yee 6f3f9a4c64 Add display of $Revision $ and credits. 2001-02-27 22:42:36 +00:00
Fred Drake 5dd09bb5df No need to call filterwarnings() to suppress further warnings from this
module; that won't happen.
2001-02-27 21:51:47 +00:00
Fred Drake ddd802cbd7 Replace all the platform-specific TERMIOS modules with a portable version
based on the termios module.  The only added "feature" is the deprecation
warning it spits out.
2001-02-27 21:35:40 +00:00
Fred Drake 1191d0148f Get the needed constants from termios, not TERMIOS. 2001-02-27 21:23:31 +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
Andrew M. Kuchling 83c158fdc9 Bug #229280: remove '/' characters from the OS name (for BSD/OS :) ) 2001-02-27 19:25:42 +00:00
Andrew M. Kuchling a34dbe0fdc Patch #403947: On Cygwin, use the Unix compiler class, and not
the Cygwin-specific compiler class.

 (According to Jason Tishler, cygwinccompiler needs some work to
  handle the differences in Cygwin- and MSVC-Python. Makefile and
  config files are currently ignored by cygwinccompiler, as it was
  written to support cygwin for extensions which are intended to be
  used with the standard MSVC built Python.)
2001-02-27 19:13:15 +00:00
Andrew M. Kuchling 9767e76808 Patch #404275: generate a reasonable platform string for AIX 2001-02-27 18:48:00 +00:00
Jeremy Hylton 8016a4b0af Remove two meaningless, module-level global statements (one of a
non-existent variable :-).

Reflow long lines.
2001-02-27 18:44:14 +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 dd1753434a pydoc: text and HTML documentation generator for interactive use 2001-02-27 14:43:46 +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
Moshe Zadka e99bd17ed6 Fixing bug #227562 by calling URLopener.http_error_default when
an invalid 401 request is being handled.
2001-02-27 06:27:04 +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
Fred Drake 6fd08baddc Do not hide a failure to create a temporary file; if it fails the work
will not have been done, and applications need to know that.  Also, do
not print a message about it; the exception is the right thing.

This closes SF bug #133717.
2001-02-23 20:04:54 +00:00
Barry Warsaw 22e4182d60 Describe -s a little more generically. 2001-02-23 18:31:40 +00:00
Martin v. Löwis 7edbd4ffb4 Patch #103885: Add dynamic registration and lookup of DOM implementations. 2001-02-22 14:05:50 +00:00
Jeremy Hylton f5d3ea00b9 Fix previous checkin, hopelessly broken as it was; reported by Detlef Lannert. 2001-02-22 13:24:27 +00:00
Jeremy Hylton 3a9a96c778 replace exec with simple assignments 2001-02-21 16:33:24 +00:00
Jack Jansen 2d0589be67 The code to write timestamps couldn't handle negative times (and time
on the Mac is negativevalues > 0x80000000). Fixed.
2001-02-21 10:39:35 +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
Andrew M. Kuchling c05abb3bda Patch #103473 from dougfort: Some sites (amazon.com for one) drop
cookies that contain '=' as part of the value. This patch modifies
Cookie.py to allow '=' as a legal character, and to make the key
search nongreedy so it stops at the first '='.
2001-02-20 22:11:24 +00:00
Tim Peters 754ba589b7 Improve accuracy. In the .tex file, note the new "% BUG:" comments: an
extra backslash is getting displayed in the generated HTML.
2001-02-20 11:24:35 +00:00
Jeremy Hylton 121b6eb018 SF patch #103749: implicit tuple + default arg 2001-02-19 23:53:42 +00:00
Fred Drake f1da6287fc Fix a few small typos in the docstrings.
get_close_matches():  Do not use %-interpolation for strings when
    concatenation is more efficient.
2001-02-19 19:30:05 +00:00
Guido van Rossum b68c245662 SF Patch # 103839 byt dougfort: Allow ';' in attributes
sgmllib does not recognize HTML attributes containing the semicolon
';' character. This may be in accordance with the HTML spec, but there
are sites that use it (excite.com) and the browsers I regularly use
(IE5, Netscape, Opera) all handle it. Doug Fort Downright Software LLC
2001-02-19 18:39:09 +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