On Win2K it thought 'foo' started at byte offset 0 instead of at the
pagesize, and on Win98 it thought 'foo' didn't exist at all. Somehow
or other this is related to the new "in memory file" gimmicks in
bsddb, but the old bsddb we use on Windows sucks so bad anyway I don't
want to bother digging deeper. Flushing the file in test_mmap after
writing to it makes the problem go away, so good enough.
build's "undetected error" problems were originally detected with
extension types, but we can whitebox test the same situations with
new-style classes.
states can be for this function, and ensure that only AttributeErrors
are masked. Any other exception raised via the equivalent of
getattr(cls, '__bases__') should be propagated up.
abstract_issubclass(): If abstract_get_bases() returns NULL, we must
call PyErr_Occurred() to see if an exception is being propagated, and
return -1 or 0 as appropriate. This is the specific fix for a problem
whereby if getattr(derived, '__bases__') raised an exception, an
"undetected error" would occur (under a debug build). This nasty
situation was uncovered when writing a security proxy extension type
for the Zope3 project, where the security proxy raised a Forbidden
exception on getattr of __bases__.
PyObject_IsInstance(), PyObject_IsSubclass(): After both calls to
abstract_get_bases(), where we're setting the TypeError if the return
value is NULL, we must first check to see if an exception occurred,
and /not/ mask an existing exception.
Neil Schemenauer should double check that these changes don't break
his ExtensionClass examples (there aren't any test cases for those
examples and abstract_get_bases() was added by him in response to
problems with ExtensionClass). Neil, please add test cases if
possible!
I belive this is a bug fix candidate for Python 2.2.2.
The SIGXFSZ signal is sent when the maximum file size limit is
exceeded (RLIMIT_FSIZE). Apparently, it is also sent when the 2GB
file limit is reached on platforms without large file support.
The default action for SIGXFSZ is to terminate the process and dump
core. When it is ignored, the system call that caused the limit to be
exceeded returns an error and sets errno to EFBIG. Python
always checks errno on I/O syscalls, so there is nothing to do with
the signal.
Also add a test that Python doesn't die with SIGXFSZ if it exceeds the
file rlimit. (Assuming this will also test the behavior when the 2GB
limit is exceed on a platform that doesn't have large file support.)
closes SF #514433
can now pass 'None' as the filename for the bsddb.*open functions,
and you'll get an in-memory temporary store.
docs are ripped out of the bsddb dbopen man page. Fred may want to
clean them up.
Considering this for 2.2, but not 2.1.
(py-mode-map): Bind py-help-at-point to f1 as well as C-c C-h
(py-help-at-point): Make sure the symbol is quoted so things like
pydoc.help('sys.platform') work correctly. Also, leave the *Python
Output* buffer in help-mode; this may be a bit more controversial.
to call pychecker on the current file, add a face for pseudo
keywords self, None, True, False, and Ellipsis. Specifically,
(py-pychecker-command, py-pychecker-command-args): New variables.
(py-pseudo-keyword-face): New face variable, defaulting to a copy of
font-lock-keyword-face.
(python-font-lock-keywords): Add an entry for self, None, True, False,
Ellipsis to be rendered in py-pseudo-keyword-face.
(py-pychecker-history): New variable.
(py-mode-map): Bind C-c C-w to py-pychecker-run.
(py-pychecker-run): New command.
Assorted crashes on Windows and Linux when trying to display a very
long calltip, most likely a Tk bug. Wormed around by clamping the
calltip display to a maximum of 79 characters (why 79? why not ...).
Bugfix candidate, for all Python releases.
http://www.python.org/sf/444708
This adds the optional argument for str.strip
to unicode.strip too and makes it possible
to call str.strip with a unicode argument
and unicode.strip with a str argument.
"help-on-symbol-at-point" feature which uses pydoc to provide help on
the symbol under point, if available.
Mods include some name changes, a port to Emacs, binding the command
to C-c C-h, and providing a more informative error message if the
symbol's help can't be found (through use of a nasty bare except).
Note also that py-describe-mode has been moved off of C-c C-h m; it's
now just available on C-c ?
Closes SF patch #545439.
#! line, use the command on that line as the shell command to use to
execute the region. I.e. if the region looks like
----------------
#! /usr/bin/env python1.5
print 'hello world'.startswith('hello')
----------------
you'll get an exception! :)
This closes SF bug #232398.
python-mode file, py-which-shell would have been nil and the command
to use would not get set correctly. This changes things so that 1)
the temporary file has a .py extension, 2) the temporary file is put
into python-mode, and 3) the temporary file's py-which-shell is
captured in a local `shell' variable, which is used to calculate the
command to use. Closes SF bug #545436.
(py-parse-state): Rip out the XEmacs-specific calls to
buffer-syntactic-context, which can get quite confused if there's an
open paren in column zero say, embedded in a triple quoted string.
This was always a performance hack anyway, and computers are fast
enough now that we should be able to get away with the slower, more
portable, full-parse branch. Closes SF bug #451841.
Update the comments at the top of the file.
- islink() now returns true for alias files
- walk() no longer follows aliases while traversing
- realpath() implemented, returning an alias-free pathname.
As this could conceivably break existing code I think it isn't a bugfix candidate.
+ Redirect PyMem_{Del, DEL} to the object allocator's free() when
pymalloc is enabled. Needed so old extensions can continue to
mix PyObject_New with PyMem_DEL.
+ This implies that pgen needs to be able to see the PyObject_XYZ
declarations too. pgenheaders.h now includes Python.h. An
implication is that I expect obmalloc.o needs to get linked into
pgen on non-Windows boxes.
+ When PYMALLOC_DEBUG is defined, *all* Py memory API functions
now funnel through the debug allocator wrapper around pymalloc.
This is the default in a debug build.
+ That caused compile.c to fail: it indirectly mixed PyMem_Malloc
with raw platform free() in one place. This is verbotten.