2016-06-09 09:01:51 -07:00
|
|
|
language: python
|
|
|
|
sudo: false
|
|
|
|
services:
|
|
|
|
- mysql
|
|
|
|
- postgresql
|
2016-06-27 07:27:05 -07:00
|
|
|
- memcached
|
2016-06-15 07:30:52 -07:00
|
|
|
addons:
|
|
|
|
# Use postgresql 9.3 to get commit-lock testing
|
2016-07-01 15:44:55 -07:00
|
|
|
# Use postgresql 9.4 to get support for BLOB SQL functions for pg8000
|
postgres 9.5+: use ON CONFLICT UPDATE to make temp permanent
Instead of a combination DELETE/INSERT statement. This gives us a 5-10%
performance increase.
BEFORE
"Transaction", postgresql
"Add 1000 Objects", 17167
"Update 1000 Objects", 17314
"Read 1000 Warm Objects", 12575
"Read 1000 Cold Objects", 16714
"Read 1000 Hot Objects", 58357
"Read 1000 Steamin' Objects", 2124724
AFTER
"Transaction", postgresql
"Add 1000 Objects", 18042
"Update 1000 Objects", 19380
"Read 1000 Warm Objects", 13611
"Read 1000 Cold Objects", 17970
"Read 1000 Hot Objects", 62971
"Read 1000 Steamin' Objects", 2069391
2017-01-24 08:40:25 -08:00
|
|
|
# Use postgresql 9.5 to get support for INSERT ON CONFLICT UPDATE
|
2018-01-31 08:57:41 -08:00
|
|
|
# Use postgresql 9.6 ... just because
|
|
|
|
postgresql: "9.6"
|
2017-01-24 11:44:59 -08:00
|
|
|
|
2016-06-09 09:01:51 -07:00
|
|
|
matrix:
|
2017-01-24 11:39:36 -08:00
|
|
|
include:
|
2017-01-25 07:55:05 -08:00
|
|
|
- python: 2.7
|
2017-01-25 08:15:44 -08:00
|
|
|
env:
|
|
|
|
- ENV=cmysqlconnector
|
2017-01-26 09:58:05 -08:00
|
|
|
- RS_MY_DRIVER="C MySQL Connector/Python"
|
2017-01-24 15:18:29 -08:00
|
|
|
- python: 3.6
|
|
|
|
env: ENV=mysqlconnector
|
2018-02-02 07:29:42 -08:00
|
|
|
|
|
|
|
# PyPy 5.8.0 is knonwn to be broken. Check again
|
|
|
|
# when Travis updates.
|
|
|
|
#- python: pypy
|
|
|
|
# env: ENV=mysqlconnector
|
2017-01-24 15:18:29 -08:00
|
|
|
|
2017-01-24 11:39:36 -08:00
|
|
|
- python: 3.6
|
2017-01-24 11:44:59 -08:00
|
|
|
env: ENV=mysql
|
|
|
|
- python: 3.5
|
|
|
|
env: ENV=mysql
|
|
|
|
- python: 2.7
|
2017-04-11 06:37:03 -07:00
|
|
|
env:
|
|
|
|
- ENV=mysql
|
|
|
|
- OLDZODB=true
|
|
|
|
|
2018-01-31 08:57:41 -08:00
|
|
|
- python: pypy
|
2017-01-24 11:44:59 -08:00
|
|
|
env: ENV=mysql
|
|
|
|
|
|
|
|
- python: 3.5
|
2016-07-17 09:23:05 -07:00
|
|
|
env: ENV=pymysql
|
2017-01-24 11:44:59 -08:00
|
|
|
- python: 2.7
|
|
|
|
env: ENV=pymysql
|
|
|
|
|
|
|
|
- python: 2.7
|
2016-07-17 09:23:05 -07:00
|
|
|
env: ENV=umysqldb
|
2017-01-24 11:44:59 -08:00
|
|
|
|
2018-01-31 08:57:41 -08:00
|
|
|
- env: ENV=postgres
|
2017-01-24 11:44:59 -08:00
|
|
|
python: 2.7
|
2018-01-31 08:57:41 -08:00
|
|
|
- env: ENV=postgres
|
|
|
|
python: pypy
|
|
|
|
- env: ENV=postgres
|
2017-01-24 11:44:59 -08:00
|
|
|
python: 3.6
|
|
|
|
|
|
|
|
|
2018-01-31 08:57:41 -08:00
|
|
|
- env: ENV=pypostgres
|
2017-01-24 11:44:59 -08:00
|
|
|
python: 2.7
|
2018-01-31 08:57:41 -08:00
|
|
|
- env: ENV=pypostgres
|
2017-01-24 11:44:59 -08:00
|
|
|
python: 3.5
|
|
|
|
|
2016-06-09 09:01:51 -07:00
|
|
|
fast_finish: true
|
|
|
|
script:
|
2016-06-13 08:13:08 -07:00
|
|
|
# coverage slows PyPy down from 2minutes to 12+.
|
Initial support for pg8000
The major difference from psycopg2/cffi is that it doesn't have native
lobject support. This is easily worked around, but this draft is not
complete because it doesn't support chunks. Some refactoring will be
required to elegantly handle this.
Two minor differences:
- It doesn't support multiple statements in a single `cursor.execute()`
call. Apparently it turns all statements into prepared statements,
because the error is from the server. Easily worked around and
unlikely to be a perfomance difference.
- It handles transaction isolation levels like most other drivers, in
SQL. This could be handled more elegantly too.
One thing: The server spits out lots of "WARNING: not in a transaction".
If I enable statement logging, I see every `commit` immediately followed
by a `rollback`, which generates the warning. I'm not sure if that's
just us, or something the driver is doing differently (e.g, maybe
psycopg2/cffi always follows `commit` with `begin`? and then when we try
to `rollback` we're already in a transaction?). Annoying but harmless.
Still, would like to figure it out though.
Testing this pure-python driver on Python 3 also revealed a lot of
connection leaks, many of which I've fixed, but there are probably more.
This should be a win for PyPy. See also zopefoundation/ZODB#78.
The testing matrix is expanded to test the pure-python drivers on
CPython too and to test pg8000. (Travis will be the first time I run
psycopg2 tests; hope I didn't break anything!)
Fixes #85.
2016-07-01 15:10:36 -07:00
|
|
|
# But don't run the pymysql/pypy tests twice.
|
2016-12-10 09:27:11 -08:00
|
|
|
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pylint --rcfile=.pylintrc relstorage -f parseable -r n; fi
|
2016-11-15 10:33:14 -08:00
|
|
|
- if [[ $TRAVIS_PYTHON_VERSION == pypy* ]]; then python -m relstorage.tests.alltests -v; fi
|
|
|
|
- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage run -m relstorage.tests.alltests -v; fi
|
2016-06-09 09:01:51 -07:00
|
|
|
after_success:
|
|
|
|
- coveralls
|
|
|
|
notifications:
|
|
|
|
email: false
|
|
|
|
|
2016-09-22 15:09:25 -07:00
|
|
|
before_install:
|
2016-09-22 14:55:50 -07:00
|
|
|
- python --version
|
2016-09-22 15:09:25 -07:00
|
|
|
|
|
|
|
install:
|
2016-06-24 05:32:39 -07:00
|
|
|
- pip install -U pip setuptools
|
2017-04-14 08:16:52 -07:00
|
|
|
- pip install -U tox coveralls
|
2017-06-22 08:27:27 -07:00
|
|
|
- pip install -U "pylint>=1.7.1"
|
2016-11-15 10:33:14 -08:00
|
|
|
- if [[ $TRAVIS_PYTHON_VERSION == pypy* ]]; then pip install -U python-memcached; fi
|
|
|
|
- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pip install -U pylibmc cffi; fi
|
2016-09-08 07:23:46 -07:00
|
|
|
- pip install -U -e ".[test]"
|
2016-06-09 09:01:51 -07:00
|
|
|
- .travis/setup-$ENV.sh
|
2017-04-11 06:37:03 -07:00
|
|
|
- if [[ $OLDZODB == true ]]; then .travis/setup-oldzodb.sh; fi
|
2016-12-10 09:27:11 -08:00
|
|
|
|
|
|
|
cache: pip
|
2016-06-09 09:01:51 -07:00
|
|
|
|
|
|
|
before_cache:
|
|
|
|
- rm -f $HOME/.cache/pip/log/debug.log
|