Merge pull request #2227 from bagerard/test_py38

Test py38
This commit is contained in:
erdenezul 2019-12-27 07:05:12 +01:00 committed by GitHub
commit 3d45538998
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -3,7 +3,7 @@
# with a very large number of jobs, hence we only test a subset of all the # with a very large number of jobs, hence we only test a subset of all the
# combinations: # combinations:
# * MongoDB v3.4 & the latest PyMongo v3.x is currently the "main" setup, # * MongoDB v3.4 & the latest PyMongo v3.x is currently the "main" setup,
# tested against Python v2.7, v3.5, v3.6, and PyPy. # tested against Python v2.7, v3.5, v3.6, v3.7, v3.8 and PyPy.
# * Besides that, we test the lowest actively supported Python/MongoDB/PyMongo # * Besides that, we test the lowest actively supported Python/MongoDB/PyMongo
# combination: MongoDB v3.4, PyMongo v3.4, Python v2.7. # combination: MongoDB v3.4, PyMongo v3.4, Python v2.7.
# * MongoDB v3.6 is tested against Python v3.6, and PyMongo v3.6, v3.7, v3.8. # * MongoDB v3.6 is tested against Python v3.6, and PyMongo v3.6, v3.7, v3.8.
@ -23,6 +23,7 @@ python:
- 3.5 - 3.5
- 3.6 - 3.6
- 3.7 - 3.7
- 3.8
- pypy - pypy
- pypy3 - pypy3
@ -51,7 +52,6 @@ matrix:
- python: 3.7 - python: 3.7
env: MONGODB=${MONGODB_3_6} PYMONGO=${PYMONGO_3_9} env: MONGODB=${MONGODB_3_6} PYMONGO=${PYMONGO_3_9}
install: install:
# Install Mongo # Install Mongo
- wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${MONGODB}.tgz - wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${MONGODB}.tgz

View File

@ -91,12 +91,11 @@ Some simple examples of what MongoEngine code looks like:
# Iterate over all posts using the BlogPost superclass # Iterate over all posts using the BlogPost superclass
>>> for post in BlogPost.objects: >>> for post in BlogPost.objects:
... print '===', post.title, '===' ... print('===', post.title, '===')
... if isinstance(post, TextPost): ... if isinstance(post, TextPost):
... print post.content ... print(post.content)
... elif isinstance(post, LinkPost): ... elif isinstance(post, LinkPost):
... print 'Link:', post.url ... print('Link:', post.url)
... print
... ...
# Count all blog posts and its subtypes # Count all blog posts and its subtypes