diff --git a/.travis.yml b/.travis.yml index 73c3a01..f5561f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,11 +5,6 @@ matrix: language: python python: "2.7" env: CFLAGS="-Werror -coverage" - - os: linux - dist: trusty - language: python - python: "3.3" - env: CFLAGS="-Werror -coverage" - os: linux dist: trusty language: python @@ -26,10 +21,10 @@ matrix: python: "3.6" env: CFLAGS="-Werror -coverage" - os: linux - dist: trusty + dist: xenial language: python - python: "3.7-dev" - env: CFLAGS="-coverage" + python: "3.7" + env: CFLAGS="-Werror -coverage" - os: linux dist: trusty language: python @@ -66,7 +61,7 @@ install: - python -m pip install --upgrade setuptools - python -m pip install --upgrade pytest flake8 sphinx sphinx_rtd_theme coverage codecov hypothesis - python -m pip install --upgrade mypy || true - - if [[ "$TRAVIS_PYTHON_VERSION" != "3.3" ]] && [[ "$TRAVIS_PYTHON_VERSION" != "3.7-dev" ]] && [[ "${TRAVIS_PYTHON_VERSION:0:4}" != "pypy" ]]; then python -m pip install --upgrade pygame; fi + - if [[ "$TRAVIS_OS_NAME" != "osx" ]] && [[ "$TRAVIS_PYTHON_VERSION" != "3.7" ]] && [[ "${TRAVIS_PYTHON_VERSION:0:4}" != "pypy" ]]; then python -m pip install --upgrade pygame; fi script: - python -m coverage run --branch setup.py test @@ -80,4 +75,4 @@ script: - python setup.py bdist_wheel - python setup.py install --root=_root_setup - if [[ "${TRAVIS_PYTHON_VERSION:0:4}" != "pypy" ]] ; then python -m pip install .; fi - - if [[ "$TRAVIS_PYTHON_VERSION" != "3.3" ]]; then python -m sphinx -W -a -E -b html -n docs docs/_build; fi + - python -m sphinx -W -a -E -b html -n docs docs/_build diff --git a/cairo/surface.c b/cairo/surface.c index 3743261..dbc9799 100644 --- a/cairo/surface.c +++ b/cairo/surface.c @@ -475,7 +475,10 @@ surface_set_mime_data (PycairoSurface *o, PyObject *args) { Py_RETURN_NONE; } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" res = PyObject_AsReadBuffer (obj, (const void **)&buffer, &buffer_len); +#pragma GCC diagnostic pop if (res == -1) return NULL; @@ -818,7 +821,10 @@ image_surface_create_for_data (PyTypeObject *type, PyObject *args) { format = (cairo_format_t)format_arg; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" res = PyObject_AsWriteBuffer (obj, (void **)&buffer, &buffer_len); +#pragma GCC diagnostic pop if (res == -1) return NULL; diff --git a/setup.cfg b/setup.cfg index 44cdc59..b710f17 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,3 +26,4 @@ no_implicit_optional = True disallow_any_decorated = True disallow_any_explicit = False strict_optional = True +follow_imports = silent