Skip to content

Commit

Permalink
Merge pull request #278 from uploadcare/feature/277-drop_python_3.6_u…
Browse files Browse the repository at this point in the history
…pdate_everything_else

Drop Python 3.6 & 3.7 support, update Pydantic and everything else
closes #277 #274
  • Loading branch information
evgkirov committed Dec 28, 2023
2 parents a897f59 + 7a142e9 commit e0abb58
Show file tree
Hide file tree
Showing 33 changed files with 373 additions and 424 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ exclude = .venv,venv,**/migrations/*,snapshots
per-file-ignores =
tests/**: S101
**/tests/**: S101
pyuploadcare/ucare_cli/**: T003,T001,T004
pyuploadcare/ucare_cli/**: T003,T001,T004,T201,T203,T204
288 changes: 142 additions & 146 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ name: Tests
on:
push:
branches:
- main
- main
pull_request:
branches:
- 'main'
- 'feature/**'
- 'version-3.x/**'
- "main"
- "feature/**"
- "version-3.x/**"

jobs:
lint:
Expand All @@ -20,21 +20,21 @@ jobs:
python-version: [3.9]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
run: |
poetry install
- name: Run linters
run: make lint
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
run: |
poetry install
- name: Run linters
run: make lint

functional:
needs: lint
Expand All @@ -43,138 +43,134 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
run: |
poetry install
- name: Test with pytest
run: |
make test-functional
functional-legacy-py:
needs: lint

runs-on: ${{ matrix.os }}
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
run: |
poetry install
- name: Test with pytest
run: |
make test-functional
django-2-and-3:
needs: functional
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.6']
# https://docs.djangoproject.com/en/2.2/faq/install/#what-python-version-can-i-use-with-django
# https://docs.djangoproject.com/en/3.2/faq/install/#what-python-version-can-i-use-with-django
python-version: ["3.8", "3.9"]
django-version: ["2.2", "3.0", "3.1", "3.2"]

include:
- python-version: "3.10"
django-version: "3.2"

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.15
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
run: |
poetry install
- name: Test with pytest
run: |
make test-functional
django:
- uses: actions/checkout@v3
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install poetry
uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: false
- name: install dependencies
run: |
poetry install
- name: install specific django version
run: |
poetry run pip install django~=${{ matrix.django-version }}
- name: test with pytest
run: |
make test-django
django-4:
needs: functional
runs-on: ubuntu-latest
strategy:
matrix:
# https://docs.djangoproject.com/en/4.2/faq/install/#what-python-version-can-i-use-with-django
# this is a bit excessive, probably should run only before
# releasing new version
python-version: ['3.7', '3.8', '3.9']
django-version: ['2.2', '3.0', '3.1', '3.2']
python-version: ["3.8", "3.9", "3.10"]
django-version: ["4.0", "4.1", "4.2"]

include:
- python-version: '3.7'
django-version: 1.11

# django versions that support py3.10
- python-version: '3.10'
django-version: 3.2
- python-version: '3.10'
django-version: 4.0
- python-version: "3.11"
django-version: "4.1"

# django versions that support py3.11
- python-version: '3.11'
django-version: 4.1
- python-version: '3.11'
django-version: 4.2
- python-version: "3.11"
django-version: "4.2"

# no django versions that support py3.12 - as of 2023-10-04
- python-version: "3.12"
django-version: "4.2"

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
run: |
poetry install
- name: Install specific Django version
run: |
poetry run pip install django~=${{ matrix.django-version }}.0
- name: Test with pytest
run: |
make test-django
django-legacy-py:
needs: functional-legacy-py
runs-on: ubuntu-20.04
- uses: actions/checkout@v3
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install poetry
uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: false
- name: install dependencies
run: |
poetry install
- name: install specific django version
run: |
poetry run pip install django~=${{ matrix.django-version }}
- name: test with pytest
run: |
make test-django
django-5:
needs: functional
runs-on: ubuntu-latest
strategy:
matrix:
# https://docs.djangoproject.com/en/3.2/faq/install/#what-python-version-can-i-use-with-django
# this is a bit excessive, probably should run only before
# releasing new version
python-version: ['3.6']
django-version: ['1.11', '2.2', '3.0', '3.1', '3.2']
# https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
python-version: ["3.10", "3.11", "3.12"]
django-version: ["5.0"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.15 # needed for py3.6
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
run: |
poetry install
- name: Install specific Django version
run: |
poetry run pip install django~=${{ matrix.django-version }}.0
- name: Test with pytest
run: |
make test-django
- uses: actions/checkout@v3
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install poetry
uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: false
- name: install dependencies
run: |
poetry install
- name: install specific django version
run: |
poetry run pip install django~=${{ matrix.django-version }}
- name: test with pytest
run: |
make test-django
integration:
needs: functional
Expand All @@ -184,19 +180,19 @@ jobs:
python-version: [3.9]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
run: |
poetry install
- name: Test with pytest
run: |
make test-integration
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: false
- name: Install dependencies
run: |
poetry install
- name: Test with pytest
run: |
make test-integration
17 changes: 0 additions & 17 deletions Dockerfile_py36_test

This file was deleted.

18 changes: 18 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ The format is based on [Keep a
Changelog](https://keepachangelog.com/en/1.0.0/), and this project
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.0.0](https://github.com/uploadcare/pyuploadcare/compare/v4.3.0...v5.0.0) - 2023-12-28

### Breaking Changes

- Python 3.6 and 3.7 are no longer supported.
- Django 1.11, 2.0, and 2.1 are no longer supported.
- [Pydantic](https://docs.pydantic.dev) has been updated to Version 2. Projects dependent on Pydantic Version 1 may encounter errors due to incompatibility between Versions 1 and 2.
- Removed `tox.ini`. The recommended method for running tests locally is now through [act](https://github.com/nektos/act) with Docker.

### Added

- Added Python 3.12 and Django 5.0 to the test matrix.

### Changed

- Updated dependencies: `httpx`, `pydantic`, `pytz`, `typing-extensions`.
- Updated development dependencies: `mypy`, `pytest`, `black`, `isort`, `flake8`, `flake8-print`, `vcrpy`, `yarl`, `coverage`, `pytest-cov`, `sphinx`, `sphinx-argparse`, `types-*`. Replaced `pytest-freezegun` with `pytest-freezer`.

## [4.3.0](https://github.com/uploadcare/pyuploadcare/compare/v4.2.2...v4.3.0) - 2023-12-24

### Fixed
Expand Down
Loading

0 comments on commit e0abb58

Please sign in to comment.