Mark Hammond [Tue, 1 Jul 2003 00:13:27 +0000 (00:13 +0000)]
Support 'mbcs' as a 'built-in' encoding, so the C API can use it without
defering to the encodings package.
As described in [ 763111 ] mbcs encoding should skip encodings package
Walter Dörwald [Mon, 30 Jun 2003 11:57:52 +0000 (11:57 +0000)]
Don't require that a RuntimeError is raised when playing a second
sound while the first one is still running, as the first one
one might already have finished.
Just van Rossum [Sun, 29 Jun 2003 21:54:12 +0000 (21:54 +0000)]
- added --semi-standalone option that builds apps that depend on an
installed Python, yet include any modules not in the std lib
- reworked extension module inclusion code: put all .so files in
a subdirectory of Contents/Resources/, but more importantly,
correctly support extensions that are submodules.
Jeremy Hylton [Sun, 29 Jun 2003 17:55:05 +0000 (17:55 +0000)]
Fix sf bug 666219: assertion error in httplib.
The obvious way for this assertion to fail is if the LineAndFileWrapper constructor is called when an empty line. Raise a BadStatusError before the call.
The test seems to expect that if time.daylight is true, then the
is_dst field of the tm structure will be 1 too. But this isn't
the case, since daylight is true if the timezone does DST, *not*
if DST is in effect.
Tim Peters [Sun, 29 Jun 2003 05:30:48 +0000 (05:30 +0000)]
Some nifty doctest extensions from Jim Fulton, currently used in Zope3.
I won't have time to write real docs, but spent a lot of time adding
comments to his code and fleshing out the exported functions' docstrings.
There's probably opportunity to consolidate how docstrings get extracted
too, and the new code for that is probably better than the old code for
that (which strained mightily to recover from 2.2's new class/type
gimmicks).
Guido van Rossum [Sat, 28 Jun 2003 21:53:52 +0000 (21:53 +0000)]
Add PyThreadState_SetAsyncExc(long, PyObject *).
A new API (only accessible from C) to interrupt a thread by sending it
an exception. This is not always effective, but might help some people.
Requested by Just van Rossum and Alex Martelli. It is intentional
that you have to write your own C extension to call it from Python.
Jim Fulton [Sat, 28 Jun 2003 11:53:29 +0000 (11:53 +0000)]
Changed the assignment of PyType_GenericNew to tp_new slot. Now do
this in module initialization before calling PyType_Ready. (Sorry
Tim.) This is necessary to compile on cygwin. AFAIK, we support
cygwin. If so, then we need to write extentions this way.
Jim Fulton [Sat, 28 Jun 2003 11:53:12 +0000 (11:53 +0000)]
Changed the assignment of PyType_GenericNew to tp_new slot. Now do
this in module initialization before calling PyType_Ready. (Sorry
Tim.) This is necessary to compile on cygwin. AFAIK, we support
cygwin. If so, then we need to write extentions this way.
Fixed bug in implementation of tp_init function. It should be an int
function, not a PyObject *.
SF patch #761519: Fixes for bugs 760703 and 757821
SF bug #760703: SocketHandler and LogRecord don't work well together
SF bug #757821: logging module docs
Applied Vinay Sajip's patch with a few minor fixups and a NEWS item.
Patched __init__.py - added new function
makeLogRecord (for bug report 760703).
Patched handlers.py - updated some docstrings and
deleted some old commented-out code.
Patched test_logging.py to make use of makeLogRecord.
Patched liblogging.tex to fill documentation gaps (both
760703 and bug 757821).
Tim Peters [Fri, 27 Jun 2003 20:48:05 +0000 (20:48 +0000)]
A hack to ease compatibility with pre-2.3 Pythons: by default, doctest
now accepts "True" when a test expects "1", and similarly for "False"
versus "0". This is un-doctest-like, but on balance makes it much
more pleasant to write doctests that pass under 2.2 and 2.3. I expect
it to go away again, when 2.2 is forgotten. In the meantime, there's
a new doctest module constant that can be passed to a new optional
argument, if you want to turn this behavior off.
Note that this substitution is very simple-minded: the expected and
actual outputs have to consist of single tokens. No attempt is made,
e.g., to accept [True, False] when a test expects [1, 0]. This is a
simple hack for simple tests, and I intend to keep it that way.