]> granicus.if.org Git - python/log
python
22 years agoMake tarfile raise ImportError on MacOS9. The pathname handling needs work, and I...
Jack Jansen [Fri, 7 Mar 2003 13:37:32 +0000 (13:37 +0000)]
Make tarfile raise ImportError on MacOS9. The pathname handling needs work, and I don't have time to fix it. I'll file a bug report.

22 years agoThe filename fix of the previous checkin was complete bogus, the problem is elsewhere...
Jack Jansen [Fri, 7 Mar 2003 13:27:53 +0000 (13:27 +0000)]
The filename fix of the previous checkin was complete bogus, the problem is elsewhere. Retracting.

22 years agoTwo fixes to make this test pass on MacOS9:
Jack Jansen [Fri, 7 Mar 2003 12:50:45 +0000 (12:50 +0000)]
Two fixes to make this test pass on MacOS9:
- the test was sloppy about filenames: "0-REGTYPE-TEXT" was used where
  the archive held "/0-REGTYPE-TEXT".
- tarfile extracts all files in binary mode, but the test expected to be able to
  read and compare text files in text mode. Use universal text mode.

22 years agoTest that os.utime and os.chmod actually exist before using them.
Jack Jansen [Fri, 7 Mar 2003 12:47:06 +0000 (12:47 +0000)]
Test that os.utime and os.chmod actually exist before using them.

22 years agoBroke down and made it work for Python 2.0 and up. (Older versions
Guido van Rossum [Fri, 7 Mar 2003 01:33:18 +0000 (01:33 +0000)]
Broke down and made it work for Python 2.0 and up.  (Older versions
would have required refraining from using string methods -- too
painful.)

Changed the -s option so that multiple -s options are cumulative.

22 years agofix name of db2pickle
Skip Montanaro [Fri, 7 Mar 2003 00:47:40 +0000 (00:47 +0000)]
fix name of db2pickle

22 years agoSF patch #693753: fix for bug 639806: default for dict.pop
Raymond Hettinger [Thu, 6 Mar 2003 23:54:28 +0000 (23:54 +0000)]
SF patch #693753:  fix for bug 639806: default for dict.pop
(contributed by Michael Stone.)

22 years agoRepaired a misleading comment Barry inherited from me.
Tim Peters [Thu, 6 Mar 2003 23:41:58 +0000 (23:41 +0000)]
Repaired a misleading comment Barry inherited from me.

22 years agoFirst try to use the OSATerminology module to get the terminology
Jack Jansen [Thu, 6 Mar 2003 23:04:38 +0000 (23:04 +0000)]
First try to use the OSATerminology module to get the terminology
resources before reverting to manually reading the resources.

Unfortunately there is still a bug in here somewhere: it doesn't work
for all applications.

22 years agoBuild the OSATerminology module on MacOSX.
Jack Jansen [Thu, 6 Mar 2003 23:03:43 +0000 (23:03 +0000)]
Build the OSATerminology module on MacOSX.

22 years agoVarious tweaks by Jack because of the different module name, adaptation
Jack Jansen [Thu, 6 Mar 2003 23:02:59 +0000 (23:02 +0000)]
Various tweaks by Jack because of the different module name, adaptation
to the Python style, etc.

22 years agoModule to get OSA terminology description through the "official channels",
Jack Jansen [Thu, 6 Mar 2003 23:02:04 +0000 (23:02 +0000)]
Module to get OSA terminology description through the "official channels",
in stead of manually getting the AETE/AEUT resource. Donated by Donovan
Preston. This is his original code (but with the filename changed) checked
in for reference only.

22 years agoFix SF bug #697256, PyMarshal_WriteShortToFile() documented, but not implemented
Neal Norwitz [Thu, 6 Mar 2003 22:04:24 +0000 (22:04 +0000)]
Fix SF bug #697256, PyMarshal_WriteShortToFile() documented, but not implemented

Remove prototype and doc.  Backport candidate.

22 years ago_split_ascii(): In the clause where curlen + partlen > maxlen, if the
Barry Warsaw [Thu, 6 Mar 2003 20:33:04 +0000 (20:33 +0000)]
_split_ascii(): In the clause where curlen + partlen > maxlen, if the
part itself is longer than maxlen, and we aren't already splitting on
whitespace, then we recursively split the part on whitespace and
append that to the this list.

22 years agotest_long_received_header(): Another test case for folding long
Barry Warsaw [Thu, 6 Mar 2003 20:31:02 +0000 (20:31 +0000)]
test_long_received_header(): Another test case for folding long
Received headers (first on semis then on whitespace), given by Jason
Mastaler.

22 years agoReverted the previous change to read() and readline().
Raymond Hettinger [Thu, 6 Mar 2003 16:31:48 +0000 (16:31 +0000)]
Reverted the previous change to read() and readline().
Kevin Jacobs found that the code simplification did not
exactly match the semantics of the original.  Regression
test cases were requested.

22 years agoAdd a note explaining why you shouldn't try to compute mean and
Guido van Rossum [Thu, 6 Mar 2003 16:11:17 +0000 (16:11 +0000)]
Add a note explaining why you shouldn't try to compute mean and
standard deviation.  Also add an XXX comment wondering if we should
refrain from using itertools.repeat().

22 years agotest_whitespace_eater_unicode(): Test of the last outstanding bug in
Barry Warsaw [Thu, 6 Mar 2003 16:11:14 +0000 (16:11 +0000)]
test_whitespace_eater_unicode(): Test of the last outstanding bug in
SF # 640110.

22 years ago__unicode__(): When converting to a unicode string, we need to
Barry Warsaw [Thu, 6 Mar 2003 16:10:30 +0000 (16:10 +0000)]
__unicode__(): When converting to a unicode string, we need to
preserve spaces in the encoded/unencoded word boundaries.  RFC 2047 is
ambiguous here, but most people expect the space to be preserved.
Really closes SF bug # 640110.

22 years agoSimpler way to write reindent(), suggested by Raymond H.
Guido van Rossum [Thu, 6 Mar 2003 13:09:09 +0000 (13:09 +0000)]
Simpler way to write reindent(), suggested by Raymond H.

22 years agoRemoved superfluous \r.
Sjoerd Mullender [Thu, 6 Mar 2003 12:53:07 +0000 (12:53 +0000)]
Removed superfluous \r.

22 years agotest_rfc2047_multiline(): Test case for SF bug #640110.
Barry Warsaw [Thu, 6 Mar 2003 06:38:29 +0000 (06:38 +0000)]
test_rfc2047_multiline(): Test case for SF bug #640110.

22 years agodecode_header(): Typo when appending an unencoded chunk to the
Barry Warsaw [Thu, 6 Mar 2003 06:37:42 +0000 (06:37 +0000)]
decode_header(): Typo when appending an unencoded chunk to the
previous unencoded chunk (e.g. when they appear on separate lines).
Closes the 2nd bug in SF #640110 (the first one's already been
fixed).

22 years agoDescribe Charset.__repr__().
Barry Warsaw [Thu, 6 Mar 2003 06:07:34 +0000 (06:07 +0000)]
Describe Charset.__repr__().

22 years agoDescribe the new Header.encode() argument "splitchars".
Barry Warsaw [Thu, 6 Mar 2003 06:06:54 +0000 (06:06 +0000)]
Describe the new Header.encode() argument "splitchars".

22 years agoMerge of the folding-reimpl-branch. Specific changes,
Barry Warsaw [Thu, 6 Mar 2003 05:41:07 +0000 (05:41 +0000)]
Merge of the folding-reimpl-branch.  Specific changes,

Update tests for email 2.5.

22 years agoMerge of the folding-reimpl-branch. Specific changes,
Barry Warsaw [Thu, 6 Mar 2003 05:39:46 +0000 (05:39 +0000)]
Merge of the folding-reimpl-branch.  Specific changes,

_split(): New implementation of ASCII line splitting which should do a
better job and not be subject to the various weird artifacts (bugs)
reported.  This should also do a better job of higher-level syntactic
splits by trying first to split on semis, then commas, then
whitespace.

Use a Timbot-ly binary search for optimal non-ASCII split points for
better packing of header lines.  This also lets us remove one
recursion call.  Don't pass in firstline, but instead pass in the
actual line length we're shooting for.  Also pass in the list of split
characters.

encode(): Pass in the list of split characters so applications can
have some control over what "higher level syntactic breaks" are.

Also,

decode_header(): Transform binascii.Errors which can occur when
decoding a base64 RFC 2047 header with bogus data, into an
email.Errors.HeaderParseError.  Closes SF bug #696712.

22 years agoMerge of the folding-reimpl-branch. Specific changes,
Barry Warsaw [Thu, 6 Mar 2003 05:25:35 +0000 (05:25 +0000)]
Merge of the folding-reimpl-branch.  Specific changes,

Rename a constant.

22 years agoMerge of the folding-reimpl-branch. Specific changes,
Barry Warsaw [Thu, 6 Mar 2003 05:25:00 +0000 (05:25 +0000)]
Merge of the folding-reimpl-branch.  Specific changes,

Remove a senseless comment.

22 years agoMerge of the folding-reimpl-branch. Specific changes,
Barry Warsaw [Thu, 6 Mar 2003 05:22:02 +0000 (05:22 +0000)]
Merge of the folding-reimpl-branch.  Specific changes,

_handle_multipart(): Ensure that if the preamble exists but does not
end in a newline, a newline is still added.  Without this, the
boundary separator will end up on the preamble line, breaking the MIME
structure.

_make_boundary(): Handle differences in the decimal point character
based on the locale.

22 years agoMerge of the folding-reimpl-branch. Specific changes,
Barry Warsaw [Thu, 6 Mar 2003 05:16:29 +0000 (05:16 +0000)]
Merge of the folding-reimpl-branch.  Specific changes,

Charset: Alias __repr__ to __str__ for debugging.

header_encode(): When calling quopriMIME.header_encode(), set
maxlinelen=None so that the lower level function doesn't (also) try to
wrap/fold the line.

22 years agoMerge of the folding-reimpl-branch. Specific changes,
Barry Warsaw [Thu, 6 Mar 2003 05:14:20 +0000 (05:14 +0000)]
Merge of the folding-reimpl-branch.  Specific changes,

_max_append(): Change the comparison so that the new string is
concatenated if it's less than or equal to the max length.

header_encode(): Allow for maxlinelen == None to mean, don't do any
line splitting.  This is because this module is mostly used by higher
level abstractions (Header.py) which already ensures line lengths.  We
do this in a cheapo way by setting the max_encoding to some insanely
<100k wink> large number.

22 years agoAdd notes about baseline overhead, and about different Python
Guido van Rossum [Thu, 6 Mar 2003 03:02:10 +0000 (03:02 +0000)]
Add notes about baseline overhead, and about different Python
versions.  Add -h/--help option to print doc string.

22 years agoAdded more documentation.
Guido van Rossum [Thu, 6 Mar 2003 02:32:19 +0000 (02:32 +0000)]
Added more documentation.

22 years agoMention timeit.py.
Guido van Rossum [Thu, 6 Mar 2003 01:56:12 +0000 (01:56 +0000)]
Mention timeit.py.

22 years agoA flexible utility to time the execution speed of a code snippet.
Guido van Rossum [Wed, 5 Mar 2003 23:31:58 +0000 (23:31 +0000)]
A flexible utility to time the execution speed of a code snippet.
Usable from the command line or from a program.

22 years agoTwo ancient and obscure bugs found and fixed by Donovan Preston (these
Jack Jansen [Wed, 5 Mar 2003 21:16:06 +0000 (21:16 +0000)]
Two ancient and obscure bugs found and fixed by Donovan Preston (these
could be responsible for various unexplained problems with Python/OSA
interaction over the years):
- Enum values were passed as their string counterparts. Most applications
  don't seem to mind this, but some do (InDesign).
- Attributes have never worked (!), as they were incorrectly passed
  as parameters. Apparently nobody uses them much:-)

22 years agoDeclare all variables at the start of their scope.
Fred Drake [Wed, 5 Mar 2003 17:31:21 +0000 (17:31 +0000)]
Declare all variables at the start of their scope.

22 years agoPatch #698082 from Thomas Heller: Modulefinder didn't exclude modules
Just van Rossum [Wed, 5 Mar 2003 17:23:48 +0000 (17:23 +0000)]
Patch #698082 from Thomas Heller:  Modulefinder didn't exclude modules
in packages correctly.

22 years agoFix for bug #697546: don't auto-register the Python documentation
Jack Jansen [Wed, 5 Mar 2003 16:13:19 +0000 (16:13 +0000)]
Fix for bug #697546: don't auto-register the Python documentation
by putting the help book in an array. Somehow the fact that Python.app
(and, hence, pythonw) got an automatic help menu messed up Tkinter's
handling of the help menu.

22 years agoAn #endif was missing in Just's patch. Added.
Jack Jansen [Wed, 5 Mar 2003 16:00:15 +0000 (16:00 +0000)]
An #endif was missing in Just's patch. Added.

22 years agoremoving one Mac hack and add another:
Just van Rossum [Wed, 5 Mar 2003 15:46:54 +0000 (15:46 +0000)]
removing one Mac hack and add another:
- The applet logic has been replaced to bundlebuilder's bootstrap script
- Due to Apple being extremely string about argv[0], we need a way to
  specify the actual executable name for use with sys.executable. See
  the comment embedded in the code.

22 years agoAlways initialize Py_FileSystemDefaultEncoding on Unix in Py_Initialize,
Martin v. Löwis [Wed, 5 Mar 2003 15:13:47 +0000 (15:13 +0000)]
Always initialize Py_FileSystemDefaultEncoding on Unix in Py_Initialize,
and not as a side effect of setlocale. Expose it as sys.getfilesystemencoding.
Adjust test case.

22 years agoActually *do* override the type in AppBuilder.
Jack Jansen [Wed, 5 Mar 2003 14:44:54 +0000 (14:44 +0000)]
Actually *do* override the type in AppBuilder.

22 years agoMoved some application-bundle specific code from the BundleBuilder class to
Jack Jansen [Wed, 5 Mar 2003 14:42:18 +0000 (14:42 +0000)]
Moved some application-bundle specific code from the BundleBuilder class to
AppBuilder, and set the default type to BNDL (overridden in AppBuilder).

This surfaced when trying to build help bundles.

22 years agoBack in June in revision 1.98 Steve (accidentally, presumably) wiped
Michael W. Hudson [Wed, 5 Mar 2003 14:42:09 +0000 (14:42 +0000)]
Back in June in revision 1.98 Steve (accidentally, presumably) wiped
out a month's worth of checkins to libstdtypes.tex (including my
extended slice docs).

I think this checkin merges them all back in, but if you make one of
these checkins:

    revision 1.97
    date: 2002/06/14 00:27:13;  author: nnorwitz
    Use \code{True} (or False) instead of true/false.
    Not sure if code is correct, but that is what's in this file.
    I've seen \constant{True} in other places.
    ----------------------------
    revision 1.95
    date: 2002/05/22 20:39:43;  author: bwarsaw
    Jack's documentation for the U mode character on the file()
    constructor, vetted by Barry.
    ----------------------------
    revision 1.94
    date: 2002/05/21 18:19:15;  author: rhettinger
    Patch 543387.  Document deprecation of complex %, //,and divmod().
    ----------------------------
    revision 1.93
    date: 2002/05/15 15:45:25;  author: rhettinger
    Added missing index entries for mapping methods.  Closes patch
    #548693.

some checking may be in order.

22 years agoI thought it was common practice to check things compiled before
Michael W. Hudson [Wed, 5 Mar 2003 14:20:58 +0000 (14:20 +0000)]
I thought it was common practice to check things compiled before
checking them in?  Oh well, this fixes various obvious mistakes and
changes a subsubsubsection (which doesn't exist) into a subsubsection
(which does).  I'm not sure this matches the intent, but it seems to
read OK on a quick skim.

22 years agoPatch #696645: Remove VMS code with uncertain authorship.
Martin v. Löwis [Wed, 5 Mar 2003 14:15:21 +0000 (14:15 +0000)]
Patch #696645: Remove VMS code with uncertain authorship.

22 years agoThese are no longer used.
Jack Jansen [Wed, 5 Mar 2003 09:37:19 +0000 (09:37 +0000)]
These are no longer used.

22 years agoPoint e-mail address at the SIG
Andrew M. Kuchling [Tue, 4 Mar 2003 19:36:11 +0000 (19:36 +0000)]
Point e-mail address at the SIG

22 years agoos.listdir(): Fall back to the original byte string if conversion to unicode
Just van Rossum [Tue, 4 Mar 2003 19:30:44 +0000 (19:30 +0000)]
os.listdir(): Fall back to the original byte string if conversion to unicode
fails, as discussed in patch #683592.

22 years agoWeaken recommendation of Friedl book; fix reference
Andrew M. Kuchling [Tue, 4 Mar 2003 14:17:05 +0000 (14:17 +0000)]
Weaken recommendation of Friedl book; fix reference

22 years ago[bug #692016] update description of {m,n} modifier; you can omit the lower bound
Andrew M. Kuchling [Tue, 4 Mar 2003 14:12:24 +0000 (14:12 +0000)]
[bug #692016] update description of {m,n} modifier; you can omit the lower bound

22 years ago[bug #696771] Remove misleading parenthetical aside
Andrew M. Kuchling [Tue, 4 Mar 2003 14:07:51 +0000 (14:07 +0000)]
[bug #696771] Remove misleading parenthetical aside

22 years agoPatch #696613 by Ben Laurie: use "test -L" to test for symlinks in stead
Jack Jansen [Tue, 4 Mar 2003 10:52:39 +0000 (10:52 +0000)]
Patch #696613 by Ben Laurie: use "test -L" to test for symlinks in stead
of the older (and, according to some manpages, deprecated) "test -h".

22 years agoAttempting to save the shell raised an error related to saving
Kurt B. Kaiser [Tue, 4 Mar 2003 04:42:04 +0000 (04:42 +0000)]
Attempting to save the shell raised an error related to saving
breakpoints, which are not implemented in the shell

22 years agoSF 693333
Kurt B. Kaiser [Tue, 4 Mar 2003 04:03:45 +0000 (04:03 +0000)]
SF 693333
Modify subprocess to print a reasonable message upon receiving
a 'quit' or 'exit'

22 years agotest_ioctl is an expected skip on Windows.
Tim Peters [Tue, 4 Mar 2003 00:26:38 +0000 (00:26 +0000)]
test_ioctl is an expected skip on Windows.

22 years agoFix SF #692416, don't crash interpreter for _tkinter.deletefilehandler
Neal Norwitz [Mon, 3 Mar 2003 21:16:39 +0000 (21:16 +0000)]
Fix SF #692416, don't crash interpreter for _tkinter.deletefilehandler
in addition to createfilehandler and creaetetimerhandler.

22 years ago[Bug #693470] 'licence' as an alias for 'license' doesn't work.
Andrew M. Kuchling [Mon, 3 Mar 2003 20:07:27 +0000 (20:07 +0000)]
[Bug #693470] 'licence' as an alias for 'license' doesn't work.
   This patch makes it work again.

22 years agoSF 695861
Kurt B. Kaiser [Mon, 3 Mar 2003 20:06:48 +0000 (20:06 +0000)]
SF 695861
Eliminate extra blank line in shell output.  Caused by stdout not being
flushed
upon completion of subprocess' Executive.runcode() when user code ends by
outputting an unterminated line, e.g. print "test",

22 years agoplugged leak noted by nnorwitz: the 'et' format returns allocated memory
Just van Rossum [Mon, 3 Mar 2003 19:07:13 +0000 (19:07 +0000)]
plugged leak noted by nnorwitz: the 'et' format returns allocated memory

22 years ago[Bug #69389] List register command in __all__, so setup.py --help-commands will now...
Andrew M. Kuchling [Mon, 3 Mar 2003 18:37:16 +0000 (18:37 +0000)]
[Bug #69389] List register command in __all__, so setup.py --help-commands will now list it

22 years agoImprove description
Andrew M. Kuchling [Mon, 3 Mar 2003 18:26:01 +0000 (18:26 +0000)]
Improve description

22 years agoPatch #683592 revisited, after discussions with MvL:
Just van Rossum [Mon, 3 Mar 2003 17:32:15 +0000 (17:32 +0000)]
Patch #683592 revisited, after discussions with MvL:
- Implement the behavior as specified in PEP 277, meaning os.listdir()
  will only return unicode strings if it is _called_ with a unicode
  argument.
- And then return only unicode, don't attempt to convert to ASCII.
- Don't switch on Py_FileSystemDefaultEncoding, but simply use the
  default encoding if Py_FileSystemDefaultEncoding is NULL. This means
  os.listdir() can now raise UnicodeDecodeError if the default encoding
  can't represent the directory entry. (This seems better than silcencing
  the error and fall back to a byte string.)
- Attempted to decribe the above in Doc/lib/libos.tex.
- Reworded the Misc/NEWS items to reflect the current situation.

This checkin also fixes bug #696261, which was due to os.listdir() not
using Py_FileSystemDefaultEncoding, like all file system calls are
supposed to.

22 years agopy-pdbtrack-grub-for-buffer(): Rectified some logic errors i
Ken Manheimer [Mon, 3 Mar 2003 17:09:44 +0000 (17:09 +0000)]
py-pdbtrack-grub-for-buffer(): Rectified some logic errors i
introduced when shifting around some code, and added some redundancy
to reduce chances of hitting the wrong source code.  (This is
experimental - it will improve the accuracy, but will reduce the
ability of the user to deliberately select the buffer they want the
buffer grubbing stuff to find.  I think the accuracy improvement will
be worth it, but am not sure, so may remove this.)

22 years agoGave the text fields a little more space, so they don't get cut off.
Jack Jansen [Mon, 3 Mar 2003 14:56:59 +0000 (14:56 +0000)]
Gave the text fields a little more space, so they don't get cut off.

22 years agoMod to previous checkin: we must require ascii, not system defautl encoding,
Jack Jansen [Mon, 3 Mar 2003 13:19:44 +0000 (13:19 +0000)]
Mod to previous checkin: we must require ascii, not system defautl encoding,
because we have no easy way to convert the python encoding string to
a CF encoding parameter.

22 years agoAccept only the system default encoding when converting Python
Jack Jansen [Mon, 3 Mar 2003 13:12:59 +0000 (13:12 +0000)]
Accept only the system default encoding when converting Python
strings to CF strings. Fixes 682215.

22 years agoFix bug
Michael W. Hudson [Mon, 3 Mar 2003 12:29:42 +0000 (12:29 +0000)]
Fix bug

[ 555817 ] Flawed fcntl.ioctl implementation.

with my patch that allows for an array to be mutated when passed
as the buffer argument to ioctl() (details complicated by
backwards compatibility considerations -- read the docs!).

22 years agoDon't call AEInteractWithUser unconditionally on a quit appleevent. The
Jack Jansen [Mon, 3 Mar 2003 12:28:04 +0000 (12:28 +0000)]
Don't call AEInteractWithUser unconditionally on a quit appleevent. The
EasyDIalogs methods will call it if needed.

Fixes #684975.

22 years agoCall AEInteractWithUser() before bringing up any of the dialogs (with the
Jack Jansen [Mon, 3 Mar 2003 12:25:02 +0000 (12:25 +0000)]
Call AEInteractWithUser() before bringing up any of the dialogs (with the
exception of the ProgressBar, which I think is okay to show in the background).

This is a prerequisitite for the fix of #684975.

22 years agoDon't crash on _tkinter.createfilehandler in non-threaded Tcl;
Martin v. Löwis [Mon, 3 Mar 2003 10:40:01 +0000 (10:40 +0000)]
Don't crash on _tkinter.createfilehandler in non-threaded Tcl;
disable this function in threaded Tcl. Likewise for creaetetimerhandler.
Fixes #692416.

22 years agoPatch #671666: Alias ANSI code page to "mbcs".
Martin v. Löwis [Mon, 3 Mar 2003 09:34:01 +0000 (09:34 +0000)]
Patch #671666: Alias ANSI code page to "mbcs".

22 years agoGuard advancing past leading meta-comments.
Ken Manheimer [Mon, 3 Mar 2003 04:05:03 +0000 (04:05 +0000)]
Guard advancing past leading meta-comments.

22 years agoEnhanced pdbtrack to provide for source code that's not findable by
Ken Manheimer [Mon, 3 Mar 2003 00:35:32 +0000 (00:35 +0000)]
Enhanced pdbtrack to provide for source code that's not findable by
the reported path.  (Eg, precompiled scripts with a file path suitable
for a different host, scripts actually running on a remote system or
with no valid path, like Zope through-the-web python scripts.)

On failing to find the code on the reported path, pdbtrack takes the
function name and looks through the buffers, from most to least
recent, seeking the first python-mode buffer that either is named for
the function or has a definition (def or class) for that function.  So
to get source tracking for code that's not located where the path
indicates, you put a copy of the script in a buffer, and pdbtrack will
find it.

Also, fixed a small bug so pdbtrack now properly presents the overlay
arrow when you run the pdb 'w'here command.

22 years agoUse Carbon.File for FSSpec and FSRef conversion, not macfs.
Jack Jansen [Sun, 2 Mar 2003 23:16:50 +0000 (23:16 +0000)]
Use Carbon.File for FSSpec and FSRef conversion, not macfs.

22 years ago_CG module only needs the ApplicationServices framework, not Carbon.
Jack Jansen [Sun, 2 Mar 2003 21:31:51 +0000 (21:31 +0000)]
_CG module only needs the ApplicationServices framework, not Carbon.

22 years agoUndo the apply() removals; this code needs to run under Python 1.5.2.
Guido van Rossum [Sun, 2 Mar 2003 20:47:29 +0000 (20:47 +0000)]
Undo the apply() removals; this code needs to run under Python 1.5.2.

22 years agoMyComplex now works.
Guido van Rossum [Sun, 2 Mar 2003 13:53:18 +0000 (13:53 +0000)]
MyComplex now works.

22 years agoFix from Greg Chapman from SF bug #695651: a complex subclass
Guido van Rossum [Sun, 2 Mar 2003 13:51:47 +0000 (13:51 +0000)]
Fix from Greg Chapman from SF bug #695651: a complex subclass
constructor, when passed a single complex argument, returns the
argument unchanged.  This should be done only for the complex base
class; a complex subclass should of course cast the value to the
subclass in this case.

The fix also revealed a segfault in complex_getnewargs(): the argument
for the Py_BuildValue() format code "D" is the *address* of a
Py_complex struct, not the value.  (This corroborated by the API
documentation.)

I expect this needs to be backported to 2.2.3.

22 years agoCommit MvL's doc patch for SF bug #221327. This adds an example of
Guido van Rossum [Sun, 2 Mar 2003 13:17:20 +0000 (13:17 +0000)]
Commit MvL's doc patch for SF bug #221327.  This adds an example of
calling into Python from a C thread.

22 years agotest_load_from_canned_string(): Created a DATA2 string to test a canned
Tim Peters [Sun, 2 Mar 2003 04:54:24 +0000 (04:54 +0000)]
test_load_from_canned_string():  Created a DATA2 string to test a canned
proto 2 pickle too.

22 years agoAdd updates for alpha2
Andrew M. Kuchling [Sun, 2 Mar 2003 02:31:58 +0000 (02:31 +0000)]
Add updates for alpha2

22 years agoExpand itertools paragraph
Andrew M. Kuchling [Sun, 2 Mar 2003 02:13:52 +0000 (02:13 +0000)]
Expand itertools paragraph

22 years agoTestOnlySetsInBinaryOps: Simplified the non-inplace tests by using
Tim Peters [Sun, 2 Mar 2003 00:36:10 +0000 (00:36 +0000)]
TestOnlySetsInBinaryOps:  Simplified the non-inplace tests by using
assertRaises.  Fixed a repeated subtle bug in the inplace tests by
removing the possibilty that a self.fail() call could raise a
TypeError that the test catches by mistake.

22 years agoTypo repairs in new code.
Tim Peters [Sun, 2 Mar 2003 00:31:23 +0000 (00:31 +0000)]
Typo repairs in new code.

22 years agoSF bug 693121: Set == non-Set is a TypeError.
Tim Peters [Sun, 2 Mar 2003 00:19:49 +0000 (00:19 +0000)]
SF bug 693121:  Set == non-Set is a TypeError.
Allow mixed-type __eq__ and __ne__ for Set objects.  This is messier than
I'd like because Set *also* implements __cmp__.  I know of one glitch now:
cmp(s, t) returns 0 now when s and t are both Sets and s == t, despite
that Set.__cmp__ unconditionally raises TypeError (and by intent).  The
rub is that __eq__ gets tried first, and the x.__eq__(y) True result
convinces Python that cmp(x, y) is 0 without even calling Set.__cmp__.

22 years agoThe doctest was printing Sets, but that's unreliable because set
Tim Peters [Sat, 1 Mar 2003 23:33:34 +0000 (23:33 +0000)]
The doctest was printing Sets, but that's unreliable because set
elements get displayed in undefined dict order.  Use a Set subclass
instead (which arranges to sort the elements for display).

22 years agoFix comment, mode really is used
Neal Norwitz [Sat, 1 Mar 2003 22:58:00 +0000 (22:58 +0000)]
Fix comment, mode really is used

22 years agoFix SF patch #695581, "returnself" -> "return self"
Neal Norwitz [Sat, 1 Mar 2003 15:22:41 +0000 (15:22 +0000)]
Fix SF patch #695581, "returnself" -> "return self"

22 years agoget_completer() takes no args
Neal Norwitz [Sat, 1 Mar 2003 15:19:41 +0000 (15:19 +0000)]
get_completer() takes no args

22 years agoAdded implementation notes for [re]set_exc_info().
Guido van Rossum [Sat, 1 Mar 2003 03:36:33 +0000 (03:36 +0000)]
Added implementation notes for [re]set_exc_info().

22 years agoReindent the new code properly.
Guido van Rossum [Sat, 1 Mar 2003 03:25:41 +0000 (03:25 +0000)]
Reindent the new code properly.

22 years ago- New function sys.exc_clear() clears the current exception. This is
Guido van Rossum [Sat, 1 Mar 2003 03:20:41 +0000 (03:20 +0000)]
- New function sys.exc_clear() clears the current exception.  This is
  rarely needed, but can sometimes be useful to release objects
  referenced by the traceback held in sys.exc_info()[2].  (SF patch
  #693195.)  Thanks to Kevin Jacobs!

22 years agoSeveral of the tools can make direct calls the inner iterators.
Raymond Hettinger [Sat, 1 Mar 2003 01:48:24 +0000 (01:48 +0000)]
Several of the tools can make direct calls the inner iterators.

22 years agoRemoved duplicate test from inner loop.
Raymond Hettinger [Sat, 1 Mar 2003 01:44:32 +0000 (01:44 +0000)]
Removed duplicate test from inner loop.
The PyIter_Check is already performed by PyObject_GetIter.

22 years agoAdd news item for patch #695090
Andrew M. Kuchling [Fri, 28 Feb 2003 22:09:33 +0000 (22:09 +0000)]
Add news item for patch #695090

22 years ago[Patch #695090 from Bernhard Herzog] Allow specifying both py_modules and packages
Andrew M. Kuchling [Fri, 28 Feb 2003 22:03:04 +0000 (22:03 +0000)]
[Patch #695090 from Bernhard Herzog] Allow specifying both py_modules and packages

22 years agoHandle iconv initialization erorrs
Neal Norwitz [Fri, 28 Feb 2003 20:00:42 +0000 (20:00 +0000)]
Handle iconv initialization erorrs