Add API function simplefilter() that does not create or install
regular expressions to match message or module. Extend the filters
data structure to store None as an alternative to re.compile("").
Move the _test() function to test_warnings and add some code to try
and avoid disturbing the global state of the warnings module.
At this point, the problem appears particular to the OS/2 EMX port of
gdbm (which is at v1.7.3) - this combination produces a .pag file but
no .dir file.
A more sophisticated patch which checks magic numbers when dbm.library
indicates that dbm is linked to gdbm, and there is no .dir file, is
still attached to the above patch entry for reconsideration after 2.3
is released.
This checkin applies a workaround specific to the known failure case.
until now: the inheritance of default values was the wrong way around.
This caused app bundles to get a type of "BNDL" instead of "APPL".
Apparently this is not a problem until you try to drag your app to
the dock.
----------------------------------------------------------------------
record tuple by name as well as index, to match the behaviour of
the pwd/grp extension modules for Unix. These emulation modules
now pass test_pwd & test_grp.
* Extended DB & DBEnv set_get_returns_none functionality to take a
"level" instead of a boolean flag. The boolean 0 and 1 values still
have the same effect. A value of 2 extends the "return None instead
of raising an exception" behaviour to the DBCursor set methods.
This will become the default behaviour in pybsddb 4.2.
* Fixed a typo in DBCursor.join_item method that made it crash instead
of returning a value. Obviously nobody uses it. Wrote a test case
for join and join_item.
- added bundle_id/--bundle-id option, to specify the CFBundleIndentifier
#765615:
- in the appropriate situation, prepend $PATH with our path instead of
setting it.
time.tzname[1] and not time.daylight`` is true when it should only when
time.daylight is true. Tests are also fixed.
Closes bug #763047 and its cohort #763052.
because it was still looking in the ossaudiodev module namespace for
this symbol.
As the symbol has already been rebound as a global, use that instead.
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.
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.
Analysis by Bob Halley:
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.
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).
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).
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.
The interning of short strings violates the refcnt==1 assumption for
_PyString_Resize().
A simple fix is to boost the initial value of "totalnew" by 1.
Combined with an NULL argument to PyString_FromStringAndSize(),
this assures that resulting format string is not interned.
This will remain true even if the implementation of
PyString_FromStringAndSize() changes because only the uninitialized
strings that can be interned are those of zero length.
Added a test case.
The constructor() call only made sense when it registered the
constructor as safe for unpickling. We should probably remove the
module-global function, but need to worry about backwards
compatibility.
In response to "shouldn't the client close the file?", the answer is
"no". The original design behind HTTPConnection is that the client did
not have to worry about it. The response would close itself when you
read the last of the data from it. This closing also dealt with
allowing the connection to perform another request/response (if it was
a persistent connection).
However... the auto-close behavior broke compatibility with the
classic httplib.HTTP class' behavior when a zero-length response body
was present. In that situation, the HTTPResponse object was
auto-closing it since there was no data present, and for an HTTP/1.0
connection-close socket (or an HTTP/0.9 request) connection, that also
ended up closing the socket. When an httplib.HTTP user went to read
the socket... boom. A patch to correct the auto-close (for compat with
old httplib users) was added in rev 1.22.
But for non-zero-length *chunked* bodies, we should keep the
auto-close behavior. The library user is not reading the socket (they
can't cuz of the chunked response we just got done handling), so they
should be immune to the response closing the socket. In fact, I would
like to see (one day) the auto-close restored, and the HTTP subclass
would simply have a flag to disable that behavior (for back-compat
purposes).