]> granicus.if.org Git - python/log
python
24 years agoPEP 227 implementation
Jeremy Hylton [Thu, 25 Jan 2001 20:12:27 +0000 (20:12 +0000)]
PEP 227 implementation

test_new: new.code() noew takes two more arguments
test_grammer: Add a bunch of test cases for lambda (not really PEP 227 related)

24 years agoPEP 227 implementation
Jeremy Hylton [Thu, 25 Jan 2001 20:11:23 +0000 (20:11 +0000)]
PEP 227 implementation

New tests cases for nested scopes.

24 years agoIn subst_vars(), change the name of the argument from str to s to
Jeremy Hylton [Thu, 25 Jan 2001 20:10:32 +0000 (20:10 +0000)]
In subst_vars(), change the name of the argument from str to s to
prevent binding for str from masking use of builtin str in nested
function.

(This is the only case I found in the standard library where a local
shadows a global or builtin.  There may be others, but the regression
test doesn't catch them.)

24 years agoPEP 227 implementation
Jeremy Hylton [Thu, 25 Jan 2001 20:08:47 +0000 (20:08 +0000)]
PEP 227 implementation

Track changes to new opcodes.  Add hasfree list that applies to all
ops that use the closure.

24 years agoPEP 227 implementation
Jeremy Hylton [Thu, 25 Jan 2001 20:07:56 +0000 (20:07 +0000)]
PEP 227 implementation

Track changes to PyFrame_New() and PyFuntion_New().

24 years agoMake module objects from Setup depend on Python.h headers.
Neil Schemenauer [Thu, 25 Jan 2001 20:07:50 +0000 (20:07 +0000)]
Make module objects from Setup depend on Python.h headers.

24 years agoPEP 227 implementation
Jeremy Hylton [Thu, 25 Jan 2001 20:06:59 +0000 (20:06 +0000)]
PEP 227 implementation

The majority of the changes are in the compiler.  The mainloop changes
primarily to implement the new opcodes and to pass a function's
closure to eval_code2().  Frames and functions got new slots to hold
the closure.

Include/compile.h
    Add co_freevars and co_cellvars slots to code objects.
    Update PyCode_New() to take freevars and cellvars as arguments
Include/funcobject.h
    Add func_closure slot to function objects.
    Add GetClosure()/SetClosure() functions (and corresponding
    macros) for getting at the closure.
Include/frameobject.h
    PyFrame_New() now takes a closure.
Include/opcode.h
    Add four new opcodes: MAKE_CLOSURE, LOAD_CLOSURE, LOAD_DEREF,
    STORE_DEREF.
    Remove comment about old requirement for opcodes to fit in 7
    bits.
compile.c
    Implement changes to code objects for co_freevars and co_cellvars.

    Modify symbol table to use st_cur_name (string object for the name
    of the current scope) and st_cur_children (list of nested blocks).
    Also define st_nested, which might more properly be called
    st_cur_nested.  Add several DEF_XXX flags to track def-use
    information for free variables.

    New or modified functions of note:
    com_make_closure(struct compiling *, PyCodeObject *)
        Emit LOAD_CLOSURE opcodes as needed to pass cells for free
        variables into nested scope.
    com_addop_varname(struct compiling *, int, char *)
        Emits opcodes for LOAD_DEREF and STORE_DEREF.
    get_ref_type(struct compiling *, char *name)
        Return NAME_CLOSURE if ref type is FREE or CELL
    symtable_load_symbols(struct compiling *)
        Decides what variables are cell or free based on def-use info.
        Can now raise SyntaxError if nested scopes are mixed with
        exec or from blah import *.
    make_scope_info(PyObject *, PyObject *, int, int)
        Helper functions for symtable scope stack.
    symtable_update_free_vars(struct symtable *)
        After a code block has been analyzed, it must check each of
        its children for free variables that are not defined in the
        block.  If a variable is free in a child and not defined in
        the parent, then it is defined by block the enclosing the
        current one or it is a global.  This does the right logic.
    symtable_add_use() is now a macro for symtable_add_def()
    symtable_assign(struct symtable *, node *)
        Use goto instead of for (;;)

    Fixed bug in symtable where name of keyword argument in function
    call was treated as assignment in the scope of the call site. Ex:
        def f():
            g(a=2) # a was considered a local of f

ceval.c
    eval_code2() now take one more argument, a closure.
    Implement LOAD_CLOSURE, LOAD_DEREF, STORE_DEREF, MAKE_CLOSURE>

    Also: When name error occurs for global variable, report that the
    name was global in the error mesage.

Objects/frameobject.c
    Initialize f_closure to be a tuple containing space for cellvars
    and freevars.  f_closure is NULL if neither are present.
Objects/funcobject.c
    Add support for func_closure.
Python/import.c
    Change the magic number.
Python/marshal.c
    Track changes to code objects.

24 years agoPEP 227 implementation
Jeremy Hylton [Thu, 25 Jan 2001 20:04:14 +0000 (20:04 +0000)]
PEP 227 implementation

A cell contains a reference to a single PyObject.  It could be
implemented as a mutable, one-element sequence, but the separate type
has less overhead.

24 years agoucnhash module has gone, xreadlines module added.
Jack Jansen [Thu, 25 Jan 2001 18:31:16 +0000 (18:31 +0000)]
ucnhash module has gone, xreadlines module added.

24 years agoAdd bzip2 archives back to the set of generated archives; we had way too
Fred Drake [Thu, 25 Jan 2001 17:32:51 +0000 (17:32 +0000)]
Add bzip2 archives back to the set of generated archives; we had way too
many reasonable requests to keep them around.

Bump version number.

24 years agoRemoved references to Python 1.5.3; that was a "tentative" number I used
Fred Drake [Thu, 25 Jan 2001 17:29:18 +0000 (17:29 +0000)]
Removed references to Python 1.5.3; that was a "tentative" number I used
in the docs to indicate the next version before we decided on 1.6.

Adjusted winsound.Beep() description slightly as well.

24 years agoUpdate link to LaTeX2HTML web site.
Fred Drake [Thu, 25 Jan 2001 17:25:28 +0000 (17:25 +0000)]
Update link to LaTeX2HTML web site.

24 years agoadd extra tests to verify that co_varnames is being set up properly
Jeremy Hylton [Thu, 25 Jan 2001 17:03:37 +0000 (17:03 +0000)]
add extra tests to verify that co_varnames is being set up properly

also normalize checks for syntax errors and delete commented out
definition of verify.

24 years agoFix bug reported by Ka-Ping Yee: The compiler botched parsing function
Jeremy Hylton [Thu, 25 Jan 2001 17:01:49 +0000 (17:01 +0000)]
Fix bug reported by Ka-Ping Yee: The compiler botched parsing function
parameters that contained both anonymous tuples and *arg or **arg. Ex:
def f(a, (b, c), *d): pass

Fix the symtable_params() to generate names in the right order for
co_varnames slot of code object.  Consider *arg and **arg before the
"complex" names introduced by anonymous tuples.

24 years agoucnhash module has gone.
Jack Jansen [Thu, 25 Jan 2001 16:28:34 +0000 (16:28 +0000)]
ucnhash module has gone.

24 years agoucnhash module has gone, xreadlines module added.
Jack Jansen [Thu, 25 Jan 2001 16:28:00 +0000 (16:28 +0000)]
ucnhash module has gone, xreadlines module added.

24 years agoadded a few more __all__ lists
Skip Montanaro [Thu, 25 Jan 2001 15:29:22 +0000 (15:29 +0000)]
added a few more __all__ lists
test___all__.py: fail silently in check_all if the module can't be imported

24 years agofail more completely by deleting dbhash from sys.modules if bsddb can't be
Skip Montanaro [Thu, 25 Jan 2001 13:47:00 +0000 (13:47 +0000)]
fail more completely by deleting dbhash from sys.modules if bsddb can't be
loaded - prevents second import later from succeeding spuriously - mostly of
use in regression tests where the module might get imported more than once

24 years agoLet's keep things portable to non GCC compilers, please.
Sjoerd Mullender [Thu, 25 Jan 2001 10:10:39 +0000 (10:10 +0000)]
Let's keep things portable to non GCC compilers, please.
You can only use mult-line strings in C if each line ends in \.

24 years agoClarify winsound.beep docs, in response to c.l.py beep brouhahalet.
Tim Peters [Thu, 25 Jan 2001 09:33:48 +0000 (09:33 +0000)]
Clarify winsound.beep docs, in response to c.l.py beep brouhahalet.

24 years agoFix bugs introduced by rewrite (in particular, time-based initialization
Tim Peters [Thu, 25 Jan 2001 06:23:18 +0000 (06:23 +0000)]
Fix bugs introduced by rewrite (in particular, time-based initialization
got broken).  Also added new method .jumpahead(N).  This finally gives us
a semi-decent answer to how Python's RNGs can be used safely and efficiently
in multithreaded programs (although it requires the user to use the new
machinery!).

24 years agoReworked random.py so that it no longer depends on, and offers all the
Tim Peters [Thu, 25 Jan 2001 03:36:26 +0000 (03:36 +0000)]
Reworked random.py so that it no longer depends on, and offers all the
functionality of, whrandom.py.  Also closes all the "XXX" todos in
random.py.  New frequently-requested functions/methods getstate() and
setstate().  All exported functions are now bound methods of a hidden
instance.  Killed all unintended exports.  Updated the docs.
FRED:  The more I fiddle the docs, the less I understand the exact
intended use of the \var, \code, \method tags.  Please review critically.
GUIDO:  See email.  I updated NEWS as if whrandom were deprecated; I
think it should be.

24 years agoA \begin{funcdesc} was closed with an \end{methoddesc}.
Barry Warsaw [Thu, 25 Jan 2001 00:39:16 +0000 (00:39 +0000)]
A \begin{funcdesc} was closed with an \end{methoddesc}.

24 years agoFixed a bug where \& was needed.
Barry Warsaw [Thu, 25 Jan 2001 00:38:15 +0000 (00:38 +0000)]
Fixed a bug where \& was needed.

24 years agoProvide a much better (and complete!) description of the lockf()
Barry Warsaw [Thu, 25 Jan 2001 00:36:54 +0000 (00:36 +0000)]
Provide a much better (and complete!) description of the lockf()
function, based on an eyeballing of the code.

24 years agolockf_doc: a much better description of the lockf() function, based on
Barry Warsaw [Thu, 25 Jan 2001 00:20:13 +0000 (00:20 +0000)]
lockf_doc: a much better description of the lockf() function, based on
an eyeballing of the code.

24 years agoSupply long-missing docs for random.seed(). Extensive rewrite of module
Tim Peters [Wed, 24 Jan 2001 23:06:53 +0000 (23:06 +0000)]
Supply long-missing docs for random.seed().  Extensive rewrite of module
intro docs.
*************** Fred:  check my LaTeX!  Also, the docs for whrandom should
*************** be moved into Obsolete Modules.

24 years agoCheck the Py_TPFLAGS_HAVE_RICHCOMPARE flag before using the
Guido van Rossum [Wed, 24 Jan 2001 22:14:43 +0000 (22:14 +0000)]
Check the Py_TPFLAGS_HAVE_RICHCOMPARE flag before using the
tp_richcompare field!  (Hopefully this will make Python 2.1 binary
compatible with certain Zope extensions. :-)

24 years agoAdd a flag to indicate the presence of the tp_richcompare field, and
Guido van Rossum [Wed, 24 Jan 2001 22:13:48 +0000 (22:13 +0000)]
Add a flag to indicate the presence of the tp_richcompare field, and
add it to the default flags.

24 years agoFix the test output, now that escapes in repr() of string and Unicode
Guido van Rossum [Wed, 24 Jan 2001 21:49:57 +0000 (21:49 +0000)]
Fix the test output, now that escapes in repr() of string and Unicode
are different (Ping didn't test this).

24 years agoFix the test output, now that escapes in repr() of string and Unicode
Guido van Rossum [Wed, 24 Jan 2001 21:46:18 +0000 (21:46 +0000)]
Fix the test output, now that escapes in repr() of string and Unicode
are different (Ping couldn't test this).

24 years agoThe array type was missing the Py_TPFLAGS_DEFAULT initializer for the
Guido van Rossum [Wed, 24 Jan 2001 21:44:21 +0000 (21:44 +0000)]
The array type was missing the Py_TPFLAGS_DEFAULT initializer for the
tp_flags.  This will become important when I introduce
Py_TPFLAGS_HAVE_RICHCOMPARE (as I should have!).

24 years agoNew asynchat.py from Sam Rushing: this foregoes using the regex module
Andrew M. Kuchling [Wed, 24 Jan 2001 21:10:55 +0000 (21:10 +0000)]
New asynchat.py from Sam Rushing:  this foregoes using the regex module
   to find the prefix of strings, thus removing a warning, and simply
   uses straightforward string slicing.

24 years agoFix an obvious usage nit I should have caught myself on the previous
Fred Drake [Wed, 24 Jan 2001 18:19:40 +0000 (18:19 +0000)]
Fix an obvious usage nit I should have caught myself on the previous
change to this file.  Thanks, /F!

24 years agoUpdate the build instructions for flat makefile.
Neil Schemenauer [Wed, 24 Jan 2001 17:49:59 +0000 (17:49 +0000)]
Update the build instructions for flat makefile.

24 years agoThe usual.
Neil Schemenauer [Wed, 24 Jan 2001 17:25:28 +0000 (17:25 +0000)]
The usual.

24 years ago- build now happens in toplevel directory, add subdir paths to filenames
Neil Schemenauer [Wed, 24 Jan 2001 17:24:33 +0000 (17:24 +0000)]
- build now happens in toplevel directory, add subdir paths to filenames
- change EXE to EXTEXT, there is an autoconf macro for it
- use PROG_INSTALL macro rather than always using install-sh
- add option to disable signal module (simplifies the makefile)
- create subdirs for object files (when building out of src dir)
- don't generate subdir makefiles
- generate "boot" makefile

24 years agoShow '\011', '\012', and '\015' as '\t', '\n', '\r' in strings.
Ka-Ping Yee [Wed, 24 Jan 2001 17:19:08 +0000 (17:19 +0000)]
Show '\011', '\012', and '\015' as '\t', '\n', '\r' in strings.
Switch from octal escapes to hex escapes for other nonprintable characters.

24 years agoPatch from Andrew to properly set module source directory.
Neil Schemenauer [Wed, 24 Jan 2001 17:18:21 +0000 (17:18 +0000)]
Patch from Andrew to properly set module source directory.

24 years agoThere is no more Modules/Makefile, use toplevel Makefile.
Neil Schemenauer [Wed, 24 Jan 2001 17:17:20 +0000 (17:17 +0000)]
There is no more Modules/Makefile, use toplevel Makefile.

24 years agoChanges for flat makefile. Building of modules happens from toplevel
Neil Schemenauer [Wed, 24 Jan 2001 17:16:22 +0000 (17:16 +0000)]
Changes for flat makefile.  Building of modules happens from toplevel
directory.  Modify meaning of -s option to specify the Modules directory.
Add -l option to specify library source directory when building extension
modules.  Perhaps these names should be switched to avoid breaking old
code.  Add -c compiler option to when emitting rules to build object files.

24 years agoBuild now happens in toplevel directory, not Modules. Don't monkey with
Neil Schemenauer [Wed, 24 Jan 2001 17:13:11 +0000 (17:13 +0000)]
Build now happens in toplevel directory, not Modules.  Don't monkey with
VPATH.

24 years agoFlat makefile based on toplevel Makefile.in and makefiles in build
Neil Schemenauer [Wed, 24 Jan 2001 17:11:43 +0000 (17:11 +0000)]
Flat makefile based on toplevel Makefile.in and makefiles in build
subdirectories.  Those other makefiles will go away eventually.

24 years agoRemove evil "sec:" prefix from some \label markups; this is bad for
Fred Drake [Wed, 24 Jan 2001 16:39:35 +0000 (16:39 +0000)]
Remove evil "sec:" prefix from some \label markups; this is bad for
filenames on Windows (& Mac?) platforms.

24 years agoAttributeList --> NamedNodeMap
Fred Drake [Wed, 24 Jan 2001 16:17:15 +0000 (16:17 +0000)]
AttributeList --> NamedNodeMap
Since there is no such thing as an AttributeList, don't say "attributes"
is one.

24 years agoGot rid of extraneous Modues:TE in the search path.
Jack Jansen [Wed, 24 Jan 2001 16:09:59 +0000 (16:09 +0000)]
Got rid of extraneous Modues:TE in the search path.

24 years agoWaste and scrap now sort-of work for Carbon. Scrap is mostly empty, and waste uses...
Jack Jansen [Wed, 24 Jan 2001 16:07:31 +0000 (16:07 +0000)]
Waste and scrap now sort-of work for Carbon. Scrap is mostly empty, and waste uses a mixture between Waste 2.0 and Waste 1.3.

24 years agoRecognize {compiler} and {project} prefixes to pathnames and output the correct XML.
Jack Jansen [Wed, 24 Jan 2001 16:04:50 +0000 (16:04 +0000)]
Recognize {compiler} and {project} prefixes to pathnames and output the correct XML.

24 years agoRegenerated (and manually massaged for PutScrap) so it can be byuilt both for Carbon...
Jack Jansen [Wed, 24 Jan 2001 16:04:01 +0000 (16:04 +0000)]
Regenerated (and manually massaged for PutScrap) so it can be byuilt both for Carbon and Classic. The Carbon module is rather empty, though, for now.

24 years agoQuick (manual) fix to make the module compile with Waste 2.0. TBD later.
Jack Jansen [Wed, 24 Jan 2001 16:03:05 +0000 (16:03 +0000)]
Quick (manual) fix to make the module compile with Waste 2.0. TBD later.

24 years agoWaste and scrap now sort-of work for Carbon. Scrap is mostly empty, and waste uses...
Jack Jansen [Wed, 24 Jan 2001 16:02:07 +0000 (16:02 +0000)]
Waste and scrap now sort-of work for Carbon. Scrap is mostly empty, and waste uses a mixture between Waste 2.0 and Waste 1.3.

24 years agoUpdated version of asyncore.py from Sam Rushing:
Andrew M. Kuchling [Wed, 24 Jan 2001 15:50:19 +0000 (15:50 +0000)]
Updated version of asyncore.py from Sam Rushing:
    Adds support for using select.poll() if it's available

    Move a 'map is None' test out of an else branch and into the right place

24 years agoPart of patch #102409: special cases for Cygwin:
Andrew M. Kuchling [Wed, 24 Jan 2001 15:43:09 +0000 (15:43 +0000)]
Part of patch #102409: special cases for Cygwin:
    Lib/distutils/command/build_ext.py(build_ext.finalize_options): Add
    Cygwin specific code to append Python's library directory to the
    extension's list of library directories.

    (build_ext.get_libraries): Add Cygwin specific code to append Python's
    (import) library to the extension's list of libraries.

24 years agoBlacklisted (for the time being) the functions that have a component argument. Don...
Jack Jansen [Wed, 24 Jan 2001 14:22:13 +0000 (14:22 +0000)]
Blacklisted (for the time being) the functions that have a component argument. Don't want to drag the Cm module into the core set too.

24 years agoBuild directives for PythonStandalone were missing.
Jack Jansen [Wed, 24 Jan 2001 14:06:35 +0000 (14:06 +0000)]
Build directives for PythonStandalone were missing.

24 years agoAdded the GrafPort attributes that are unavailable under Carbon.
Jack Jansen [Wed, 24 Jan 2001 14:06:04 +0000 (14:06 +0000)]
Added the GrafPort attributes that are unavailable under Carbon.

24 years agoImplemented direct attribute access for Carbon builds and accessor functions for...
Jack Jansen [Wed, 24 Jan 2001 14:05:11 +0000 (14:05 +0000)]
Implemented direct attribute access for Carbon builds and accessor functions for non-carbon builds.

24 years agotest___all__ was failing on WIndows because locale.py doesn't really
Tim Peters [Wed, 24 Jan 2001 10:13:46 +0000 (10:13 +0000)]
test___all__ was failing on WIndows because locale.py doesn't really
know which names it exports.  Didn't fix its ignorance, but patched
over the consequence.

24 years agoWindows: ucnhash subproject no longer exists (/F merged into unicodedata).
Tim Peters [Wed, 24 Jan 2001 10:07:22 +0000 (10:07 +0000)]
Windows:  ucnhash subproject no longer exists (/F merged into unicodedata).

24 years agoucnhash is no longer used
Fredrik Lundh [Wed, 24 Jan 2001 08:20:40 +0000 (08:20 +0000)]
ucnhash is no longer used

24 years agonew unicodedata functions (name, lookup)
Fredrik Lundh [Wed, 24 Jan 2001 08:10:07 +0000 (08:10 +0000)]
new unicodedata functions (name, lookup)

24 years agoucnhash is no longer used
Fredrik Lundh [Wed, 24 Jan 2001 08:02:00 +0000 (08:02 +0000)]
ucnhash is no longer used

24 years agothe ucnhash module is no longer used
Fredrik Lundh [Wed, 24 Jan 2001 08:00:28 +0000 (08:00 +0000)]
the ucnhash module is no longer used

24 years agoMove uchhash functionality into unicodedata (after the recent
Fredrik Lundh [Wed, 24 Jan 2001 07:59:11 +0000 (07:59 +0000)]
Move uchhash functionality into unicodedata (after the recent
crop of changes, the files are small enough to do this).  Also
adds "name" and "lookup" functions to unicodedata.

24 years agodocumented (new) optional doseq parameter to urlencode.
Skip Montanaro [Wed, 24 Jan 2001 06:36:06 +0000 (06:36 +0000)]
documented (new) optional doseq parameter to urlencode.

24 years agoa few more modules get __all__
Skip Montanaro [Wed, 24 Jan 2001 06:27:27 +0000 (06:27 +0000)]
a few more modules get __all__

24 years agoPyObject_Dump() -> _PyObject_Dump()
Barry Warsaw [Wed, 24 Jan 2001 04:18:13 +0000 (04:18 +0000)]
PyObject_Dump() -> _PyObject_Dump()

PyGC_Dump() -> _PyGC_Dump()

24 years agoPyGC_Dump() -> _PyGC_Dump()
Barry Warsaw [Wed, 24 Jan 2001 04:17:26 +0000 (04:17 +0000)]
PyGC_Dump() -> _PyGC_Dump()

24 years agoPyObject_Dump() -> _PyObject_Dump()
Barry Warsaw [Wed, 24 Jan 2001 04:16:59 +0000 (04:16 +0000)]
PyObject_Dump() -> _PyObject_Dump()

24 years ago__all__: removed "error", "abort", "readonly", as these are not
Barry Warsaw [Wed, 24 Jan 2001 04:16:09 +0000 (04:16 +0000)]
__all__: removed "error", "abort", "readonly", as these are not
exportable module attributes (they're attributes on the IMAP class).
Fixed the case typo on Time2Internaldate.

Does anybody run the test suite any more? <wink>

24 years agoIt's "gopherlib" not "gopher".
Barry Warsaw [Wed, 24 Jan 2001 04:13:02 +0000 (04:13 +0000)]
It's "gopherlib" not "gopher".

24 years agoModified version of part of patch #102409 for Cygwin:
Andrew M. Kuchling [Wed, 24 Jan 2001 03:31:07 +0000 (03:31 +0000)]
Modified version of part of patch #102409 for Cygwin:
   Get platform-specific modules right on Cygwin
   Getting a string value for the platform has been factored out into
   get_platform()

24 years agoAdd names of people who've pointed out broken links and images
Andrew M. Kuchling [Wed, 24 Jan 2001 01:11:26 +0000 (01:11 +0000)]
Add names of people who've pointed out broken links and images
Bump version number

24 years agoFredrik pointed out that the database shrank more than 55K
Andrew M. Kuchling [Wed, 24 Jan 2001 00:52:56 +0000 (00:52 +0000)]
Fredrik pointed out that the database shrank more than 55K

24 years agoAlso build the Carbon extension modules.
Jack Jansen [Tue, 23 Jan 2001 23:19:41 +0000 (23:19 +0000)]
Also build the Carbon extension modules.

24 years agoRemoved extraneous references to Modules:TE
Jack Jansen [Tue, 23 Jan 2001 23:19:13 +0000 (23:19 +0000)]
Removed extraneous references to Modules:TE

24 years agoThe C-prefix file for Carbon plugin projects.
Jack Jansen [Tue, 23 Jan 2001 22:46:21 +0000 (22:46 +0000)]
The C-prefix file for Carbon plugin projects.

24 years agoAh well, why not check this in. A script to remove all .pyc files in a folder hierarchy.
Jack Jansen [Tue, 23 Jan 2001 22:45:52 +0000 (22:45 +0000)]
Ah well, why not check this in. A script to remove all .pyc files in a folder hierarchy.

24 years agoProjects for Carbon plugin modules.
Jack Jansen [Tue, 23 Jan 2001 22:42:45 +0000 (22:42 +0000)]
Projects for Carbon plugin modules.

24 years agoUse &# escape for non-ascii chars.
Jack Jansen [Tue, 23 Jan 2001 22:40:32 +0000 (22:40 +0000)]
Use &# escape for non-ascii chars.

24 years agoAdded an attribute runtimemodel, which is either "ppc" or "carbon" and is the runtime...
Jack Jansen [Tue, 23 Jan 2001 22:38:23 +0000 (22:38 +0000)]
Added an attribute runtimemodel, which is either "ppc" or "carbon" and is the runtime model of the current interpreter. Will have to ad another value later for real MacOSX MachO, I guess.

24 years agoAdded the actual builds of the carbon projects.
Jack Jansen [Tue, 23 Jan 2001 22:36:52 +0000 (22:36 +0000)]
Added the actual builds of the carbon projects.

24 years agoGenerate Carbon as well as classic PPC plugin projects. This module is finally paying...
Jack Jansen [Tue, 23 Jan 2001 22:36:26 +0000 (22:36 +0000)]
Generate Carbon as well as classic PPC plugin projects. This module is finally paying back the investment in it!

24 years agoVarious settings were unconditionally set. Allow them to be overridden in the setting...
Jack Jansen [Tue, 23 Jan 2001 22:35:22 +0000 (22:35 +0000)]
Various settings were unconditionally set. Allow them to be overridden in the settings dict.

24 years agoIf the template is not specified it depends on the current execution model (classic...
Jack Jansen [Tue, 23 Jan 2001 22:34:50 +0000 (22:34 +0000)]
If the template is not specified it depends on the current execution model (classic ppc or carbon).

24 years agoAdded a template for Carbon plugin projects.
Jack Jansen [Tue, 23 Jan 2001 22:33:31 +0000 (22:33 +0000)]
Added a template for Carbon plugin projects.

24 years agoMoved files from template to template-ppc, as this is the template for classic PPC...
Jack Jansen [Tue, 23 Jan 2001 22:33:01 +0000 (22:33 +0000)]
Moved files from template to template-ppc, as this is the template for classic PPC projects.

24 years agoFix for MacOS X/Darwin: it doesn't need -lm, ever. (Noted by Steven Majewski)
Andrew M. Kuchling [Tue, 23 Jan 2001 22:21:11 +0000 (22:21 +0000)]
Fix for MacOS X/Darwin: it doesn't need -lm, ever.  (Noted by Steven Majewski)

24 years ago_PyImport_Inittab: define the exceptions module's init function.
Barry Warsaw [Tue, 23 Jan 2001 21:46:57 +0000 (21:46 +0000)]
_PyImport_Inittab: define the exceptions module's init function.
Fixes bug #121706.

24 years agoAdded a note about the memory size.
Jack Jansen [Tue, 23 Jan 2001 21:03:52 +0000 (21:03 +0000)]
Added a note about the memory size.
Added Matthias Neeracher and Alexandre Parenteau to the "thank you" list. This should have been done _ages_ ago for Matthias! Shame shame!!

24 years agoUpped the default memory size to a whopping 24Mb, which is needed to make the autotes...
Jack Jansen [Tue, 23 Jan 2001 20:57:52 +0000 (20:57 +0000)]
Upped the default memory size to a whopping 24Mb, which is needed to make the autotests run. Sigh. User with low-memory systems will have to adapt the setting.

24 years agoUse &# escape for non-ascii chars.
Jack Jansen [Tue, 23 Jan 2001 20:56:25 +0000 (20:56 +0000)]
Use &# escape for non-ascii chars.

24 years agoSlight reworking to make it more useful for debugging
Barry Warsaw [Tue, 23 Jan 2001 16:42:01 +0000 (16:42 +0000)]
Slight reworking to make it more useful for debugging
Py_Initialize()/Py_Finalize() loop leaks.

- allow an optional 3rd argument which is the loop count.  -1 means
  infloop (the default).

- Add a setting of Py_NoSiteFlag=1, but leave it commented out by
  default.

24 years agoUpdates and changes:
Barry Warsaw [Tue, 23 Jan 2001 16:38:57 +0000 (16:38 +0000)]
Updates and changes:

- set VERSION to 2.1

- change blddir to ../.. since that seems more common than the old
  value (at least for my debugging session).

24 years agoAdd prototype for PyGC_Dump() -- but only inside the #ifdef
Barry Warsaw [Tue, 23 Jan 2001 16:37:22 +0000 (16:37 +0000)]
Add prototype for PyGC_Dump() -- but only inside the #ifdef
WITH_CYCLE_GC.

24 years agoAdd prototype for PyObject_Dump().
Barry Warsaw [Tue, 23 Jan 2001 16:33:56 +0000 (16:33 +0000)]
Add prototype for PyObject_Dump().

24 years agoPyObject_Dump(): Use %p format to print the address of the pointer.
Barry Warsaw [Tue, 23 Jan 2001 16:33:18 +0000 (16:33 +0000)]
PyObject_Dump(): Use %p format to print the address of the pointer.

PyGC_Dump(): Wrap this in a #ifdef WITH_CYCLE_GC.

24 years agoA few useful definitions if you're using gdb. Copy to ~/.gdbinit to
Barry Warsaw [Tue, 23 Jan 2001 16:25:19 +0000 (16:25 +0000)]
A few useful definitions if you're using gdb.  Copy to ~/.gdbinit to
pull it in automatically.

24 years agoA few miscellaneous helpers.
Barry Warsaw [Tue, 23 Jan 2001 16:24:35 +0000 (16:24 +0000)]
A few miscellaneous helpers.

PyObject_Dump(): New function that is useful when debugging Python's C
runtime.  In something like gdb it can be a pain to get some useful
information out of PyObject*'s.  This function prints the str() of the
object to stderr, along with the object's refcount and hex address.

PyGC_Dump(): Similar to PyObject_Dump() but knows how to cast from the
garbage collector prefix back to the PyObject* structure.

[See Misc/gdbinit for some useful gdb hooks]

none_dealloc(): Rather than SEGV if we accidentally decref None out of
existance, we assign None's and NotImplemented's destructor slot to
this function, which just calls abort().

24 years agoLeak pluggin', bug fixin' and better documentin'. Specifically,
Barry Warsaw [Tue, 23 Jan 2001 16:08:34 +0000 (16:08 +0000)]
Leak pluggin', bug fixin' and better documentin'.  Specifically,

module__doc__: Document the Warning subclass heirarchy.

make_class(): Added a "goto finally" so that if populate_methods()
fails, the return status will be -1 (failure) instead of 0 (success).

fini_exceptions(): When decref'ing the static pointers to the
exception classes, clear out their dictionaries too.  This breaks a
cycle from class->dict->method->class and allows the classes with
unbound methods to be reclaimed.  This plugs a large memory leak in a
common Py_Initialize()/dosomething/Py_Finalize() loop.