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.
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.
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",
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.
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.)
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.
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!).
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).
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.
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.)
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.
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__.
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).
- 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!
Barry Warsaw [Fri, 28 Feb 2003 15:27:40 +0000 (15:27 +0000)]
compile_atom(): Neal's last checkin removing the setting of i broke
the build, so I'm restoring it. I'm not sure what Neal's intent was,
since the line following the one he removed was "REQN(i, 1)" so i is
obviously used. ;)
Jack Jansen [Fri, 28 Feb 2003 12:51:18 +0000 (12:51 +0000)]
Moved the Apple workaround for the guard define for wchar_t out of
the #ifdef HAVE_NCURSES_H: the same problem exists on OSX 10.1 with
a fink-installed curses (which uses curses.h as the include file name).
Kurt B. Kaiser [Thu, 27 Feb 2003 23:04:17 +0000 (23:04 +0000)]
M rpc.py
M run.py
Move exception formatting out of rpc.py. This allows each end of the
link to format and print exceptions how and where it sees fit and makes it
easier for threads to display their own exceptions.
Jack Jansen [Thu, 27 Feb 2003 22:36:20 +0000 (22:36 +0000)]
Changing the window type to movable modal isn't enough to make the dialogs movable: apprently you also need to set a bit in the dlgx resource. Did this.
In the process of adding all the extended slice support I attempted to
change _PyEval_SliceIndex to round massively negative longs up to
-INT_MAX, instead of 0 but botched it. Get it right.
Module review:
* Changed variable name from 'list' to 'flist'.
* Replaced "while 1" with "while True".
* Replaced if/elif/elif/elif structure with a shorter and
faster dispatch dictionary that maps attrs to methods.
* Simplified and sped comparison logic by using
ifilter, ifilterfalse, and dict.fromkeys.
* Used True and False rather than 1 and 0.
Module review:
* Replaced "while 1" with "while True"
* Rewrote read() and readline() for clarity and speed.
* Replaced variable 'list' with 'hlist'
* Used augmented assignment in two places.
Fred Drake [Wed, 26 Feb 2003 19:51:23 +0000 (19:51 +0000)]
The macfs, macostools, and plistlib should not be expected to run
beyond Mac OS and Darwin. I'm not even sure they should be run on
Darwin, but I'll let someone more knowledgable on that tell us.
[Bug #668662] Patch from Pearu Pearson: if a C source file is
specified with an absolute path, the object file is also
written to an absolute path. The patch drops the drive and
leading '/' from the source path, so a path like /path/to/foo.c
results in an object file like build/temp.i686linux/path/to/foo.o.
Walter Dörwald [Wed, 26 Feb 2003 14:49:41 +0000 (14:49 +0000)]
Port test_ucn and test_unicodedata to PyUnit. Add a few tests for error
cases increasing coverage in unicodedata.c from 87% to 95%
(when the normalization tests are run). From SF patch #662807.
Jack Jansen [Tue, 25 Feb 2003 23:02:03 +0000 (23:02 +0000)]
If a resource file cannot be decoded because the directory is readonly
create a temporary file. This fixes #688011.
Got rid of the install() method in macresource, and replaced it with
a resource_filename() method which will optionally decode a given resourcefile
(which may be applesingle-encoded) and return the real resourcefile.
Use this new method in buildtools to copy the correct resource file to
the bundle. This fixes #688007.