]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
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.

23 years agoBackport:
Guido van Rossum [Mon, 10 Jun 2002 14:34:01 +0000 (14:34 +0000)] 
Backport:

Three's a charm: yet another fix for SF bug 551412.  Thinking again
about the test case, slot_nb_power gets called on behalf of its second
argument, but with a non-None modulus it wouldn't check this, and
believes it is called on behalf of its first argument.  Fix this
properly, and get rid of the code in _PyType_Lookup() that tries to
call _PyType_Ready().  But do leave a check for a NULL tp_mro there,
because this can still legitimately occur.

23 years agoOops. That wasn't supposed to be backported. :-(
Guido van Rossum [Thu, 6 Jun 2002 20:11:15 +0000 (20:11 +0000)] 
Oops.  That wasn't supposed to be backported. :-(

23 years agoBackport:
Guido van Rossum [Thu, 6 Jun 2002 20:10:16 +0000 (20:10 +0000)] 
Backport:
The tp_new implementation should initialize the errorhandler field,
otherwise this code could segfault:

  from socket import socket
  s = socket.__new__(socket)
  s.recv(100)

23 years agoBackport:
Guido van Rossum [Thu, 6 Jun 2002 17:55:35 +0000 (17:55 +0000)] 
Backport:

Fix from SF patch 565085: copy._reduction doesn't __setstate__.
Straightforward fix.

23 years agoSF bug 558179.
Guido van Rossum [Wed, 5 Jun 2002 19:10:19 +0000 (19:10 +0000)] 
SF bug 558179.
Change default for get() back to None.

23 years agoBackport to 2.2.x:
Guido van Rossum [Tue, 4 Jun 2002 21:19:55 +0000 (21:19 +0000)] 
Backport to 2.2.x:

Address SF bug 519621: slots weren't traversed by GC.

While I was at it, I added a tp_clear handler and changed the
tp_dealloc handler to use the clear_slots helper for the tp_clear
handler.

Also set mp->flags = READONLY for the __weakref__ pseudo-slot.

[Note that I am *not* backporting the part of that patch that
tightened the __slot__ rules.]

23 years agoBackport Guido's changes from revision 1.89:
Fred Drake [Tue, 4 Jun 2002 16:29:24 +0000 (16:29 +0000)] 
Backport Guido's changes from revision 1.89:

Addressed SF bug 421973 (finally).

Rewrote the subsection on coercion rules (and made it a proper
subsection, with a label).  The new section is much less precise,
because precise rules would be too hard to give (== I don't know what
they are any more :-).  OTOH, the new section gives much more
up-to-date information.

Also noted that __coerce__ may return NotImplemented, with the same
meaning as None.

FLD: My modifications to Guido's markup are included from revision 1.90.

23 years agoBackport to 2.2.x:
Guido van Rossum [Mon, 3 Jun 2002 19:54:10 +0000 (19:54 +0000)] 
Backport to 2.2.x:

Address the residual issue with the fix for SF 551412 in
_PyType_Lookup().  Decided to clear the error condition in the
unfortunate but unlikely case that PyType_Ready() fails.

23 years agoRun gcc with -w to work-around an autoconf 2.13 bug. Fixes #535545.
Martin v. Löwis [Sun, 2 Jun 2002 17:34:47 +0000 (17:34 +0000)] 
Run gcc with -w to work-around an autoconf 2.13 bug. Fixes #535545.

23 years agoPatch #552060: Add SSLFakeSocket.sendall.
Martin v. Löwis [Sun, 2 Jun 2002 12:32:04 +0000 (12:32 +0000)] 
Patch #552060: Add SSLFakeSocket.sendall.

23 years agoFix SF #561858 Assertion with very long lists
Neal Norwitz [Sat, 1 Jun 2002 18:26:22 +0000 (18:26 +0000)] 
Fix SF #561858 Assertion with very long lists

if co_stacksize was > 32767 (the maximum value
which can be stored in 16 bits (signed)),
the PyCodeObject would be written wrong.
So on the second import (reading the .pyc)
would cause a crash.

Since we can't change the PYC magic, we
go on (silently), but don't write the file.
This means everything will work, but
a .pyc will not be written and the file will need
to be parsed on each import.

I will backport.

23 years agoBackport to 2.2.x:
Guido van Rossum [Fri, 31 May 2002 21:17:53 +0000 (21:17 +0000)] 
Backport to 2.2.x:

SF bug 533625 (Armin Rigo). rexec: potential security hole

If a rexec instance allows writing in the current directory (a common
thing to do), there's a way to execute bogus bytecode.  Fix this by
not allowing imports from .pyc files (in a way that allows a site to
configure things so that .pyc files *are* allowed, if writing is not
allowed).

23 years agoUpdate links and information on PyQt/PyKDE.
Fred Drake [Fri, 31 May 2002 18:22:14 +0000 (18:22 +0000)] 
Update links and information on PyQt/PyKDE.

23 years agoBackport change to 1.35 adding doc strings
Raymond Hettinger [Wed, 29 May 2002 23:44:50 +0000 (23:44 +0000)] 
Backport change to 1.35 adding doc strings

23 years agoBackport change to 1.19 adding docstrings.
Raymond Hettinger [Wed, 29 May 2002 23:35:08 +0000 (23:35 +0000)] 
Backport change to 1.19 adding docstrings.

23 years agoBackport change to 1.18 adding docstrings
Raymond Hettinger [Wed, 29 May 2002 23:24:12 +0000 (23:24 +0000)] 
Backport change to 1.18 adding docstrings

23 years agoBackport change to 1.29 adding docstrings
Raymond Hettinger [Wed, 29 May 2002 23:15:46 +0000 (23:15 +0000)] 
Backport change to 1.29 adding docstrings

23 years agoBackport change to 1.8 adding docstrings
Raymond Hettinger [Wed, 29 May 2002 23:05:46 +0000 (23:05 +0000)] 
Backport change to 1.8 adding docstrings

23 years agoThe logreader object did not always refill the input buffer correctly
Neil Schemenauer [Wed, 29 May 2002 18:44:30 +0000 (18:44 +0000)] 
The logreader object did not always refill the input buffer correctly
and got confused by certain log files.  Remove logreader_refill and the
associated logic and replace with fgetc.

23 years agoBackport fix by tismer for #210682
Neal Norwitz [Wed, 29 May 2002 01:17:47 +0000 (01:17 +0000)] 
Backport fix by tismer for #210682

fixed an old buglet that caused bdb to be unable to
continue in the botframe, after a breakpoint was set.
the key idea is not to set botframe to the bottom level frame,
but its f_back, which actually might be None.
Additional changes: migrated old exception trick to use
sys._getframe(), which exists both in 2.1 and 2.2 .

Note: I believe Mark Hammond needs to look over his code now.
F5 correctly starts up in the debugger, but later on doesn't stop at a given
breakpoint any longer.

kind regards - chris

23 years agoFix for SF bug 551412. When _PyType_Lookup() is called on a type
Guido van Rossum [Fri, 24 May 2002 21:41:26 +0000 (21:41 +0000)] 
Fix for SF bug 551412.  When _PyType_Lookup() is called on a type
whose tp_mro hasn't been initialized, it would dump core.  Fix this by
checking for NULL and calling PyType_Ready().  Backport from 2.3.

23 years agoAdded missing dependency on the refcount data file.
Fred Drake [Thu, 23 May 2002 19:42:11 +0000 (19:42 +0000)] 
Added missing dependency on the refcount data file.

23 years agoCloses: #556025 seg fault when doing list(xrange(1e9))
Neal Norwitz [Thu, 23 May 2002 13:02:37 +0000 (13:02 +0000)] 
Closes: #556025 seg fault when doing list(xrange(1e9))
A MemoryError is now raised when the list cannot be created.
There is a test, but as the comment says, it really only
works for 32 bit systems.  I don't know how to improve
the test for other systems (ie, 64 bit or systems
where the data size != addressable size,
e.g. 64 bit data, but 48 bit addressable memory)

23 years agoAdded a version annotation for StringTypes.
Fred Drake [Wed, 22 May 2002 02:43:42 +0000 (02:43 +0000)] 
Added a version annotation for StringTypes.

23 years agoAdd availability information for a couple of the types, and notes on writing
Fred Drake [Tue, 21 May 2002 14:32:23 +0000 (14:32 +0000)] 
Add availability information for a couple of the types, and notes on writing
string-type tests for versions of Python built without Unicode support.

23 years agoMunge the RCS keywords to avoid updates, so the version number matches that
Fred Drake [Tue, 21 May 2002 03:50:49 +0000 (03:50 +0000)] 
Munge the RCS keywords to avoid updates, so the version number matches that
of the PyUNIT version of the same file.  This helps people understand that
this version is the same as the version from the independent PyUNIT
release (confusion was indicated on the PyUNIT mailing list).

23 years agoTypo: build -> built
Fred Drake [Thu, 16 May 2002 13:47:31 +0000 (13:47 +0000)] 
Typo: build -> built

23 years agoFix broken reference, minor clarification.
Fred Drake [Thu, 16 May 2002 13:47:00 +0000 (13:47 +0000)] 
Fix broken reference, minor clarification.

23 years agoPatch 547037. Corrected documentation to match
Raymond Hettinger [Thu, 16 May 2002 04:33:33 +0000 (04:33 +0000)] 
Patch 547037.  Corrected documentation to match
actual module behavior for adding newlines.

23 years ago[Bug #556370] Update URL for Expat
Andrew M. Kuchling [Wed, 15 May 2002 20:46:56 +0000 (20:46 +0000)] 
[Bug #556370] Update URL for Expat

23 years agoAdded missing index entries for mapping methods. Closes patch #548693.
Raymond Hettinger [Wed, 15 May 2002 15:50:32 +0000 (15:50 +0000)] 
Added missing index entries for mapping methods.  Closes patch #548693.

23 years agoAdd docstrings excerpted from the library reference.
Raymond Hettinger [Wed, 15 May 2002 03:50:31 +0000 (03:50 +0000)] 
Add docstrings excerpted from the library reference.
Closes patch 556161.

23 years agoUse spaces, not tabs for indents.
Guido van Rossum [Tue, 14 May 2002 14:07:12 +0000 (14:07 +0000)] 
Use spaces, not tabs for indents.

Raymond Hettinger, beware!  This caused the Unix install to fail!

23 years agoCloses patch 529408 deprecating random.stdgamma().
Raymond Hettinger [Tue, 14 May 2002 06:56:27 +0000 (06:56 +0000)] 
Closes patch 529408 deprecating random.stdgamma().

23 years agoCloses SF bug 527139. Brings docs inline with random.py 1.26.6.1
Raymond Hettinger [Mon, 13 May 2002 23:47:02 +0000 (23:47 +0000)] 
Closes SF bug 527139.  Brings docs inline with random.py 1.26.6.1
which fixed the unnecessarily restricted method domain.

23 years agoCloses SF bug 527139. Moved temp variables inside guard.
Raymond Hettinger [Mon, 13 May 2002 23:43:06 +0000 (23:43 +0000)] 
Closes SF bug 527139.  Moved temp variables inside guard.

23 years agoCorrect gammavariate's method name and domain.
Raymond Hettinger [Mon, 13 May 2002 22:39:28 +0000 (22:39 +0000)] 
Correct gammavariate's method name and domain.
Partial solution to SF bug 527139.

23 years agoBackport from 2.3:
Guido van Rossum [Mon, 13 May 2002 18:30:40 +0000 (18:30 +0000)] 
Backport from 2.3:

Jim Fulton reported a segfault in dir().  A heavily proxied object
returned a proxy for __class__ whose __bases__ was also a proxy.  The
merge_class_dict() helper for dir() assumed incorrectly that __bases__
would always be a tuple and used the in-line tuple API on the proxy.

23 years agoBackport checkin:
Walter Dörwald [Mon, 13 May 2002 09:11:44 +0000 (09:11 +0000)] 
Backport checkin:

Add #ifdef PY_USING_UNICODE sections, so that
stringobject.c compiles again with --disable-unicode.

Fixes SF bug http://www.python.org/sf/554912

23 years agoBackport ver 1.88 correction noting that lists now support .__getitem__().
Raymond Hettinger [Mon, 13 May 2002 07:55:24 +0000 (07:55 +0000)] 
Backport ver 1.88 correction noting that lists now support .__getitem__().
Closes SF bug 548874 and patch 552468.

23 years agoClose SF bug 551673. Backport Skip Montanaro's checkin of 2.112.
Raymond Hettinger [Sun, 12 May 2002 17:20:38 +0000 (17:20 +0000)] 
Close SF bug 551673.  Backport Skip Montanaro's checkin of 2.112.
Clarifies message when raising TypeError to indicate that float() accepts
strings or numbers.

23 years agoFix typo: ptread --> pthread
Fred Drake [Sat, 11 May 2002 03:37:15 +0000 (03:37 +0000)] 
Fix typo:  ptread --> pthread
Closes SF bug #554644.

23 years agoFix typo
Andrew M. Kuchling [Thu, 9 May 2002 14:34:47 +0000 (14:34 +0000)] 
Fix typo

23 years agoBackport of 1.4:
Jack Jansen [Tue, 7 May 2002 20:21:50 +0000 (20:21 +0000)] 
Backport of 1.4:
Fixed a mistake on my part when regenerating: removed a bogus import of ApplscriBugfix candidate (I'll move it over myself).

23 years agoAdd a note explaining the interaction between unbuffered input and
Fred Drake [Mon, 6 May 2002 16:03:00 +0000 (16:03 +0000)] 
Add a note explaining the interaction between unbuffered input and
xreadlines.xreadlines().
This closes SF patch #552804.

23 years agoIntegrated SF patch #539487 by Matthias Klose:
Fred Drake [Fri, 3 May 2002 04:54:20 +0000 (04:54 +0000)] 
Integrated SF patch #539487 by Matthias Klose:
This patch adds Milan Zamazal's conversion script and
modifies the mkinfo script to build the info doc files
from the LaTeX sources.  Currently, the mac, doc and
inst TeX files are not handled.
Explicitly checks for GNU Emacs 21.

23 years agoThis commit was manufactured by cvs2svn to create branch
cvs2svn [Fri, 3 May 2002 04:54:20 +0000 (04:54 +0000)] 
This commit was manufactured by cvs2svn to create branch
'release22-maint'.

23 years agoAdd a regression test that was removed prematurely. This tests deprecated
Fred Drake [Thu, 2 May 2002 18:13:48 +0000 (18:13 +0000)] 
Add a regression test that was removed prematurely.  This tests deprecated
(but not removed!) features of the xrange object.  This test should be
maintained for all of 2.2.x to avoid regression failures.

23 years agoMany minor markup adjustments for consistency.
Fred Drake [Thu, 2 May 2002 17:56:17 +0000 (17:56 +0000)] 
Many minor markup adjustments for consistency.

23 years agoRemove extra period produced by previous change.
Fred Drake [Thu, 2 May 2002 17:54:01 +0000 (17:54 +0000)] 
Remove extra period produced by previous change.

23 years agoAdded regression tests for xrange object attributes.
Fred Drake [Thu, 2 May 2002 16:07:59 +0000 (16:07 +0000)] 
Added regression tests for xrange object attributes.
See SF bug #551285.

23 years agoFix attribute access for the xrange objects. The tp_getattr and tp_getattro
Fred Drake [Thu, 2 May 2002 16:05:40 +0000 (16:05 +0000)] 
Fix attribute access for the xrange objects.  The tp_getattr and tp_getattro
handlers were both set, but were not compatible.  This change uses only the
tp_getattro handler with a more "modern" approach.
This fixes SF bug #551285.

23 years agoCorrect information on support for repietition & concatenation for buffer
Fred Drake [Thu, 2 May 2002 05:57:07 +0000 (05:57 +0000)] 
Correct information on support for repietition & concatenation for buffer
and xrange objects.
This closes SF bug #550555.

23 years agoRevise version/date information since we're not about to hit a release.
Fred Drake [Thu, 2 May 2002 04:51:37 +0000 (04:51 +0000)] 
Revise version/date information since we're not about to hit a release.

23 years agoBackport buffer() tests trunk to avoid regression failures.
Fred Drake [Thu, 2 May 2002 04:49:48 +0000 (04:49 +0000)] 
Backport buffer() tests trunk to avoid regression failures.

23 years agoExplain what os.read() returns at end of file.
Fred Drake [Wed, 1 May 2002 03:32:25 +0000 (03:32 +0000)] 
Explain what os.read() returns at end of file.
This closes SF bug #550409.

23 years agoAdd missing right-parenthesis.
Fred Drake [Wed, 1 May 2002 03:22:48 +0000 (03:22 +0000)] 
Add missing right-parenthesis.

23 years agoAdd a note about when the "%r" formatting code was added.
Fred Drake [Tue, 30 Apr 2002 14:54:31 +0000 (14:54 +0000)] 
Add a note about when the "%r" formatting code was added.

23 years agobackport theller's patch:
Anthony Baxter [Tue, 30 Apr 2002 04:07:57 +0000 (04:07 +0000)] 
backport theller's patch:

Typo: whcar_t should be wchar_t.

Bugfix candidate? Don't know how this is handled in the docs.

Original patch(es):
python/dist/src/Doc/api/concrete.tex:1.15

23 years agobackport tim_one's patch:
Anthony Baxter [Tue, 30 Apr 2002 04:05:33 +0000 (04:05 +0000)] 
backport tim_one's patch:

Repair widespread misuse of _PyString_Resize.  Since it's clear people
don't understand how this function works, also beefed up the docs.  The
most common usage error is of this form (often spread out across gotos):

if (_PyString_Resize(&s, n) < 0) {
Py_DECREF(s);
s = NULL;
goto outtahere;
}

The error is that if _PyString_Resize runs out of memory, it automatically
decrefs the input string object s (which also deallocates it, since its
refcount must be 1 upon entry), and sets s to NULL.  So if the "if"
branch ever triggers, it's an error to call Py_DECREF(s):  s is already
NULL!  A correct way to write the above is the simpler (and intended)

if (_PyString_Resize(&s, n) < 0)
goto outtahere;

Bugfix candidate.

Original patch(es):
python/dist/src/Python/bltinmodule.c:2.253

23 years agobackport tim_one's patch:
Anthony Baxter [Tue, 30 Apr 2002 03:41:53 +0000 (03:41 +0000)] 
backport tim_one's patch:

Repair widespread misuse of _PyString_Resize.  Since it's clear people
don't understand how this function works, also beefed up the docs.  The
most common usage error is of this form (often spread out across gotos):

if (_PyString_Resize(&s, n) < 0) {
Py_DECREF(s);
s = NULL;
goto outtahere;
}

The error is that if _PyString_Resize runs out of memory, it automatically
decrefs the input string object s (which also deallocates it, since its
refcount must be 1 upon entry), and sets s to NULL.  So if the "if"
branch ever triggers, it's an error to call Py_DECREF(s):  s is already
NULL!  A correct way to write the above is the simpler (and intended)

if (_PyString_Resize(&s, n) < 0)
goto outtahere;

Bugfix candidate.

Original patch(es):
python/dist/src/Objects/fileobject.c:2.161
python/dist/src/Objects/stringobject.c:2.161
python/dist/src/Objects/unicodeobject.c:2.147

23 years agobackport tim_one's patch:
Anthony Baxter [Tue, 30 Apr 2002 03:33:15 +0000 (03:33 +0000)] 
backport tim_one's patch:

(some tweaking for different _PyObject_GC_Malloc() call in 2.2. checked,
still returns the same thing on failure...)

_PyObject_GC_New:  Could call PyObject_INIT with a NULL 1st argument.
_PyObject_GC_NewVar:  Could call PyObject_INIT_VAR likewise.

Bugfix candidate.

Original patch(es):
python/dist/src/Modules/gcmodule.c:2.40

23 years agobackport tim_one's patch:
Anthony Baxter [Tue, 30 Apr 2002 03:24:12 +0000 (03:24 +0000)] 
backport tim_one's patch:

Repair widespread misuse of _PyString_Resize.  Since it's clear people
don't understand how this function works, also beefed up the docs.  The
most common usage error is of this form (often spread out across gotos):

if (_PyString_Resize(&s, n) < 0) {
Py_DECREF(s);
s = NULL;
goto outtahere;
}

The error is that if _PyString_Resize runs out of memory, it automatically
decrefs the input string object s (which also deallocates it, since its
refcount must be 1 upon entry), and sets s to NULL.  So if the "if"
branch ever triggers, it's an error to call Py_DECREF(s):  s is already
NULL!  A correct way to write the above is the simpler (and intended)

if (_PyString_Resize(&s, n) < 0)
goto outtahere;

Bugfix candidate.

Original patch(es):
python/dist/src/Doc/api/concrete.tex:1.13

23 years agoAdded a missing "|" in the grammar productions used in the reference manual
Fred Drake [Tue, 30 Apr 2002 02:21:32 +0000 (02:21 +0000)] 
Added a missing "|" in the grammar productions used in the reference manual
(reported by François Pinard).
Added some missing "_" characters in the same cluster of productions.
Added missing floor division operator in m_expr production, and mention
floor division in the relevant portion of the text.

23 years agoSlightly expand and clarify the differences between getegid(), getgid(),
Fred Drake [Fri, 26 Apr 2002 20:59:55 +0000 (20:59 +0000)] 
Slightly expand and clarify the differences between getegid(), getgid(),
getpgrp(), and setpgid().
This closes SF bug #547939.

23 years agoBe more consistent, both internally and with recommended practice.
Fred Drake [Fri, 26 Apr 2002 20:43:59 +0000 (20:43 +0000)] 
Be more consistent, both internally and with recommended practice.
This closes SF bug #547953.

23 years agobackport gvanrossum's patch:
Anthony Baxter [Fri, 26 Apr 2002 06:31:22 +0000 (06:31 +0000)] 
backport gvanrossum's patch:

Make sure that tp_free frees the int the same way as tp_dealloc would.
This fixes the problem that Barry reported on python-dev:
   >>> 23000 .__class__ = bool
crashes in the deallocator.  This was because int inherited tp_free
from object, which uses the default allocator.

2.2. Bugfix candidate.

(trivial change in backport: "freefunc" -> "destructor")

Original patch(es):
python/dist/src/Objects/intobject.c:2.82

23 years agoBackport of trunk fix:
Jack Jansen [Wed, 24 Apr 2002 09:21:48 +0000 (09:21 +0000)] 
Backport of trunk fix:
Second part of fix for #493826: regenerated suite modules so errn exists
but == 0 doesn't signal an error.

This also picked up a few other changes, but they should be harmless.

23 years agoThis commit was manufactured by cvs2svn to create branch
cvs2svn [Wed, 24 Apr 2002 09:21:48 +0000 (09:21 +0000)] 
This commit was manufactured by cvs2svn to create branch
'release22-maint'.

23 years agoAdd text about circular references caused by storing frames in local
Fred Drake [Tue, 23 Apr 2002 21:20:44 +0000 (21:20 +0000)] 
Add text about circular references caused by storing frames in local
variables.  This closes SF bug #543148.

23 years agobackport some warnings filters to shut up complaints about complex
Anthony Baxter [Tue, 23 Apr 2002 04:02:55 +0000 (04:02 +0000)] 
backport some warnings filters to shut up complaints about complex
divmod &c. Should probably be cleaned up properly so that the tests
don't call that.

23 years agobackport:
Anthony Baxter [Tue, 23 Apr 2002 02:21:00 +0000 (02:21 +0000)] 
backport:

don't fail if the audio device is busy, just skip.
SF patch 545486