]> granicus.if.org Git - python/log
python
24 years agoSearch /tmp before /var/tmp and /usr/tmp -- this seems preferred.
Guido van Rossum [Fri, 2 Mar 2001 05:51:16 +0000 (05:51 +0000)]
Search /tmp before /var/tmp and /usr/tmp -- this seems preferred.
SF patch #404564, Gregor Hoffleit.

24 years agoMake getsourcefile() succeed even if the filename doesn't end in '.py' --
Ka-Ping Yee [Fri, 2 Mar 2001 05:50:34 +0000 (05:50 +0000)]
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.

24 years agoReplace literal '@test' with TESTFN.
Ka-Ping Yee [Fri, 2 Mar 2001 05:48:10 +0000 (05:48 +0000)]
Replace literal '@test' with TESTFN.

24 years agoWhen catching errors from os.rmdir(), test for os.error, not IOError!
Guido van Rossum [Fri, 2 Mar 2001 05:46:17 +0000 (05:46 +0000)]
When catching errors from os.rmdir(), test for os.error, not IOError!

24 years agoAdd a new item to the Python 2.1 start menu: "Module Docs".
Guido van Rossum [Fri, 2 Mar 2001 04:59:38 +0000 (04:59 +0000)]
Add a new item to the Python 2.1 start menu: "Module Docs".
This brings up Ping's pydoc server.

(XXX The icons for this and for IDLE seem screwed.  Oh well.)

24 years agoBelieve it or not, but "more" on Windows requires "more <file" rather
Guido van Rossum [Fri, 2 Mar 2001 04:27:08 +0000 (04:27 +0000)]
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.

24 years agoRefactored the warning-issuing code more.
Guido van Rossum [Fri, 2 Mar 2001 03:30:41 +0000 (03:30 +0000)]
Refactored the warning-issuing code more.

Made sure that the warnings issued by symtable_check_unoptimized()
(about import * and exec) contain the proper filename and line number,
and are transformed into SyntaxError exceptions with -Werror.

24 years agoThanks to Steven Majewski, finally putting MacOS X imports to bed for 2.1b1.
Tim Peters [Fri, 2 Mar 2001 03:28:03 +0000 (03:28 +0000)]
Thanks to Steven Majewski, finally putting MacOS X imports to bed for 2.1b1.

24 years agoTypo repair.
Tim Peters [Fri, 2 Mar 2001 03:11:53 +0000 (03:11 +0000)]
Typo repair.

24 years agoAdded William Tanksley.
Tim Peters [Fri, 2 Mar 2001 02:54:27 +0000 (02:54 +0000)]
Added William Tanksley.

24 years agoMake names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters [Fri, 2 Mar 2001 02:53:08 +0000 (02:53 +0000)]
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.

24 years agoClean up the handling of getsourcefile/getabsfile.
Ka-Ping Yee [Fri, 2 Mar 2001 02:45:08 +0000 (02:45 +0000)]
Clean up the handling of getsourcefile/getabsfile.
Remove __main__ from the index of built-in modules.
Miscellaneous compatibility fixes.

24 years agoClarify the purpose of getsourcefile().
Ka-Ping Yee [Fri, 2 Mar 2001 02:08:53 +0000 (02:08 +0000)]
Clarify the purpose of getsourcefile().
Add getabsfile() for getting a most-normalized path.

24 years agoClarify synopsis line a bit.
Ka-Ping Yee [Fri, 2 Mar 2001 02:01:40 +0000 (02:01 +0000)]
Clarify synopsis line a bit.
Remove -no-about-splash option (not understood by all Netscapes).

24 years agotest_global was broken by some recent checkin. Repairing.
Tim Peters [Fri, 2 Mar 2001 01:48:16 +0000 (01:48 +0000)]
test_global was broken by some recent checkin.  Repairing.

24 years agoWhen seeking the module for an object, compare absolute (not relative) paths.
Ka-Ping Yee [Fri, 2 Mar 2001 01:19:39 +0000 (01:19 +0000)]
When seeking the module for an object, compare absolute (not relative) paths.

24 years agoUse imp.get_suffixes to determine a module name in modulename(file).
Ka-Ping Yee [Fri, 2 Mar 2001 01:19:14 +0000 (01:19 +0000)]
Use imp.get_suffixes to determine a module name in modulename(file).
When possible, display strings containing backslashes using r'' notation.

24 years ago- Numeric now lives in Lib:site-python.
Jack Jansen [Thu, 1 Mar 2001 23:19:05 +0000 (23:19 +0000)]
- Numeric now lives in Lib:site-python.
- Imaging and Numeric are now also available under Carbon.
- Started working on the active installer.

24 years ago- Numeric now lives in Lib:site-python.
Jack Jansen [Thu, 1 Mar 2001 23:18:31 +0000 (23:18 +0000)]
- Numeric now lives in Lib:site-python.
- Imaging and Numeric are now also available under Carbon.

24 years agoRemoved some stuff that shouldn't be in the dev distribution.
Jack Jansen [Thu, 1 Mar 2001 23:17:43 +0000 (23:17 +0000)]
Removed some stuff that shouldn't be in the dev distribution.

24 years agoRemoved Extensions:Numeric from sys.path. It now lives in Lib:site-python.
Jack Jansen [Thu, 1 Mar 2001 23:16:51 +0000 (23:16 +0000)]
Removed Extensions:Numeric from sys.path. It now lives in Lib:site-python.

24 years agoSilly typo which caused the stack browser to crash.
Jack Jansen [Thu, 1 Mar 2001 23:15:54 +0000 (23:15 +0000)]
Silly typo which caused the stack browser to crash.

24 years agoAlso build Imaging for Carbon.
Jack Jansen [Thu, 1 Mar 2001 23:15:01 +0000 (23:15 +0000)]
Also build Imaging for Carbon.

24 years agoUseful future statement support for the interactive interpreter
Jeremy Hylton [Thu, 1 Mar 2001 22:59:14 +0000 (22:59 +0000)]
Useful future statement support for the interactive interpreter

(Also remove warning about module-level global decl, because we can't
distinguish from code passed to exec.)

Define PyCompilerFlags type contains a single element,
cf_nested_scopes, that is true if a nested scopes future statement has
been entered at the interactive prompt.

New API functions:
    PyNode_CompileFlags()
    PyRun_InteractiveOneFlags()
    -- same as their non Flags counterparts except that the take an
       optional PyCompilerFlags pointer

compile.c: In jcompile() use PyCompilerFlags argument.  If
    cf_nested_scopes is true, compile code with nested scopes.  If it
    is false, but the code has a valid future nested scopes statement,
    set it to true.

pythonrun.c: Create a new PyCompilerFlags object in
    PyRun_InteractiveLoop() and thread it through to
    PyRun_InteractiveOneFlags().

24 years agoPut current date into POT-Creation-Date; leave PO-Revision-Date for
Martin v. Löwis [Thu, 1 Mar 2001 22:56:17 +0000 (22:56 +0000)]
Put current date into POT-Creation-Date; leave PO-Revision-Date for
for the translator to update; that is compatible with xgettext 0.10.35.

24 years agoThank Jason Tishler and Steven Majewski for their help in the Cygwin and
Tim Peters [Thu, 1 Mar 2001 22:19:38 +0000 (22:19 +0000)]
Thank Jason Tishler and Steven Majewski for their help in the Cygwin and
MacOS X ports.  Change section header to beta 1.

24 years agoSolaris defines VSWTCH instead of VSWTC; carefully make sure both are
Fred Drake [Thu, 1 Mar 2001 21:54:49 +0000 (21:54 +0000)]
Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
defined and export both names.

Solaris also does not define CBAUDEX; it is not clear that CBAUDEXT
(which is defined there) is the same thing, so we only protect against
the lack of CBAUDEX.

Reported by Greg V. Wilson.

24 years agoWrap some long lines, use only C89 /* */ comments, and add spaces around
Fred Drake [Thu, 1 Mar 2001 20:48:17 +0000 (20:48 +0000)]
Wrap some long lines, use only C89 /* */ comments, and add spaces around
some operators (style guide conformance).

24 years agoAdd Samuele Pedroni
Guido van Rossum [Thu, 1 Mar 2001 20:36:48 +0000 (20:36 +0000)]
Add Samuele Pedroni

24 years agoTest interaction of global and nested scopes -- thanks to Samuele Pedroni.
Guido van Rossum [Thu, 1 Mar 2001 20:35:45 +0000 (20:35 +0000)]
Test interaction of global and nested scopes -- thanks to Samuele Pedroni.

24 years agoAdded entry for urllib2 documentation.
Fred Drake [Thu, 1 Mar 2001 19:54:29 +0000 (19:54 +0000)]
Added entry for urllib2 documentation.

24 years agoAlso accept .so as an extension for module files.
Ka-Ping Yee [Thu, 1 Mar 2001 19:31:25 +0000 (19:31 +0000)]
Also accept .so as an extension for module files.

24 years agoUse larger chunks for the HTML version of the Distutils documentation.
Fred Drake [Thu, 1 Mar 2001 18:38:56 +0000 (18:38 +0000)]
Use larger chunks for the HTML version of the Distutils documentation.

24 years agoComment out section titles for sections that have not been written yet;
Fred Drake [Thu, 1 Mar 2001 18:37:52 +0000 (18:37 +0000)]
Comment out section titles for sections that have not been written yet;
there is no need to clutter a reader's life with those useless things.

Suppress the "Contents" page for HTML; it is not needed for small documents
in the online environment since LaTeX2HTML generates lots of tables of links
anyway.

Various markup consistency nits.

24 years agoComment out section titles for sections that have not been written yet;
Fred Drake [Thu, 1 Mar 2001 18:35:43 +0000 (18:35 +0000)]
Comment out section titles for sections that have not been written yet;
there is no need to clutter a reader's life with those useless things.

Make the snippets of Python code conform to the standard style.

Suppress the "Contents" page for HTML; it is not needed for small documents
in the online environment since LaTeX2HTML generates lots of tables of links
anyway.

Various markup consistency nits.

24 years agoDocument configuration flags to compile for large file support on
Guido van Rossum [Thu, 1 Mar 2001 18:29:57 +0000 (18:29 +0000)]
Document configuration flags to compile for large file support on
certain Linux systems.

24 years agoTwo improvements to large file support:
Guido van Rossum [Thu, 1 Mar 2001 18:26:53 +0000 (18:26 +0000)]
Two improvements to large file support:

- In _portable_ftell(), try fgetpos() before ftello() and ftell64().
  I ran into a situation on a 64-bit capable Linux where the C
  library's ftello() and ftell64() returned negative numbers despite
  fpos_t and off_t both being 64-bit types; fgetpos() did the right
  thing.

- Define a new typedef, Py_off_t, which is either fpos_t or off_t,
  depending on which one is 64 bits.  This removes the need for a lot
  of #ifdefs later on.  (XXX Should this be moved to pyport.h?  That
  file currently seems oblivious to large fille support, so for now
  I'll leave it here where it's needed.)

24 years agoMore MacOSX fiddling. As noted in a comment, I believe all variations
Tim Peters [Thu, 1 Mar 2001 18:12:00 +0000 (18:12 +0000)]
More MacOSX fiddling.  As noted in a comment, I believe all variations
of these "search the directory" schemes (including this one) are still prone
to making mistakes.

24 years agoBetter __credits__.
Ka-Ping Yee [Thu, 1 Mar 2001 17:11:17 +0000 (17:11 +0000)]
Better __credits__.

24 years agoHere we go again, another round of version bumping...
Guido van Rossum [Thu, 1 Mar 2001 14:50:13 +0000 (14:50 +0000)]
Here we go again, another round of version bumping...

24 years agoAdd __author__ and __credits__ variables.
Ka-Ping Yee [Thu, 1 Mar 2001 13:56:40 +0000 (13:56 +0000)]
Add __author__ and __credits__ variables.

24 years agoAdd __author__ variable.
Ka-Ping Yee [Thu, 1 Mar 2001 13:56:16 +0000 (13:56 +0000)]
Add __author__ variable.
Robustify: don't rely on modules being present in sys.modules.

24 years agoDocstring improvements.
Ka-Ping Yee [Thu, 1 Mar 2001 13:55:20 +0000 (13:55 +0000)]
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.)

24 years agoMore fiddling w/ the new-fangled Mac import code.
Tim Peters [Thu, 1 Mar 2001 08:47:29 +0000 (08:47 +0000)]
More fiddling w/ the new-fangled Mac import code.

24 years agoChecking in patch 404826 -- urllib2 enhancements and documentations.
Moshe Zadka [Thu, 1 Mar 2001 08:40:42 +0000 (08:40 +0000)]
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)

24 years agoWhitespace normalization.
Tim Peters [Thu, 1 Mar 2001 08:31:39 +0000 (08:31 +0000)]
Whitespace normalization.

24 years agoSuppress a compiler warning under OpenVMS; time_t is unsigned on (at least)
Fred Drake [Thu, 1 Mar 2001 06:33:32 +0000 (06:33 +0000)]
Suppress a compiler warning under OpenVMS; time_t is unsigned on (at least)
the more recent versions of that platform, so we use the value (time_t)(-1)
as the error value.  This is the type used in the OpenVMS documentation:

http://www.openvms.compaq.com/commercial/c/5763p048.htm#inde

This closes SF tracker bug #404240.

Also clean up an exception message when detecting overflow of time_t values
beyond 4 bytes.

24 years agoFix core dump in example from Samuele Pedroni:
Jeremy Hylton [Thu, 1 Mar 2001 06:09:34 +0000 (06:09 +0000)]
Fix core dump in example from Samuele Pedroni:

from __future__ import nested_scopes
x=7
def f():
    x=1
    def g():
        global x
        def i():
            def h():
                return x
            return h()
        return i()
    return g()

print f()
print x

This kind of code didn't work correctly because x was treated as free
in i, leading to an attempt to load x in g to make a closure for i.

Solution is to make global decl apply to nested scopes unless their is
an assignment.  Thus, x in h is global.

24 years agoVisit the closure during traversal and XDECREF it on during deallocation.
Jeremy Hylton [Thu, 1 Mar 2001 06:06:37 +0000 (06:06 +0000)]
Visit the closure during traversal and XDECREF it on during deallocation.

24 years agoBump the release number to 2.1b1.
Fred Drake [Thu, 1 Mar 2001 06:01:20 +0000 (06:01 +0000)]
Bump the release number to 2.1b1.

24 years agofinal round of __all__ lists (I hope) - skipped urllib2 because Moshe may be
Skip Montanaro [Thu, 1 Mar 2001 04:27:19 +0000 (04:27 +0000)]
final round of __all__ lists (I hope) - skipped urllib2 because Moshe may be
giving it a slight facelift

24 years agomove import into function to avoid having to add an __all__ list...
Skip Montanaro [Thu, 1 Mar 2001 04:13:51 +0000 (04:13 +0000)]
move import into function to avoid having to add an __all__ list...

24 years agoAdd getlineno() routine to account for LINENO optimization.
Ka-Ping Yee [Thu, 1 Mar 2001 03:55:35 +0000 (03:55 +0000)]
Add getlineno() routine to account for LINENO optimization.

24 years agoRevised version of Jason Tishler's patch to make this compile on Cygwin,
Fred Drake [Thu, 1 Mar 2001 03:28:08 +0000 (03:28 +0000)]
Revised version of Jason Tishler's patch to make this compile on Cygwin,
which does not define all the constants.

This closes SF tracker patch #404924.

24 years agoAdd tests for the .copy() methods of both weak dictionary classes.
Fred Drake [Thu, 1 Mar 2001 03:06:53 +0000 (03:06 +0000)]
Add tests for the .copy() methods of both weak dictionary classes.

24 years agoChange WeakDictionary to WeakValueDictionary in a couple more places.
Fred Drake [Thu, 1 Mar 2001 03:06:03 +0000 (03:06 +0000)]
Change WeakDictionary to WeakValueDictionary in a couple more places.

WeakValueDictionary.copy(),
WeakKeyDictionary.copy():  Actually return the copy!

24 years agoPrepare Windows for 2.1 beta 1: installer dialogs and bump "build number".
Tim Peters [Thu, 1 Mar 2001 02:43:40 +0000 (02:43 +0000)]
Prepare Windows for 2.1 beta 1:  installer dialogs and bump "build number".

24 years agoAdded blurbs about difflib, doctest and Windows import (PEP 235).
Tim Peters [Thu, 1 Mar 2001 02:31:33 +0000 (02:31 +0000)]
Added blurbs about difflib, doctest and Windows import (PEP 235).

24 years agoRemove extra close curly in code #ifdef'ed out on my box.
Tim Peters [Thu, 1 Mar 2001 02:20:01 +0000 (02:20 +0000)]
Remove extra close curly in code #ifdef'ed out on my box.

24 years agoIn Steven's apparent absence, check in *something* with a non-zero chance
Tim Peters [Thu, 1 Mar 2001 01:30:56 +0000 (01:30 +0000)]
In Steven's apparent absence, check in *something* with a non-zero chance
of making new-fangled Mac imports work again.  May not work, and may not
even compile on his boxes, but should be at worst very close on both.

24 years agoFix markup nit pointed out by FLD
Andrew M. Kuchling [Thu, 1 Mar 2001 01:02:52 +0000 (01:02 +0000)]
Fix markup nit pointed out by FLD

24 years agoDon't add global names to st->st_global if we're already iterating
Jeremy Hylton [Thu, 1 Mar 2001 00:42:55 +0000 (00:42 +0000)]
Don't add global names to st->st_global if we're already iterating
over the elements of st->st_global!

24 years agoUse
Guido van Rossum [Thu, 1 Mar 2001 00:36:53 +0000 (00:36 +0000)]
Use

    find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f

to remove all .py[co] files before testing, rather than just those in
the Lib/test directory.  "find" is used all over the Makefile so I
suppose it's safe; how about xargs?

24 years agoCall main routine in pydoc module (pydoc.cli).
Ka-Ping Yee [Thu, 1 Mar 2001 00:25:40 +0000 (00:25 +0000)]
Call main routine in pydoc module (pydoc.cli).

24 years agoNormalize case of paths in sys.path to avoid duplicates on Windows.
Ka-Ping Yee [Thu, 1 Mar 2001 00:24:32 +0000 (00:24 +0000)]
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().

24 years agoAdd test case for global stmt at module level.
Jeremy Hylton [Wed, 28 Feb 2001 23:49:19 +0000 (23:49 +0000)]
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.

24 years agoundo introduction of st_global_star
Jeremy Hylton [Wed, 28 Feb 2001 23:47:55 +0000 (23:47 +0000)]
undo introduction of st_global_star

24 years agoDocument PyErr_WarnExplicit().
Guido van Rossum [Wed, 28 Feb 2001 23:46:44 +0000 (23:46 +0000)]
Document PyErr_WarnExplicit().

24 years agoWarn about global statement at the module level.
Jeremy Hylton [Wed, 28 Feb 2001 23:44:45 +0000 (23:44 +0000)]
Warn about global statement at the module level.

Do better accounting for global variables.

24 years agoDocument warn_explicit().
Guido van Rossum [Wed, 28 Feb 2001 23:34:21 +0000 (23:34 +0000)]
Document warn_explicit().

24 years agoDisable GetWindowSpareFlag and GetWindowGoAwayBox on carbon.
Jack Jansen [Wed, 28 Feb 2001 23:32:42 +0000 (23:32 +0000)]
Disable GetWindowSpareFlag and GetWindowGoAwayBox on carbon.

24 years agoupdate output to reflect exception that is now raised
Jeremy Hylton [Wed, 28 Feb 2001 23:24:22 +0000 (23:24 +0000)]
update output to reflect exception that is now raised

24 years agoPut PPC distributions back in, rearranged packages and use VISE variable magic to...
Jack Jansen [Wed, 28 Feb 2001 23:23:31 +0000 (23:23 +0000)]
Put PPC distributions back in, rearranged packages and use VISE variable magic to determine which ConfigurePythonXXX to run.

24 years agoadd DEF_BOUND
Jeremy Hylton [Wed, 28 Feb 2001 23:03:39 +0000 (23:03 +0000)]
add DEF_BOUND

24 years agoAdd entry for the inspect module.
Fred Drake [Wed, 28 Feb 2001 23:02:20 +0000 (23:02 +0000)]
Add entry for the inspect module.

24 years agoClean up some of the markup for consistency, wrap some long lines.
Fred Drake [Wed, 28 Feb 2001 23:01:38 +0000 (23:01 +0000)]
Clean up some of the markup for consistency, wrap some long lines.

24 years agoFix some rules broken by typos, others by the flattening of the makefile.
Fred Drake [Wed, 28 Feb 2001 22:59:37 +0000 (22:59 +0000)]
Fix some rules broken by typos, others by the flattening of the makefile.

24 years agoAdd warning/error handlin for problematic nested scopes cases as
Jeremy Hylton [Wed, 28 Feb 2001 22:54:51 +0000 (22:54 +0000)]
Add warning/error handlin for problematic nested scopes cases as
described in PEP 227.

symtable_check_unoptimized() warns about import * and exec with "in"
when it is used in a function that contains a nested function with
free variables.  Warnings are issued unless nested scopes are in
effect, in which case these are SyntaxErrors.

symtable_check_shadow() warns about assignments in a function scope
that shadow free variables defined in a nested scope.  This will
always generate a warning -- and will behave differently with nested
scopes than without.

Restore full checking for free vars in children, even when nested
scopes are not enabled.  This is needed to support warnings for
shadowing.

Change symtable_warn() to return an int-- the return value of
PyErr_WarnExplicit.

Sundry cleanup: Remove commented out code.  Break long lines.

24 years agoFix filter for SyntaxErrors
Jeremy Hylton [Wed, 28 Feb 2001 22:50:15 +0000 (22:50 +0000)]
Fix filter for SyntaxErrors

24 years agoFix for bug #405007: prefix subdir to scripts in order to build in
Andrew M. Kuchling [Wed, 28 Feb 2001 22:49:26 +0000 (22:49 +0000)]
Fix for bug #405007: prefix subdir to scripts in order to build in
    a subdirectory.

24 years agoAdd description of PEP235
Andrew M. Kuchling [Wed, 28 Feb 2001 22:39:15 +0000 (22:39 +0000)]
Add description of PEP235
Remove references to 2.1alpha
Update description of PEP229

24 years agoMove a comment around to where it belongs (the code had alrady been
Guido van Rossum [Wed, 28 Feb 2001 22:26:36 +0000 (22:26 +0000)]
Move a comment around to where it belongs (the code had alrady been
moved).

24 years agoCover pydoc
Andrew M. Kuchling [Wed, 28 Feb 2001 22:22:40 +0000 (22:22 +0000)]
Cover pydoc
Update reference Python version to beta1
Rip out PEP 232 section
Add placeholders for PEP 236 and 235
Fix erroneous \filename references

24 years agoDocument the object allocator
Andrew M. Kuchling [Wed, 28 Feb 2001 22:10:07 +0000 (22:10 +0000)]
Document the object allocator
Minor sentence change

24 years agoLet's have some sanity. Introduce a helper to issue a symbol table
Guido van Rossum [Wed, 28 Feb 2001 22:08:12 +0000 (22:08 +0000)]
Let's have some sanity.  Introduce a helper to issue a symbol table
warning.

24 years agoadded description of NL token
Skip Montanaro [Wed, 28 Feb 2001 22:05:41 +0000 (22:05 +0000)]
added description of NL token

24 years agoUse the new PyErr_WarnExplicit() API to issue better warnings for
Guido van Rossum [Wed, 28 Feb 2001 21:55:38 +0000 (21:55 +0000)]
Use the new PyErr_WarnExplicit() API to issue better warnings for
global after assign / use.

Note: I'm not updating the PyErr_Warn() call for import * / exec
combined with a function, because I can't trigger it with an example.
Jeremy, just follow the example of the call to PyErr_WarnExplicit()
that I *did* include.

24 years agoSyntaxError__init__(): Be a little more robust when picking apart the
Fred Drake [Wed, 28 Feb 2001 21:52:10 +0000 (21:52 +0000)]
SyntaxError__init__():  Be a little more robust when picking apart the
    location information for the SyntaxError -- do not do more than we
    need to, stopping as soon as an exception has been raised.

24 years agoMove some constant initialization from FTP.__init__() and FTP.connect()
Fred Drake [Wed, 28 Feb 2001 21:46:37 +0000 (21:46 +0000)]
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.)

24 years agoAdd PyErr_WarnExplicit(), which calls warnings.warn_explicit(), with
Guido van Rossum [Wed, 28 Feb 2001 21:46:24 +0000 (21:46 +0000)]
Add PyErr_WarnExplicit(), which calls warnings.warn_explicit(), with
explicit filename, lineno etc. arguments.

24 years agoAdd declaration for PyErr_WarnExplicit().
Guido van Rossum [Wed, 28 Feb 2001 21:44:20 +0000 (21:44 +0000)]
Add declaration for PyErr_WarnExplicit().

24 years agoAdd a new API:
Guido van Rossum [Wed, 28 Feb 2001 21:43:40 +0000 (21:43 +0000)]
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.

24 years agoMention pydoc
Andrew M. Kuchling [Wed, 28 Feb 2001 21:05:42 +0000 (21:05 +0000)]
Mention pydoc

24 years agoLeave #! lines featuring /usr/bin/env alone
Andrew M. Kuchling [Wed, 28 Feb 2001 20:59:33 +0000 (20:59 +0000)]
Leave #! lines featuring /usr/bin/env alone

24 years agoNow that Jeremy is asking about this code, it looks really bogus to me,
Fred Drake [Wed, 28 Feb 2001 20:58:04 +0000 (20:58 +0000)]
Now that Jeremy is asking about this code, it looks really bogus to me,
so let's rip it out.  The constructor for SyntaxError does the right
thing, so we do not need to do it again.

24 years agoInstall the pydoc script
Andrew M. Kuchling [Wed, 28 Feb 2001 20:56:49 +0000 (20:56 +0000)]
Install the pydoc script

24 years agoAdd script form of pydoc so that it's present in beta1. Currently
Andrew M. Kuchling [Wed, 28 Feb 2001 20:55:10 +0000 (20:55 +0000)]
Add script form of pydoc so that it's present in beta1.  Currently
    this just copies the __name__=='__main__' logic from pydoc.py.
    ?!ng can decide whether he wants to create a main() in pydoc, or rip
    it out of pydoc.py completely.

24 years agoFix for bug #404875: fix typo in setup.py
Andrew M. Kuchling [Wed, 28 Feb 2001 19:49:57 +0000 (19:49 +0000)]
Fix for bug #404875: fix typo in setup.py

24 years agoPlacate tabnanny
Andrew M. Kuchling [Wed, 28 Feb 2001 19:40:27 +0000 (19:40 +0000)]
Placate tabnanny

24 years agoDefine lots of constants for indexes into the structures for the file
Fred Drake [Wed, 28 Feb 2001 17:56:26 +0000 (17:56 +0000)]
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.