[apparmor] [patch] utils: remove pep 0420 breakage

Seth Arnold seth.arnold at canonical.com
Mon Sep 15 22:32:21 UTC 2014


On Mon, Sep 15, 2014 at 10:32:41AM -0700, Steve Beattie wrote:
> Due to wanting to support additional external apparmor python modules,
> both real [0] and hypothetical (e.g. gui prototypes), as part of
> the python utils merge, some namespace packaging bits were added
> to apparmor/__init__.py, based on the (not very clear) advice given
> in python's pep 0420 [1]. However, a side effect of this is that it
> causes system installed versions of python modules to be used over
> paths specified via PYTHONPATH [2], which breaks our in-tree tests
> when the system versions of the python modules are out of date with
> respect to the in-tree version.
> 
> It seems based on testing, however, that carrying this code snippet
> is no longer necessary to have external modules be found. Thus,
> the following patch drops it.
> 
> [0] e.g. https://launchpad.net/click-apparmor
> [1] http://www.python.org/dev/peps/pep-0420/
> [2] a python upstream discussion about this occurred at
>     https://mail.python.org/pipermail/distutils-sig/2014-March/024049.html
> 
> Signed-off-by: Steve Beattie <steve at nxnw.org>

Oh that's fantastic! Nice work.

Acked-by: Seth Arnold <seth.arnold at canonical.com>

Thanks

> ---
>  utils/apparmor/__init__.py |    1 -
>  1 file changed, 1 deletion(-)
> 
> Index: b/utils/apparmor/__init__.py
> ===================================================================
> --- a/utils/apparmor/__init__.py
> +++ b/utils/apparmor/__init__.py
> @@ -7,4 +7,3 @@
>  #    License published by the Free Software Foundation.
>  #
>  # ------------------------------------------------------------------
> -__import__('pkg_resources').declare_namespace(__name__)
> 
> -- 
> Steve Beattie
> <sbeattie at ubuntu.com>
> http://NxNW.org/~steve/



> -- 
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140915/86ded0a8/attachment-0001.pgp>


More information about the AppArmor mailing list