Compare commits

..

7 Commits

Author SHA1 Message Date
Stefan Wojcik
70f1067470 more thorough and isolated unit tests 2017-02-08 00:05:19 -08:00
Stefan Wojcik
fba4477dd8 fix flake8 2017-02-07 23:51:38 -08:00
Stefan Wojcik
6ac7a8eec6 fix chaining of the limit, skip, hint, and batch_size 2017-02-07 23:43:46 -08:00
Stefan Wojcik
bad4e6846a Cleaner ordering code + allow clearing an explicit sort 2017-02-07 23:38:56 -08:00
Stefan Wojcik
0e77efb0c7 Fix BaseQuerySet.comment 2017-02-07 23:34:39 -08:00
Stefan Wojcik
8a6f36256e minor cleanup 2017-02-06 19:29:35 -07:00
Stefan Wojcik
515ffac246 unit test showing issues with skip & limit on an existing queryset 2017-02-06 18:55:15 -07:00
4 changed files with 15 additions and 61 deletions

View File

@@ -1,6 +1,3 @@
# Use a container-based environment
sudo: false
language: python
python:
@@ -11,41 +8,26 @@ python:
- pypy
- pypy3
# Test on PyMongo v2.7.x, v2.8.x, and v3.x
env:
- PYMONGO=2.7
- PYMONGO=2.8
- PYMONGO=3.0
- PYMONGO=dev
matrix:
fast_finish: true
services:
- mongodb
addons:
apt:
sources:
- mongodb-upstart
packages:
- mongodb-org-server=2.6.9
# Optional dependencies for the ImageField and others
- 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
before_install:
- travis_retry sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
- echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' |
sudo tee /etc/apt/sources.list.d/mongodb.list
- travis_retry sudo apt-get update
- travis_retry sudo apt-get install mongodb-org-server
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
- travis_retry pip install --upgrade pip
- travis_retry pip install coveralls
- travis_retry pip install flake8
@@ -53,9 +35,6 @@ install:
- travis_retry pip install "virtualenv<14.0.0" # virtualenv>=14.0.0 has dropped Python 3.2 support (and pypy3 is based on py32)
- travis_retry tox -e $(echo py$TRAVIS_PYTHON_VERSION-mg$PYMONGO | tr -d . | sed -e 's/pypypy/pypy/') -- -e test
# Cache dependencies installed via pip
cache: pip
# Run flake8 for py27
before_script:
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then tox -e flake8; fi
@@ -66,7 +45,7 @@ script:
# For now only submit coveralls for Python v2.7. Python v3.x currently shows
# 0% coverage. That's caused by 'use_2to3', which builds the py3-compatible
# code in a separate dir and runs tests on that.
after_success:
after_script:
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then coveralls --verbose; fi
notifications:
@@ -77,22 +56,11 @@ branches:
- master
- /^v.*$/
# Whenever a new release is created via GitHub, publish it on PyPI.
deploy:
provider: pypi
user: the_drow
password:
secure: QMyatmWBnC6ZN3XLW2+fTBDU4LQcp1m/LjR2/0uamyeUzWKdlOoh/Wx5elOgLwt/8N9ppdPeG83ose1jOz69l5G0MUMjv8n/RIcMFSpCT59tGYqn3kh55b0cIZXFT9ar+5cxlif6a5rS72IHm5li7QQyxexJIII6Uxp0kpvUmek=
# create a source distribution and a pure python wheel for faster installs
distributions: "sdist bdist_wheel"
# only deploy on tagged commits (aka GitHub releases) and only for the
# parent repo's builds running Python 2.7 along with dev PyMongo (we run
# Travis against many different Python and PyMongo versions and we don't
# want the deploy to occur multiple times).
on:
tags: true
repo: MongoEngine/mongoengine
condition: "$PYMONGO = 3.0"
python: 2.7

View File

@@ -5,8 +5,6 @@ Changelog
Development
===========
- (Fill this out as you fix issues and develop you features).
- POTENTIAL BREAKING CHANGE: Fixed limit/skip/hint/batch_size chaining #1476
- POTENTIAL BREAKING CHANGE: Changed a public `QuerySet.clone_into` method to a private `QuerySet._clone_into` #1476
- Fixed connecting to a replica set with PyMongo 2.x #1436
- Fixed an obscure error message when filtering by `field__in=non_iterable`. #1237

View File

@@ -2,20 +2,6 @@
Upgrading
#########
Development
***********
(Fill this out whenever you introduce breaking changes to MongoEngine)
This release includes various fixes for the `BaseQuerySet` methods and how they
are chained together. Since version 0.10.1 applying limit/skip/hint/batch_size
to an already-existing queryset wouldn't modify the underlying PyMongo cursor.
This has been fixed now, so you'll need to make sure that your code didn't rely
on the broken implementation.
Additionally, a public `BaseQuerySet.clone_into` has been renamed to a private
`_clone_into`. If you directly used that method in your code, you'll need to
rename its occurrences.
0.11.0
******
This release includes a major rehaul of MongoEngine's code quality and

View File

@@ -1,5 +1,5 @@
[tox]
envlist = {py27,py33,py34,py35,pypy,pypy3}-{mg27,mg28,mg30},flake8
envlist = {py26,py27,py33,py34,py35,pypy,pypy3}-{mg27,mg28},flake8
[testenv]
commands =
@@ -7,10 +7,12 @@ commands =
deps =
nose
mg27: PyMongo<2.8
mg28: PyMongo>=2.8,<2.9
mg28: PyMongo>=2.8,<3.0
mg30: PyMongo>=3.0
mgdev: https://github.com/mongodb/mongo-python-driver/tarball/master
setenv =
PYTHON_EGG_CACHE = {envdir}/python-eggs
passenv = windir
[testenv:flake8]
deps =