Antoine Pitrou [Tue, 19 Jun 2012 14:33:39 +0000 (16:33 +0200)]
Issue #15103: remove the NUL character (serving as a Mercurial binary marker) from Python/importlib.h.
Instead the email notification hook uses a configuration option to omit importlib.h diffs.
Issue #15038:
Fix incorrect test of the condition variable state, spotted by
Richard Oudkerk. This could cause the internal condition variable
to grow without bounds.
Issue #15038: Optimize python Locks on Windows
Extract cross-platform condition variable support into a separate file and
provide user-mode non-recursive locks for Windows.
Antoine Pitrou [Sun, 17 Jun 2012 21:18:07 +0000 (23:18 +0200)]
Prevent test_inspect from keeping alive a ton of frames and local variables by way of a global variable keeping a reference to a traceback.
Should fix some buildbot failures.
Nick Coghlan [Sun, 17 Jun 2012 06:33:00 +0000 (16:33 +1000)]
Improve an internal ipaddress test, add a comment explaining why treating networks as containers of interfaces rather than addresses would prove confusing
Stefan Krah [Sat, 16 Jun 2012 17:45:35 +0000 (19:45 +0200)]
1) State the relative errors of the power functions for integer exponents.
2) _mpd_qpow_mpd(): Abort the loop for all specials, not only infinity.
3) _mpd_qpow_mpd(): Make the function more general and distinguish between
zero clamping and folding down the exponent. The latter case is currently
handled by setting context->clamp to 0 before calling the function.
4) _mpd_qpow_int(): Add one to the work precision in case of a negative
exponent. This is to get the same relative error (0.1 * 10**-prec)
for both positive and negative exponents. The previous relative
error for negative exponents was (0.2 * 10**-prec).
Both errors are _before_ the final rounding to the context precision.
Brett Cannon [Sat, 16 Jun 2012 00:00:53 +0000 (20:00 -0400)]
Issue #14938: importlib.abc.SourceLoader.is_package() now takes the
module name into consideration when determining whether a module is a
package or not. This prevents importing a module's __init__ module
directly and having it considered a package, which can lead to
duplicate sub-modules.
Brett Cannon [Fri, 15 Jun 2012 23:39:06 +0000 (19:39 -0400)]
Issue #13959: Add to imp.find_module() and load_module's docstrings
that they are deprecated (previous commit documented this fact in the
module docs).
Brett Cannon [Fri, 15 Jun 2012 23:21:07 +0000 (19:21 -0400)]
Closes issue #14982: Document that pkgutil's walk_packages() and
iter_modules() requires iter_modules() be defined on an importer. The
importers in importlib do not define this non-standard method.
Eli Bendersky [Fri, 15 Jun 2012 06:03:19 +0000 (09:03 +0300)]
Removed _SimpleElementPath and its flaky test. The test monkey-patches the module, which causes other failures and fails itself depending on the order tests are run.
Eli Bendersky [Fri, 15 Jun 2012 04:42:50 +0000 (07:42 +0300)]
Replace the iter/itertext methods of Element in _elementtree with true C implementations, instead of the bootstrapped Python code. In addition to being cleaner (removing the last remains of the bootstrapping code in _elementtree), this gives a 10x performance boost for iter() on large documents.
Also reorganized the tests a bit to be more robust.
Issue #1667546: On platforms supporting tm_zone and tm_gmtoff fields
in struct tm, time.struct_time objects returned by time.gmtime(),
time.localtime() and time.strptime() functions now have tm_zone and
tm_gmtoff attributes. Original patch by Paul Boddie.
Victor Stinner [Tue, 12 Jun 2012 20:46:37 +0000 (22:46 +0200)]
PEP 418: Rename adjusted attribute to adjustable in time.get_clock_info() result
Fix also its value on Windows and Linux according to its documentation:
"adjustable" indicates if the clock *can be* adjusted, not if it is or was
adjusted.
In most cases, it is not possible to indicate if a clock is or was adjusted.