]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
24 years agoExplained more differences between PyList_SetItem() and PyList_SET_ITEM().
Fred Drake [Sun, 3 Jun 2001 03:16:04 +0000 (03:16 +0000)] 
Explained more differences between PyList_SetItem() and PyList_SET_ITEM().
In particular, the affect on existing list content was not sufficiently
explained.

This closes SF bug #429554.

24 years agoDocument os.getenv().
Fred Drake [Thu, 31 May 2001 20:27:18 +0000 (20:27 +0000)] 
Document os.getenv().
This closes SF bug #429059.

24 years agoSome general cleanup of the threading module documentation, including
Fred Drake [Thu, 31 May 2001 20:24:37 +0000 (20:24 +0000)] 
Some general cleanup of the threading module documentation, including
fixing the reference to Thread.getDeamon() (should be isDaemon()).

This closes SF bug #429070.

24 years agoexpand __all__ to include a bunch of names that should have been there
Skip Montanaro [Thu, 31 May 2001 18:03:22 +0000 (18:03 +0000)] 
expand __all__ to include a bunch of names that should have been there
before.

24 years agoUsers of PySequence_GET_FAST() should get the length of the sequence using
Fred Drake [Tue, 29 May 2001 18:53:11 +0000 (18:53 +0000)] 
Users of PySequence_GET_FAST() should get the length of the sequence using
PySequence_Size(), not PyObject_Size(): the later considers the mapping
methods as well as the sequence methods, which is not needed here.  Either
should be equally fast in this case, but PySequence_Size() offers a better
conceptual match.

24 years agoreadlink() description: Added note that the return value may be either
Fred Drake [Tue, 29 May 2001 18:14:26 +0000 (18:14 +0000)] 
readlink() description:  Added note that the return value may be either
    absolute or relative.

remove(), rename() descriptions:  Give more information about the cross-
    platform behavior of these functions, so single-platform developers
    can be aware of the potential issues when writing portable code.

This closes SF patch #426598.

24 years agoBring the notes on the relationship between __cmp__(), __eq__(), and
Fred Drake [Tue, 29 May 2001 16:06:21 +0000 (16:06 +0000)] 
Bring the notes on the relationship between __cmp__(), __eq__(), and
__hash__() up to date (re: use of objects which define these methods
as dictionary keys).

This closes SF bug #427698.

Migrated comments about supporting __contains__() and the use of the "in"
operator from the development branch.

24 years agoFix typo reported in SF bug #427783.
Fred Drake [Tue, 29 May 2001 15:45:01 +0000 (15:45 +0000)] 
Fix typo reported in SF bug #427783.

24 years agoThe parameter to the listen() method is not optional, but was marked as
Fred Drake [Tue, 29 May 2001 15:39:24 +0000 (15:39 +0000)] 
The parameter to the listen() method is not optional, but was marked as
optional in the documentation.

This closes SF bug #427985.

24 years ago_PyTuple_Resize: guard against PyTuple_New() returning NULL, using Tim's
Thomas Wouters [Tue, 29 May 2001 08:05:01 +0000 (08:05 +0000)] 
_PyTuple_Resize: guard against PyTuple_New() returning NULL, using Tim's
suggestion (modulo style).

24 years ago_PyTuple_Resize: take into account the empty tuple. There can be only one.
Thomas Wouters [Mon, 28 May 2001 13:04:33 +0000 (13:04 +0000)] 
_PyTuple_Resize: take into account the empty tuple. There can be only one.
Instead of raising a SystemError, just create a new tuple of the desired
size.

This fixes (at least) SF bug #420343.

24 years agoAdd a version annotation for splitdrive(); old, but as long as I managed
Fred Drake [Fri, 25 May 2001 16:21:22 +0000 (16:21 +0000)] 
Add a version annotation for splitdrive(); old, but as long as I managed
to end up with the information, it is better recorded than lost.

24 years agoBackport Fred's checkin 1.3:
Thomas Wouters [Wed, 23 May 2001 15:21:50 +0000 (15:21 +0000)] 
Backport Fred's checkin 1.3:

Actually include a synopsis line for the ColorPicker module.

24 years agoBackport Tim's checkin 2.84:
Thomas Wouters [Wed, 23 May 2001 15:07:55 +0000 (15:07 +0000)] 
Backport Tim's checkin 2.84:

SF bug #422121 Insecurities in dict comparison.
Fixed a half dozen ways in which general dict comparison could crash
Python (even cause Win98SE to reboot) in the presence of kay and/or
value comparison routines that mutate the dict during dict comparison.

24 years agoRe-incarnate dead turd of old test_mutants output file.
Thomas Wouters [Wed, 23 May 2001 14:56:36 +0000 (14:56 +0000)] 
Re-incarnate dead turd of old test_mutants output file.

24 years agoNow that the backporting of test_mutants.py worked successfully (Barnevelder
Thomas Wouters [Wed, 23 May 2001 14:55:54 +0000 (14:55 +0000)] 
Now that the backporting of test_mutants.py worked successfully (Barnevelder
chickens work best!) adapt test_mutants to the absense of 'key in dict'.

24 years agoTim's test_mutants test, taken from revision 1.3 (unsure if I used the right
Thomas Wouters [Wed, 23 May 2001 14:52:45 +0000 (14:52 +0000)] 
Tim's test_mutants test, taken from revision 1.3 (unsure if I used the right
dead chicken for CVS to make the connection... lets hope so.)

24 years agoThis commit was manufactured by cvs2svn to create branch
cvs2svn [Wed, 23 May 2001 14:52:45 +0000 (14:52 +0000)] 
This commit was manufactured by cvs2svn to create branch
'release21-maint'.

24 years agoNet result of Tim's checkins to stropmodule.c (2.78, 2.79, 2.80, 2.81),
Thomas Wouters [Wed, 23 May 2001 14:38:53 +0000 (14:38 +0000)] 
Net result of Tim's checkins to stropmodule.c (2.78, 2.79, 2.80, 2.81),
stringobject.c (2.114, 2.115) and test_strop.py (1.11, 1.12). Fixes
'replace' behaviour on systems on which 'malloc(0)' returns NULL (together
with previous checkins) and re-synchs the string-operation code in
stringobject.c and stropmodule.c, with the exception of 'replace', which has
the old semantics in stropmodule but the new semantics in stringobjects.

24 years ago*** empty log message ***
Thomas Wouters [Wed, 23 May 2001 13:36:37 +0000 (13:36 +0000)] 
*** empty log message ***

24 years agoBackport Jeremy's checkins (frameobject.c:2.50, test_scope.py:1.16,
Thomas Wouters [Wed, 23 May 2001 13:26:29 +0000 (13:26 +0000)] 
Backport Jeremy's checkins (frameobject.c:2.50, test_scope.py:1.16,
test_scope:1.8):

SF patch 419176 from MvL; fixed bug 418977
Two errors in dict_to_map() helper used by PyFrame_LocalsToFast().

24 years agoBackport Tim's checkin 2.130:
Thomas Wouters [Wed, 23 May 2001 13:18:30 +0000 (13:18 +0000)] 
Backport Tim's checkin 2.130:

SF bug #422108 - Error in rich comparisons.
Fix a bad (albeit unlikely) return value in try_rich_to_3way_compare().
Also document do_cmp()'s return values.

24 years agoBackport MAL's checkin 1.32:
Thomas Wouters [Wed, 23 May 2001 13:15:03 +0000 (13:15 +0000)] 
Backport MAL's checkin 1.32:

Fix for bug #417030: "print '%*s' fails for unicode string"

24 years agoBackport MAL's checkin 2.105:
Thomas Wouters [Wed, 23 May 2001 13:14:24 +0000 (13:14 +0000)] 
Backport MAL's checkin 2.105:

Fix for bug #417030: "print '%*s' fails for unicode string"

24 years agoNet result of Guido's checkins of object.c (2.125 and 2.126), classobject.c
Thomas Wouters [Wed, 23 May 2001 13:03:13 +0000 (13:03 +0000)] 
Net result of Guido's checkins of object.c (2.125 and 2.126), classobject.c
(2.128) and stringobject.c (2.105), which reworks PyObject_Str() and
PyObject_Repr() so strings and instances aren't special-cased, and
    print >> file, instance
works like expected in all cases.

24 years agoBackport of Tim's checkin 2.177:
Thomas Wouters [Wed, 23 May 2001 12:51:22 +0000 (12:51 +0000)] 
Backport of Tim's checkin 2.177:

SF bug #417093: Case sensitive import: dir and .py file w/ same name
Directory containing
    Spam.py
    spam/__init__.py
Then "import Spam" caused a SystemError, because code checking for
the existence of "Spam/__init__.py" finds it on a case-insensitive
filesystem, but then bails because the directory it finds it in
doesn't match case, and then old code assumed that was still an error
even though it isn't anymore.  Changed the code to just continue
looking in this case (instead of calling it an error).  So
    import Spam
and
    import spam
both work now.

24 years agoBackport Tim's checkin 2.199:
Thomas Wouters [Wed, 23 May 2001 12:46:45 +0000 (12:46 +0000)] 
Backport Tim's checkin 2.199:

Fix buglet reported on c.l.py:  map(fnc, file.xreadlines()) blows up.
Took away map()'s insistence that sequences support __len__, and cleaned
up the convoluted code that made it *look* like it really cared about
__len__ (in fact the old ->len field was only *used* as a flag bit, as
the main loop only looked at its sign bit, setting the field to -1 when
IndexError got raised; renamed the field to ->saw_IndexError instead).

24 years agoBackport of Tim's checkin 2.88:
Thomas Wouters [Wed, 23 May 2001 12:31:25 +0000 (12:31 +0000)] 
Backport of Tim's checkin 2.88:

A different approach to the problem reported in
Patch #419651: Metrowerks on Mac adds 0x itself
C std says %#x and %#X conversion of 0 do not add the 0x/0X base marker.
Metrowerks apparently does.  Mark Favas reported the same bug under a
Compaq compiler on Tru64 Unix, but no other libc broken in this respect
is known (known to be OK under MSVC and gcc).
So just try the damn thing at runtime and see what the platform does.
Note that we've always had bugs here, but never knew it before because
a relevant test case didn't exist before 2.1.

24 years agoBackport Tim's checkin 2.104:
Thomas Wouters [Wed, 23 May 2001 12:30:59 +0000 (12:30 +0000)] 
Backport Tim's checkin 2.104:

A different approach to the problem reported in
Patch #419651: Metrowerks on Mac adds 0x itself
C std says %#x and %#X conversion of 0 do not add the 0x/0X base marker.
Metrowerks apparently does.  Mark Favas reported the same bug under a
Compaq compiler on Tru64 Unix, but no other libc broken in this respect
is known (known to be OK under MSVC and gcc).
So just try the damn thing at runtime and see what the platform does.
Note that we've always had bugs here, but never knew it before because
a relevant test case didn't exist before 2.1.

24 years agoBackport Jeremy's checkin 1.7:
Thomas Wouters [Wed, 23 May 2001 12:15:57 +0000 (12:15 +0000)] 
Backport Jeremy's checkin 1.7:

Fix 2.1 nested scopes crash reported by Evan Simpson

The new test case demonstrates the bug.  Be more careful in
symtable_resolve_free() to add a var to cells or frees only if it
won't be added under some other rule.

XXX Add new assertion that will catch this bug.

24 years agoBackport Jeremy's checkin 1.15:
Thomas Wouters [Wed, 23 May 2001 12:15:17 +0000 (12:15 +0000)] 
Backport Jeremy's checkin 1.15:

Fix 2.1 nested scopes crash reported by Evan Simpson

The new test case demonstrates the bug.  Be more careful in
symtable_resolve_free() to add a var to cells or frees only if it
won't be added under some other rule.

XXX Add new assertion that will catch this bug.

24 years agoBackport Jeremy's checkin 2.198:
Thomas Wouters [Wed, 23 May 2001 12:11:35 +0000 (12:11 +0000)] 
Backport Jeremy's checkin 2.198:

Fix 2.1 nested scopes crash reported by Evan Simpson

The new test case demonstrates the bug.  Be more careful in
symtable_resolve_free() to add a var to cells or frees only if it
won't be added under some other rule.

XXX Add new assertion that will catch this bug.

24 years agoBackport Fred's checkin 2.29:
Thomas Wouters [Wed, 23 May 2001 11:32:06 +0000 (11:32 +0000)] 
Backport Fred's checkin 2.29:

Correct the sense of a couple of conditional compilations -- used #ifndef
when #ifdef was needed.
This closes (reallu!) SF bug #417418.

24 years agoAdd a list of mapping interface methods which are not supported by
Fred Drake [Tue, 22 May 2001 15:17:12 +0000 (15:17 +0000)] 
Add a list of mapping interface methods which are not supported by
rfc822.Message (per Barry's comments).

24 years agoAdd some clarifications about the mapping interface presented by
Fred Drake [Tue, 22 May 2001 14:37:18 +0000 (14:37 +0000)] 
Add some clarifications about the mapping interface presented by
rfc822.Message objects, based on comments from Barry.

24 years agoUpdate output to reflect additional precision produced by the repr() of
Fred Drake [Mon, 21 May 2001 17:02:57 +0000 (17:02 +0000)] 
Update output to reflect additional precision produced by the repr() of
floating point numbers in an interactive example.

This closes SF bug #419434.

24 years agoAdd documentation for Py_Main() and PyThreadState_GetDict().
Fred Drake [Mon, 21 May 2001 15:58:54 +0000 (15:58 +0000)] 
Add documentation for Py_Main() and PyThreadState_GetDict().

24 years agoTypo: "that" --> "than"
Fred Drake [Mon, 21 May 2001 15:04:28 +0000 (15:04 +0000)] 
Typo: "that" --> "than"
This closes SF bug #425320.

24 years agoFix bug in smtplib example: the prompt said to end the message with ^D,
Fred Drake [Sun, 20 May 2001 13:35:45 +0000 (13:35 +0000)] 
Fix bug in smtplib example: the prompt said to end the message with ^D,
but doing so raised EOFError.  This makes it work as advertised and
converts to string methods where reasonable.

This closes SF bug #424776.

24 years agoMake sure we include all of Python's numeric types in the data model
Fred Drake [Mon, 14 May 2001 16:04:57 +0000 (16:04 +0000)] 
Make sure we include all of Python's numeric types in the data model
description, so that the introduction of complex is not a surprise.

This closes SF bug #423429.

24 years agothe usual...
Fred Drake [Fri, 11 May 2001 16:35:03 +0000 (16:35 +0000)] 
the usual...

24 years agoMigrate the last few revisions from the head to the bugfix branch -- these
Fred Drake [Fri, 11 May 2001 16:34:23 +0000 (16:34 +0000)] 
Migrate the last few revisions from the head to the bugfix branch -- these
have all been portability fixes and improving the consistency of how file
descriptors and file objects are handled.

24 years agoAdd a check for sys/modem.h, needed by termios on HP-UX.
Fred Drake [Fri, 11 May 2001 16:21:06 +0000 (16:21 +0000)] 
Add a check for sys/modem.h, needed by termios on HP-UX.

24 years agoFix typo in weakref.proxy() documentation.
Fred Drake [Thu, 10 May 2001 17:23:10 +0000 (17:23 +0000)] 
Fix typo in weakref.proxy() documentation.
This closes SF bug #423087.

24 years agoRemove all mentions of the strop module -- it has been pronounced Evil.
Fred Drake [Thu, 10 May 2001 15:13:39 +0000 (15:13 +0000)] 
Remove all mentions of the strop module -- it has been pronounced Evil.
(The string "strop" is found in the rexec documentation, but that should
not be changed until strop is actually removed or rexec no longer allows
it.)

24 years agoFix typo reported by David Goodger. This closes SF patch #422383.
Fred Drake [Thu, 10 May 2001 15:10:17 +0000 (15:10 +0000)] 
Fix typo reported by David Goodger.  This closes SF patch #422383.

24 years agoItamar Shtull-Trauring <python@itamarst.org>:
Fred Drake [Wed, 9 May 2001 19:57:50 +0000 (19:57 +0000)] 
Itamar Shtull-Trauring <python@itamarst.org>:
Updates zipfile.ZipFile docs to mention the fact that you can create a
ZipFile instance from an arbitrary file-like object.

This closes patch #418011.

24 years agoThree uses of makesockaddr() used sockaddr buffers that had not be cleared;
Fred Drake [Wed, 9 May 2001 19:13:40 +0000 (19:13 +0000)] 
Three uses of makesockaddr() used sockaddr buffers that had not be cleared;
this could cause invalid paths to be returned for AF_UNIX sockets on some
platforms (including FreeBSD 4.2-RELEASE), appearantly because there is
no assurance that the address will be nul-terminated when filled in by the
kernel.

This closes SF bug #416573.

24 years agoUpdate build notes for Mac OS X 10.0.
Fred Drake [Wed, 9 May 2001 18:13:29 +0000 (18:13 +0000)] 
Update build notes for Mac OS X 10.0.
This closes SF bug #416530.

24 years agoFix the operator precedence table: exponentiation binds tighter than
Fred Drake [Wed, 9 May 2001 16:53:19 +0000 (16:53 +0000)] 
Fix the operator precedence table: exponentiation binds tighter than
negation.

This closes SF bug #421999.

24 years agoUpdate the directory names to match changes at SourceForge.
Fred Drake [Wed, 9 May 2001 16:26:36 +0000 (16:26 +0000)] 
Update the directory names to match changes at SourceForge.

24 years agoWork around limitations of the module synopsis table generation to avoid
Fred Drake [Wed, 9 May 2001 15:52:56 +0000 (15:52 +0000)] 
Work around limitations of the module synopsis table generation to avoid
leaking LaTeX2HTML's internal string munging.

This fixes SF bug #420399.

24 years agoJob.build_html(): Be more robust in ensuring about.html exists; copying
Fred Drake [Wed, 9 May 2001 04:04:11 +0000 (04:04 +0000)] 
Job.build_html():  Be more robust in ensuring about.html exists; copying
    the right HTML file to the name about.html is needed even if the
    --numeric option was not given -- some other name may have been
    assigned due to some non-determinism in the algorithm use to perform
    name allocation.  ;-(

This closes the "About..." portion of SF bug #420216.

24 years agoThere is no IMAP class in the imaplib module; the class is IMAP4.
Fred Drake [Wed, 9 May 2001 03:57:01 +0000 (03:57 +0000)] 
There is no IMAP class in the imaplib module; the class is IMAP4.
There is no imap module; refer to imaplib instead, since it exists.
Move the "See Also:" section in front of the sub-sections, for
consistency with other portions of the library reference.

This closes the library reference portion of SF bug #420216.

24 years agoNote that when inplace=1 existing backup files will be removed silently.
Fred Drake [Wed, 9 May 2001 03:26:11 +0000 (03:26 +0000)] 
Note that when inplace=1 existing backup files will be removed silently.
Closes SF bug #420230.

24 years agoMake the license GPL-compatible.
Guido van Rossum [Fri, 4 May 2001 18:55:39 +0000 (18:55 +0000)] 
Make the license GPL-compatible.

24 years agoThe weakref support in PyObject_InitVar() as well; this should have come out
Fred Drake [Thu, 3 May 2001 20:04:49 +0000 (20:04 +0000)] 
The weakref support in PyObject_InitVar() as well; this should have come out
at the same time as it did from PyObject_Init() .

24 years agoRemove unnecessary intialization for the case of weakly-referencable objects;
Fred Drake [Thu, 3 May 2001 19:45:34 +0000 (19:45 +0000)] 
Remove unnecessary intialization for the case of weakly-referencable objects;
the code necessary to accomplish this is simpler and faster if confined to
the object implementations, so we only do this there.

This causes no behaviorial changes beyond a (very slight) speedup.

24 years agoCorrect two floating-point representations printed by the interpreter in
Fred Drake [Wed, 25 Apr 2001 20:59:47 +0000 (20:59 +0000)] 
Correct two floating-point representations printed by the interpreter in
interactive examples.  Error noted by Dinu Gherman.

24 years agoUpdate publish-to-SourceForge scripts to automatically determine if the
Fred Drake [Sun, 22 Apr 2001 06:19:29 +0000 (06:19 +0000)] 
Update publish-to-SourceForge scripts to automatically determine if the
branch is the head (development) branch or a maintenance brach, and use
the appropriate target directory for each.

24 years agoOnly document <file>.xreadlines() once; added version annotation.
Fred Drake [Sun, 22 Apr 2001 01:58:00 +0000 (01:58 +0000)] 
Only document <file>.xreadlines() once; added version annotation.

This closes SF bug #417943 (in the maintenance branch).

24 years agoFix a number of minor markup errors.
Fred Drake [Sat, 21 Apr 2001 05:56:39 +0000 (05:56 +0000)] 
Fix a number of minor markup errors.

24 years agoThe (fairly recent) \textasciicircum is not supported by LaTeX2HTML; add
Fred Drake [Sat, 21 Apr 2001 05:56:28 +0000 (05:56 +0000)] 
The (fairly recent) \textasciicircum is not supported by LaTeX2HTML; add
support for it here.

24 years agoAdd versioning notes: many of the signatures changed to allow the time
Fred Drake [Thu, 19 Apr 2001 04:55:57 +0000 (04:55 +0000)] 
Add versioning notes:  many of the signatures changed to allow the time
used to be omitted (meaning use the current time) as of Python 2.1.
Users who need cross-version portability need to know things like this.

24 years agoCut-&-paste-o noted by Wolfgang Teschner: decompressobj() returns
Fred Drake [Wed, 18 Apr 2001 20:17:23 +0000 (20:17 +0000)] 
Cut-&-paste-o noted by Wolfgang Teschner:  decompressobj() returns
*DE*compression objects, not compression objects!

24 years agoAdd description of the "explanation" optional parameter added to the
Fred Drake [Wed, 18 Apr 2001 17:32:45 +0000 (17:32 +0000)] 
Add description of the "explanation" optional parameter added to the
\versionadded macro.

I originally thought this should not be merged into the 2.1 maintenance
branch, but reconsidered:  documentation changes may actually *use* the
new version of the markup, so the lack of this markup variant can
reasonably be considered a bug.

24 years ago\versionadded: Add support for including an explanatory note along with
Fred Drake [Wed, 18 Apr 2001 17:30:26 +0000 (17:30 +0000)] 
\versionadded:  Add support for including an explanatory note along with
    the versioning information, similar to \versionchanged.

24 years agoAdded support for optional explanation parameter to the \versionadded
Fred Drake [Wed, 18 Apr 2001 17:29:14 +0000 (17:29 +0000)] 
Added support for optional explanation parameter to the \versionadded
macro.

Refactored do_cmd_versionadded() and do_cmd_versionchanged() to do most
of the work in a helper function, with the do_cmd_*() wrappers just supplying
a portion of the replacement text.

24 years agoSuggestion from Keith Briggs: refer to RE objects consistently instead of
Fred Drake [Wed, 18 Apr 2001 17:27:10 +0000 (17:27 +0000)] 
Suggestion from Keith Briggs:  refer to RE objects consistently instead of
introducing a new term ("regex") without defining it.

24 years agoUpdate version numbers for the maintenance branch of the documentation.
Fred Drake [Wed, 18 Apr 2001 05:24:30 +0000 (05:24 +0000)] 
Update version numbers for the maintenance branch of the documentation.

24 years agoMake a number of small clarifications and correct a whole bunch of typos,
Fred Drake [Wed, 18 Apr 2001 05:14:32 +0000 (05:14 +0000)] 
Make a number of small clarifications and correct a whole bunch of typos,
all reported by Bruce Smith.

24 years agoAdd note about the version in which GetoptError was added -- this can
Fred Drake [Wed, 18 Apr 2001 03:27:13 +0000 (03:27 +0000)] 
Add note about the version in which GetoptError was added -- this can
bite people interested in 1.5.2 compatibility.

24 years agoSet the version number to 2.1.1a1. This checkin inaugurates the
Guido van Rossum [Tue, 17 Apr 2001 15:19:29 +0000 (15:19 +0000)] 
Set the version number to 2.1.1a1.  This checkin inaugurates the
release21-maint branch.

24 years agoThis commit was manufactured by cvs2svn to create branch
cvs2svn [Tue, 17 Apr 2001 15:19:29 +0000 (15:19 +0000)] 
This commit was manufactured by cvs2svn to create branch
'release21-maint'.

24 years agoThis commit was manufactured by cvs2svn to create tag 'release21'. v2.1
cvs2svn [Mon, 16 Apr 2001 18:46:45 +0000 (18:46 +0000)] 
This commit was manufactured by cvs2svn to create tag 'release21'.

24 years agoNoted what's new in 2.1 (final).
Guido van Rossum [Mon, 16 Apr 2001 18:46:45 +0000 (18:46 +0000)] 
Noted what's new in 2.1 (final).

Hopefully this is the last checkin for 2.1!

24 years agoFix three PyChecker-detected gotchas.
Jeremy Hylton [Mon, 16 Apr 2001 18:43:18 +0000 (18:43 +0000)] 
Fix three PyChecker-detected gotchas.

Import OPT_ symbols from _symtable.
Define has_exec() and has_import_star().

24 years agoExport three optimization (fast locals) flags
Jeremy Hylton [Mon, 16 Apr 2001 18:42:13 +0000 (18:42 +0000)] 
Export three optimization (fast locals) flags

24 years agoUpdate Windows installer & buildno for 2.1 final.
Tim Peters [Mon, 16 Apr 2001 18:20:30 +0000 (18:20 +0000)] 
Update Windows installer & buildno for 2.1 final.

24 years agoIn walk(), don't die when os.lstat() raises os.error, e.g. because a
Guido van Rossum [Mon, 16 Apr 2001 18:12:04 +0000 (18:12 +0000)] 
In walk(), don't die when os.lstat() raises os.error, e.g. because a
file was deleted by a previous call to the visitor function.

This used to be the behavior in 1.5.2 and before, but a patch to avoid
making two stat() calls accidentally broke this in 2.0.

Moshe, this would be a good one for 2.0.1 too!

24 years agoUpdate the version to 2.1final (again :-).
Guido van Rossum [Mon, 16 Apr 2001 17:51:43 +0000 (17:51 +0000)] 
Update the version to 2.1final (again :-).

24 years agoAdd a test case for Weak*Dictionary.update() that would have caught a
Fred Drake [Mon, 16 Apr 2001 17:37:27 +0000 (17:37 +0000)] 
Add a test case for Weak*Dictionary.update() that would have caught a
recently reported bug; also exposed some other bugs in the implementation.

24 years agoWeak*Dictionary.update(): Fix calls to [].append() to only have one
Fred Drake [Mon, 16 Apr 2001 17:34:48 +0000 (17:34 +0000)] 
Weak*Dictionary.update():  Fix calls to [].append() to only have one
    parameter.

Weak*Dictionary.get():  Make the second parameter optional.

WeakKeyDictionary.has_key(), .keys():  Make these actually work!

24 years agoImplement Mark Favas's suggestion. There's a clear bug in _group():
Guido van Rossum [Mon, 16 Apr 2001 16:04:10 +0000 (16:04 +0000)] 
Implement Mark Favas's suggestion.  There's a clear bug in _group():
its first return statement returns a single value while its caller
always expects it to return a tuple of two items.  Fix this by
returning (s, 0) instead.

This won't make the locale test on Irix succeed, but now it will fail
because of a bug in the platform's en_US locale rather than because of
a bug in the locale module.

24 years agoUpdate document for the actual 2.1rc1
Andrew M. Kuchling [Mon, 16 Apr 2001 02:27:53 +0000 (02:27 +0000)] 
Update document for the actual 2.1rc1

24 years agoThis commit was manufactured by cvs2svn to create tag 'r21c2'. v2.1c2
cvs2svn [Mon, 16 Apr 2001 02:07:08 +0000 (02:07 +0000)] 
This commit was manufactured by cvs2svn to create tag 'r21c2'.

24 years agoThis is (hopefully) last checkin before releasing 2.1c2 -- get rid of
Guido van Rossum [Mon, 16 Apr 2001 02:07:08 +0000 (02:07 +0000)] 
This is (hopefully) last checkin before releasing 2.1c2 -- get rid of
trailing whitespace.

24 years agoAdded news for 2.1c2.
Guido van Rossum [Mon, 16 Apr 2001 02:05:23 +0000 (02:05 +0000)] 
Added news for 2.1c2.

Greatly updated news for 2.1c1 (!).

24 years agoUpdate Windows installer & build number to 2.1c2 release.
Tim Peters [Mon, 16 Apr 2001 01:44:08 +0000 (01:44 +0000)] 
Update Windows installer & build number to 2.1c2 release.

24 years agoWe need another release candidate after so many "small" changes.
Guido van Rossum [Mon, 16 Apr 2001 00:33:29 +0000 (00:33 +0000)] 
We need another release candidate after so many "small" changes.

DO NOT CHECK ANYTHHING IN FROM NOW ON WITHOUT ASKING ME.

24 years agoChange the test data to ask for class C from module __main__ rather
Guido van Rossum [Mon, 16 Apr 2001 00:28:21 +0000 (00:28 +0000)] 
Change the test data to ask for class C from module __main__ rather
than from module pickletester.  Using the latter turned out to cause
the test to break when invoked as "import test.test_pickle" or "import
test.autotest".

24 years agoReverting Moshe's EGD patch *and* Martin's patch to make it work with
Guido van Rossum [Mon, 16 Apr 2001 00:21:33 +0000 (00:21 +0000)] 
Reverting Moshe's EGD patch *and* Martin's patch to make it work with
OpenSSL versions beore 0.9.5.  This just is too experimental to be
worth it, especially since the user would have to do some severe
hacking of the Modules/Setup file to even enable the EGD code, and
without the EGD code it would always spit out a warning on some
systems -- even when socket.ssl() is not used.  Fixing that properly
is not my job; the EGD patch is clearly not so important that it
should hold up the 2.1 release.

24 years agoTim pointed out a remaining vulnerability in popitem(): the
Guido van Rossum [Mon, 16 Apr 2001 00:02:32 +0000 (00:02 +0000)] 
Tim pointed out a remaining vulnerability in popitem(): the
PyTuple_New() could *conceivably* clear the dict, so move the test for
an empty dict after the tuple allocation.  It means that we waste time
allocating and deallocating a 2-tuple when the dict is empty, but who
cares.  It also means that when the dict is empty *and* there's no
memory to allocate a 2-tuple, we raise MemoryError, not KeyError --
but that may actually a good idea: if there's no room for a lousy
2-tuple, what are the chances that there's room for a KeyError
instance?

24 years agoTentative fix for a problem that Tim discovered at the last moment,
Guido van Rossum [Sun, 15 Apr 2001 22:16:26 +0000 (22:16 +0000)] 
Tentative fix for a problem that Tim discovered at the last moment,
and reported to python-dev: because we were calling dict_resize() in
PyDict_Next(), and because GC's dict_traverse() uses PyDict_Next(),
and because PyTuple_New() can cause GC, and because dict_items() calls
PyTuple_New(), it was possible for dict_items() to have the dict
resized right under its nose.

The solution is convoluted, and touches several places: keys(),
values(), items(), popitem(), PyDict_Next(), and PyDict_SetItem().

There are two parts to it. First, we no longer call dict_resize() in
PyDict_Next(), which seems to solve the immediate problem.  But then
PyDict_SetItem() must have a different policy about when *it* calls
dict_resize(), because we want to guarantee (e.g. for an algorithm
that Jeremy uses in the compiler) that you can loop over a dict using
PyDict_Next() and make changes to the dict as long as those changes
are only value replacements for existing keys using PyDict_SetItem().
This is done by resizing *after* the insertion instead of before, and
by remembering the size before we insert the item, and if the size is
still the same, we don't bother to even check if we might need to
resize.  An additional detail is that if the dict starts out empty, we
must still resize it before the insertion.

That was the first part. :-)

The second part is to make keys(), values(), items(), and popitem()
safe against side effects on the dict caused by allocations, under the
assumption that if the GC can cause arbitrary Python code to run, it
can cause other threads to run, and it's not inconceivable that our
dict could be resized -- it would be insane to write code that relies
on this, but not all code is sane.

Now, I have this nagging feeling that the loops in lookdict probably
are blissfully assuming that doing a simple key comparison does not
change the dict's size.  This is not necessarily true (the keys could
be class instances after all).  But that's a battle for another day.

24 years agoSF bug reporters.
Guido van Rossum [Sun, 15 Apr 2001 20:48:27 +0000 (20:48 +0000)] 
SF bug reporters.

24 years agoFix SF bug [ #416231 ] urllib.basejoin fails to apply some ../.
Guido van Rossum [Sun, 15 Apr 2001 20:47:33 +0000 (20:47 +0000)] 
Fix SF bug [ #416231 ] urllib.basejoin fails to apply some ../.
Reported by Juan M. Bello Rivas.

24 years agoSRE: made "copyright" string static, to avoid potential linking
Fredrik Lundh [Sun, 15 Apr 2001 19:00:58 +0000 (19:00 +0000)] 
SRE: made "copyright" string static, to avoid potential linking
conflicts.

24 years agoPatch by Mark Favas to ensure that the zlib we find is 1.1.3 or
Guido van Rossum [Sun, 15 Apr 2001 15:16:12 +0000 (15:16 +0000)] 
Patch by Mark Favas to ensure that the zlib we find is 1.1.3 or
later.  This assumes that zlib.h has a line of the form

    #define ZLIB_VERSION "1.1.3"

This solves the problem where a zlib installation is found but it is
an older version -- this would break the build, while a better
solution is to simply ignore that zlib installation.

24 years agoGet rid of the seek() method on the _Mailbox class. This was a
Guido van Rossum [Sun, 15 Apr 2001 13:32:27 +0000 (13:32 +0000)] 
Get rid of the seek() method on the _Mailbox class.  This was a
cut-and-paste copy of the seek() method on the _Subfile class, but it
didn't make one bit of sense: it sets self.pos, which is not used in
this class or its subclasses, and it uses self.start and self.stop,
which aren't defined on this class or its subclasses.  This is purely
my own fault -- I added this in rev 1.4 and apparently never tried to
use it.  Since it's not documented, and of very questionable use given
that there's no tell(), I'm ripping it out.

This resolves SF bug 416199 by Andrew Dalke: mailbox.py seek problems.

24 years agoIn order to make this test work on Windows, the test locale has to be
Guido van Rossum [Sun, 15 Apr 2001 13:15:56 +0000 (13:15 +0000)] 
In order to make this test work on Windows, the test locale has to be
set to 'en' there -- Windows does not understand the 'en_US' locale.
The test succeeds there.