# This is a pip constraints file that is used to preserve Python 2.6
# compatibility (on Travis CI). Why I'm still doing that in 2018 is
# a good question, maybe simply to prove that I can :-P.

# flake8 3.0.0 drops explicit support for Python 2.6:
# http://flake8.pycqa.org/en/latest/release-notes/3.0.0.html
flake8 < 3.0.0 ; python_version < '2.7'

# flake8-docstrings 1.0.0 switches from pep257 to pydocstyle and I haven't been
# able to find a combination of versions of flake8-docstrings and pydocstyle
# that actually works on Python 2.6. Here's the changelog:
# https://gitlab.com/pycqa/flake8-docstrings/blob/master/HISTORY.rst
flake8-docstrings < 1.0.0 ; python_version < '2.7'

# Constrain pip to the (very old but nonetheless) most recent release of pip
# that pip-accel and consequently py2deb are compatible with. An upcoming
# refactor is intended to finally resolve this awkward situation :-).
pip >= 7.0, < 7.2

# pycparser < 2.19 drops Python 2.6 compatibility:
# https://github.com/eliben/pycparser/blob/master/CHANGES
pycparser < 2.19 ; python_version < '2.7'

# pydocstyle 4.0.0 drops Python 2 compatibility:
# http://www.pydocstyle.org/en/5.0.2/release_notes.html#july-6th-2019
pydocstyle < 4.0.0 ; python_version < '3.0'

# pyflakes 2.0.0 drops Python 2.6 compatibility:
# https://github.com/PyCQA/pyflakes/blob/master/NEWS.txt
pyflakes < 2.0.0 ; python_version < '2.7'

# pytest 3.3 drops Python 2.6 compatibility:
# https://docs.pytest.org/en/latest/changelog.html#pytest-3-3-0-2017-11-23
pytest < 3.3 ; python_version < '2.7'

# setuptools 45 drops Python 2.7 compatibility:
# https://setuptools.readthedocs.io/en/latest/history.html#v45-0-0
setuptools < 45

# tox 3.0.0 drops Python 2.6 compatibility:
# https://tox.readthedocs.io/en/latest/changelog.html#v3-0-0-2018-04-02
tox < 3.0.0

# virtualenv release 16.0.0 drops Python 2.6 compatibility:
# https://virtualenv.pypa.io/en/latest/changes/
# Gotcha: Because we use 'tox' running on Python 2.7 to create a Python 2.6
# virtual environment, we can't constrain to python_version < '2.7'!
virtualenv < 16.0.0

# wheel 0.30.0 drops Python 2.6 compatibility:
# https://pypi.org/project/wheel
wheel < 0.30.0 ; python_version < '2.7'

# zipp 2 drops Python 2 compatibility:
# https://github.com/jaraco/zipp/issues/50
zipp < 2 ; python_version < '3.0'

# The following constraints are used by the py2deb test suite to make sure it
# doesn't download incompatible packages. Nowadays pip mostly does this
# automatically however the old version of pip that pip-accel depends on
# doesn't have that feature yet, hence the need for explicit constraints.

# cairocffi 1.0.0 (a dependency of WeasyPrint) drops Python 2 compatibility:
# https://github.com/Kozea/cairocffi/blob/master/NEWS.rst#version-100
cairocffi < 1.0.0 ; python_version < '3.0'

# cssselect2 (a dependency of WeasyPrint) drops Python 2 compatibility:
# https://github.com/Kozea/cssselect2/blob/master/CHANGES
cssselect2 < 0.3.0 ; python_version < '3.0'

# tinycss2 1.0.0 (a dependency of WeasyPrint) drops Python 2 compatibility:
# https://tinycss2.readthedocs.io/en/latest/#version-1-0-0
tinycss2 < 1.0.0 ; python_version < '3.0'
