Rev 5643: Fix ModuleAvailableFeature for modules with side-effects. in file:///home/vila/src/bzr/bugs/712474-module-available/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Thu Feb 3 14:07:26 UTC 2011
At file:///home/vila/src/bzr/bugs/712474-module-available/
------------------------------------------------------------
revno: 5643
revision-id: v.ladeuil+lp at free.fr-20110203140726-2a0u26l9gvto0lcg
parent: pqm at pqm.ubuntu.com-20110203075947-l52516mt7wsqryi7
fixes bug(s): https://launchpad.net/bugs/712474
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 712474-module-available
timestamp: Thu 2011-02-03 15:07:26 +0100
message:
Fix ModuleAvailableFeature for modules with side-effects.
-------------- next part --------------
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py 2011-01-27 15:58:36 +0000
+++ b/bzrlib/tests/__init__.py 2011-02-03 14:07:26 +0000
@@ -4340,7 +4340,8 @@
def _probe(self):
try:
- self._module = __import__(self.module_name, {}, {}, [''])
+ exec 'import %s' % (self.module_name)
+ self._module = sys.modules[self.module_name]
return True
except ImportError:
return False
=== modified file 'doc/en/release-notes/bzr-2.4.txt'
--- a/doc/en/release-notes/bzr-2.4.txt 2011-01-27 17:45:24 +0000
+++ b/doc/en/release-notes/bzr-2.4.txt 2011-02-03 14:07:26 +0000
@@ -36,7 +36,8 @@
the dirstate file to be rebuilt, rather than using a ``bzr checkout``
workaround. (John Arbash Meinel)
-* ``bzr cat-revision`` no longer requires a working tree. (Jelmer Vernooij, #704405)
+* ``bzr cat-revision`` no longer requires a working tree.
+ (Jelmer Vernooij, #704405)
Bug Fixes
*********
@@ -103,5 +104,9 @@
suite. This can include new facilities for writing tests, fixes to
spurious test failures and changes to the way things should be tested.
+* ``ModuleAvailableFeature`` can now be used for modules with side-effects
+ that can't be imported twice with ``__import__``.
+ (Vincent Ladeuil, #712474)
+
..
vim: tw=74 ft=rst ff=unix
More information about the bazaar-commits
mailing list