Skip to content

Commit 7b860f7

Browse files
authored
Deprecate Python v2.6 (#1430)
1 parent e28804c commit 7b860f7

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: python
22

33
python:
4-
- '2.6'
4+
- '2.6' # TODO remove in v0.11.0
55
- '2.7'
66
- '3.3'
77
- '3.4'

mongoengine/python_support.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1-
"""Helper functions and types to aid with Python 2.5 - 3 support."""
1+
"""Helper functions and types to aid with Python 2.6 - 3 support."""
22

33
import sys
4+
import warnings
5+
46
import pymongo
57

68

9+
# Show a deprecation warning for people using Python v2.6
10+
# TODO remove in mongoengine v0.11.0
11+
if sys.version_info[0] == 2 and sys.version_info[1] == 6:
12+
warnings.warn(
13+
'Python v2.6 support is deprecated and is going to be dropped '
14+
'entirely in the upcoming v0.11.0 release. Update your Python '
15+
'version if you want to have access to the latest features and '
16+
'bug fixes in MongoEngine.',
17+
DeprecationWarning
18+
)
19+
720
if pymongo.version_tuple[0] < 3:
821
IS_PYMONGO_3 = False
922
else:

0 commit comments

Comments
 (0)