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

23 years agoBackport checkin:
Walter Dörwald [Mon, 22 Apr 2002 18:42:45 +0000 (18:42 +0000)] 
Backport checkin:
Apply patch diff.txt from SF feature request
http://www.python.org/sf/444708

This adds the optional argument for str.strip
to unicode.strip too and makes it possible
to call str.strip with a unicode argument
and unicode.strip with a str argument.

23 years agoBackport the following changes:
Walter Dörwald [Mon, 22 Apr 2002 11:57:06 +0000 (11:57 +0000)] 
Backport the following changes:

Misc/NEWS 1.387->1.388
Lib/test/string_tests.py 1.10->1.11, 1.12->1.14,
Lib/test/test_unicode.py 1.50->1.51, 1.53->1.54, 1.55->1.56
Lib/test/test_string.py 1.15->1.16
Lib/string.py 1.61->1.63
Lib/test/test_userstring.py 1.5->1.6, 1.11, 1.12
Objects/stringobject.c 2.156->2.159
Objects/unicodeobject.c 2.137->2.139
Doc/lib/libstdtypes.tec 1.87->1.88

Add a method zfill to str, unicode and UserString
and change Lib/string.py accordingly
(see SF patch http://www.python.org/sf/536241)

This also adds Guido's fix to test_userstring.py
and the subinstance checks in test_string.py
and test_unicode.py.

23 years agobackport mhammond's patch:
Anthony Baxter [Mon, 22 Apr 2002 11:21:59 +0000 (11:21 +0000)] 
backport mhammond's patch:

Fix bug 544473 - "Queue module can deadlock".
Use try/finally to ensure all Queue locks remain stable.
Includes test case.  Bugfix candidate.

(and branchpatch can now handle adding files :)

23 years agoThis commit was manufactured by cvs2svn to create branch
cvs2svn [Mon, 22 Apr 2002 11:21:59 +0000 (11:21 +0000)] 
This commit was manufactured by cvs2svn to create branch
'release22-maint'.

23 years agoPatch #500311: Work around for buggy https servers. Fixes #494762.
Martin v. Löwis [Sat, 20 Apr 2002 07:45:25 +0000 (07:45 +0000)] 
Patch #500311: Work around for buggy https servers. Fixes #494762.

23 years agobackport fix for SF buf #505315 from trunk
Jeremy Hylton [Sat, 20 Apr 2002 05:07:05 +0000 (05:07 +0000)] 
backport fix for SF buf #505315 from trunk

23 years agoBackport fix for SF #522274 from trunk.
Jeremy Hylton [Fri, 19 Apr 2002 22:58:11 +0000 (22:58 +0000)] 
Backport fix for SF #522274 from trunk.

23 years agoPatch #546194: Check constants individually. Fixes 534143 on OpenBSD.
Martin v. Löwis [Fri, 19 Apr 2002 21:06:13 +0000 (21:06 +0000)] 
Patch #546194: Check constants individually. Fixes 534143 on OpenBSD.

23 years ago[backport bug fix from the trunk]
Jeremy Hylton [Fri, 19 Apr 2002 14:59:08 +0000 (14:59 +0000)] 
[backport bug fix from the trunk]

Fix SF #544995 (zlib crash on second flush call)
Bug fix by mhammond.

Bug fix candidate for 2.2, not present in 2.1.

23 years agoClean up the use of version numbers in filenames; always use an "abstract"
Fred Drake [Fri, 19 Apr 2002 04:06:06 +0000 (04:06 +0000)] 
Clean up the use of version numbers in filenames; always use an "abstract"
version number, and explain what it is at the top of the chapter.
This closes SF bug #225003.

23 years agobackport mhammond's patch:
Anthony Baxter [Fri, 19 Apr 2002 03:54:37 +0000 (03:54 +0000)] 
backport mhammond's patch:

Fix bug 544473 - "Queue module can deadlock".
Use try/finally to ensure all Queue locks remain stable.
Includes test case.  Bugfix candidate.

Original patch(es):
python/dist/src/Lib/Queue.py:1.15

23 years agoTest for --export-dynamic directly to avoid problems with binutils 2.12.
Martin v. Löwis [Thu, 18 Apr 2002 14:55:08 +0000 (14:55 +0000)] 
Test for --export-dynamic directly to avoid problems with binutils 2.12.

23 years agobackport gvanrossum's patch:
Anthony Baxter [Thu, 18 Apr 2002 05:39:54 +0000 (05:39 +0000)] 
backport gvanrossum's patch:

Deprecate % as well.  The message for deprecation of //, % and divmod
is the same in all three cases (mostly because // calls divmod :-).

Original patches were:
python/dist/src/Objects/complexobject.c:2.59

23 years agobackport gvanrossum's patch:
Anthony Baxter [Thu, 18 Apr 2002 05:38:53 +0000 (05:38 +0000)] 
backport gvanrossum's patch:

Add news about deprecated complex ops.

Original patches were:
python/dist/src/Misc/NEWS:1.387

23 years agobackport gvanrossum's patch:
Anthony Baxter [Thu, 18 Apr 2002 05:37:51 +0000 (05:37 +0000)] 
backport gvanrossum's patch:

SF bug #543387.

Complex numbers implement divmod() and //, neither of which makes one
lick of sense.  Unfortunately this is documented, so I'm adding a
deprecation warning now, so we can delete this silliness, oh, around
2005 or so.

Bugfix candidate (At least for 2.2.2, I think.)

Original patches were:
python/dist/src/Objects/complexobject.c:2.58

23 years agobackport fdrake's patch:
Anthony Baxter [Thu, 18 Apr 2002 05:22:33 +0000 (05:22 +0000)] 
backport fdrake's patch:

Document the optional argument to the .strip(), .rstrip(), .strip() string
methods.
Part of SF feature #444708.

Original patches were:
python/dist/src/Doc/lib/libstdtypes.tex:1.87

23 years agoNews for new strip method argument. Made the news message a bit
Anthony Baxter [Thu, 18 Apr 2002 05:21:16 +0000 (05:21 +0000)] 
News for new strip method argument. Made the news message a bit
more informative.

23 years agobackport gvanrossum's patch:
Anthony Baxter [Thu, 18 Apr 2002 05:18:56 +0000 (05:18 +0000)] 
backport gvanrossum's patch:

Partially implement SF feature request 444708.

Add optional arg to string methods strip(), lstrip(), rstrip().
The optional arg specifies characters to delete.

Also for UserString.

Still to do:

- Misc/NEWS
- LaTeX docs (I did the docstrings though)
- Unicode methods, and Unicode support in the string methods.

Original patches were:
python/dist/src/Lib/test/string_tests.py:1.12

23 years agobackport gvanrossum's patch:
Anthony Baxter [Thu, 18 Apr 2002 05:17:53 +0000 (05:17 +0000)] 
backport gvanrossum's patch:

Partially implement SF feature request 444708.

Add optional arg to string methods strip(), lstrip(), rstrip().
The optional arg specifies characters to delete.

Also for UserString.

Still to do:

- Misc/NEWS
- LaTeX docs (I did the docstrings though)
- Unicode methods, and Unicode support in the string methods.

Original patches were:
python/dist/src/Lib/UserString.py:1.11

23 years agobackport gvanrossum's patch:
Anthony Baxter [Thu, 18 Apr 2002 05:16:37 +0000 (05:16 +0000)] 
backport gvanrossum's patch:

Partially implement SF feature request 444708.

Add optional arg to string methods strip(), lstrip(), rstrip().
The optional arg specifies characters to delete.

Also for UserString.

Still to do:

- Misc/NEWS
- LaTeX docs (I did the docstrings though)
- Unicode methods, and Unicode support in the string methods.

Original patches were:
python/dist/src/Objects/stringobject.c:2.156

23 years agobackport gvanrossum's patch:
Anthony Baxter [Thu, 18 Apr 2002 05:13:41 +0000 (05:13 +0000)] 
backport gvanrossum's patch:

SF bug #543318 (Frank J. Tobin).

In DatagramRequestHandler.setup(), the wfile initialization should be
StringIO.StringIO(), not StringIO.StringIO(slf.packet).

Bugfix candidate (all the way back to Python 1.5.2 :-).

Original patches were:
python/dist/src/Lib/SocketServer.py:1.31

23 years agobackport gvanrossum's patch:
Anthony Baxter [Thu, 18 Apr 2002 05:11:50 +0000 (05:11 +0000)] 
backport gvanrossum's patch:

SF bug #541883 (Vincent Fiack).

A stupid bug in object_set_class(): didn't check for value==NULL
before checking its type.

Bugfix candidate.

Original patches were:
python/dist/src/Objects/typeobject.c:2.142

23 years agobackport gvanrossum's patch:
Anthony Baxter [Thu, 18 Apr 2002 05:10:58 +0000 (05:10 +0000)] 
backport gvanrossum's patch:

SF bug #541883 (Vincent Fiack).

A stupid bug in object_set_class(): didn't check for value==NULL
before checking its type.

Bugfix candidate.

Original patches were:
python/dist/src/Lib/test/test_descr.py:1.129

23 years agobackport gvanrossum's patch:
Anthony Baxter [Thu, 18 Apr 2002 05:08:28 +0000 (05:08 +0000)] 
backport gvanrossum's patch:

Provisional fix for writefile() [SF bug # 541730].

The problem was that an exception can occur in the text.get() call or
in the write() call, when the text buffer contains non-ASCII
characters.  This causes the previous contents of the file to be lost.

The provisional fix is to call str(self.text.get(...)) *before*
opening the file, so that if the exception occurs, we never open the
file.

Two orthogonal better solutions have to wait for policy decisions:

1. We could try to encode the data as Latin-1 or as UTF-8; but that
   would require IDLE to grow a notion of file encoding which requires
   more thought.

2. We could make backups before overwriting a file.  This requires
   more thought because it needs to be fast and cross-platform and
   configurable.

Original patches were:
python/dist/src/Tools/idle/IOBinding.py:1.6

23 years agobackport nnorwitz's patch:
Anthony Baxter [Thu, 18 Apr 2002 05:00:45 +0000 (05:00 +0000)] 
backport nnorwitz's patch:

BDFL agreed with Tim: rehabilitate randint().

23 years agobackport fdrake's patch:
Anthony Baxter [Thu, 18 Apr 2002 04:59:44 +0000 (04:59 +0000)] 
backport fdrake's patch:

BDFL agreed with Tim: rehabilitate randint().

23 years agobackport tim_one's patch:
Anthony Baxter [Thu, 18 Apr 2002 04:52:10 +0000 (04:52 +0000)] 
backport tim_one's patch:

resetwarnings():  change the docstring to reflect what the code
actually does.  Note that the description in the Library Reference
manual is already accurate.

Bugfix candidate.

23 years agobackport bwarsaw's patch:
Anthony Baxter [Thu, 18 Apr 2002 04:48:14 +0000 (04:48 +0000)] 
backport bwarsaw's patch:

test_mktime(): Removed.  This wasn't really testing anything useful
(or platform independent).  Closes SF bug #460357.

Bug fix candidate.

23 years agoDarn. Of course the warning that Tim killed on the trunk must also be
Guido van Rossum [Thu, 18 Apr 2002 04:47:10 +0000 (04:47 +0000)] 
Darn.  Of course the warning that Tim killed on the trunk must also be
killed in the branch.

23 years agobackport gvanrossum's patch:
Anthony Baxter [Thu, 18 Apr 2002 04:46:49 +0000 (04:46 +0000)] 
backport gvanrossum's patch:

SF bug 544647.

PyNumber_InPlaceMultiply insisted on calling sq_inplace_repeat if it
existed, even if nb_inplace_multiply also existed and the arguments
weren't right for sq_inplace_repeat.  Change this to only use
sq_inplace_repeat if nb_inplace_multiply isn't defined.

Bugfix candidate.

23 years agobackport gvanrossum's patch:
Anthony Baxter [Thu, 18 Apr 2002 04:40:05 +0000 (04:40 +0000)] 
backport gvanrossum's patch:

SF bug 544647.

PyNumber_InPlaceMultiply insisted on calling sq_inplace_repeat if it
existed, even if nb_inplace_multiply also existed and the arguments
weren't right for sq_inplace_repeat.  Change this to only use
sq_inplace_repeat if nb_inplace_multiply isn't defined.

Bugfix candidate.

23 years agobackport akuchling's patch:
Anthony Baxter [Thu, 18 Apr 2002 03:47:40 +0000 (03:47 +0000)] 
backport akuchling's patch:

Use 2.1's .hexdigest() method

23 years agocorrected backport. 'patch' made me sad, it got it horribly wrong
Anthony Baxter [Thu, 18 Apr 2002 02:32:25 +0000 (02:32 +0000)] 
corrected backport. 'patch' made me sad, it got it horribly wrong
(no idea why, or how)

backport theller's patch

Set the warn_dir option to 0 before running the install command.
This suppresses bogus warnings about modules installed into a directory
not in sys.path.

Bugfix candidate.

23 years agobackport tim_one's patch:
Anthony Baxter [Thu, 18 Apr 2002 02:19:46 +0000 (02:19 +0000)] 
backport tim_one's patch:

SF bug 543840: complex(string) accepts strings with \0
complex_subtype_from_string():  this stopped parsing at the first 0
byte, as if that were the end of the input string.

23 years agobackport gvanrossum's patch
Anthony Baxter [Thu, 18 Apr 2002 02:19:19 +0000 (02:19 +0000)] 
backport gvanrossum's patch

Fix from SF bug #541980 (Jacques A. Vidrine).

When os.stat() for a file raises OSError, turn it into IOError per
documentation.

23 years agoBackport rev 2.132 (note: some earlier bugfix candidates still TBD).
Guido van Rossum [Thu, 18 Apr 2002 00:37:10 +0000 (00:37 +0000)] 
Backport rev 2.132 (note: some earlier bugfix candidates still TBD).

SF bug 542984.

Change type_get_doc (the get function for __doc__) to look in tp_dict
more often, and if it finds a descriptor in tp_dict, to call it (with
a NULL instance).  This means you can add a __doc__ descriptor to a
new-style class that returns instance docs when called on an instance,
and class docs when called on a class -- or the same docs in either
case, but lazily computed.

I'll also check this into the 2.2 maintenance branch.

23 years agoBackport rev 2.143 (note: some earlier bugfix candidates still TBD).
Guido van Rossum [Thu, 18 Apr 2002 00:36:17 +0000 (00:36 +0000)] 
Backport rev 2.143 (note: some earlier bugfix candidates still TBD).

SF bug 542984.

Change type_get_doc (the get function for __doc__) to look in tp_dict
more often, and if it finds a descriptor in tp_dict, to call it (with
a NULL instance).  This means you can add a __doc__ descriptor to a
new-style class that returns instance docs when called on an instance,
and class docs when called on a class -- or the same docs in either
case, but lazily computed.

I'll also check this into the 2.2 maintenance branch.

23 years agoAdd a version annotation for the help() function.
Fred Drake [Wed, 17 Apr 2002 12:54:56 +0000 (12:54 +0000)] 
Add a version annotation for the help() function.

23 years agoWindows installer: disabled Wise's "delete in-use files" uninstall
Tim Peters [Wed, 17 Apr 2002 04:36:35 +0000 (04:36 +0000)] 
Windows installer:  disabled Wise's "delete in-use files" uninstall
option.  It was the cause of at least one way UNWISE.EXE could vanish
(install a python; uninstall it; install it again; reboot the machine;
abracadabra the uinstaller is gone).

23 years agoAdjust markup to worm around tool limitations; the "m" in "model" was being
Fred Drake [Wed, 17 Apr 2002 03:42:08 +0000 (03:42 +0000)] 
Adjust markup to worm around tool limitations; the "m" in "model" was being
dropped in the HTML formatted version.
Reported by Mike Coleman.

23 years agoPass the -r option to getpagecounts to generate an entry for the "What's
Fred Drake [Wed, 17 Apr 2002 03:31:31 +0000 (03:31 +0000)] 
Pass the -r option to getpagecounts to generate an entry for the "What's
New" document.

23 years agoRemove Emacs turd; not needed with modern Emacs versions.
Fred Drake [Wed, 17 Apr 2002 03:29:26 +0000 (03:29 +0000)] 
Remove Emacs turd; not needed with modern Emacs versions.

Add a -r option; if given with a release number, the "What's New" document
is included with the relevant version number.

Update the text of the README distributed with the PostScript files to
reflect the changes in the user organizations in the Python community.

23 years agoChanged last two remaining uses of "./" to "index.html" when referring to the
Fred Drake [Wed, 17 Apr 2002 01:42:58 +0000 (01:42 +0000)] 
Changed last two remaining uses of "./" to "index.html" when referring to the
index file for the top-level directory.  This makes it easier to use an
unpacked version of the documentation via file: URLs.
This closes SF bug #541257.

23 years agoRemove repeated index entry; adds nothing different.
Fred Drake [Tue, 16 Apr 2002 02:03:31 +0000 (02:03 +0000)] 
Remove repeated index entry; adds nothing different.
Closes SF bug #518985.

23 years agoFix grammar
Neal Norwitz [Mon, 15 Apr 2002 22:59:45 +0000 (22:59 +0000)] 
Fix grammar

23 years agoBetter documentation for GetArgv() and the ProgressBar type.
Fred Drake [Mon, 15 Apr 2002 19:54:08 +0000 (19:54 +0000)] 
Better documentation for GetArgv() and the ProgressBar type.
This closes SF patch #496705.

23 years agoSF bug 543148: Memory leak with stackframes + inspect.
Tim Peters [Sat, 13 Apr 2002 05:25:28 +0000 (05:25 +0000)] 
SF bug 543148:  Memory leak with stackframes + inspect.
Put a bound on the number of frameobjects that can live in the
frameobject free_list.

Also fixed on the trunk.  I don't intend to backport to 2.1 (too
much work -- lots of cyclic structures leak there).

23 years agoUse random instead of whrandom
Andrew M. Kuchling [Wed, 10 Apr 2002 21:14:37 +0000 (21:14 +0000)] 
Use random instead of whrandom

23 years agoUse random module instead of whrandom
Andrew M. Kuchling [Wed, 10 Apr 2002 21:14:02 +0000 (21:14 +0000)] 
Use random module instead of whrandom
Move imports to top