]> granicus.if.org Git - python/log
python
24 years agoChanged doctest to run tests in alphabetic order of name.
Tim Peters [Wed, 21 Mar 2001 23:07:59 +0000 (23:07 +0000)]
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).

24 years agoIntegrated an expanded version of some text from Neil Schemenauer about
Fred Drake [Wed, 21 Mar 2001 22:15:01 +0000 (22:15 +0000)]
Integrated an expanded version of some text from Neil Schemenauer about
supporting cyclic garbage collection.  (This is not all of it, but I'm
taking a break!)

Also fixed some markup nits.

24 years agoTest that traceback module works with SyntaxErrors with or without carets.
Jeremy Hylton [Wed, 21 Mar 2001 20:33:04 +0000 (20:33 +0000)]
Test that traceback module works with SyntaxErrors with or without carets.

24 years agoDo not print caret when offset is None.
Jeremy Hylton [Wed, 21 Mar 2001 20:29:18 +0000 (20:29 +0000)]
Do not print caret when offset is None.

24 years agoMake PyDict_Next safe to use for loops that merely modify the values
Tim Peters [Wed, 21 Mar 2001 19:23:56 +0000 (19:23 +0000)]
Make PyDict_Next safe to use for loops that merely modify the values
associated with existing dict keys.
This is a variant of part of Michael Hudson's patch #409864 "lazy fix for
Pings bizarre scoping crash".

24 years agoUse PyObject_IsInstance() to check whether the first argument to an
Guido van Rossum [Wed, 21 Mar 2001 19:17:22 +0000 (19:17 +0000)]
Use PyObject_IsInstance() to check whether the first argument to an
unbound method is of the right type.  Hopefully this solves SF patch
#409355 (Meta-class inheritance problem); I have no easy way to test.

24 years agoReformat and edit docstrings to follow modern conventions. Single
Jeremy Hylton [Wed, 21 Mar 2001 19:09:31 +0000 (19:09 +0000)]
Reformat and edit docstrings to follow modern conventions.  Single
line summary followed by blank line and description.

24 years agoUpdate PyNode_CompileSymtable() to understand future statements
Jeremy Hylton [Wed, 21 Mar 2001 19:01:33 +0000 (19:01 +0000)]
Update PyNode_CompileSymtable() to understand future statements

24 years agoMove the code implementing isinstance() and issubclass() to new C
Guido van Rossum [Wed, 21 Mar 2001 18:40:58 +0000 (18:40 +0000)]
Move the code implementing isinstance() and issubclass() to new C
APIs, PyObject_IsInstance() and PyObject_IsSubclass() -- both
returning an int, or -1 for errors.

24 years agoAdd test cases for the fnmatch module.
Fred Drake [Wed, 21 Mar 2001 18:29:25 +0000 (18:29 +0000)]
Add test cases for the fnmatch module.

24 years agoJust import sys at the top instead of inside lots of functions.
Fred Drake [Wed, 21 Mar 2001 18:26:33 +0000 (18:26 +0000)]
Just import sys at the top instead of inside lots of functions.

Add some helpers for supporting PyUNIT-based unit testing.

24 years agoThe unittest module from PyUNIT, by Steve Purcell.
Fred Drake [Wed, 21 Mar 2001 18:09:46 +0000 (18:09 +0000)]
The unittest module from PyUNIT, by Steve Purcell.

24 years agoDonovan Baarda <abo@users.sourceforge.net>:
Fred Drake [Wed, 21 Mar 2001 18:05:48 +0000 (18:05 +0000)]
Donovan Baarda <abo@users.sourceforge.net>:
Patch to make "\" in a character group work properly.

This closes SF bug #409651.

24 years agoFixed a bunch of Tabnanny errors
Moshe Zadka [Wed, 21 Mar 2001 17:24:49 +0000 (17:24 +0000)]
Fixed a bunch of Tabnanny errors

24 years agoAdd tests for recent changes:
Jeremy Hylton [Wed, 21 Mar 2001 16:44:39 +0000 (16:44 +0000)]
Add tests for recent changes:
- global stmt in class does not affect free vars in methods
- locals() works with free and cell vars

24 years agoFix PyFrame_FastToLocals() and counterpart to deal with cells and
Jeremy Hylton [Wed, 21 Mar 2001 16:43:47 +0000 (16:43 +0000)]
Fix PyFrame_FastToLocals() and counterpart to deal with cells and
frees.  Note there doesn't seem to be any way to test LocalsToFast(),
because the instructions that trigger it are illegal in nested scopes
with free variables.

Fix allocation strategy for cells that are also formal parameters.
Instead of emitting LOAD_FAST / STORE_DEREF pairs for each parameter,
have the argument handling code in eval_code2() do the right thing.

A side-effect of this change is that cell variables that are also
arguments are listed at the front of co_cellvars in the order they
appear in the argument list.

24 years agoUse proper compiler flags on UnixWare.
Martin v. Löwis [Wed, 21 Mar 2001 15:57:54 +0000 (15:57 +0000)]
Use proper compiler flags on UnixWare.
Closes bug #231439.

24 years agoAdd newline to end of file.
Guido van Rossum [Wed, 21 Mar 2001 14:18:12 +0000 (14:18 +0000)]
Add newline to end of file.

24 years agoDocument tix directory.
Martin v. Löwis [Wed, 21 Mar 2001 11:47:55 +0000 (11:47 +0000)]
Document tix directory.

24 years agoAdd section on 2.1b2.
Martin v. Löwis [Wed, 21 Mar 2001 08:01:39 +0000 (08:01 +0000)]
Add section on 2.1b2.
Report the addition of the Tix module.

24 years agoRemove Tix detection from Tkinter part; lib-tk/Tix attempts to load Tix
Martin v. Löwis [Wed, 21 Mar 2001 07:44:53 +0000 (07:44 +0000)]
Remove Tix detection from Tkinter part; lib-tk/Tix attempts to load Tix
by requiring it. Also remove commentary from Setup.dist about commenting
in and out stuff.

24 years agoPatch #410231: Add the Python Tix library.
Martin v. Löwis [Wed, 21 Mar 2001 07:42:07 +0000 (07:42 +0000)]
Patch #410231: Add the Python Tix library.

24 years agoPatch #409504: Fix regex problems, consider \-continuation lines in Makefile
Martin v. Löwis [Wed, 21 Mar 2001 06:58:25 +0000 (06:58 +0000)]
Patch #409504: Fix regex problems, consider \-continuation lines in Makefile
and Setup.

24 years agoUpdate Windows installer for 2.1b2.
Tim Peters [Wed, 21 Mar 2001 06:09:14 +0000 (06:09 +0000)]
Update Windows installer for 2.1b2.

24 years agoAddrf simple test that import is case-sensitive.
Tim Peters [Wed, 21 Mar 2001 03:58:16 +0000 (03:58 +0000)]
Addrf simple test that import is case-sensitive.

24 years agoStarted on 2.1b2 release notes. Cleaned out alfa notes, etc.
Jack Jansen [Tue, 20 Mar 2001 23:30:38 +0000 (23:30 +0000)]
Started on 2.1b2 release notes. Cleaned out alfa notes, etc.

24 years agoAdded dummy _tkinter module for Carbon, which explains that Tkinter isnt supported...
Jack Jansen [Tue, 20 Mar 2001 23:30:06 +0000 (23:30 +0000)]
Added dummy _tkinter module for Carbon, which explains that Tkinter isnt supported under Carbon.

24 years agoDummy _tkinter module for Carbon, which explains that Tkinter isnt supported under...
Jack Jansen [Tue, 20 Mar 2001 23:29:41 +0000 (23:29 +0000)]
Dummy _tkinter module for Carbon, which explains that Tkinter isnt supported under Carbon.

24 years agoMoved the description of the tzparse module to the "Obsolete" section
Fred Drake [Tue, 20 Mar 2001 23:13:53 +0000 (23:13 +0000)]
Moved the description of the tzparse module to the "Obsolete" section
and note that it fails when the TZ environment variable is not set.

This closes SF bug #409683.

24 years agoCase-checking was broken on the Macintosh. Fixed.
Jack Jansen [Tue, 20 Mar 2001 23:09:54 +0000 (23:09 +0000)]
Case-checking was broken on the Macintosh. Fixed.

24 years agoGot module to work under Carbon. Also disabled a few more bits of cfm68k support.
Jack Jansen [Tue, 20 Mar 2001 21:55:51 +0000 (21:55 +0000)]
Got module to work under Carbon. Also disabled a few more bits of cfm68k support.

24 years agoAdded riscos modules to modules that don't have to be included.
Jack Jansen [Tue, 20 Mar 2001 21:55:07 +0000 (21:55 +0000)]
Added riscos modules to modules that don't have to be included.

24 years agoLawrence Hudson, SF #401702: Modify co_filename in frozen programs
Guido van Rossum [Tue, 20 Mar 2001 20:43:34 +0000 (20:43 +0000)]
Lawrence Hudson, SF #401702: Modify co_filename in frozen programs

  This patch was developed primarily to reduce the size of the
  frozen binary.  It is particularly useful when freezing for 'small'
  platforms, such as Palm OS, where you really want to save that
  last miserable byte.

  A limitation of this patch is that it does not provide any feedback
  about the replacements being made.  As the path matching
  is case-sensitive this may lead to unexpected behaviour for DOS
  and Windows people, eg
      > freeze.py -r C:\Python\Lib\=py\ goats.py
  should probably be:
      > freeze.py -r c:\python\lib\=py\ goats.py

24 years agoBump version to 2.1b2.
Guido van Rossum [Tue, 20 Mar 2001 19:57:10 +0000 (19:57 +0000)]
Bump version to 2.1b2.

24 years agoAdd a deprecation warning to this module.
Guido van Rossum [Tue, 20 Mar 2001 18:36:48 +0000 (18:36 +0000)]
Add a deprecation warning to this module.

Importing it typically fails anyway (no TZ variable defined), so this
is no great loss.

24 years agoBug #409419: delete seek() and tell() methods, so callers can use getattr()
Andrew M. Kuchling [Tue, 20 Mar 2001 15:51:14 +0000 (15:51 +0000)]
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)

24 years ago* Fixing the password-proxy bug
Moshe Zadka [Tue, 20 Mar 2001 13:14:28 +0000 (13:14 +0000)]
* Fixing the password-proxy bug
* Not sending content-type and content-length twice

24 years agoGet rid of --with-check-import-case. (Jason Tishler, SF #409924)
Guido van Rossum [Tue, 20 Mar 2001 13:09:14 +0000 (13:09 +0000)]
Get rid of --with-check-import-case.  (Jason Tishler, SF #409924)

24 years agoSF patch #408326 by Robin Thomas: slice objects comparable, not
Guido van Rossum [Tue, 20 Mar 2001 12:41:34 +0000 (12:41 +0000)]
SF patch #408326 by Robin Thomas: slice objects comparable, not
hashable

This patch changes the behavior of slice objects in the following
manner:

- Slice objects are now comparable with other slice objects as though
they were logically tuples of (start,stop,step). The tuple is not
created in the comparison function, but the comparison behavior is
logically equivalent.

- Slice objects are not hashable. With the above change to being
comparable, slice objects now cannot be used as keys in dictionaries.

[I've edited the patch for style.  Note that this fixes the problem
that dict[i:j] seemed to work but was meaningless.  --GvR]

24 years agoSF patch 407758, "timemodule patches for Cygwin", from Norman Vine.
Tim Peters [Tue, 20 Mar 2001 03:26:49 +0000 (03:26 +0000)]
SF patch 407758, "timemodule patches for Cygwin", from Norman Vine.
http://sourceforge.net/tracker/?func=detail&aid=407758&group_id=5470&atid=305470

24 years agoFixup handling of free variables in methods when the class scope also
Jeremy Hylton [Tue, 20 Mar 2001 00:25:43 +0000 (00:25 +0000)]
Fixup handling of free variables in methods when the class scope also
has a binding for the name.  The fix is in two places:

  - in symtable_update_free_vars, ignore a global stmt in a class scope
  - in symtable_load_symbols, add extra handling for names that are
    defined at class scope and free in a method

Closes SF bug 407800

24 years agoAdd test for a list comprehension that is nested in the left-hand part
Jeremy Hylton [Mon, 19 Mar 2001 20:42:11 +0000 (20:42 +0000)]
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.

24 years agoFix crashes in nested list comprehensions
Jeremy Hylton [Mon, 19 Mar 2001 20:38:06 +0000 (20:38 +0000)]
Fix crashes in nested list comprehensions
SF bugs 409230 and 407800

Also remove bogus list comp code from symtable_assign().

24 years agoWhen building the installer, prompt for the location of the system directory
Tim Peters [Mon, 19 Mar 2001 19:19:45 +0000 (19:19 +0000)]
When building the installer, prompt for the location of the system directory
on the current machine.  Wise doesn't seem to know this itself, and it
varies across Windows flavors.

24 years agoAdd a whole lot of stuff to __all__.
Guido van Rossum [Mon, 19 Mar 2001 13:40:44 +0000 (13:40 +0000)]
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.)

24 years agoMarkup nit: For the Python documents, we use \empt instead of \textit.
Fred Drake [Mon, 19 Mar 2001 04:19:56 +0000 (04:19 +0000)]
Markup nit:  For the Python documents, we use \empt instead of \textit.

24 years agoRepair test_doctest's expected-output file (Guido added some new output).
Tim Peters [Sun, 18 Mar 2001 20:14:25 +0000 (20:14 +0000)]
Repair test_doctest's expected-output file (Guido added some new output).

24 years agoadd errorTab to __all__ on win*
Skip Montanaro [Sun, 18 Mar 2001 19:53:21 +0000 (19:53 +0000)]
add errorTab to __all__ on win*
closes bug #406642

24 years agoCommitting patch 405101
Moshe Zadka [Sun, 18 Mar 2001 17:11:56 +0000 (17:11 +0000)]
Committing patch 405101

24 years agoMake doctest's self-test succeed after the previous change.
Guido van Rossum [Sun, 18 Mar 2001 17:05:58 +0000 (17:05 +0000)]
Make doctest's self-test succeed after the previous change.

24 years agoPrint a bunch of asterisks before the failure summary, to separate it
Guido van Rossum [Sun, 18 Mar 2001 16:58:44 +0000 (16:58 +0000)]
Print a bunch of asterisks before the failure summary, to separate it
from the last failure report.

24 years agoTeach Tools/freeze/makeconfig.py and Tools/freeze/parsesetup.py to use
Eric S. Raymond [Sun, 18 Mar 2001 11:27:58 +0000 (11:27 +0000)]
Teach Tools/freeze/makeconfig.py and Tools/freeze/parsesetup.py to use
the re package rather than the obsolete regex.

24 years agoSF bug [ #409448 ] Complex division is braindead
Tim Peters [Sun, 18 Mar 2001 08:21:57 +0000 (08:21 +0000)]
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.

24 years agoFix bug #233253: the --define and --undef options didn't work, whether
Andrew M. Kuchling [Sat, 17 Mar 2001 20:15:41 +0000 (20:15 +0000)]
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.

24 years agoBug #409403: Signal an error if the distribution's metadata has no version
Andrew M. Kuchling [Sat, 17 Mar 2001 19:59:26 +0000 (19:59 +0000)]
Bug #409403: Signal an error if the distribution's metadata has no version

24 years agoTidy up the ordering of include and library directories, putting
Andrew M. Kuchling [Sat, 17 Mar 2001 16:56:35 +0000 (16:56 +0000)]
Tidy up the ordering of include and library directories, putting
    /usr/local first and leaving /usr/include at the end.  This addresses
    the comments in bug #232609.

24 years agoSF bug [ #233200 ] cPickle does not use Py_BEGIN_ALLOW_THREADS.
Tim Peters [Sat, 17 Mar 2001 04:50:51 +0000 (04:50 +0000)]
SF bug [ #233200 ] cPickle does not use Py_BEGIN_ALLOW_THREADS.
http://sourceforge.net/tracker/?func=detail&aid=233200&group_id=5470&atid=105470
Wrapped the fread/fwrite calls in thread BEGIN_ALLOW/END_ALLOW brackets
Afraid I hit the "delete trailing whitespace key" too!  Only two "real" sections
of code changed here.

24 years agoDistutils version number has been changed from 1.0.1 to 1.0.2pre
Thomas Heller [Fri, 16 Mar 2001 21:00:18 +0000 (21:00 +0000)]
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?

24 years agoThe bdist_wininst.py command has been recreated after wininst.exe
Thomas Heller [Fri, 16 Mar 2001 20:57:37 +0000 (20:57 +0000)]
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.

24 years agoAdd documentation for SGMLParser.handle_decl().
Fred Drake [Fri, 16 Mar 2001 20:39:41 +0000 (20:39 +0000)]
Add documentation for SGMLParser.handle_decl().

24 years agoChange RuntimeError to SGMLParseError, which subclasses RuntimeError
Fred Drake [Fri, 16 Mar 2001 20:04:57 +0000 (20:04 +0000)]
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.

24 years agoFinally fill in the documentation for the PyDict_Next() function. It is
Fred Drake [Fri, 16 Mar 2001 15:41:29 +0000 (15:41 +0000)]
Finally fill in the documentation for the PyDict_Next() function.  It is
different enough to actually require an explanation.  ;-)

Fix a couple of PyDictObject* types that should be PyObject* types.

24 years agoInstall the Python DLL with execute priviledge set. This is required for
Neil Schemenauer [Fri, 16 Mar 2001 11:50:43 +0000 (11:50 +0000)]
Install the Python DLL with execute priviledge set.  This is required for
Cygwin Python to startup correctly when in ntsec mode.  Cygwin operating in
this mode is probably not the only system with this requirement.

24 years agoWhitespace normalization.
Tim Peters [Fri, 16 Mar 2001 08:29:48 +0000 (08:29 +0000)]
Whitespace normalization.

24 years agoFiles for second 2.1b1 distribution.
Jack Jansen [Thu, 15 Mar 2001 14:41:01 +0000 (14:41 +0000)]
Files for second 2.1b1 distribution.

24 years agoFindFolder argument is a short, not an unsigned short.
Jack Jansen [Thu, 15 Mar 2001 14:39:37 +0000 (14:39 +0000)]
FindFolder argument is a short, not an unsigned short.
Added kLocalDomain and friends.

24 years agoHandle the apple menu differently under Carbon.
Jack Jansen [Thu, 15 Mar 2001 14:39:03 +0000 (14:39 +0000)]
Handle the apple menu differently under Carbon.

24 years agoFindFolder argument is a short, not an unsigned short.
Jack Jansen [Thu, 15 Mar 2001 14:38:10 +0000 (14:38 +0000)]
FindFolder argument is a short, not an unsigned short.

24 years agoAdded QDFlushPortBuffer calls.
Jack Jansen [Thu, 15 Mar 2001 14:35:33 +0000 (14:35 +0000)]
Added QDFlushPortBuffer calls.

24 years agoImport kOnSystemDisk from MACFS
Jack Jansen [Thu, 15 Mar 2001 14:33:24 +0000 (14:33 +0000)]
Import kOnSystemDisk from MACFS

24 years agoLook for shared libraries first in kLocalDomain and then in kOnSystemDisk.
Jack Jansen [Thu, 15 Mar 2001 14:28:40 +0000 (14:28 +0000)]
Look for shared libraries first in kLocalDomain and then in kOnSystemDisk.
Don't do sys.prefix==os.getcwd() check unless we're an applet.

24 years agoFiles for second 2.1b1 distribution.
Jack Jansen [Thu, 15 Mar 2001 14:27:09 +0000 (14:27 +0000)]
Files for second 2.1b1 distribution.

24 years agoRemove redundant "__future__:" from module docstring.
Ka-Ping Yee [Thu, 15 Mar 2001 10:45:44 +0000 (10:45 +0000)]
Remove redundant "__future__:" from module docstring.

24 years agoImport the exceptions that this module can raise.
Fred Drake [Wed, 14 Mar 2001 22:43:47 +0000 (22:43 +0000)]
Import the exceptions that this module can raise.

24 years agoAdd doc string for run from profile.doc. (pydoc motivates me to write
Jeremy Hylton [Wed, 14 Mar 2001 20:01:19 +0000 (20:01 +0000)]
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?

24 years agoMoved clearing of "literal" flag. The flag is set in setliteral which
Sjoerd Mullender [Wed, 14 Mar 2001 17:03:30 +0000 (17:03 +0000)]
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.

24 years agoChange "[%s]" % string.whitespace to r"\s" in regular expressions.
Fred Drake [Wed, 14 Mar 2001 16:18:56 +0000 (16:18 +0000)]
Change "[%s]" % string.whitespace to r"\s" in regular expressions.

24 years agoupdated __all__ to include several other names
Skip Montanaro [Tue, 13 Mar 2001 19:47:16 +0000 (19:47 +0000)]
updated __all__ to include several other names

24 years agoAdd some LaTeX magic so that Latin-1 characters do not get so badly
Fred Drake [Tue, 13 Mar 2001 17:56:08 +0000 (17:56 +0000)]
Add some LaTeX magic so that Latin-1 characters do not get so badly
trashed.

24 years agoPatch #407965: Improve Level 2 conformance of minidom
Martin v. Löwis [Tue, 13 Mar 2001 10:50:13 +0000 (10:50 +0000)]
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.

24 years agoOops. A RISCOS patch I forgot to check in.
Guido van Rossum [Tue, 13 Mar 2001 09:31:07 +0000 (09:31 +0000)]
Oops.  A RISCOS patch I forgot to check in.

24 years agoAdd test to verify that nested functions with free variables don't
Jeremy Hylton [Tue, 13 Mar 2001 02:01:12 +0000 (02:01 +0000)]
Add test to verify that nested functions with free variables don't
cause the free variables to leak.

24 years agoVariety of small INC/DECREF patches that fix reported memory leaks
Jeremy Hylton [Tue, 13 Mar 2001 01:58:22 +0000 (01:58 +0000)]
Variety of small INC/DECREF patches that fix reported memory leaks
with free variables.  Thanks to Martin v. Loewis for finding two of
the problems.  This fixes SF buf 405583.

There is also a C API change: PyFrame_New() is reverting to its
pre-2.1 signature.  The change introduced by nested scopes was a
mistake.  XXX Is this okay between beta releases?

cell_clear(), the GC helper, must decref its reference to break
cycles.

frame_dealloc() must dealloc all cell vars and free vars in addition
to locals.

eval_code2() setup code must INCREF cells it copies out of the
closure.

The STORE_DEREF opcode implementation must DECREF the object it passes
to PyCell_Set().

24 years agoPy_BuildValue(): Add "D" conversion to create a Python complex value from
Fred Drake [Mon, 12 Mar 2001 21:06:31 +0000 (21:06 +0000)]
Py_BuildValue():  Add "D" conversion to create a Python complex value from
    a Py_complex C value.

Patch by Walter Dörwald.
This closes SF patch #407148.

24 years agoPy_BuildValue(): Add "D" conversion to create a Python complex value from
Fred Drake [Mon, 12 Mar 2001 21:03:26 +0000 (21:03 +0000)]
Py_BuildValue():  Add "D" conversion to create a Python complex value from
    a Py_complex C value.

Patch by Walter Dörwald.
This partially closes SF patch #407148.

24 years agoMultifile.read(): Fix a broken conversion to string methods.
Fred Drake [Mon, 12 Mar 2001 02:56:15 +0000 (02:56 +0000)]
Multifile.read():  Fix a broken conversion to string methods.

This closes SF bug #407777.

24 years agoIdentifiers matching _[A-Z_]\w* are reserved for C implementations.
Tim Peters [Sun, 11 Mar 2001 18:36:13 +0000 (18:36 +0000)]
Identifiers matching _[A-Z_]\w* are reserved for C implementations.
May or may not be related to bug 407680 (obmalloc.c - looks like it's
corrupted).  This repairs the illegal vrbl names, but leaves a pile of
illegal macro names (_THIS_xxx, _SYSTEM_xxx, _SET_HOOKS, _FETCH_HOOKS).

24 years agoWhen 1.6 boosted the # of digits produced by repr(float), repr(complex)
Tim Peters [Sun, 11 Mar 2001 08:37:29 +0000 (08:37 +0000)]
When 1.6 boosted the # of digits produced by repr(float), repr(complex)
apparently forgot to play along.  Make complex act like float.

24 years agoWindows: Fallout from renaming the pydoc file.
Tim Peters [Sun, 11 Mar 2001 08:06:25 +0000 (08:06 +0000)]
Windows:  Fallout from renaming the pydoc file.

24 years agoSF bug Win32: pydoc command isn't executable.
Tim Peters [Sun, 11 Mar 2001 07:34:18 +0000 (07:34 +0000)]
SF bug Win32: pydoc command isn't executable.
As the bug report notes, the Windows installer creates a useless pydoc
file in the base directory.  Changed the installer to rename it pydoc.pyw
instead.

24 years agoMagic strings in both Python and the Wise installer define the registry key
Tim Peters [Sun, 11 Mar 2001 04:30:35 +0000 (04:30 +0000)]
Magic strings in both Python and the Wise installer define the registry key
to be used in Windows.  They got out of synch.  Repaired that, and added
comments to each one pointing at the other.

24 years agoMake sure we close the group and password databases when we are done with
Fred Drake [Sun, 11 Mar 2001 03:03:07 +0000 (03:03 +0000)]
Make sure we close the group and password databases when we are done with
them; this closes SF bug #407504.

24 years agoGet rid of hardcoded Python path (can't guess where the user installed
Tim Peters [Sat, 10 Mar 2001 21:48:24 +0000 (21:48 +0000)]
Get rid of hardcoded Python path (can't guess where the user installed
IDLE, and it likely changes across releases anyway).

24 years agoFix a further markup problem noted by FLD
Andrew M. Kuchling [Sat, 10 Mar 2001 16:49:07 +0000 (16:49 +0000)]
Fix a further markup problem noted by FLD

24 years agoChris Stern's BBEdit Python language module.
Jack Jansen [Sat, 10 Mar 2001 13:24:41 +0000 (13:24 +0000)]
Chris Stern's BBEdit Python language module.

24 years agoMake docstrings raw, since they contain literal backslashes.
Ka-Ping Yee [Sat, 10 Mar 2001 09:33:14 +0000 (09:33 +0000)]
Make docstrings raw, since they contain literal backslashes.

24 years agoFix findsource() to work for derived classes.
Ka-Ping Yee [Sat, 10 Mar 2001 09:31:55 +0000 (09:31 +0000)]
Fix findsource() to work for derived classes.

24 years agoImport the nested_scopes feature twice, to exercise the patch introduced
Fred Drake [Sat, 10 Mar 2001 02:18:47 +0000 (02:18 +0000)]
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.

24 years agoWhen iterating over the names imported in a future statement, ignore the
Fred Drake [Sat, 10 Mar 2001 02:15:37 +0000 (02:15 +0000)]
When iterating over the names imported in a future statement, ignore the
commas in the concrete syntax; checking those causes a segfault.

This fixes SF bug #407394.

24 years agoFinished implementation of removing incorrect preferences file.
Jack Jansen [Fri, 9 Mar 2001 23:15:27 +0000 (23:15 +0000)]
Finished implementation of removing incorrect preferences file.