[lxc-devel] [PATCH 2/3] python3: Drop API warning and fix pep8/pyflakes3

Stéphane Graber stgraber at ubuntu.com
Thu Feb 13 18:46:09 UTC 2014


Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 src/lxc/lxc-device                       | 5 -----
 src/lxc/lxc-ls                           | 4 ----
 src/lxc/lxc-start-ephemeral.in           | 4 ----
 src/python-lxc/examples/api_test.py      | 3 ---
 src/python-lxc/examples/pyconsole-vte.py | 3 ---
 src/python-lxc/examples/pyconsole.py     | 3 ---
 src/python-lxc/lxc/__init__.py           | 5 -----
 7 files changed, 27 deletions(-)

diff --git a/src/lxc/lxc-device b/src/lxc/lxc-device
index 78be6ab..e7ad4fb 100644
--- a/src/lxc/lxc-device
+++ b/src/lxc/lxc-device
@@ -25,15 +25,10 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 #
 
-# NOTE: To remove once the API is stabilized
-import warnings
-warnings.filterwarnings("ignore", "The python-lxc API isn't yet stable")
-
 import argparse
 import gettext
 import lxc
 import os
-import sys
 
 _ = gettext.gettext
 gettext.textdomain("lxc-device")
diff --git a/src/lxc/lxc-ls b/src/lxc/lxc-ls
index c65ae81..065b3e8 100755
--- a/src/lxc/lxc-ls
+++ b/src/lxc/lxc-ls
@@ -25,10 +25,6 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 #
 
-# NOTE: To remove once the API is stabilized
-import warnings
-warnings.filterwarnings("ignore", "The python-lxc API isn't yet stable")
-
 import argparse
 import gettext
 import json
diff --git a/src/lxc/lxc-start-ephemeral.in b/src/lxc/lxc-start-ephemeral.in
index 552fd9b..e34b3a9 100644
--- a/src/lxc/lxc-start-ephemeral.in
+++ b/src/lxc/lxc-start-ephemeral.in
@@ -25,10 +25,6 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 #
 
-# NOTE: To remove once the API is stabilized
-import warnings
-warnings.filterwarnings("ignore", "The python-lxc API isn't yet stable")
-
 import argparse
 import gettext
 import lxc
diff --git a/src/python-lxc/examples/api_test.py b/src/python-lxc/examples/api_test.py
index a1fe6f9..1ac1e13 100755
--- a/src/python-lxc/examples/api_test.py
+++ b/src/python-lxc/examples/api_test.py
@@ -23,9 +23,6 @@
 # USA
 #
 
-import warnings
-warnings.filterwarnings("ignore", "The python-lxc API isn't yet stable")
-
 import lxc
 import uuid
 import sys
diff --git a/src/python-lxc/examples/pyconsole-vte.py b/src/python-lxc/examples/pyconsole-vte.py
index 2d989e0..89c3df7 100755
--- a/src/python-lxc/examples/pyconsole-vte.py
+++ b/src/python-lxc/examples/pyconsole-vte.py
@@ -24,9 +24,6 @@
 # USA
 #
 
-import warnings
-warnings.filterwarnings("ignore", "The python-lxc API isn't yet stable")
-
 import gtk
 import vte
 import lxc
diff --git a/src/python-lxc/examples/pyconsole.py b/src/python-lxc/examples/pyconsole.py
index cd17afe..d47b00b 100755
--- a/src/python-lxc/examples/pyconsole.py
+++ b/src/python-lxc/examples/pyconsole.py
@@ -24,9 +24,6 @@
 # USA
 #
 
-import warnings
-warnings.filterwarnings("ignore", "The python-lxc API isn't yet stable")
-
 import lxc
 import sys
 import time
diff --git a/src/python-lxc/lxc/__init__.py b/src/python-lxc/lxc/__init__.py
index 01f9a69..9eb27b6 100644
--- a/src/python-lxc/lxc/__init__.py
+++ b/src/python-lxc/lxc/__init__.py
@@ -25,12 +25,7 @@
 import _lxc
 import os
 import subprocess
-import stat
 import time
-import warnings
-
-warnings.warn("The python-lxc API isn't yet stable "
-              "and may change at any point in the future.", Warning, 2)
 
 default_config_path = _lxc.get_global_config_item("lxc.lxcpath")
 version = _lxc.get_version()
-- 
1.9.rc1



More information about the lxc-devel mailing list