# Pip requirements file for installation of the project.
#
# The order of packages is significant, because pip processes them in the order
# of appearance.
#
# Make sure that the minimum versions required in this file are consistent with
# the minimum versions specified in minimum-constraints.txt.


# Direct dependencies (except pip, setuptools, wheel):

# Keep minimum versions consistent with table for 'minimum' packages in development.rst and with minimum-constraints.txt
# Starting with Python 3.9, ansible >=4 is needed.
# ansible 4 requires Python 2.7 or >=3.5.
# ansible 5 requires Python >=3.8.
# ansible 6 requires Python >=3.8.
# ansible 7 requires Python >=3.9.
# ansible 8 requires Python >=3.9.
# ansible 9 requires Python >=3.10.
# The sanity check of ansible 4 supports Python 2.7, 3.5 to 3.9.
# The sanity check of ansible 5 supports Python 3.8 to 3.10.
# The sanity check of ansible 6 supports Python 3.8 to 3.10.
# The sanity check of ansible 7 supports Python 3.9 to 3.11.
# The sanity check of ansible 8 supports Python 3.9 to 3.11.
# The sanity check of ansible 9 supports Python 3.10 to 3.12 (or higher?).
# We require the lowest ansible version that supports the sanity check an a given Python version:
ansible>=2.9.27; python_version == '2.7'   # sanity test is not run here
ansible>=2.9.27; python_version >= '3.5' and python_version <= '3.8'
ansible>=4.0.0; python_version == '3.9'
ansible>=5.0.1; python_version == '3.10'
ansible>=7.0.0; python_version == '3.11'
ansible>=9.0.1; python_version >= '3.12'

# ansible-core is pulled in by ansible>=4.0, and is needed for pip-check-reqs checks.
ansible-core>=2.11.12; python_version == '3.9'
ansible-core>=2.12.10; python_version == '3.10'
ansible-core>=2.14.2; python_version == '3.11'
ansible-core>=2.16.0; python_version >= '3.12'

# requests 2.22.0 removes the pinning of urllib3 to <1.25.0, and urllib 1.25.9
#   is required to address safety issues
# requests 2.25.0 tolerates urllib3 1.26.5 which is needed on Python 3.10 to
#   remove ImportWarning in six
requests>=2.25.0; python_version <= '3.6'
requests>=2.31.0; python_version >= '3.7'

# zhmcclient @ git+https://github.com/zhmcclient/python-zhmcclient.git@master
zhmcclient>=1.11.3


# Indirect dependencies are not specified in this file, unless needed to solve versioning issues:

# Jinja2 is used by ansible/ansible-core and by ansible-doc-extractor.
# The module.rst.j2 template used by ansible-doc-extractor uses the 'tojson' filter added in Jinja2 2.9
# Ansible 6 requires Jinja2>=3.0
# Python 3.10 requires Jinja>=2.11
Jinja2>=2.10.1; python_version <= '3.8'   # ansible <= 5
Jinja2>=3.0.0; python_version >= '3.9'   # ansible >= 6

# MarkupSafe is used by Jinja2
# Jinja2 3.0 requires MarkupSafe>=2.0
MarkupSafe>=1.1.0; python_version <= '3.8'   # ansible <= 5
MarkupSafe>=2.0.0; python_version >= '3.9'   # ansible >= 6

# cryptography 3.1 has deprecated Python 3.5 support and issues a deprecation
# warning that causes ansible-test to fail
# cryptography 3.2 addresses a dependabot security issue
# cryptography 37.0.0 has deprecated Python 3.6 support and issues a deprecation
# warning that causes ansible-test to fail
cryptography>=3.3.2; python_version == '2.7'
cryptography>=3.0,<3.1; python_version == '3.5'
cryptography>=3.4.7,<37.0.0; python_version == '3.6'
cryptography>=41.0.4; python_version >= '3.7'

# importlib-metadata is used by jsonschema which is used by zhmcclient
importlib-metadata>=0.12,<5.0.0; python_version <= '3.7'
importlib-metadata>=1.1.0; python_version >= '3.8'

# packaging is used by TBD, and for dev also by pytest, pip-check-reqs, sphinx
# packaging>=20.5 is needed by pip-check-reqs 2.4.3 but it requires only packaging>=16.0
# packaging 21.0 removed support for Python <3.6
packaging>=20.5; python_version <= '3.5'
packaging>=21.0; python_version >= '3.6'

# PyYAML 5.3 fixed narrow build error on Python 2.7
# PyYAML 5.3.1 addressed issue 38100 reported by safety
# PyYAML 5.2 addressed issue 38639 reported by safety
# PyYAML 5.3 has wheel archives for Python 2.7, 3.5 - 3.9
# PyYAML 5.4 has wheel archives for Python 2.7, 3.6 - 3.9
# PyYAML 6.0 has wheel archives for Python 3.6 - 3.11
# PyYAML 5.4 and 6.0.0 fails install since Cython 3 was released, see issue
#   https://github.com/yaml/pyyaml/issues/724.
PyYAML>=5.3.1; python_version <= '3.5'
PyYAML>=5.3.1,!=5.4.0,!=5.4.1; python_version >= '3.6' and python_version <= '3.11'
PyYAML>=5.3.1,!=5.4.0,!=5.4.1,!=6.0.0; python_version >= '3.12'

python-dateutil>=2.8.2
jsonschema>=3.0.1,!=4.0.0,!=4.18.1
# urllib3 1.26.10 removed support for py35
urllib3>=1.26.18; python_version == '2.7'
urllib3>=1.26.9; python_version == '3.5'
urllib3>=1.26.18; python_version >= '3.6'
