]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
23 years agoBackport my fixing up of PyObject_New/PyMem_Del mismatches.
Michael W. Hudson [Wed, 6 Feb 2002 17:11:51 +0000 (17:11 +0000)] 
Backport my fixing up of PyObject_New/PyMem_Del mismatches.

23 years agoBackport loewis' checkin of revision 1.44:
Michael W. Hudson [Wed, 6 Feb 2002 17:09:18 +0000 (17:09 +0000)] 
Backport loewis' checkin of revision 1.44:

Encode MSVC paths as mbcs. Fixes #509117. 2.2.1 candidate.

(apparently 1.5.2 compatibility is still a goal for distutils, but
I'll wait until that gets amended on the trunk...)

23 years agoFix a bunch of typos found by nnorwitz.
Michael W. Hudson [Wed, 6 Feb 2002 17:06:03 +0000 (17:06 +0000)] 
Fix a bunch of typos found by nnorwitz.

23 years agoUpdate the instructions on reporting bugs to reflect that anonymous reports
Fred Drake [Mon, 4 Feb 2002 21:43:44 +0000 (21:43 +0000)] 
Update the instructions on reporting bugs to reflect that anonymous reports
are no longer accepted.

23 years agostring.split() docstring described the interpretation of the maxsplit
Fred Drake [Wed, 30 Jan 2002 16:15:59 +0000 (16:15 +0000)] 
string.split() docstring described the interpretation of the maxsplit
argument incorrectly.
This closes SF bug #505997.

23 years agoRevise cheeseshop example so that the order of the keyword output is
Fred Drake [Tue, 29 Jan 2002 14:54:18 +0000 (14:54 +0000)] 
Revise cheeseshop example so that the order of the keyword output is
completely determined by the example; dict insertion order and the string
hash algorithm no longer affect the output.
This fixes SF bug #509281.

23 years agoIt's merge time! (well, this is the last one for the moment)
Michael W. Hudson [Mon, 28 Jan 2002 16:06:11 +0000 (16:06 +0000)] 
It's merge time!  (well, this is the last one for the moment)

Backport gvanrossum's checkin of revision 2.236:

A tentative fix for SF bug #503837 (Roeland Rengelink):
type.__module__ problems (again?)

This simply initializes the __module__ local in a class statement from
the __name__ global.  I'm not 100% sure that this is the correct fix,
although it usually does the right thing.  The problem is that if the
class statement executes in a custom namespace, the __name__ global
may be taken from __builtins__, in which case it would have the value
__builtin__, or it may not exist at all (if the custom namespace also
has a custom __builtins__), in which case the class statement will
fail.

Nevertheless, unless someone finds a better solution, this is a 2.2.1
bugfix too.

(apparently noone has :()

23 years agoIt's merge time!
Michael W. Hudson [Mon, 28 Jan 2002 15:31:14 +0000 (15:31 +0000)] 
It's merge time!

Backport bwarsaw's checkin of revision 1.25:

test_multipart_one_part(): Idempotency test case for a multipart/*
with only one subpart.

23 years agoIt's merge time!
Michael W. Hudson [Mon, 28 Jan 2002 15:30:05 +0000 (15:30 +0000)] 
It's merge time!

Backport bwarsaw's checkin of revision 1.1:

Test case of a singleton multipart; i.e. a multipart/* with only one
subpart.

23 years agoIt's merge time!
Michael W. Hudson [Mon, 28 Jan 2002 15:27:20 +0000 (15:27 +0000)] 
It's merge time!

Backport bwarsaw's checkin of revision 1.6:

_parsebody(): When adding subparts to a multipart container, make sure
that the first subpart added makes the payload a list object.
Otherwise, a multipart/* with only one subpart will not have the
proper structure.

23 years agoIt's merge time!
Michael W. Hudson [Mon, 28 Jan 2002 15:14:57 +0000 (15:14 +0000)] 
It's merge time!

Backport loewis' checkin of revision 1.123:

Encode Unicode arguments to split/splitlist as UTF-8. Fixes #507962.
2.2.1 bugfix candidate.

23 years agoIt's merge time!
Michael W. Hudson [Mon, 28 Jan 2002 15:13:21 +0000 (15:13 +0000)] 
It's merge time!

Backport loewis' checkin of revision 2.7 (of dynload_hpux.c):

Test for error status of shl_findsym. Fixes #505417. 2.2.1 candiate.

23 years agoIt's merge time!
Michael W. Hudson [Mon, 28 Jan 2002 15:10:52 +0000 (15:10 +0000)] 
It's merge time!

Tim sez "Bugfix candidate:  the current state of AutoIdent.py
should be in 2.2.1."

23 years agoIt's merge time!
Michael W. Hudson [Mon, 28 Jan 2002 15:07:45 +0000 (15:07 +0000)] 
It's merge time!

Backport loewis' checkin of revision 1.74:

Use BLDLIBRARY to build extension modules. Fixes #504252.
2.2.1 candidate.

23 years agoIt's merge time!
Michael W. Hudson [Mon, 28 Jan 2002 15:05:14 +0000 (15:05 +0000)] 
It's merge time!

Backport gvanrossum's checkin of revision 1.9:

There's no need for typechecks on the second and third argument of
new.instancemethod() -- the instancemethod object is now a perfectly
general container.

This fixes SF bug ##503091 (Pedro Rodriquez): new.instancemethod fails
for new classes

This is a 2.2.1 candidate.

23 years agoIt's merge time!
Michael W. Hudson [Mon, 28 Jan 2002 15:03:36 +0000 (15:03 +0000)] 
It's merge time!

Backport gvanrossum's checkin of revision 2.38:

There's no need for typechecks on the second and third argument of
new.instancemethod() -- the instancemethod object is now a perfectly
general container.

This fixes SF bug ##503091 (Pedro Rodriquez): new.instancemethod fails
for new classes

This is a 2.2.1 candidate.

23 years agoIt's merge time!
Michael W. Hudson [Mon, 28 Jan 2002 15:01:42 +0000 (15:01 +0000)] 
It's merge time!

Backport lemburg's checkin of revision 1.11:

Restore Python 2.1 StringIO.py behaviour: support concatenating
Unicode string snippets to larger Unicode strings.

This fix should also go into Python 2.2.1.

23 years agoIt's merge time!
Michael W. Hudson [Mon, 28 Jan 2002 15:00:27 +0000 (15:00 +0000)] 
It's merge time!

Backport lemburg's checkin of revision 1.20:

Restore Python 2.1 StringIO.py behaviour: support concatenating
Unicode string snippets to larger Unicode strings.

This fix should also go into Python 2.2.1.

23 years agoIt's merge time!
Michael W. Hudson [Mon, 28 Jan 2002 14:58:24 +0000 (14:58 +0000)] 
It's merge time!

Backport gvanrossum's checkin:

Checked in Sean Reifschneider's RPM spec file and patches.  Bugfix candidate.

23 years agoThis commit was manufactured by cvs2svn to create branch
cvs2svn [Mon, 28 Jan 2002 14:58:24 +0000 (14:58 +0000)] 
This commit was manufactured by cvs2svn to create branch
'release22-maint'.

23 years agoAdd keyword.kwlist to the public API.
Fred Drake [Thu, 24 Jan 2002 16:39:43 +0000 (16:39 +0000)] 
Add keyword.kwlist to the public API.

23 years agolibkeyword.tex was missing from the list of dependencies for the
Fred Drake [Thu, 24 Jan 2002 16:39:26 +0000 (16:39 +0000)] 
libkeyword.tex was missing from the list of dependencies for the
Library Reference.

23 years agoFix for
Michael W. Hudson [Wed, 23 Jan 2002 15:53:08 +0000 (15:53 +0000)] 
Fix for

[ #496154 ] Typos in dynload_beos.c

and on the branch.

23 years agoFix typo reported by François Pinard.
Fred Drake [Mon, 21 Jan 2002 16:09:42 +0000 (16:09 +0000)] 
Fix typo reported by François Pinard.

23 years agoUpdated GNU info dir segment from Milan Zamazal.
Fred Drake [Thu, 17 Jan 2002 21:26:44 +0000 (21:26 +0000)] 
Updated GNU info dir segment from Milan Zamazal.

23 years agoUpdate email address.
Fred Drake [Thu, 17 Jan 2002 21:06:19 +0000 (21:06 +0000)] 
Update email address.

23 years agoFix Michael Hudson's email address.
Fred Drake [Thu, 17 Jan 2002 06:18:17 +0000 (06:18 +0000)] 
Fix Michael Hudson's email address.

23 years agoMerge in Thomas Heller's typo fix from revision 1.13.
Fred Drake [Tue, 15 Jan 2002 04:48:59 +0000 (04:48 +0000)] 
Merge in Thomas Heller's typo fix from revision 1.13.

23 years agoInclude <unistd.h> in Python.h. Fixes #500924.
Martin v. Löwis [Sat, 12 Jan 2002 11:13:24 +0000 (11:13 +0000)] 
Include <unistd.h> in Python.h. Fixes #500924.

23 years agoAdd fallback argument to translation(). Set fallback to 1 for install().
Martin v. Löwis [Fri, 11 Jan 2002 06:37:07 +0000 (06:37 +0000)] 
Add fallback argument to translation(). Set fallback to 1 for install().
Fixes #500595.

23 years agoAdded item about the webbrowser security fix.
Fred Drake [Thu, 10 Jan 2002 13:51:05 +0000 (13:51 +0000)] 
Added item about the webbrowser security fix.

23 years agoFix webbrowser.py security bug: be more careful about what we pass to
Fred Drake [Mon, 7 Jan 2002 15:29:33 +0000 (15:29 +0000)] 
Fix webbrowser.py security bug: be more careful about what we pass to
os.system().
This closes Python bug #500401, Debian bug #127507.

23 years agoInitialize err_ret with filename if available. Fixes #498828.
Martin v. Löwis [Sat, 5 Jan 2002 21:41:01 +0000 (21:41 +0000)] 
Initialize err_ret with filename if available. Fixes #498828.

23 years agoTime2Internaldate(): Call isinstance() once for each of the type tests
Fred Drake [Sat, 5 Jan 2002 17:22:20 +0000 (17:22 +0000)] 
Time2Internaldate():  Call isinstance() once for each of the type tests
instead of possibly twice by using a sequence of types to check for.
Add a message to the ValueError that can be raised.

23 years agoCheck for time.struct_time in addition to tuples. Use 3 characters
Martin v. Löwis [Sat, 5 Jan 2002 11:33:55 +0000 (11:33 +0000)] 
Check for time.struct_time in addition to tuples. Use 3 characters
for zone hours. Fixes #499169.

23 years agoImplement PyObject_DelItemString. Fixes #498915.
Martin v. Löwis [Sat, 5 Jan 2002 10:52:38 +0000 (10:52 +0000)] 
Implement PyObject_DelItemString. Fixes #498915.

23 years agoDo not mask the name of a built-in function in example code.
Fred Drake [Sat, 5 Jan 2002 04:04:36 +0000 (04:04 +0000)] 
Do not mask the name of a built-in function in example code.
Based on comment sent to python-docs.

23 years agoFix indentation error in example from the Tkinter Life Preserver.
Fred Drake [Sat, 5 Jan 2002 03:57:19 +0000 (03:57 +0000)] 
Fix indentation error in example from the Tkinter Life Preserver.
This closes SF bug #499505.

23 years agoFix minor typo reported in SF patch #497951.
Fred Drake [Sat, 5 Jan 2002 01:52:23 +0000 (01:52 +0000)] 
Fix minor typo reported in SF patch #497951.

23 years agoBackport gvanrossum's checkin of revision 1.20:
Michael W. Hudson [Fri, 4 Jan 2002 12:29:45 +0000 (12:29 +0000)] 
Backport gvanrossum's checkin of revision 1.20:

Thread.__bootstrap(): ignore exceptions in the self.__delete() call in
the finally clause.  An exception here could happen when a daemon
thread exits after the threading module has already been trashed by
the import finalization, and there's not much of a point in trying to
insist doing the cleanup in that stage.

This should fix SF bug ##497111: active_limbo_lock error at program
exit.

2.1.2 and 2.2.1 Bugfix candidate!

(has this gone into 2.1.2 yet?)

23 years agoBackport gvanrossum's checkin of revisions
Michael W. Hudson [Fri, 4 Jan 2002 12:28:43 +0000 (12:28 +0000)] 
Backport gvanrossum's  checkin of revisions
  copy.py, 1.23 & test_descr.py, 1.114:

Fix for SF bug ##497426: can't deepcopy recursive new objects

deepcopy(), _reconstruct(): pass the memo to the other function, so
that recursive data structures built out of new-style objects may be
deeply copied correctly.

2.2.1 bugfix!

23 years agoAdd fcntl.h constants from glibc 2.2.4. Fixes #496171.
Martin v. Löwis [Fri, 28 Dec 2001 21:09:23 +0000 (21:09 +0000)] 
Add fcntl.h constants from glibc 2.2.4. Fixes #496171.

23 years agoBackport gvanrossum's checkin of version 1.10:
Michael W. Hudson [Fri, 28 Dec 2001 15:48:09 +0000 (15:48 +0000)] 
Backport gvanrossum's checkin of version 1.10:

_reduce(): Avoid infinite recursion in the pickler when self.__class__
doesn't have the _HEAPTYPE flag set, e.g. for time.struct_time and
posix.stat_result.

This fixes the immediate symptoms of SF bug #496873 (cPickle /
time.struct_time loop), replacing the infinite loop with an exception.

23 years agoRemove extend directory and tidy up README as gvanrossum did on the trunk.
Michael W. Hudson [Fri, 28 Dec 2001 10:29:23 +0000 (10:29 +0000)] 
Remove extend directory and tidy up README as gvanrossum did on the trunk.

I'm feeling thorough today :)

23 years agoBackport gvanrossum's checkin of version 2.217:
Michael W. Hudson [Fri, 28 Dec 2001 10:24:44 +0000 (10:24 +0000)] 
Backport gvanrossum's checkin of version 2.217:

Due to a cut-and-paste error, the type object exported under the name
statvfs_result was in fact the stat_result type object. :-(

2.2.1 bugfix!

23 years agoBackport tim_one's checkin of version 2.302:
Michael W. Hudson [Fri, 28 Dec 2001 10:22:15 +0000 (10:22 +0000)] 
Backport tim_one's checkin of version 2.302:

SF bug #496549 -Qnew and in-place division "/=".

eval_frame():  Under -Qnew, INPLACE_DIVIDE wasn't getting handed off to
INPLACE_TRUE_DIVIDE (like BINARY_DIVIDE was getting handed off to
BINARY_TRUE_DIVIDE).

Bugfix candidate.

23 years agoBackport of akuchling's checkin of 1.10:
Michael W. Hudson [Fri, 28 Dec 2001 10:20:06 +0000 (10:20 +0000)] 
Backport of akuchling's checkin of 1.10:

Suggested by Pete Shinners: treat .m and .mm files as source code.

Question for Jack Jansen: is this reasonable?

Candidate for 2.2 release branch (if Jack thinks it's OK).

Not sure how this wasn't on the branch already, seeing as I thought it
went into 2.2.

23 years agoBackport loewis' checkin of version 1.2:
Michael W. Hudson [Fri, 28 Dec 2001 10:17:07 +0000 (10:17 +0000)] 
Backport loewis' checkin of version 1.2:

Regenerated for Linux 2.2.4.

This wasn't flagged as a bugfix candidate, but I think it probably was.
Howl if you disagree.

23 years agoBackport loewis' checkin of version 1.201:
Michael W. Hudson [Fri, 28 Dec 2001 10:12:44 +0000 (10:12 +0000)] 
Backport loewis' checkin of version 1.201:

Add TCP socket options from glibc 2.2.4. Fixes #495680.
2.2.1 bugfix candidate.

23 years agoBackport Guido's checkin of version 1.61:
Michael W. Hudson [Fri, 28 Dec 2001 10:11:32 +0000 (10:11 +0000)] 
Backport Guido's checkin of version 1.61:

Don't set passiveserver to 0 in connect().  See SF bug #495693.

This should definitely be backported to 2.2.1.  I'll leave it to Jack
to decide whether he wants to fix this in MacPython 2.2.

23 years agoAdd note that fromfd() is Unix-specific.
Fred Drake [Fri, 28 Dec 2001 04:42:10 +0000 (04:42 +0000)] 
Add note that fromfd() is Unix-specific.
This fixes SF bug #495896.
Fix up various markup consistency & style guide conformance nits.

23 years agoAdded index entries similar to some recommended by Skip, and used the word
Fred Drake [Fri, 28 Dec 2001 04:37:37 +0000 (04:37 +0000)] 
Added index entries similar to some recommended by Skip, and used the word
"interpolation" in the text, to make the string formatting material easier to
find.
This closes SF bug #487165.

23 years agoMake this do the right thing with entries which start with the percent sign,
Fred Drake [Fri, 28 Dec 2001 04:36:14 +0000 (04:36 +0000)] 
Make this do the right thing with entries which start with the percent sign,
in response to Skip's comments in SF bug #487165.

Make use of string methods instead of string module functions in most places.
Add (and make the default) a way to collapse symbol entries into a single
"Symbols" section in the generated index.  This is similar to what makeindex
does, but does not include entries beginning with an underscore.

23 years agoAdded some missing index entries, noted by L. Peter Deutsch.
Fred Drake [Fri, 28 Dec 2001 04:35:43 +0000 (04:35 +0000)] 
Added some missing index entries, noted by L. Peter Deutsch.

23 years agoFixed up some index entries.
Fred Drake [Fri, 28 Dec 2001 04:35:10 +0000 (04:35 +0000)] 
Fixed up some index entries.

23 years agoElaborate the descriptions for onecmd(), precmd(), and postcmd() so they are
Fred Drake [Fri, 28 Dec 2001 04:33:03 +0000 (04:33 +0000)] 
Elaborate the descriptions for onecmd(), precmd(), and postcmd() so they are
useful.

23 years agoFix wrongly-named formal parameters in three places: begin_y was used twice
Fred Drake [Fri, 28 Dec 2001 04:31:36 +0000 (04:31 +0000)] 
Fix wrongly-named formal parameters in three places: begin_y was used twice
instead of begin_y and begin_x for derwin(), subpad(), and subwin().
Reported for derwin() by Eric Huss.

Added class annotations for the window methods so they would be properly
described in the index.

23 years agoClose an improperly-closed verbatim environment.
Fred Drake [Fri, 28 Dec 2001 04:30:38 +0000 (04:30 +0000)] 
Close an improperly-closed verbatim environment.
This closes SF patch #496215.

Add a little more detail to the example that had not been closed.

23 years agoMerge names added on the trunk (contributions are being merged as well).
Fred Drake [Fri, 28 Dec 2001 04:29:22 +0000 (04:29 +0000)] 
Merge names added on the trunk (contributions are being merged as well).

23 years agoBump version info for maintenance branch.
Fred Drake [Fri, 28 Dec 2001 04:27:46 +0000 (04:27 +0000)] 
Bump version info for maintenance branch.

23 years agoThis commit was manufactured by cvs2svn to create branch
cvs2svn [Fri, 28 Dec 2001 04:27:46 +0000 (04:27 +0000)] 
This commit was manufactured by cvs2svn to create branch
'release22-maint'.

23 years ago1.00 at last!
Andrew M. Kuchling [Fri, 21 Dec 2001 04:39:11 +0000 (04:39 +0000)] 
1.00 at last!
Describe super() very briefly
A few minor reformattings and wording changes
Set the release date (presumably tomorrow...)

23 years agoAdd a reference to the signal module to the os.kill() description.
Fred Drake [Fri, 21 Dec 2001 03:58:47 +0000 (03:58 +0000)] 
Add a reference to the signal module to the os.kill() description.
This closes SF bug #495609.

23 years agoFix typo in httplib example.
Fred Drake [Fri, 21 Dec 2001 03:52:04 +0000 (03:52 +0000)] 
Fix typo in httplib example.
This fixes SF bug #495221.

23 years agoFix up some examples in the tutorial so we don't contradict our own
Fred Drake [Thu, 20 Dec 2001 23:54:56 +0000 (23:54 +0000)] 
Fix up some examples in the tutorial so we don't contradict our own
advice on docstrings.
This fixes SF bug #495601.

23 years agoApplying r22c1 branch mods back to the trunk.
Jack Jansen [Thu, 20 Dec 2001 20:41:45 +0000 (20:41 +0000)] 
Applying r22c1 branch mods back to the trunk.

23 years agoFix the availability statement for the spawn*() functions to reflect the
Fred Drake [Thu, 20 Dec 2001 17:24:11 +0000 (17:24 +0000)] 
Fix the availability statement for the spawn*() functions to reflect the
actual availability on Windows.
This fixes SF bug #495191.

23 years agoRe-commit Ping's patch to the cgi and cgitb documentation, using the
Fred Drake [Thu, 20 Dec 2001 17:13:09 +0000 (17:13 +0000)] 
Re-commit Ping's patch to the cgi and cgitb documentation, using the
right version this time.  Thanks, Ping!
(This was from SF patch #494582, "\index -> \indexii" version.)

23 years agotest_parseaddr_empty(): New test for assuring that
Barry Warsaw [Thu, 20 Dec 2001 16:37:27 +0000 (16:37 +0000)] 
test_parseaddr_empty(): New test for assuring that
Utils.parseaddr('<>') -- i.e. on an empty address, returns the empty
string.  Built on rfc822, this used to return None.

23 years agoUpdate the documentation links
Andrew M. Kuchling [Thu, 20 Dec 2001 16:33:45 +0000 (16:33 +0000)] 
Update the documentation links
Remove reference to this being a draft

23 years agoUse the final patch/bug numbers
Andrew M. Kuchling [Thu, 20 Dec 2001 16:04:24 +0000 (16:04 +0000)] 
Use the final patch/bug numbers

23 years agoZZZ.
Guido van Rossum [Thu, 20 Dec 2001 15:56:23 +0000 (15:56 +0000)] 
ZZZ.

23 years agoSF patch #495358 (Artur Zaprzala): rfc822.AddressList and "<>" address
Guido van Rossum [Thu, 20 Dec 2001 15:54:48 +0000 (15:54 +0000)] 
SF patch #495358 (Artur Zaprzala): rfc822.AddressList and "<>" address

    rfc822.AddressList incorrectly handles empty address.
    "<>" is converted to None and should be "".
    AddressList.__str__() fails on None.
    I got an email with such an address and my program
    failed processing it.

    Example:
    >>> import rfc822

    >>> rfc822.AddressList("<>").addresslist
    [('', None)]
    >>> str(rfc822.AddressList("<>"))
    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "/usr/lib/python2.1/rfc822.py", line 753, in __str__
    return ", ".join(map(dump_address_pair,
    self.addresslist))
    TypeError: sequence item 0: expected string, None found

[His solution: in the internal routine AddrlistClass.getrouteaddr(),
initialize adlist to "".]

23 years agoAnother contributor.
Guido van Rossum [Thu, 20 Dec 2001 13:19:36 +0000 (13:19 +0000)] 
Another contributor.

23 years agoWhitespace normalization.
Tim Peters [Thu, 20 Dec 2001 06:18:15 +0000 (06:18 +0000)] 
Whitespace normalization.

23 years agoApparently it's Cygwin with a capital C.
Michael W. Hudson [Wed, 19 Dec 2001 22:09:09 +0000 (22:09 +0000)] 
Apparently it's Cygwin with a capital C.

23 years agopartial merge with current pythonware codebase:
Fredrik Lundh [Wed, 19 Dec 2001 21:40:04 +0000 (21:40 +0000)] 
partial merge with current pythonware codebase:
- use repr instead of implied str for doubles
- updated version number to 1.0.0 (for 2.2 final)

23 years agoFix a typo
Neal Norwitz [Wed, 19 Dec 2001 20:44:13 +0000 (20:44 +0000)] 
Fix a typo

23 years agoMore cygwin news. This section is getting a bit long. Oh well.
Michael W. Hudson [Wed, 19 Dec 2001 19:49:58 +0000 (19:49 +0000)] 
More cygwin news.  This section is getting a bit long.  Oh well.

23 years agoSF bug #495021: Crash calling os.stat with a trailing backslash
Tim Peters [Wed, 19 Dec 2001 19:05:01 +0000 (19:05 +0000)] 
SF bug #495021:  Crash calling os.stat with a trailing backslash
Patch from Mark Hammond, plus code rearrangement and comments from me.
posix_do_stat():  Windows-specific code could try to free() stack
memory in some cases when a path ending with a forward or backward slash
was passed to os.stat().

23 years agoAdd test for pickling new-style class with custom metaclass.
Guido van Rossum [Wed, 19 Dec 2001 16:58:54 +0000 (16:58 +0000)] 
Add test for pickling new-style class with custom metaclass.

23 years agoFix for SF bug #494904: Cannot pickle a class with a metaclass,
Guido van Rossum [Wed, 19 Dec 2001 16:57:36 +0000 (16:57 +0000)] 
Fix for SF bug #494904: Cannot pickle a class with a metaclass,
reported by Dan Parisien.

23 years agosave(): Fix for SF bug #494904: Cannot pickle a class with a
Guido van Rossum [Wed, 19 Dec 2001 16:56:54 +0000 (16:56 +0000)] 
save(): Fix for SF bug #494904: Cannot pickle a class with a
metaclass, reported by Dan Parisien.

Objects that are instances of custom metaclasses, i.e. whose ob_type
is a subclass of PyType_Type, should be pickled the same as new-style
classes (objects whose ob_type is PyType_Type).  This can't be done
through the existing dispatch switches, and the __reduce__ trick
doesn't work for these, since it finds the unbound __reduce__ for
instances of the class (inherited from PyBaseObject_Type).  So check
explicitly using PyType_IsSubtype().

23 years agoPickler.save(): Fix for SF bug #494904: Cannot pickle a class with a
Guido van Rossum [Wed, 19 Dec 2001 16:55:02 +0000 (16:55 +0000)] 
Pickler.save(): Fix for SF bug #494904: Cannot pickle a class with a
metaclass, reported by Dan Parisien.

Objects that are instances of custom metaclasses, i.e. whose class is
a subclass of 'type', should be pickled the same as new-style classes
(objects whose class is 'type').  This can't be done through a
dispatch table entry, and the __reduce__ trick doesn't work for these,
since it finds the unbound __reduce__ for instances of the class
(inherited from 'object').  So check explicitly using issubclass().

23 years agoAdd some additional tests that check more proxy behaviors.
Fred Drake [Wed, 19 Dec 2001 16:54:23 +0000 (16:54 +0000)] 
Add some additional tests that check more proxy behaviors.

23 years agoproxy_compare(): Make sure that we unwrap both objects being compared if
Fred Drake [Wed, 19 Dec 2001 16:44:30 +0000 (16:44 +0000)] 
proxy_compare():  Make sure that we unwrap both objects being compared if
both are proxy objects.

23 years agoFix the test control support for the pickle & cPickle tests so the tests run
Fred Drake [Wed, 19 Dec 2001 16:42:15 +0000 (16:42 +0000)] 
Fix the test control support for the pickle & cPickle tests so the tests run
under regrtest.

23 years agoThe test using class initarg failed, because it was lacking a
Guido van Rossum [Wed, 19 Dec 2001 16:38:29 +0000 (16:38 +0000)] 
The test using class initarg failed, because it was lacking a
__safe_for_unpickling__ attribute.

23 years agoMake the module docstring agree with reality: the module prvides the
Fred Drake [Wed, 19 Dec 2001 14:27:41 +0000 (14:27 +0000)] 
Make the module docstring agree with reality: the module prvides the
"handler()" function, not the "handle()" function.

23 years agoWhen running regen for the plat directories we should use the BUILDEXT
Jack Jansen [Wed, 19 Dec 2001 09:24:40 +0000 (09:24 +0000)] 
When running regen for the plat directories we should use the BUILDEXT
extension, not the EXT one, as regen uses the python binary in the build
directory. Fixes #493959.

23 years agoSF bug #494738: binascii_b2a_base64 overwrites memory.
Tim Peters [Wed, 19 Dec 2001 04:41:35 +0000 (04:41 +0000)] 
SF bug #494738:  binascii_b2a_base64 overwrites memory.
binascii_b2a_base64():  We didn't allocate enough buffer space for very
short inputs (e.g., a 1-byte input can produce a 5-byte output, but we
only allocated 2 bytes).  I expect that malloc overheads absorbed the
overrun in practice, but computing a correct upper bound is a very simple
change.

23 years agoSF bug #494668: PUSH() should assert-fail on overflow.
Tim Peters [Wed, 19 Dec 2001 04:11:07 +0000 (04:11 +0000)] 
SF bug #494668:  PUSH() should assert-fail on overflow.
eval_frame():  Added asserts to the top of the eval loop, to verify
that the eval stack pointer is in bounds, plus some comments.

23 years agoTemporaryFileWrapper: fixed typo in new comment.
Tim Peters [Tue, 18 Dec 2001 23:22:01 +0000 (23:22 +0000)] 
TemporaryFileWrapper:  fixed typo in new comment.

23 years agoPatch #494384: Disable more Unicode API if Unicode is not used.
Martin v. Löwis [Tue, 18 Dec 2001 22:36:40 +0000 (22:36 +0000)] 
Patch #494384: Disable more Unicode API if Unicode is not used.

23 years agoTemporaryFileWrapper: cache the value of os.unlink for use by __del__,
Tim Peters [Tue, 18 Dec 2001 22:32:40 +0000 (22:32 +0000)] 
TemporaryFileWrapper:  cache the value of os.unlink for use by __del__,
to prevent mysterious errors at shutdown due to "os.unlink" turning into
"None.unlink".

23 years agoMove the helper class _closedsocket *into* the _socketobject class.
Guido van Rossum [Tue, 18 Dec 2001 22:22:25 +0000 (22:22 +0000)] 
Move the helper class _closedsocket *into* the _socketobject class.
This way, when a socket object is deleted after the socket module has
already been zapped by module shutdown, we don't get annoying warnings
about exceptions in __del__ methods.

23 years agoRecreated after source changes.
Thomas Heller [Tue, 18 Dec 2001 21:08:15 +0000 (21:08 +0000)] 
Recreated after source changes.

23 years agoMoved a bunch of routines from "blacklisted" to "graylisted", as they _are_
Just van Rossum [Tue, 18 Dec 2001 20:15:27 +0000 (20:15 +0000)] 
Moved a bunch of routines from "blacklisted" to "graylisted", as they _are_
available in OSX (mach-o) but not in CarbonLib (neither on OSX or OS9).

23 years agoSecond part of fix for bug [#483982] Python 2.2b2 bdist_wininst
Thomas Heller [Tue, 18 Dec 2001 20:13:40 +0000 (20:13 +0000)] 
Second part of fix for bug [#483982] Python 2.2b2 bdist_wininst
crashes.

If no external zip-utility is found, the archive is created by the
zipfile module, which behaves different now than in 2.1: if the
zip-file is created in the root directory if the distribution, it will
contain an (empty) version of itself.

This triggered the above bug - so it's better to create the zip-file
far away in the TMP directory.

23 years agoAdd entry for the pydoc documentation.
Fred Drake [Tue, 18 Dec 2001 16:32:30 +0000 (16:32 +0000)] 
Add entry for the pydoc documentation.