aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Sturmfels <ben@sturm.com.au>2020-04-29 14:10:01 +1000
committerBen Sturmfels <ben@sturm.com.au>2020-04-29 14:10:01 +1000
commite99f0aeac60bda47bdb550c62205961613fb05c2 (patch)
treeff63bac1a5e3e51b3911f07ac24d0ce96ea03274
parent3a1fb089e874caad8b63457bc9d3aecf5f0ad9b8 (diff)
downloadmediagoblin-e99f0aeac60bda47bdb550c62205961613fb05c2.tar.lz
mediagoblin-e99f0aeac60bda47bdb550c62205961613fb05c2.tar.xz
mediagoblin-e99f0aeac60bda47bdb550c62205961613fb05c2.zip
Add deprecation warning when running Python 2 [#5598].
-rw-r--r--mediagoblin/__init__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/mediagoblin/__init__.py b/mediagoblin/__init__.py
index 88dedd28..d4ecd745 100644
--- a/mediagoblin/__init__.py
+++ b/mediagoblin/__init__.py
@@ -14,4 +14,16 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+import warnings
+
+import six
+
from mediagoblin._version import __version__
+
+
+if six.PY2:
+ warnings.warn(
+ "MediaGoblin's Python 2 support will be removed in the next"
+ " release. Please consider switching to Python 3.",
+ DeprecationWarning,
+ )