projects
/
mediagoblin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a1fb08
)
Add deprecation warning when running Python 2 [#5598].
author
Ben Sturmfels
<ben@sturm.com.au>
Wed, 29 Apr 2020 04:10:01 +0000
(14:10 +1000)
committer
Ben Sturmfels
<ben@sturm.com.au>
Wed, 29 Apr 2020 04:10:01 +0000
(14:10 +1000)
mediagoblin/__init__.py
patch
|
blob
|
blame
|
history
diff --git
a/mediagoblin/__init__.py
b/mediagoblin/__init__.py
index 88dedd288ef2826bb6bb63ae93687f67f6dbe239..d4ecd7457336a8b931097aa17ec62cd74c8b4121 100644
(file)
--- 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,
+ )