[Python-apps-commits] r11613 - in packages/pylint/trunk/debian (4 files)
morph at users.alioth.debian.org
morph at users.alioth.debian.org
Wed Dec 10 19:30:54 UTC 2014
Date: Wednesday, December 10, 2014 @ 19:30:52
Author: morph
Revision: 11613
* debian/patches/5733254372edb1df9f72f72c6733608405a99a40.patch
- backport of --unsafe-load-any-extension and --extension-pkg-whitelist to
be able to run pylint even on third-party extensions (and not only on
Standard Library ones); Closes: #772018
Added:
packages/pylint/trunk/debian/patches/
packages/pylint/trunk/debian/patches/5733254372edb1df9f72f72c6733608405a99a40.patch
packages/pylint/trunk/debian/patches/series
Modified:
packages/pylint/trunk/debian/changelog
Modified: packages/pylint/trunk/debian/changelog
===================================================================
--- packages/pylint/trunk/debian/changelog 2014-12-08 22:11:31 UTC (rev 11612)
+++ packages/pylint/trunk/debian/changelog 2014-12-10 19:30:52 UTC (rev 11613)
@@ -1,3 +1,12 @@
+pylint (1.3.1-2) UNRELEASED; urgency=medium
+
+ * debian/patches/5733254372edb1df9f72f72c6733608405a99a40.patch
+ - backport of --unsafe-load-any-extension and --extension-pkg-whitelist to
+ be able to run pylint even on third-party extensions (and not only on
+ Standard Library ones); Closes: #772018
+
+ -- Sandro Tosi <morph at debian.org> Wed, 10 Dec 2014 19:28:31 +0000
+
pylint (1.3.1-1) unstable; urgency=medium
* New upstream release
Added: packages/pylint/trunk/debian/patches/5733254372edb1df9f72f72c6733608405a99a40.patch
===================================================================
--- packages/pylint/trunk/debian/patches/5733254372edb1df9f72f72c6733608405a99a40.patch (rev 0)
+++ packages/pylint/trunk/debian/patches/5733254372edb1df9f72f72c6733608405a99a40.patch 2014-12-10 19:30:52 UTC (rev 11613)
@@ -0,0 +1,55 @@
+# HG changeset patch
+# User Torsten Marek <shlomme at gmail.com>
+# Date 1416661887 -3600
+# Node ID 5733254372edb1df9f72f72c6733608405a99a40
+# Parent f8fa8f2bd2bbe88a2c4f6d87d3cab200ca0160c6
+Add options to control extension loading in astroid.
+
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,6 +1,13 @@
+ ChangeLog for Pylint
+ ====================
+
++ * Added new options for controlling the loading of C extensions.
++ By default, only C extensions from the stdlib will be loaded
++ into the active Python interpreter for inspection, because they
++ can run arbitrary code on import. The option
++ `--extension-pkg-whitelist` can be used to specify modules
++ or packages that are safe to load.
++
+ 2014-08-24 -- 1.3.1
+
+ * Fix a false positive with string formatting checker, when
+--- a/lint.py
++++ b/lint.py
+@@ -275,6 +275,20 @@ class PyLinter(OptionsManagerMixIn, Mess
+
+ ('include-ids', _deprecated_option('i', 'yn')),
+ ('symbols', _deprecated_option('s', 'yn')),
++
++ ('unsafe-load-any-extension',
++ {'type': 'yn', 'metavar': '<yn>', 'default': False, 'hide': True,
++ 'help': ('Allow loading of arbitrary C extensions. Extensions'
++ ' are imported into the active Python interpreter and'
++ ' may run arbitrary code.')}),
++
++ ('extension-pkg-whitelist',
++ {'type': 'csv', 'metavar': '<pkg[,pkg]>', 'default': [],
++ 'help': ('A comma-separated list of package or module names'
++ ' from where C extensions may be loaded. Extensions are'
++ ' loading into the active Python interpreter and may run'
++ ' arbitrary code')}
++ ),
+ )
+
+ option_groups = (
+@@ -669,6 +683,8 @@ class PyLinter(OptionsManagerMixIn, Mess
+ self.stats = {'by_module' : {},
+ 'by_msg' : {},
+ }
++ MANAGER.always_load_extensions = self.config.unsafe_load_any_extension
++ MANAGER.extension_package_whitelist.update(self.config.extension_pkg_whitelist)
+ for msg_cat in MSG_TYPES.itervalues():
+ self.stats[msg_cat] = 0
+
Added: packages/pylint/trunk/debian/patches/series
===================================================================
--- packages/pylint/trunk/debian/patches/series (rev 0)
+++ packages/pylint/trunk/debian/patches/series 2014-12-10 19:30:52 UTC (rev 11613)
@@ -0,0 +1 @@
+5733254372edb1df9f72f72c6733608405a99a40.patch
More information about the Python-apps-commits
mailing list