Participate in garbage collection if available.
Potentially decref handlers in clear_handlers.
Partially reindent.
Put synthetic frame object on the stack to support better error output.
Expose Python codecs to pyexpat.
Add new Expat 1.2 handlers and API.
Fix memory leak: release self->handlers.
Do not expect PyModule_AddObject and PyModule_AddStringConstant in 2.0b1.
Raise exception in ParseFile.
ctime, gmtime and localtime optional, defaulting to 'the current time' in
all cases. Adjust docs, add news item. Also convert all argument-handling to
METH_VARARGS. Closes SF patch #103265.
implementation details inside the ucnhash module.
also cleaned up the unicode copyright blurb a little; Secret Labs'
internal revision history isn't that interesting...
- In count(), remove(), index(): call RichCompare(Py_EQ).
- Get rid of array_compare(), in favor of new array_richcompare() (a
near clone of list_compare()).
- Aligned items in array_methods initializer and comments for type
struct initializer.
- Folded a few long lines.
The final piece of this change...
Strip down Setup.config.in and Setup.dist to the minimal sets required
to get a working Python; setup.py will handle the rest
builds during which he forgot to uncomment crucial library lines in
Setup, walks into Guido's East End nightclub with a tactical nuclear
weapon on his shoulder. Said nuclear weapon is promptly deployed
exactly where it will do the most good, right in the middle of
configure.in.
With this patch, the set of libraries autoconfigured in is extended to
include ndbm, gdbm, and crypt. This essentially eliminates any need to
tweak Setup for a normal Linux build.
"'E was a fair man. Cruel, but fair."
of dbmmodule dynamically by default (otherwise it can pull in
dependencies with libdb that croak pybsddb3). This change moves the
Setup line for dbmmodule to Setup.config.in.
(bugs #115903, #115696)
This is based on a patch by Darrel Gallion. I'm not 100%
sure about this fix, but I haven't managed to come up with
any test case it cannot handle...
-- added some more docstrings
-- fixed typo in scanner class (#125531)
-- the multiline flag (?m) should't affect the \Z operator (#127259)
-- fixed non-greedy backtracking bug (#123769, #127259)
-- added sre.DEBUG flag (currently dumps the parsed pattern structure)
-- fixed a couple of glitches in groupdict (the #126587 memory leak
had already been fixed by AMK)
xreadlines inserted themselves inbetween the two) and clarify that the
normal socket module should be commented out. (Someone also suggested the
latter on c.l.py some time ago, I forget who, sorry.)
Wasn't built on Windows; not in config.c either.
Module init function missing DL_EXPORT magic.
test_xreadline output file obviously wrong (started w/ "test_xrl").
test program very unclear about what was expected.
bugs #126161 and 123634).
The solution doesn't use the unicode-escape encoding; that has other
problems (it seems not 100% reversible). Rather, it transforms the
input Unicode object slightly before encoding it using
raw-unicode-escape, so that the decoding will reconstruct the original
string: backslash and newline characters are translated into their
\uXXXX counterparts.
This is backwards incompatible for strings containing backslashes, but
for some of those strings, the pickling was already broken.
Note that SF bug #123634 complains specifically that cPickle fails to
unpickle the pickle for u'' (the empty Unicode string) correctly.
This was an off-by-one error in load_unicode().
XXX Ugliness: in order to do the modified raw-unicode-escape, I've
cut-and-pasted a copy of PyUnicode_EncodeRawUnicodeEscape() into this
file that also encodes '\\' and '\n'. It might be nice to migrate
this into the Unicode implementation and give this encoding a new name
('half-raw-unicode-escape'? 'pickle-unicode-escape'?); that would help
pickle.py too. But right now I can't be bothered with the necessary
infrastructural changes.
documented, and as is reasonable (since it is optional, but there's
another argument following it that may require you to specify a
value). This solves SF bug 121887.
regardless of whether the system getopt() does what we want. This avoids the
hassle with prototypes and externs, and the check to see if the system
getopt() does what we want. Prefix optind, optarg and opterr with _PyOS_ to
avoid name clashes. Add new include file to define the right symbols. Fix
Demo/pyserv/pyserv.c to include getopt.h itself, instead of relying on
Python to provide it.
build on SGI":
* Check for 'sgi' preprocessor symbol, not '__sgi__'
* Surround individual character macros with #ifdef's, instead of making them
all rely on STRICT_SYSV_CURSES
-- fixed negative lookbehind to work correctly at the beginning
of the target string (bug #117242)
-- improved syntax check; you can no longer refer to a group
inside itself (bug #110866)
Direct use of interp->result is deprecated; changing this to
Tcl_GetStringResult(interp) everywhere fixed the problem of losing the
error message with TclError exceptions, on Windows.
libm result is 0). Cautiously add a few libm exception test cases:
1. That exp(-huge) returns 0 without exception.
2. That exp(+huge) triggers OverflowError.
3. That sqrt(-1) raises ValueError specifically (apparently under glibc linked
with -lieee, it was raising OverflowError due to an accident of the way
mathmodule.c's CHECK() macro happened to deal with Infs and NaNs under gcc).
a Z_BUF_ERROR while decompressing. If it is, assume that this means
the data being decompressed is bad and raise an exception, instead of
just assuming that Z_BUF_ERROR always means that more space is required.
read the header from the .au file and do a sanity check
pass only the data to the audio device
call flush() so that program does not exit until playback is complete
call all the other methods to verify that they work minimally
call setparameters with a bunch of bugs arguments
linuxaudiodev.c:
use explicit O_WRONLY and O_RDONLY instead of 1 and 0
add a string name to each of the entries in audio_types[]
add AFMT_A_LAW to the list of known formats
add x_mode attribute to lad object, stores imode from open call
test ioctl return value as == -1, not < 0
in read() method, resize string before return
add getptr() method, that calls does ioctl on GETIPTR or GETOPTR
depending on x_mode
in setparameters() method, do better error checking and raise
ValueErrors; also use ioctl calls recommended by Open Sound
System Programmer's Guido (www.opensound.com)
use PyModule_AddXXX to define names in module
operations are defined. This will, hopefully clarify
some of the logic.
Added close test to raise proper error when operations
are performed on closed StringIOs.
Added a position argument to the truncate method.
Added a size argument to readline.
Added PyArg_Parse calls for methods that don't take arguments to
make sure they don't take arguments.
http://sourceforge.net/bugs/?func=detailbug&bug_id=113803&group_id=5470
Add Unicode support and error handling to AsString(). Both AsString()
and Merge() now return NULL and set a proper Python exception
condition when an error happens; Merge() and other callers of
AsString() check for errors from AsString(). Also fixed cleanup in
Merge() and Tkapp_Call() return cleanup code; the fv array was not
necessarily completely initialized, causing calls to ckfree() with
garbage arguments!
(Also reindented some lines that were longer than 80 chars and
reformatted some code that used an alien coding standard.)
Versions are defined for Windows and Unix; the Unix
flavor uses sysconf() to get the page size; this avoids
the use of getpagesize(), which is deprecated and
requires an additional library on some platforms
(specifically, Reliant UNIX).
This partially closes SourceForge bug #113797.
copied strings from environment variables and argv[0] into
fixed-length buffers without checking their length.
Reported by Stan Bubrouski; advice on fix from John Viega.
Add definitions of INT_MAX and LONG_MAX to pyport.h.
Remove includes of limits.h and conditional definitions of INT_MAX
and LONG_MAX elsewhere.
This closes SourceForge patch #101659 and bug #115323.
undefined. ccording to MvL, this is safe: the MS_SYNC flag means that
msync() returns when all I/O operations are scheduled; without it, it
waits until they are complete, which is acceptable behavior.
- fixed attributions
- moved decomposition data to a separate table, in preparation
for step 3 (which won't happen before 2.0 final, promise!)
- use relative paths in the generator script
I have a lot more stuff in the works for 2.1, but let's leave
that for another day...
"xml.parsers.expat.error", so it will reflect the public name of the
exception rather than the internal name.
Also change some of the initialization to use the new PyModule_Add*()
convenience functions.
collector will be saved in gc.garbage. This is useful for debugging a
program that creates reference cycles.
- Fix else statements in gcmodule.c to conform to Python coding standards.
subset of Win32 ShellExecute's functionality. Guido wants this because
IDLE's Help -> Docs function currently crashes his machine because of a
conflict between his version of Norton AntiVirus (6.10.20) and MS's
_popen. Docs for startfile are being mailed to Fred (or just read the
docstring -- it tells the whole story).
Changed webbrowser.py to use os.startfile instead of os.popen on Windows.
Changed IDLE's EditorWindow.py to pass an absolute path for the docs
(hardcoding ShellExecute's "directory" arg to "." as used to be done let
IDLE work, but made the startfile command exceedingly obscure for other
uses -- the MS docs are terrible, of course, & still not sure I
understand it).
Note that Windows Python must link with shell32.lib now! That's where
ShellExecute lives.
data and default handlers -- a new reference was being passed to
Py_BuildValue() for the "O" format character; using "N" plugs the leak.
Fixed two other (minor) leaks that occurred on various error conditions.
Removed uses of the UNLESS macro, which makes code hard to read, and is
Evil.
I can't test this, so I'm just checking it in with blind faith in Andy.
I've tested that it doesn't broeak a non-Pth build on Linux.
Changes include:
- There's a --with-pth configure option.
- Instead of _GNU_PTH, we test for HAVE_PTH.
- Better signal handling.
- (The config.h.in file is regenerated in a slightly different order.)
Add contains() as alias for __contains__().
Make PyArg_ParseTuple() formats include the function name.
Based on patch by Denis S. Otkidach <ods@users.sourceforge.net>,
this closes SourceForge patch #101390.
reverse() didn't work at all due to bad arg check.
Fixed that.
Added Brad Chapman to ACKS file, as the proud new owner of two
implicitly copyrighted lines of Python source code <wink>.
Repaired buffer_info's total lack of arg-checking.
Replaced memmove by memcpy in reverse() guts, as memmove is
often slower and the memory areas are guaranteed disjoint.
Replaced poke-and-hope unchecked decl of tmp buffer size by
assert-checked larger tmp buffer.
Got rid of inconsistent spaces before open paren in docstrings.
Added reverse() sanity tests to test_array.py.
This fixes the first half of bug #110611: the immediate exit when ^C
is hit when readline and threads are configured.
Also added a new module variable, readline.library_version.
PyOS_setsig(), instead of directly calling signal() or sigaction().
This fixes the second half of bug #110611: the mysterious ignoring of
the first ^C when readline isn't used.
based on the available headers.
Update comments on the filename extensions used to reflect library
differences.
Added get() and setdefault() methods to the dbm object.
Added docstrings, convert all methods to PyArg_ParseTuple() so that
error messages will have the method names.