--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package astroid
As previously pre-approved in #772038, please unblock astroid, this fix is
needed to improve the fix at #591676 in order to allow users to load extensions
if the want to (hence bringing back an-par at functionaly level what pylint was
before, and as upstream have decided to evolve it).
unblock astroid/1.2.1-3
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.14-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru astroid-1.2.1/debian/changelog astroid-1.2.1/debian/changelog
--- astroid-1.2.1/debian/changelog 2014-11-23 13:36:47.000000000 +0000
+++ astroid-1.2.1/debian/changelog 2014-12-08 21:43:06.000000000 +0000
@@ -1,3 +1,11 @@
+astroid (1.2.1-3) unstable; urgency=medium
+
+ * debian/patches/afea46c0380956213976db2ce0f1e8f3cf6a0abc.patch
+ - enable fine-grained control over extensions loading; this fix is needed
+ after #591676 fix; Addresses: #772018
+
+ -- Sandro Tosi <morph@debian.org> Mon, 08 Dec 2014 21:43:04 +0000
+
astroid (1.2.1-2) unstable; urgency=medium
* debian/patches/e24cacb15e2e152db155fdca9197a8d1bf9ce235.patch
diff -Nru astroid-1.2.1/debian/patches/afea46c0380956213976db2ce0f1e8f3cf6a0abc.patch astroid-1.2.1/debian/patches/afea46c0380956213976db2ce0f1e8f3cf6a0abc.patch
--- astroid-1.2.1/debian/patches/afea46c0380956213976db2ce0f1e8f3cf6a0abc.patch 1970-01-01 01:00:00.000000000 +0100
+++ astroid-1.2.1/debian/patches/afea46c0380956213976db2ce0f1e8f3cf6a0abc.patch 2014-12-08 21:34:50.000000000 +0000
@@ -0,0 +1,44 @@
+# HG changeset patch
+# User Torsten Marek <shlomme@gmail.com>
+# Date 1416661998 -3600
+# Node ID afea46c0380956213976db2ce0f1e8f3cf6a0abc
+# Parent c9c283ee85618a5e3a0701dac0925804a73ec4b6
+Add support for more fine-grained control over extension loading.
+
+--- a/manager.py
++++ b/manager.py
+@@ -86,6 +86,8 @@ class AstroidManager(OptionsProviderMixI
+ self.astroid_cache = {}
+ self._mod_file_cache = {}
+ self.transforms = {}
++ self.always_load_extensions = False
++ self.extension_package_whitelist = set()
+
+ def ast_from_file(self, filepath, modname=None, fallback=True, source=False):
+ """given a module name, return the astroid object"""
+@@ -113,6 +115,16 @@ class AstroidManager(OptionsProviderMixI
+ from astroid.builder import AstroidBuilder
+ return AstroidBuilder(self).string_build('', modname)
+
++ def _can_load_extension(self, modname):
++ if self.always_load_extensions:
++ return True
++ if modutils.is_standard_module(modname):
++ return True
++ parts = modname.split('.')
++ return any(
++ '.'.join(parts[:x]) in self.extension_package_whitelist
++ for x in range(1, len(parts) + 1))
++
+ def ast_from_module_name(self, modname, context_file=None):
+ """given a module name, return the astroid object"""
+ if modname in self.astroid_cache:
+@@ -129,7 +141,7 @@ class AstroidManager(OptionsProviderMixI
+ if module is not None:
+ return module
+ elif mp_type in (imp.C_BUILTIN, imp.C_EXTENSION):
+- if mp_type == imp.C_EXTENSION and not modutils.is_standard_module(modname):
++ if mp_type == imp.C_EXTENSION and not self._can_load_extension(modname):
+ return self._build_stub_module(modname)
+ try:
+ module = modutils.load_module_from_name(modname)
diff -Nru astroid-1.2.1/debian/patches/series astroid-1.2.1/debian/patches/series
--- astroid-1.2.1/debian/patches/series 2014-11-23 13:36:27.000000000 +0000
+++ astroid-1.2.1/debian/patches/series 2014-12-08 21:34:50.000000000 +0000
@@ -1 +1,2 @@
e24cacb15e2e152db155fdca9197a8d1bf9ce235.patch
+afea46c0380956213976db2ce0f1e8f3cf6a0abc.patch
--- End Message ---