]> granicus.if.org Git - python/log
python
24 years agoThe 0.5 release happened on 2/15, not on 2/14. :-)
Guido van Rossum [Wed, 16 Feb 2000 01:22:35 +0000 (01:22 +0000)]
The 0.5 release happened on 2/15, not on 2/14. :-)

24 years agosupport for arglists with implicit tuple unpacks
Jeremy Hylton [Wed, 16 Feb 2000 00:55:44 +0000 (00:55 +0000)]
support for arglists with implicit tuple unpacks
- added a number of support methods to generate code just before the
  body
- hack protocol for communicating number of args to PyAssembler

fix TryExcept generation for case where exception handler has no body
fix visitAssAttr
add comment about incomplete visitAssName

stop using the ExampleASTVisitor

change script invocation to accept a list of .py files (e.g. Lib/*.py)

24 years agomore robust assignment of lineno for keyword args
Jeremy Hylton [Wed, 16 Feb 2000 00:51:37 +0000 (00:51 +0000)]
more robust assignment of lineno for keyword args
get the lineno from the name of the keyword arg

example of case that didn't work--
def foo(x, y, a = None,
b = None):

24 years agofix argcount generation for arg lists containing tuple unpacks
Jeremy Hylton [Wed, 16 Feb 2000 00:50:29 +0000 (00:50 +0000)]
fix argcount generation for arg lists containing tuple unpacks
this is sort of a hack

24 years agoadd flatten helper function
Jeremy Hylton [Wed, 16 Feb 2000 00:49:47 +0000 (00:49 +0000)]
add flatten helper function

24 years agofinish first impl of code generator
Jeremy Hylton [Tue, 15 Feb 2000 23:45:26 +0000 (23:45 +0000)]
finish first impl of code generator

add support for nodes TryExcept, TryFinally, Sliceobj
fix visitSubscript to properly handle x[a,b,c]

24 years agofix creation of Ellipsis node
Jeremy Hylton [Tue, 15 Feb 2000 23:43:19 +0000 (23:43 +0000)]
fix creation of Ellipsis node

24 years agoadd a little debugging support when new.code raises SystemError
Jeremy Hylton [Tue, 15 Feb 2000 21:59:50 +0000 (21:59 +0000)]
add a little debugging support when new.code raises SystemError

24 years agono real change -- testing syncmail
Jeremy Hylton [Tue, 15 Feb 2000 21:57:14 +0000 (21:57 +0000)]
no real change -- testing syncmail

24 years agoadd line numbers to nodes in the except clause (when possible)
Jeremy Hylton [Tue, 15 Feb 2000 21:30:48 +0000 (21:30 +0000)]
add line numbers to nodes in the except clause (when possible)

24 years agotidy up tryexcept and tryfinally nodes
Jeremy Hylton [Tue, 15 Feb 2000 21:30:00 +0000 (21:30 +0000)]
tidy up tryexcept and tryfinally nodes

24 years agoA bit restructured.
Guido van Rossum [Tue, 15 Feb 2000 19:11:26 +0000 (19:11 +0000)]
A bit restructured.

24 years agoOops, somehow the initial checkin was botched. :-(
Guido van Rossum [Tue, 15 Feb 2000 18:30:58 +0000 (18:30 +0000)]
Oops, somehow the initial checkin was botched. :-(

24 years agoAdded some clarifications.
Guido van Rossum [Tue, 15 Feb 2000 18:20:28 +0000 (18:20 +0000)]
Added some clarifications.

24 years agoTemporarily add a copy here for easy distribution.
Guido van Rossum [Tue, 15 Feb 2000 18:20:01 +0000 (18:20 +0000)]
Temporarily add a copy here for easy distribution.

24 years agoMore changes.
Guido van Rossum [Tue, 15 Feb 2000 18:11:21 +0000 (18:11 +0000)]
More changes.

24 years agoNotice status back and stack viewer.
Guido van Rossum [Tue, 15 Feb 2000 18:08:19 +0000 (18:08 +0000)]
Notice status back and stack viewer.

24 years agoSupport for Moshe's status bar.
Guido van Rossum [Tue, 15 Feb 2000 18:05:15 +0000 (18:05 +0000)]
Support for Moshe's status bar.

24 years agoStatus bar code -- by Moshe Zadka.
Guido van Rossum [Tue, 15 Feb 2000 18:04:52 +0000 (18:04 +0000)]
Status bar code -- by Moshe Zadka.

24 years agoAdding the old stack viewer implementation back, for the debugger.
Guido van Rossum [Tue, 15 Feb 2000 18:04:09 +0000 (18:04 +0000)]
Adding the old stack viewer implementation back, for the debugger.

24 years agoNew stack viewer, uses a tree widget.
Guido van Rossum [Tue, 15 Feb 2000 18:03:40 +0000 (18:03 +0000)]
New stack viewer, uses a tree widget.
(XXX: the debugger doesn't yet use this.)

24 years agoCorrect a typo and remove an unqualified except that was hiding the error.
Guido van Rossum [Tue, 15 Feb 2000 18:03:01 +0000 (18:03 +0000)]
Correct a typo and remove an unqualified except that was hiding the error.

24 years agoAdd an XXX comment about the ClassBrowser AIP.
Guido van Rossum [Tue, 15 Feb 2000 18:02:11 +0000 (18:02 +0000)]
Add an XXX comment about the ClassBrowser AIP.

24 years agoUpdated change log.
Guido van Rossum [Tue, 15 Feb 2000 17:19:25 +0000 (17:19 +0000)]
Updated change log.

24 years agoNews update. Probably incomplete; what else is new?
Guido van Rossum [Tue, 15 Feb 2000 17:17:58 +0000 (17:17 +0000)]
News update.  Probably incomplete; what else is new?

24 years agoUpdated for pending IDLE 0.5 release (still very rough -- just getting
Guido van Rossum [Tue, 15 Feb 2000 17:16:40 +0000 (17:16 +0000)]
Updated for pending IDLE 0.5 release (still very rough -- just getting
it out in a more convenient format than CVS).

24 years agoTiny addition.
Guido van Rossum [Tue, 15 Feb 2000 17:15:36 +0000 (17:15 +0000)]
Tiny addition.

24 years agoIn response to one particular complaint on edu-sig, change some error
Guido van Rossum [Tue, 15 Feb 2000 14:51:46 +0000 (14:51 +0000)]
In response to one particular complaint on edu-sig, change some error
messages from "OverflowError: integer pow()" to "OverflowError:
integer exponentiation".  (Not that this takes care of the complaint
in general that the error messages could be greatly improved. :-)

24 years agoedit a doc string
Jeremy Hylton [Mon, 14 Feb 2000 23:57:56 +0000 (23:57 +0000)]
edit a doc string
(real intent is to test out rsync install)

24 years agoMake multiplying a sequence by a long integer (5L * 'b') legal
Andrew M. Kuchling [Mon, 14 Feb 2000 22:22:04 +0000 (22:22 +0000)]
Make multiplying a sequence by a long integer (5L * 'b') legal

24 years agoget rid of spurious print
Jeremy Hylton [Mon, 14 Feb 2000 21:54:57 +0000 (21:54 +0000)]
get rid of spurious print

24 years agoPatch by Gerrit Holl:
Guido van Rossum [Mon, 14 Feb 2000 21:42:14 +0000 (21:42 +0000)]
Patch by Gerrit Holl:

* In crlf.py and lfcr.py: regsub -> re

24 years agoPatch by Gerrit Holl:
Guido van Rossum [Mon, 14 Feb 2000 21:41:50 +0000 (21:41 +0000)]
Patch by Gerrit Holl:

    * In logmerge.py: added '-r' flag to show the oldest checkin
      first instead of the newest, and getopt.getopt was used
      wrong.

24 years agolooks like everything is working except for try/except (pystone
Jeremy Hylton [Mon, 14 Feb 2000 21:33:10 +0000 (21:33 +0000)]
looks like everything is working except for try/except (pystone
compiles correctly)

24 years agoLeftShift & RightShift: fix reprs, change attr names to left and right
Jeremy Hylton [Mon, 14 Feb 2000 21:32:42 +0000 (21:32 +0000)]
LeftShift & RightShift: fix reprs, change attr names to left and right
(so they are common with other binary ops)

24 years agoFix the question marks next to the expansions of some of the
Fred Drake [Mon, 14 Feb 2000 21:30:52 +0000 (21:30 +0000)]
Fix the question marks next to the expansions of some of the
colorspace name abbreviations, based on email from Gerrit Holl
<gerrit.holl@pobox.com>.

24 years agorename several of the generic attribute names for nodes. new node attrs are:
Jeremy Hylton [Mon, 14 Feb 2000 18:34:11 +0000 (18:34 +0000)]
rename several of the generic attribute names for nodes. new node attrs are:
Exec: expr, locals, globals
Dict: items
Assert: test, fail

24 years ago(), [], and {} should not be represented as constant expressions, they
Jeremy Hylton [Mon, 14 Feb 2000 18:32:46 +0000 (18:32 +0000)]
(), [], and {} should not be represented as constant expressions, they
should be calls to BUILD_ ops for these types with no arguments

24 years agoPatch by Jack Jansen:
Guido van Rossum [Mon, 14 Feb 2000 17:58:25 +0000 (17:58 +0000)]
Patch by Jack Jansen:

If we attempt to import a dynamic module in a newer (or older) version
of Python give an error message tailored to the situation (Python too
new/old).

24 years agosplit compile.py into two files
Jeremy Hylton [Mon, 14 Feb 2000 14:14:29 +0000 (14:14 +0000)]
split compile.py into two files
add StackDepthFinder (and remove push/pop from CodeGen)
add several nodes, including Ellipsis, Bit&|^, Exec

24 years agochange MODULE_NAMESPACE/FUNCTION_NAMESPACE stuff to have a single flag
Jeremy Hylton [Sat, 12 Feb 2000 00:12:38 +0000 (00:12 +0000)]
change MODULE_NAMESPACE/FUNCTION_NAMESPACE stuff to have a single flag
named OPTIMIZED, which matches compile.c and makes more sense for
classes

revamp call signature for PythonVMCode.__init__; doesn't really matter
'cuz this code is going to be refactored out of existence

add generateClassCode and modify Func & Lambda generation

add support for nodes Classdef, Keyword,

fix CallFunc to generate right op arg when calling w/ keywords

add ugly hack to properly compute offsets when the same stack ref is
used multiple times

24 years agoAnd added a note about needing two "cvs update"s.
Jack Jansen [Fri, 11 Feb 2000 23:17:14 +0000 (23:17 +0000)]
And added a note about needing two "cvs update"s.

24 years agoExplained that you have to checkout the Mac portion of Python in a separate
Jack Jansen [Fri, 11 Feb 2000 23:14:46 +0000 (23:14 +0000)]
Explained that you have to checkout the Mac portion of Python in a separate
folder and then move it to the Python hierarchy.

24 years agoadd support for Lambda nodes
Jeremy Hylton [Fri, 11 Feb 2000 20:27:07 +0000 (20:27 +0000)]
add support for Lambda nodes

change resolution of local name ops (LOAD_FAST).  i think it makes
sense now.  if it is an argument or a local var name that it used, it
must be in varnames.  if it is a local var name that is used, it must
also be in names

24 years agoDitched '_find_SET()', since it was a no-value-added wrapper around
Greg Ward [Fri, 11 Feb 2000 02:52:39 +0000 (02:52 +0000)]
Ditched '_find_SET()', since it was a no-value-added wrapper around
  'get_msvc_paths()'.
Renamed '_do_SET()' to 'set_path_env_var()', tweaked docstring, and
  cosmetically tweaked code.
Stylistic changes to MSVCCompiler constructor (variable renaming
  and type consistency).

24 years agoLatest patch from Thomas Heller/Robin Becker:
Greg Ward [Fri, 11 Feb 2000 02:47:15 +0000 (02:47 +0000)]
Latest patch from Thomas Heller/Robin Becker:
  * tweak my docstrings
  * fix None returns to empty list
  * reshuffle responsibilities between '_find_exe()', '_find_SET()', and
    the MSVCCompiler constructor -- now the constructor worries about
    fetching the version list and determining the most recent one
  * added "/W3" compile option
Also, I added/tweaked some docstrings.

24 years agoadd loop handling via
Jeremy Hylton [Thu, 10 Feb 2000 20:55:50 +0000 (20:55 +0000)]
add loop handling via

Loop object to handle StackRegs
loops stack attr on CodeGenreeator to hold the current loop object

add support for nodes While, Break, Continue

24 years agoadd an __len__ to Set and Stack
Jeremy Hylton [Thu, 10 Feb 2000 20:54:27 +0000 (20:54 +0000)]
add an __len__ to Set and Stack

24 years agoDocument the API changes to the nntplib module (exceptions become
Barry Warsaw [Thu, 10 Feb 2000 20:26:45 +0000 (20:26 +0000)]
Document the API changes to the nntplib module (exceptions become
classes, NNTP.__init__() grows a new optional argument to set reader
mode on the server).

24 years agoAdded new exception classes:
Barry Warsaw [Thu, 10 Feb 2000 20:25:53 +0000 (20:25 +0000)]
Added new exception classes:

    NNTPError - derived from Exception, it's the base class for all
    other exceptions in this module

    NNTPReplyError - what used to be error_reply

    NNTPTemporaryError - what used to be error_temp

    NNTPPermanentError - what used to be error_perm

    NNTPProtocolError - what used to be error_proto

    NNTPDataError - what used to be error_data

All the old names are retained for backwards compatibility; they point
to the class that replaces them.  Also, any code in this module that
raises an exception, now does so with the exception class.

NNTP.__init__(): Added a new optional argument `readermode', which is
a flag that defaults to false.  When set to true, the "mode reader"
command is sent to the NNTP server before user authentication.  Reader
mode is sometimes necessary if you are connecting to an NNTP server on
the local machine and intend to call reader-specific comamnds, such as
`group'.  If you get unexpected NNTPPermanentErrors, you might need to
set readermode.  Patch provided by Thomas Wouters (who include the
standard disclaimer on is patches@python.org submission), and inspired
by Jim Tittsler.

24 years agoEnable -t when compiling Python library modules in libinstall (.pyc
Fred Drake [Thu, 10 Feb 2000 17:23:44 +0000 (17:23 +0000)]
Enable -t when compiling Python library modules in libinstall (.pyc
version only).

Enable -tt for the regression test.

Very similar to Skip's patch.

24 years agoadd namespace attr to CodeGenerator, can be either MODULE_NAMESPACE or
Jeremy Hylton [Thu, 10 Feb 2000 17:20:39 +0000 (17:20 +0000)]
add namespace attr to CodeGenerator, can be either MODULE_NAMESPACE or
FUNCTION_NAMESPACE.  initialize in __init__ and reset in
generateFunctionCode.

replace direct issue of STORE_FAST, STORE_GLOBAL, etc. with call to
storeName; same for loadName and deleteName

the new {store,load,delete}Name methods use the namespace attr and the
local variable stack to determine the correct bytecode to issue

24 years agoUntabify to pass the -tt test.
Fred Drake [Thu, 10 Feb 2000 17:17:14 +0000 (17:17 +0000)]
Untabify to pass the -tt test.

24 years agoDetabify.
Fred Drake [Thu, 10 Feb 2000 16:21:11 +0000 (16:21 +0000)]
Detabify.

I ran "expand" instead of using Skip's patch, but it's all the same.

24 years agoIn AskYesNoCancel() treat the "yes" and "no" buttons the same way as the cancel
Jack Jansen [Thu, 10 Feb 2000 16:15:53 +0000 (16:15 +0000)]
In AskYesNoCancel() treat the "yes" and "no" buttons the same way as the cancel
button (i.e. an empty label hides the button).

24 years agoMake this pass the -tt test.
Fred Drake [Thu, 10 Feb 2000 15:31:07 +0000 (15:31 +0000)]
Make this pass the -tt test.

24 years agoStylistic changes to the registry-grovelling code: code formatting, changed
Greg Ward [Thu, 10 Feb 2000 02:52:42 +0000 (02:52 +0000)]
Stylistic changes to the registry-grovelling code: code formatting, changed
function names, dbetter (hopefully) ocstrings, and comments.

24 years agoTypecheck 'output_dir' argument to compile/link methods.
Greg Ward [Thu, 10 Feb 2000 02:51:32 +0000 (02:51 +0000)]
Typecheck 'output_dir' argument to compile/link methods.

24 years agoPath from Thomas Heller: resurrect the .def file kludge while preserving the
Greg Ward [Thu, 10 Feb 2000 02:17:06 +0000 (02:17 +0000)]
Path from Thomas Heller: resurrect the .def file kludge while preserving the
/export option mini-kludge.

24 years agoPatch from Thomas heller:
Greg Ward [Thu, 10 Feb 2000 02:15:52 +0000 (02:15 +0000)]
Patch from Thomas heller:
  * don't need to mention python<ver>.lib -- it's done by a pragma
  * add debug flags for compile and link, and use them
  * fix 'link_shared_library()' to pass everything to 'link_shared_object()'
  * change filename when shared object with debug info (ugh)

24 years agoadd ExampleASTVisitor:
Jeremy Hylton [Thu, 10 Feb 2000 00:47:08 +0000 (00:47 +0000)]
add ExampleASTVisitor:
* prints out examples of nodes that are handled by visitor.  simply a
  development convenience

remove NestedCodeGenerator -- it was bogus after all
replace with generateFunctionCode, a method to call to generate code
  for a function instead of a top-level module

fix impl of visitDiscard (most pop stack)
emit lineno for pass

handle the following new node types: Import, From, Getattr, Subscript,
Slice, AssAttr, AssTuple, Mod, Not, And, Or, List

LocalNameFinder: remove names declared as globals for locals

PythonVMCode: pass arg names to constructor, force varnames to contain
them all (even if they aren't referenced)

add -q option on command line to disable stdout

24 years agoadd remove method to set
Jeremy Hylton [Thu, 10 Feb 2000 00:43:22 +0000 (00:43 +0000)]
add remove method to set

24 years agoAdded 'debug' option, and changed compile/link calls to use it.
Greg Ward [Wed, 9 Feb 2000 02:20:14 +0000 (02:20 +0000)]
Added 'debug' option, and changed compile/link calls to use it.

24 years agoAdded 'debug' option (just there for 'build_ext' and 'build_lib' commands
Greg Ward [Wed, 9 Feb 2000 02:19:49 +0000 (02:19 +0000)]
Added 'debug' option (just there for 'build_ext' and 'build_lib' commands
to fallback to if the user doesn't set it for those commands.

24 years agoAdded 'debug' flags to compile and link methods, and added dummy code for
Greg Ward [Wed, 9 Feb 2000 02:18:39 +0000 (02:18 +0000)]
Added 'debug' flags to compile and link methods, and added dummy code for
  someone who knows Windows/MSVC++ to come along and add the right flags.
Comment noting that 'link_static_lib()' signature is inconsistent with
  the other compiler classes (uh-oh!)

24 years agoAdded 'debug' flags to compile and link methods, and modified code to add
Greg Ward [Wed, 9 Feb 2000 02:17:00 +0000 (02:17 +0000)]
Added 'debug' flags to compile and link methods, and modified code to add
'-g' flag to compiler/linker command lines when it's true.

24 years agoAdded 'debug' flag to compile and link method signatures.
Greg Ward [Wed, 9 Feb 2000 02:16:14 +0000 (02:16 +0000)]
Added 'debug' flag to compile and link method signatures.
Doc fix: several paragraphs under 'link_static_lib()' moved to
  'link_shared_lib()', where they belong.

24 years agoadd optional verbose arg to walk function. it overrides the global
Jeremy Hylton [Tue, 8 Feb 2000 21:15:48 +0000 (21:15 +0000)]
add optional verbose arg to walk function.  it overrides the global
VERBOSE setting for the ASTVisitor

add getopt handling for one or more -v args

rename ForwardRef to StackRef, because it isn't necessarily directional

CodeGenerator:
* add assertStackEmpty method.  prints warning if stack is not empty
  when it should be
* define methods for AssName, UNARY_*, For

PythonVMCode:
* fix mix up between hasjrel and hasjabs for address calculation

24 years agomake all unary operators have a single child node called expr
Jeremy Hylton [Tue, 8 Feb 2000 21:06:19 +0000 (21:06 +0000)]
make all unary operators have a single child node called expr

24 years agoadd spaces to comparison names is not and not in to match dis
Jeremy Hylton [Tue, 8 Feb 2000 19:58:33 +0000 (19:58 +0000)]
add spaces to comparison names is not and not in to match dis

24 years agonow produces valid pyc files for a least a trivial subset of the
Jeremy Hylton [Tue, 8 Feb 2000 19:01:29 +0000 (19:01 +0000)]
now produces valid pyc files for a least a trivial subset of the
language.

CodeGenerator:
* modify to track stack depth
* add emit method that call's PythonVMCode's makeCodeObject
* thread filenames through in hackish way
* set flags for code objects for modules and functions
  XXX the docs for the flags seem out of date and/or incomplete

PythonVMCode:
* add doc string describing the elements of a real code object

LineAddrTable:
* creates an lnotab (no quite correctly though)

24 years agoconstants from transformer
Jeremy Hylton [Tue, 8 Feb 2000 18:57:51 +0000 (18:57 +0000)]
constants from transformer

24 years agomove constants out of transformer so that they can be shared with ast
Jeremy Hylton [Tue, 8 Feb 2000 18:57:32 +0000 (18:57 +0000)]
move constants out of transformer so that they can be shared with ast
add varargs and kwargs attributes to Function nodes

24 years agoget_config_h_filename(): Support NT as well as Posix systems.
Fred Drake [Tue, 8 Feb 2000 15:55:42 +0000 (15:55 +0000)]
get_config_h_filename():  Support NT as well as Posix systems.

_init_nt():  Use get_config_h_filename() instead of figuring out the
             name directly.

             g['SO'] should be set to '.pyd'.

             Adjust some minor coding nits.

24 years agoRevised version (thank to Thomas Heller and Robin Becker) that tries a lot
Greg Ward [Tue, 8 Feb 2000 02:39:44 +0000 (02:39 +0000)]
Revised version (thank to Thomas Heller and Robin Becker) that tries a lot
harder to find the MSVC compiler (mainly by using the registry).

24 years agoDitch .def file kludge for (much smaller) /export option kludge.
Greg Ward [Tue, 8 Feb 2000 02:37:15 +0000 (02:37 +0000)]
Ditch .def file kludge for (much smaller) /export option kludge.

24 years agoProtect against core dumps in gdbm: don't allow access by key once the
Fred Drake [Mon, 7 Feb 2000 17:19:41 +0000 (17:19 +0000)]
Protect against core dumps in gdbm: don't allow access by key once the
database is closed.  Raise gdbm.error instead.

Bug report #198 submitted by Barry Haddow <bhaddow@orbism.com>.

24 years agoAdded test case for accessing gsbm database by key after it's closed;
Fred Drake [Mon, 7 Feb 2000 17:15:48 +0000 (17:15 +0000)]
Added test case for accessing gsbm database by key after it's closed;
it should raise gdbm.error.

24 years agoSame patch (also by Mark Hammond) for this straggler project file as
Guido van Rossum [Mon, 7 Feb 2000 15:29:43 +0000 (15:29 +0000)]
Same patch (also by Mark Hammond) for this straggler project file as
for the other projects, to move the x86 project names back to what
they were.

24 years agoAdded 'libraries' option for use by the 'build_lib' command.
Greg Ward [Sat, 5 Feb 2000 02:24:52 +0000 (02:24 +0000)]
Added 'libraries' option for use by the 'build_lib' command.
Typo fix.

24 years agoRun the 'build_lib' command before building extensions, if necessary.
Greg Ward [Sat, 5 Feb 2000 02:24:16 +0000 (02:24 +0000)]
Run the 'build_lib' command before building extensions, if necessary.

24 years agoNew command to build C (and C++, hopefully) libraries needed by extensions
Greg Ward [Sat, 5 Feb 2000 02:23:59 +0000 (02:23 +0000)]
New command to build C (and C++, hopefully) libraries needed by extensions
in the current distribution: motivated by PIL's libImaging.

24 years agoTweaked various comments, docstrings, and error messages.
Greg Ward [Sat, 5 Feb 2000 02:23:16 +0000 (02:23 +0000)]
Tweaked various comments, docstrings, and error messages.

24 years agoPatch from Paul Sokolovsky <Paul.Sokolovsky@technologist.com>:
Fred Drake [Fri, 4 Feb 2000 20:33:49 +0000 (20:33 +0000)]
Patch from Paul Sokolovsky <Paul.Sokolovsky@technologist.com>:

      Attached is patch (against 1.5.2 release) to allow some modules
to be buildable as pyd's (usual &PyType_Type stuff).

24 years agorapid evolution towards producing real .pyc files (even though I don't
Jeremy Hylton [Fri, 4 Feb 2000 19:37:35 +0000 (19:37 +0000)]
rapid evolution towards producing real .pyc files (even though I don't
handle most of the language syntax yet)

create NestedCodeGenerator used to generator the separate code object
that needs to be passed as an argument to MAKE_FUNCTION when a def
stmt is found (probably useful for class too)

change CodeGenerator.visitFunction to use the NestedCG

add CompiledModule class to handle creation of .pyc (pretty minimal
for now)

add makeCodeObject method to PythonVMCode that replaces symbolic names
with indexes into slots of the code code.  the design of this
class will probably need to be revised.

24 years agoAdded a simple test program to disassemble a file, invoked as __main__.
Guido van Rossum [Fri, 4 Feb 2000 17:47:55 +0000 (17:47 +0000)]
Added a simple test program to disassemble a file, invoked as __main__.

24 years agoActually, the previous batch's comment should have been different;
Guido van Rossum [Fri, 4 Feb 2000 15:39:30 +0000 (15:39 +0000)]
Actually, the previous batch's comment should have been different;
*this* set of patches is Ka-Ping's final sweep:

The attached patches update the standard library so that all modules
have docstrings beginning with one-line summaries.

A new docstring was added to formatter.  The docstring for os.py
was updated to mention nt, os2, ce in addition to posix, dos, mac.

24 years agoThe third and final doc-string sweep by Ka-Ping Yee.
Guido van Rossum [Fri, 4 Feb 2000 15:28:42 +0000 (15:28 +0000)]
The third and final doc-string sweep by Ka-Ping Yee.

The attached patches update the standard library so that all modules
have docstrings beginning with one-line summaries.

A new docstring was added to formatter.  The docstring for os.py
was updated to mention nt, os2, ce in addition to posix, dos, mac.

24 years agoMore trivial comment -> docstring transformations by Ka-Ping Yee,
Guido van Rossum [Fri, 4 Feb 2000 15:10:34 +0000 (15:10 +0000)]
More trivial comment -> docstring transformations by Ka-Ping Yee,
who writes:

Here is batch 2, as a big collection of CVS context diffs.
Along with moving comments into docstrings, i've added a
couple of missing docstrings and attempted to make sure more
module docstrings begin with a one-line summary.

I did not add docstrings to the methods in profile.py for
fear of upsetting any careful optimizations there, though
i did move class documentation into class docstrings.

The convention i'm using is to leave credits/version/copyright
type of stuff in # comments, and move the rest of the descriptive
stuff about module usage into module docstrings.  Hope this is
okay.

24 years agochecking in initial weekend's work
Jeremy Hylton [Fri, 4 Feb 2000 00:28:21 +0000 (00:28 +0000)]
checking in initial weekend's work

compile.py: ASTVisitor framework plus bits of a code generator that
    should be bug-for-buf compatible with compile.c

misc.py: Set and Stack helpers

test.py: a bit of simple sample code that compile.py will work on

24 years agomake p2c a package
Jeremy Hylton [Fri, 4 Feb 2000 00:25:34 +0000 (00:25 +0000)]
make p2c a package

24 years agothree files from the p2c cvs tree. the message here indicates the
Jeremy Hylton [Fri, 4 Feb 2000 00:25:23 +0000 (00:25 +0000)]
three files from the p2c cvs tree.  the message here indicates the
revision number the p2c cvs tree.

COPYRIGHT: 1.1
ast.py: 1.3
transformer.py: 1.11

24 years agoImproved an error message.
Greg Ward [Thu, 3 Feb 2000 23:07:54 +0000 (23:07 +0000)]
Improved an error message.
Announce when we start building each extension (better feedback).

24 years agoChanged 'compile()' method to compile files one-at-a-time -- gives better
Greg Ward [Thu, 3 Feb 2000 23:07:19 +0000 (23:07 +0000)]
Changed 'compile()' method to compile files one-at-a-time -- gives better
feedback and, theoretically, the opportunity to set compiler flags
on a per-file basis.

24 years agoMark Hammond renames the x86 projects back to what they were named
Guido van Rossum [Thu, 3 Feb 2000 17:19:35 +0000 (17:19 +0000)]
Mark Hammond renames the x86 projects back to what they were named
before the patch by Trent Mick.  Since he now also works for
ActiveState, I suppose he overrides Trent. :-)

24 years agoThe dircmp module is now obsolete.
Fred Drake [Thu, 3 Feb 2000 15:27:26 +0000 (15:27 +0000)]
The dircmp module is now obsolete.

24 years agoThese modules are now declared obsolete.
Fred Drake [Thu, 3 Feb 2000 15:26:16 +0000 (15:26 +0000)]
These modules are now declared obsolete.

24 years agoAccording to Harri Pasanen, the Solaris+gcc test for LINKFORSHARED
Guido van Rossum [Thu, 3 Feb 2000 13:50:24 +0000 (13:50 +0000)]
According to Harri Pasanen, the Solaris+gcc test for LINKFORSHARED
needed an adaptation for the latest gcc -- we need to grep stderr as
well as stdout for the magic string BFD.  (Does anybody know what BFD
means?)

24 years agoAccording to Harri Pasanen, the Solaris+gcc test for LINKFORSHARED
Guido van Rossum [Thu, 3 Feb 2000 13:42:50 +0000 (13:42 +0000)]
According to Harri Pasanen, the Solaris+gcc test for LINKFORSHARED
needed an adaptation for the latest gcc -- we need to grep stderr as
well as stdout for the magic string BFD.  (Does anybody know what BFD
means?)

24 years ago# module filecmp
Guido van Rossum [Thu, 3 Feb 2000 00:41:22 +0000 (00:41 +0000)]
# module filecmp
# combo of old cmp, cmpcache and dircmp with redundancies removed
#
# bugs fixed:
#   dircmp.dircmp was not ignoring IGNORES
#   old stuff could falsely report files as "identical" when contents actually differed
#
# enhancements:
#   dircmp has a more straightforward interface
#cmp enhanced by Moshe Zadca
#dircmp enhanced byGordon McMillan

[some layout changes by GvR]