]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
23 years agoClarify that the bool instances are acceptable return values from
Fred Drake [Wed, 7 Aug 2002 15:41:31 +0000 (15:41 +0000)] 
Clarify that the bool instances are acceptable return values from
__nonzero__(), in response to SF bug #579991.

23 years agoDocument handling of raw-unicode-escapes. Closes SF bug 587087.
Raymond Hettinger [Tue, 6 Aug 2002 22:39:30 +0000 (22:39 +0000)] 
Document handling of raw-unicode-escapes.  Closes SF bug 587087.

23 years agoAdded references to the email package.
Fred Drake [Tue, 6 Aug 2002 21:22:59 +0000 (21:22 +0000)] 
Added references to the email package.
Closes SF bug #586937.

23 years agoSF patch #591305 Documentation err in bytecode defs
Neal Norwitz [Mon, 5 Aug 2002 23:35:02 +0000 (23:35 +0000)] 
SF patch #591305 Documentation err in bytecode defs

23 years agoRemove calls to 2.1 GC API (they are noops).
Neil Schemenauer [Mon, 5 Aug 2002 14:46:29 +0000 (14:46 +0000)] 
Remove calls to 2.1 GC API (they are noops).

23 years agoSF 582071 clarified the .split() method's docstring to note that sep=None
Raymond Hettinger [Mon, 5 Aug 2002 06:28:55 +0000 (06:28 +0000)] 
SF 582071 clarified the .split() method's docstring to note that sep=None
will trigger splitting on any whitespace.

23 years agoAdd trace_frame. Fixes #534864.
Martin v. Löwis [Sun, 4 Aug 2002 08:26:49 +0000 (08:26 +0000)] 
Add trace_frame. Fixes #534864.

23 years agoFix ref(), proxy() docstrings, based on comments from David Abrahams.
Fred Drake [Fri, 2 Aug 2002 20:17:14 +0000 (20:17 +0000)] 
Fix ref(), proxy() docstrings, based on comments from David Abrahams.

23 years agoBackport:
Guido van Rossum [Thu, 1 Aug 2002 21:14:33 +0000 (21:14 +0000)] 
Backport:
Fix for SF bug 570678 (can't flush read-only file on Mac OS X).

23 years agoBackport:
Guido van Rossum [Thu, 1 Aug 2002 19:05:07 +0000 (19:05 +0000)] 
Backport:

Tim found that once test_longexp has run, test_sort takes very much
longer to run than normal.  A profiler run showed that this was due to
PyFrame_New() taking up an unreasonable amount of time.  A little
thinking showed that this was due to the while loop clearing the space
available for the stack.  The solution is to only clear the local
variables (and cells and free variables), not the space available for
the stack, since anything beyond the stack top is considered to be
garbage anyway.  Also, use memset() instead of a while loop counting
backwards.  This should be a time savings for normal code too!  (By a
probably unmeasurable amount. :-)

23 years agoBackport:
Guido van Rossum [Thu, 1 Aug 2002 19:03:43 +0000 (19:03 +0000)] 
Backport:

SF patch 588728 (Nathan Srebro).

The __delete__ method wrapper for descriptors was not supported

(I added a test, too.)

23 years agoPut Cray fixes on the branch, too.
Michael W. Hudson [Wed, 31 Jul 2002 11:19:49 +0000 (11:19 +0000)] 
Put Cray fixes on the branch, too.

23 years agoSF patch #581414: info reader bug
Fred Drake [Tue, 30 Jul 2002 17:52:05 +0000 (17:52 +0000)] 
SF patch #581414: info reader bug

The "Matching vs. Searching" Info node is unreachable from the Info
program (but is fine in Emacs's Info mode). This patch seems to fix
it.  This is the only occurrence where the info reader fails, so
probably it could be addressed in the python docs as a workaround.
Forwarded the report to the info maintainer.

23 years agoFix docstring to be consistent with parameter name (prefix)
Neal Norwitz [Tue, 30 Jul 2002 01:18:38 +0000 (01:18 +0000)] 
Fix docstring to be consistent with parameter name (prefix)

23 years agoSF patch #587889, fix memory leak of tp_doc
Neal Norwitz [Tue, 30 Jul 2002 00:57:38 +0000 (00:57 +0000)] 
SF patch #587889, fix memory leak of tp_doc

23 years agoRevert #571603 since it is ok to import codecs that are not subdirectories
Martin v. Löwis [Mon, 29 Jul 2002 14:04:36 +0000 (14:04 +0000)] 
Revert #571603 since it is ok to import codecs that are not subdirectories
of encodings. Skip modules that don't have a getregentry function.

23 years agoPass length of result structure into setipaddr. Fixes bug #565747.
Martin v. Löwis [Sun, 28 Jul 2002 16:11:25 +0000 (16:11 +0000)] 
Pass length of result structure into setipaddr. Fixes bug #565747.

23 years agoFix SF bug 587012, doc mentions inexistent builtin unistr
Neal Norwitz [Sun, 28 Jul 2002 13:56:20 +0000 (13:56 +0000)] 
Fix SF bug 587012, doc mentions inexistent builtin unistr

23 years agoPatch #571603: Refer to encodings package explicitly.
Martin v. Löwis [Sun, 28 Jul 2002 11:33:18 +0000 (11:33 +0000)] 
Patch #571603: Refer to encodings package explicitly.

23 years agoPatch #554716: Use __va_copy where available.
Martin v. Löwis [Sun, 28 Jul 2002 10:21:31 +0000 (10:21 +0000)] 
Patch #554716: Use __va_copy where available.

23 years agoBetter yet, make it the same as the equivalent changes already made to
Fred Drake [Fri, 26 Jul 2002 15:41:59 +0000 (15:41 +0000)] 
Better yet, make it the same as the equivalent changes already made to
the version on the trunk.

23 years agoUpdate references to Digital Creations.
Fred Drake [Fri, 26 Jul 2002 15:38:39 +0000 (15:38 +0000)] 
Update references to Digital Creations.

23 years agoSmall clarifications when referring to the sys.exc_* variables so that
Fred Drake [Thu, 25 Jul 2002 21:11:41 +0000 (21:11 +0000)] 
Small clarifications when referring to the sys.exc_* variables so that
readers are not given the wrong impression that they should be using those
on a regualar basis.
This closes SF bug #585598.

23 years agoSF patch #581396, Canvas "select_item" always returns None
Neal Norwitz [Tue, 23 Jul 2002 02:55:14 +0000 (02:55 +0000)] 
SF patch #581396, Canvas "select_item" always returns None

Return the selected item, if there is any.

23 years agoreduce(): Clarified what is returned in the case of a sequence 1 item long and
Fred Drake [Wed, 17 Jul 2002 13:55:46 +0000 (13:55 +0000)] 
reduce(): Clarified what is returned in the case of a sequence 1 item long and
initial/default value.

23 years agoUse sys.executable to run Python, as suggested by Neal Norwitz.
Tim Peters [Wed, 17 Jul 2002 00:42:52 +0000 (00:42 +0000)] 
Use sys.executable to run Python, as suggested by Neal Norwitz.

23 years agoThe atexit module effectively turned itself off if sys.exitfunc already
Tim Peters [Tue, 16 Jul 2002 20:09:08 +0000 (20:09 +0000)] 
The atexit module effectively turned itself off if sys.exitfunc already
existed at the time atexit first got imported.  That's a bug, and this
fixes it.

Also reworked test_atexit.py to test for this too, and to stop using
an "expected output" file, and to test what actually happens at exit
instead of just simulating what it thinks atexit will do at exit.

23 years agoGiven the persistent id code a shot at a class before calling save_global().
Jeremy Hylton [Tue, 16 Jul 2002 20:02:15 +0000 (20:02 +0000)] 
Given the persistent id code a shot at a class before calling save_global().

Backported from the trunk.

23 years agoThe object returned by tp_new() may not have a tp_init.
Jeremy Hylton [Tue, 16 Jul 2002 19:42:21 +0000 (19:42 +0000)] 
The object returned by tp_new() may not have a tp_init.

If the object is an ExtensionClass, for example, the slot is not even
defined.  So we must check that the type has the slot (implied by
HAVE_CLASS) before calling tp_init().

23 years agoClarify the return value of __nonzero__(): It *must* be an integer.
Fred Drake [Fri, 12 Jul 2002 17:15:45 +0000 (17:15 +0000)] 
Clarify the return value of __nonzero__(): It *must* be an integer.
Closes SF bug #579991.

23 years agoBackport:
Guido van Rossum [Fri, 12 Jul 2002 16:03:09 +0000 (16:03 +0000)] 
Backport:

Remove httplib from tested modules.

The test of httplib makes it difficult to maintain httplib.  There are
two many idioms that pyclbr doesn't seem to understand, and I don't
understand how to update these tests to make them work.

Also remove commented out test of urllib2.

23 years agoUpdate output for new tests.
Jeremy Hylton [Fri, 12 Jul 2002 15:52:26 +0000 (15:52 +0000)] 
Update output for new tests.

23 years agoBackport changes.
Jeremy Hylton [Fri, 12 Jul 2002 14:23:43 +0000 (14:23 +0000)] 
Backport changes.

Change _begin() back to begin().
Fix for SF bug 579107.
Fix for SF bug #432621: httplib: multiple Set-Cookie headers
Fix SF bug #575360
Handle HTTP/0.9 responses.

23 years ago(Backport.)
Guido van Rossum [Fri, 12 Jul 2002 13:12:44 +0000 (13:12 +0000)] 
(Backport.)

Fix SF bug 579701 (Fernando Pérez); an input line consisting of one or
more spaces only crashed pdb.

23 years agosubtype_resurrection(): Removed unused import.
Tim Peters [Thu, 11 Jul 2002 18:40:12 +0000 (18:40 +0000)] 
subtype_resurrection():  Removed unused import.

23 years agosubtype_resurrection(): The test suite with -l properly reported the
Tim Peters [Thu, 11 Jul 2002 18:30:02 +0000 (18:30 +0000)] 
subtype_resurrection():  The test suite with -l properly reported the
immortal object here as a leak.  Made the object mortal again at the end.

23 years agoRepaired optimistic comment in new test.
Tim Peters [Thu, 11 Jul 2002 07:11:13 +0000 (07:11 +0000)] 
Repaired optimistic comment in new test.

23 years agoAttempting to resurrect a dying instance of a new-style class in a
Tim Peters [Thu, 11 Jul 2002 07:06:44 +0000 (07:06 +0000)] 
Attempting to resurrect a dying instance of a new-style class in a
__del__ method died with

    Fatal Python error: GC object already in linked list

in both release and debug builds.  Fixed that.  Added a new test that
dies without the fix.

23 years agoDocument gc.get_objects().
Fred Drake [Wed, 10 Jul 2002 19:21:55 +0000 (19:21 +0000)] 
Document gc.get_objects().
Closes SF bug #578308.

23 years agoUpdate the comments on building the pyexpat extension.
Fred Drake [Wed, 10 Jul 2002 19:01:25 +0000 (19:01 +0000)] 
Update the comments on building the pyexpat extension.
Closes SF bug #577774.

23 years agoNote that unicode() can raise LookupError for unknown codecs.
Fred Drake [Tue, 9 Jul 2002 05:27:12 +0000 (05:27 +0000)] 
Note that unicode() can raise LookupError for unknown codecs.
Closes SF bug #513666.

23 years agoSF bug 578752: COUNT_ALLOCS vs heap types
Tim Peters [Mon, 8 Jul 2002 22:30:52 +0000 (22:30 +0000)] 
SF bug 578752: COUNT_ALLOCS vs heap types
Repair segfaults and infinite loops in COUNT_ALLOCS builds in the
presence of new-style (heap-allocated) classes/types.

Note:  test_gc fails in a COUNT_ALLOCS build now, because it expects
a new-style class to get garbage collected.

23 years agoPyNode_AddChild(): Backporting an aggressive over-allocation policy
Tim Peters [Mon, 8 Jul 2002 19:35:56 +0000 (19:35 +0000)] 
PyNode_AddChild():  Backporting an aggressive over-allocation policy
when a parse node grows a very large number of children.  This sidesteps
platform realloc() disasters on several platforms.

23 years agoFix typo.
Fred Drake [Mon, 8 Jul 2002 14:46:49 +0000 (14:46 +0000)] 
Fix typo.
Closes SF bug #578420.

23 years agoFix typo reported by Kent Engström, and a bunch of broken markup.
Fred Drake [Mon, 8 Jul 2002 14:42:45 +0000 (14:42 +0000)] 
Fix typo reported by Kent Engström, and a bunch of broken markup.

23 years agoFix typo: "an Unicode string" --> "a Unicode string"
Fred Drake [Mon, 8 Jul 2002 14:29:28 +0000 (14:29 +0000)] 
Fix typo:  "an Unicode string" --> "a Unicode string"
Clarify the return value when the parameter is a Unicode object.

23 years agoAdd annotations that describe the change in the "errors" and "failures"
Fred Drake [Tue, 2 Jul 2002 22:46:53 +0000 (22:46 +0000)] 
Add annotations that describe the change in the "errors" and "failures"
attributes of the TestResult.

23 years agoUpdate the documentation of the errors and failures attributes of the
Fred Drake [Tue, 2 Jul 2002 22:35:02 +0000 (22:35 +0000)] 
Update the documentation of the errors and failures attributes of the
TestResult object.  Add an example of how to get even more information for
apps that can use it.
Closes SF bug #558278.

23 years agoTrack change of begin() to _begin().
Jeremy Hylton [Tue, 2 Jul 2002 20:39:37 +0000 (20:39 +0000)] 
Track change of begin() to _begin().

23 years agoBackport various bug fixes from trunk.
Jeremy Hylton [Tue, 2 Jul 2002 17:19:47 +0000 (17:19 +0000)] 
Backport various bug fixes from trunk.

The 2.2 maintenace branch is now identical to the trunk through rev
1.53.

23 years agoBackport for SF bug #574132: Major GC related performance regression.
Tim Peters [Sun, 30 Jun 2002 18:48:53 +0000 (18:48 +0000)] 
Backport for SF bug #574132:  Major GC related performance regression.
2.2.1 has another bug that prevents the regression (which isn't a
regression at all) from showing up.  "The regression" is actually a
glitch in cyclic gc that's been there forever.

As the generation being collected is analyzed, objects that can't be
collected (because, e.g., we find they're externally referenced, or
are in an unreachable cycle but have a __del__ method) are moved out
of the list of candidates.  A tricksy scheme uses negative values of
gc_refs to mark such objects as being moved.  However, the exact
negative value set at the start may become "more negative" over time
for objects not in the generation being collected, and the scheme was
checking for an exact match on the negative value originally assigned.
As a result, objects in generations older than the one being collected
could get scanned too, and yanked back into a younger generation.  Doing
so doesn't lead to an error, but doesn't do any good, and can burn an
unbounded amount of time doing useless work.

A test case is simple (thanks to Kevin Jacobs for finding it!):

x = []
for i in xrange(200000):
    x.append((1,))

Without the patch, this ends up scanning all of x on every gen0 collection,
scans all of x twice on every gen1 collection, and x gets yanked back into
gen1 on every gen0 collection.  With the patch, once x gets to gen2, it's
never scanned again until another gen2 collection, and stays in gen2.

Opened another bug about that 2.2.1 isn't actually tracking (at least)
iterators, generators, and bound method objects, due to using the 2.1
gc API internally in those places (which #defines itself out of existence
in 2.2.x).

23 years agoFixed bug 574978 shutil example out of sync with source code
Raymond Hettinger [Sun, 30 Jun 2002 04:44:29 +0000 (04:44 +0000)] 
Fixed bug 574978 shutil example out of sync with source code

23 years agoFix bug 575221 referred to dictionary type instead of dict.
Raymond Hettinger [Sun, 30 Jun 2002 04:33:37 +0000 (04:33 +0000)] 
Fix bug 575221 referred to dictionary type instead of dict.

23 years agoClarify the version information for the unicode() built-in.
Fred Drake [Sat, 29 Jun 2002 16:11:08 +0000 (16:11 +0000)] 
Clarify the version information for the unicode() built-in.
Closes SF bug #575272.

23 years agoBackport 1.37: dis.dis() also supports modules, (also backport other changes back...
Neal Norwitz [Wed, 26 Jun 2002 22:37:28 +0000 (22:37 +0000)] 
Backport 1.37: dis.dis() also supports modules, (also backport other changes back to 1.33 since these all apply to 2.2)

23 years agoFix various typos reported to python-docs.
Fred Drake [Wed, 26 Jun 2002 21:52:26 +0000 (21:52 +0000)] 
Fix various typos reported to python-docs.

23 years agoFix typo reported to python-docs.
Fred Drake [Wed, 26 Jun 2002 21:43:42 +0000 (21:43 +0000)] 
Fix typo reported to python-docs.

23 years agoFix bug #573916. Sender and recipients reversed in email example.
Raymond Hettinger [Wed, 26 Jun 2002 07:52:41 +0000 (07:52 +0000)] 
Fix bug #573916.  Sender and recipients reversed in email example.

23 years ago[Backport of recent changes to the SAX documentation.]
Fred Drake [Tue, 25 Jun 2002 17:18:48 +0000 (17:18 +0000)] 
[Backport of recent changes to the SAX documentation.]

Add more links to the "See also" section for the xml.sax package.
Talk about interfaces rather than implementation classes where appropriate.
Add hyperlinks to make the documentation on the Attributes and AttributesNS
interfaces more discoverable.
Closes SF bug #484603.

23 years agoFix typo
Raymond Hettinger [Tue, 25 Jun 2002 15:25:53 +0000 (15:25 +0000)] 
Fix typo

23 years agoCompleted previous edit
Raymond Hettinger [Tue, 25 Jun 2002 15:21:02 +0000 (15:21 +0000)] 
Completed previous edit

23 years agoClose bug 480337: Dict used before dicts explained. Added explanation
Raymond Hettinger [Tue, 25 Jun 2002 15:02:31 +0000 (15:02 +0000)] 
Close bug 480337:  Dict used before dicts explained.  Added explanation
and examples of the dict() constructor.

23 years agoClose bug 417930 by clarifying augmented assignment docs
Raymond Hettinger [Tue, 25 Jun 2002 13:39:49 +0000 (13:39 +0000)] 
Close bug 417930 by clarifying augmented assignment docs

23 years agoFix SF bug 568269 by enclosing 'computername' in a raw string
Raymond Hettinger [Tue, 25 Jun 2002 04:55:36 +0000 (04:55 +0000)] 
Fix SF bug 568269 by enclosing 'computername' in a raw string

23 years agoBackport change to 1.58 giving Lambda a separate section.
Raymond Hettinger [Tue, 25 Jun 2002 04:00:24 +0000 (04:00 +0000)] 
Backport change to 1.58 giving Lambda a separate section.

23 years agoFix SF Bug 572567: Memory leak in object comparison
Raymond Hettinger [Mon, 24 Jun 2002 13:25:41 +0000 (13:25 +0000)] 
Fix SF Bug 572567: Memory leak in object comparison

23 years agoSF # 572928 One word change for lib/libgettext.tex
Neal Norwitz [Mon, 24 Jun 2002 02:29:57 +0000 (02:29 +0000)] 
SF # 572928 One word change for lib/libgettext.tex

Fix typo.

23 years agoCorrect the RE equivalent of scanf()'s %x and %X patterns.
Fred Drake [Sat, 22 Jun 2002 01:07:50 +0000 (01:07 +0000)] 
Correct the RE equivalent of scanf()'s %x and %X patterns.
Closes SF bug #572169.

23 years agoBackport of Greg Ward's rev. 1.6 from the trunk:
Fred Drake [Fri, 21 Jun 2002 13:11:12 +0000 (13:11 +0000)] 
Backport of Greg Ward's rev. 1.6 from the trunk:
Typo fix.

23 years agoCorrected return type and value information for PyUnicode_Count() and
Fred Drake [Thu, 20 Jun 2002 22:09:12 +0000 (22:09 +0000)] 
Corrected return type and value information for PyUnicode_Count() and
PyUnicode_Find().
This closes SF bug #566631.

23 years agoFix the docstring for sys.getrefcount().
Fred Drake [Thu, 20 Jun 2002 21:35:02 +0000 (21:35 +0000)] 
Fix the docstring for sys.getrefcount().
Closes SF bug #571759.

23 years agoMake the docs for string.capitalize() match those of str.capitalize()
Fred Drake [Thu, 20 Jun 2002 21:19:27 +0000 (21:19 +0000)] 
Make the docs for string.capitalize() match those of str.capitalize()
(which makes it more clear).
Closes SF bug #571767.

23 years agoSF 563530 added missing methods for emulating numeric types
Raymond Hettinger [Thu, 20 Jun 2002 06:18:26 +0000 (06:18 +0000)] 
SF 563530 added missing methods for emulating numeric types

23 years agoTypo: bites --> bytes
Fred Drake [Tue, 18 Jun 2002 20:38:43 +0000 (20:38 +0000)] 
Typo: bites --> bytes
(Hanging around small kids too much...;)

23 years agoAdd description of the deadlock problem with child processes and pipes, and
Fred Drake [Tue, 18 Jun 2002 20:31:24 +0000 (20:31 +0000)] 
Add description of the deadlock problem with child processes and pipes, and
hints about how to work around it.
Closes SF bug #530637.

23 years agoAdd a note about "as" not being a keyword, though it has special meaning
Fred Drake [Tue, 18 Jun 2002 19:18:02 +0000 (19:18 +0000)] 
Add a note about "as" not being a keyword, though it has special meaning
when used as part of the import statement.

Note that both "as" and "None" becoming keywords in the future.

Closes SF bug #553262.

23 years agoNote the limitation that mime_decode_header() only works for Latin-1.
Fred Drake [Tue, 18 Jun 2002 18:51:49 +0000 (18:51 +0000)] 
Note the limitation that mime_decode_header() only works for Latin-1.
Closes SF bug #551912.

23 years agoBackport:
Guido van Rossum [Tue, 18 Jun 2002 16:46:57 +0000 (16:46 +0000)] 
Backport:
Patch from SF bug 570483 (Tim Northover).

In a fresh interpreter, type.mro(tuple) would segfault, because
PyType_Ready() isn't called for tuple yet.  To fix, call
PyType_Ready(type) if type->tp_dict is NULL.

23 years agoCorect speling and add \n\ to line ends in new docstring for access().
Guido van Rossum [Tue, 18 Jun 2002 16:24:15 +0000 (16:24 +0000)] 
Corect speling and add \n\ to line ends in new docstring for access().

23 years agoClarified documentation for os.access().
Fred Drake [Tue, 18 Jun 2002 16:16:46 +0000 (16:16 +0000)] 
Clarified documentation for os.access().
Based on patch contributed by Sean Reifschneider.
Closes SF patch #570618.

23 years agoClarified description of error handling for shutil.rmtree().
Fred Drake [Tue, 18 Jun 2002 14:31:19 +0000 (14:31 +0000)] 
Clarified description of error handling for shutil.rmtree().
This closes SF patch #569832.

23 years agoUpdate description of the Expat library.
Fred Drake [Mon, 17 Jun 2002 17:56:10 +0000 (17:56 +0000)] 
Update description of the Expat library.
Closes SF bug #556370.

23 years agoPyModule_AddObject(): Added missing exceptions.
Fred Drake [Mon, 17 Jun 2002 17:16:34 +0000 (17:16 +0000)] 
PyModule_AddObject():  Added missing exceptions.
Closes SF bug #523473.

23 years agoFix documentation for PyMarshal_WriteObjectToFile() and
Fred Drake [Mon, 17 Jun 2002 15:45:21 +0000 (15:45 +0000)] 
Fix documentation for PyMarshal_WriteObjectToFile() and
PyMarshal_WriteObjectToFile().
This closes SF bug #533735.

23 years agoClean up descriptions of PyObject_RichCompare() and PyObject_RichCompareBool()
Fred Drake [Fri, 14 Jun 2002 14:36:23 +0000 (14:36 +0000)] 
Clean up descriptions of PyObject_RichCompare() and PyObject_RichCompareBool()
based on comments from David Abrahams.
Added refcount information for these functions.

23 years agoTest for the bug in recurse_down_subclasses() that I just fixed.
Guido van Rossum [Fri, 14 Jun 2002 02:37:00 +0000 (02:37 +0000)] 
Test for the bug in recurse_down_subclasses() that I just fixed.

23 years agoBackport:
Guido van Rossum [Fri, 14 Jun 2002 02:28:23 +0000 (02:28 +0000)] 
Backport:
Inexplicably, recurse_down_subclasses() was comparing the object
gotten from a weak reference to NULL instead of to None.  This caused
the following assert() to fail (but only in 2.2 in the debug build --
I have to find a better test case).

23 years agoRefer the reader to the correct module for constant definitions.
Fred Drake [Fri, 14 Jun 2002 01:58:40 +0000 (01:58 +0000)] 
Refer the reader to the correct module for constant definitions.
This closes SF bug #550777.

23 years agoDocument the Binary.data attribute.
Fred Drake [Fri, 14 Jun 2002 00:33:17 +0000 (00:33 +0000)] 
Document the Binary.data attribute.
This closes SF bug #562878.

23 years agoSF # 533070 Silence AIX C Compiler Warnings
Neal Norwitz [Thu, 13 Jun 2002 21:39:47 +0000 (21:39 +0000)] 
SF # 533070 Silence AIX C Compiler Warnings

Warning caused by using &func.  & is not necessary.

23 years agoBackport:
Guido van Rossum [Thu, 13 Jun 2002 21:36:35 +0000 (21:36 +0000)] 
Backport:
Fix for SF bug 532646.  This is a little simpler than what Neal
suggested there, based upon a better analysis (__getattr__ is a red
herring).
[This might be a 2.1 bugfix candidate we well, if people care]

23 years agoDo not claim that getlocale() returns a tulpe; that is not always true.
Fred Drake [Thu, 13 Jun 2002 17:54:44 +0000 (17:54 +0000)] 
Do not claim that getlocale() returns a tulpe; that is not always true.
Closes SF bug #568577.

23 years agoAdd documentation for PyObject_RichCompare() and PyObject_RichCompareBool(),
Fred Drake [Thu, 13 Jun 2002 11:53:54 +0000 (11:53 +0000)] 
Add documentation for PyObject_RichCompare() and PyObject_RichCompareBool(),
constributed by David Abrahams.
This closes SF patch #568081.

23 years agoAdd version annotations for some older changes to the calendar module.
Fred Drake [Thu, 13 Jun 2002 01:35:19 +0000 (01:35 +0000)] 
Add version annotations for some older changes to the calendar module.
Closes SF patch #567867.

23 years agoBackport 1.15:
Guido van Rossum [Wed, 12 Jun 2002 14:41:50 +0000 (14:41 +0000)] 
Backport 1.15:

Add a testcase to ensure that cycles going through the __class__ link
of a new-style instance are detected by the garbage collector.

23 years agoBackport:
Guido van Rossum [Wed, 12 Jun 2002 03:48:46 +0000 (03:48 +0000)] 
Backport:

SF bug 567538: Generator can crash the interpreter (Finn Bock).

This was a simple typo.  Strange that the compiler didn't catch it!
Instead of WHY_CONTINUE, two tests used CONTINUE_LOOP, which isn't a
why_code at all, but an opcode; but even though 'why' is declared as
an enum, comparing it to an int is apparently not even worth a
warning -- not in gcc, and not in VC++. :-(

23 years agoCompletely revise markup for the list of list methods; the new markup matches
Fred Drake [Tue, 11 Jun 2002 02:57:32 +0000 (02:57 +0000)] 
Completely revise markup for the list of list methods; the new markup matches
the semantics and presentation used in the library reference.
Added an explanation of the use of [...] to denote optional arguments, since
this is the only use of this in a signature line.
Closes SF bug #567127.

23 years agoRecord the latest fixes.
Guido van Rossum [Mon, 10 Jun 2002 21:40:01 +0000 (21:40 +0000)] 
Record the latest fixes.

23 years agoBackport:
Guido van Rossum [Mon, 10 Jun 2002 21:37:00 +0000 (21:37 +0000)] 
Backport:

SF patch 560794 (Greg Chapman): deepcopy can't handle custom
metaclasses.

This is essentially the same problem as that reported in bug 494904
for pickle: deepcopy should treat instances of custom metaclasses the
same way it treats instances of type 'type'.

23 years agoBackport two patches that belong together:
Guido van Rossum [Mon, 10 Jun 2002 16:02:44 +0000 (16:02 +0000)] 
Backport two patches that belong together:

(2.150)
In the recent python-dev thread "Bizarre new test failure", we
discovered that subtype_traverse must traverse the type if it is a
heap type, because otherwise some cycles involving a type and its
instance would not be collected.  Simplest example:
    while 1:
        class C(object): pass
        C.ref = C()
This program grows without bounds before this fix.  (It grows ever
slower since it spends ever more time in the collector.)

Simply adding the right visit() call to subtype_traverse() revealed
other problems.  With MvL's help we re-learned that type_clear()
doesn't have to clear *all* references, only the ones that may not be
cleared by other means.  Careful analysis (see comments in the code)
revealed that only tp_mro needs to be cleared.  (The previous checkin
to this file adds a test for tp_mro==NULL to _PyType_Lookup() that's
essential to prevent crashes due to tp_mro being NULL when
subtype_dealloc() tries to look for a __del__ method.)  The same kind
of analysis also revealed that subtype_clear() doesn't need to clear
the instance dict.

With this fix, a useful property of the collector is once again
guaranteed: a single gc.collect() call will clear out all garbage.
(It didn't always before, which put us on the track of this bug.)

(2.151)
Undo the last chunk of the previous patch, putting back a useful
assert into PyType_Ready(): now that we're not clearing tp_dict, we
can assert that it's non-NULL again.