Removed support for old versions
- Removing support for Django 1.4.x, pymongo 2.5.x, pymongo 2.6.x. - Removing support for Python < 2.6.6
This commit is contained in:
parent
2c07d77368
commit
d1d5972277
34
.travis.yml
34
.travis.yml
@ -11,44 +11,12 @@ python:
|
||||
env:
|
||||
- PYMONGO=dev DJANGO=1.6.5
|
||||
- PYMONGO=dev DJANGO=1.5.8
|
||||
- PYMONGO=dev DJANGO=1.4.13
|
||||
- PYMONGO=2.5.2 DJANGO=1.6.5
|
||||
- PYMONGO=2.5.2 DJANGO=1.5.8
|
||||
- PYMONGO=2.5.2 DJANGO=1.4.13
|
||||
- PYMONGO=2.6.3 DJANGO=1.6.5
|
||||
- PYMONGO=2.6.3 DJANGO=1.5.8
|
||||
- PYMONGO=2.6.3 DJANGO=1.4.13
|
||||
- PYMONGO=2.7.1 DJANGO=1.6.5
|
||||
- PYMONGO=2.7.1 DJANGO=1.5.8
|
||||
- PYMONGO=2.7.1 DJANGO=1.4.13
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
exclude:
|
||||
- python: "3.2"
|
||||
env: PYMONGO=dev DJANGO=1.4.13
|
||||
- python: "3.2"
|
||||
env: PYMONGO=2.5.2 DJANGO=1.4.13
|
||||
- python: "3.2"
|
||||
env: PYMONGO=2.6.3 DJANGO=1.4.13
|
||||
- python: "3.2"
|
||||
env: PYMONGO=2.7.1 DJANGO=1.4.13
|
||||
- python: "3.3"
|
||||
env: PYMONGO=dev DJANGO=1.4.13
|
||||
- python: "3.3"
|
||||
env: PYMONGO=2.5.2 DJANGO=1.4.13
|
||||
- python: "3.3"
|
||||
env: PYMONGO=2.6.3 DJANGO=1.4.13
|
||||
- python: "3.3"
|
||||
env: PYMONGO=2.7.1 DJANGO=1.4.13
|
||||
- python: "3.4"
|
||||
env: PYMONGO=dev DJANGO=1.4.13
|
||||
- python: "3.4"
|
||||
env: PYMONGO=2.5.2 DJANGO=1.4.13
|
||||
- python: "3.4"
|
||||
env: PYMONGO=2.6.3 DJANGO=1.4.13
|
||||
- python: "3.4"
|
||||
env: PYMONGO=2.7.1 DJANGO=1.4.13
|
||||
|
||||
install:
|
||||
- sudo apt-get install python-dev python3-dev libopenjpeg-dev zlib1g-dev libjpeg-turbo8-dev libtiff4-dev libjpeg8-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk
|
||||
- if [[ $PYMONGO == 'dev' ]]; then pip install https://github.com/mongodb/mongo-python-driver/tarball/master; true; fi
|
||||
|
@ -7,6 +7,8 @@ Changes in 0.9.X - DEV
|
||||
======================
|
||||
- pypy support #673
|
||||
- Enabled connection pooling #674
|
||||
- Removing support for Django 1.4.x, pymongo 2.5.x, pymongo 2.6.x.
|
||||
- Removing support for Python < 2.6.6
|
||||
|
||||
Changes in 0.8.7
|
||||
================
|
||||
|
@ -13,8 +13,7 @@ from mongoengine import signals
|
||||
from mongoengine.common import _import_class
|
||||
from mongoengine.errors import (ValidationError, InvalidDocumentError,
|
||||
LookUpError)
|
||||
from mongoengine.python_support import (PY3, UNICODE_KWARGS, txt_type,
|
||||
to_str_keys_recursive)
|
||||
from mongoengine.python_support import PY3, txt_type
|
||||
|
||||
from mongoengine.base.common import get_document, ALLOW_INHERITANCE
|
||||
from mongoengine.base.datastructures import BaseDict, BaseList
|
||||
@ -545,10 +544,6 @@ class BaseDocument(object):
|
||||
# class if unavailable
|
||||
class_name = son.get('_cls', cls._class_name)
|
||||
data = dict(("%s" % key, value) for key, value in son.iteritems())
|
||||
if not UNICODE_KWARGS:
|
||||
# python 2.6.4 and lower cannot handle unicode keys
|
||||
# passed to class constructor example: cls(**data)
|
||||
to_str_keys_recursive(data)
|
||||
|
||||
# Return correct subclass for document type
|
||||
if class_name != cls._class_name:
|
||||
|
@ -3,8 +3,6 @@
|
||||
import sys
|
||||
|
||||
PY3 = sys.version_info[0] == 3
|
||||
PY25 = sys.version_info[:2] == (2, 5)
|
||||
UNICODE_KWARGS = int(''.join([str(x) for x in sys.version_info[:3]])) > 264
|
||||
|
||||
if PY3:
|
||||
import codecs
|
||||
@ -29,33 +27,3 @@ else:
|
||||
txt_type = unicode
|
||||
|
||||
str_types = (bin_type, txt_type)
|
||||
|
||||
if PY25:
|
||||
def product(*args, **kwds):
|
||||
pools = map(tuple, args) * kwds.get('repeat', 1)
|
||||
result = [[]]
|
||||
for pool in pools:
|
||||
result = [x + [y] for x in result for y in pool]
|
||||
for prod in result:
|
||||
yield tuple(prod)
|
||||
reduce = reduce
|
||||
else:
|
||||
from itertools import product
|
||||
from functools import reduce
|
||||
|
||||
|
||||
# For use with Python 2.5
|
||||
# converts all keys from unicode to str for d and all nested dictionaries
|
||||
def to_str_keys_recursive(d):
|
||||
if isinstance(d, list):
|
||||
for val in d:
|
||||
if isinstance(val, (dict, list)):
|
||||
to_str_keys_recursive(val)
|
||||
elif isinstance(d, dict):
|
||||
for key, val in d.items():
|
||||
if isinstance(val, (dict, list)):
|
||||
to_str_keys_recursive(val)
|
||||
if isinstance(key, unicode):
|
||||
d[str(key)] = d.pop(key)
|
||||
else:
|
||||
raise ValueError("non list/dict parameter not allowed")
|
||||
|
@ -1,8 +1,9 @@
|
||||
import copy
|
||||
|
||||
from mongoengine.errors import InvalidQueryError
|
||||
from mongoengine.python_support import product, reduce
|
||||
from itertools import product
|
||||
from functools import reduce
|
||||
|
||||
from mongoengine.errors import InvalidQueryError
|
||||
from mongoengine.queryset import transform
|
||||
|
||||
__all__ = ('Q',)
|
||||
|
6
setup.py
6
setup.py
@ -38,12 +38,14 @@ CLASSIFIERS = [
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python',
|
||||
"Programming Language :: Python :: 2",
|
||||
"Programming Language :: Python :: 2.6",
|
||||
"Programming Language :: Python :: 2.6.6",
|
||||
"Programming Language :: Python :: 2.7",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.1",
|
||||
"Programming Language :: Python :: 3.2",
|
||||
"Programming Language :: Python :: 3.3",
|
||||
"Programming Language :: Python :: 3.4",
|
||||
"Programming Language :: Python :: Implementation :: CPython",
|
||||
"Programming Language :: Python :: Implementation :: PyPy",
|
||||
'Topic :: Database',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user