sudo: false
language: python
os: linux
jobs:
  include:
    - python: "3.10"  # EOL 2026-10-04
      env: TOXENV=py310
      dist: bionic
    - python: "3.9"  # EOL 2025-10-05
      env: TOXENV=py39
    - python: "3.8"  # EOL 2024-10-14
      env: TOXENV=py38
    - python: "3.7"  # EOL 2023-06-27
      env: TOXENV=py37
      dist: xenial
    # - python: "3.6"  # EOL 2021-12-21
    #   env: TOXENV=py36
    # - python: "3.5"  # EOL 2020-09-13
    #   env: TOXENV=py35
    - python: "3.11-dev"
      env: TOXENV=py311
      dist: bionic
  allow_failures:
    - python: "3.11-dev"
      env: TOXENV=py311
      dist: bionic
before_install:
  # Fix for cryptography on Py36
  - pip install --upgrade virtualenv
install:
  - pip install tox-travis
  - pip install flake8
script:
  - tox

sudo: false
language: python
os: linux
jobs:
  include:
    - python: "3.10"  # EOL 2026-10-04
      env: TOXENV=py310
      dist: bionic
    - python: "3.9"  # EOL 2025-10-05
      env: TOXENV=py39
    - python: "3.8"  # EOL 2024-10-14
      env: TOXENV=py38
    - python: "3.7"  # EOL 2023-06-27
      env: TOXENV=py37
      dist: xenial
      before_install:
        # Fix "AttributeError: 'str' object has no attribute 'name'" on Py37
        - pip install -U importlib_metadata
    # - python: "3.6"  # EOL 2021-12-21
    #   env: TOXENV=py36
    # - python: "3.5"  # EOL 2020-09-13
    #   env: TOXENV=py35
    - python: "3.11-dev"
      env: TOXENV=py311
      dist: bionic
  allow_failures:
    - python: "3.11-dev"
      env: TOXENV=py311
      dist: bionic
# before_install:
#   # Fix for cryptography on Py36
#   - pip install --upgrade virtualenv
install:
  - pip install tox-travis
  - pip install flake8
script:
  - tox

Fix "AttributeError: 'str' object has no attribute 'name'" on Travis Py37
Fix "AttributeError: 'str' object has no attribute 'name'" on Travis Py37
