From e5a714bf36b3ad6d36460c9c93955eaf5d1ff8b8 Mon Sep 17 00:00:00 2001 From: Eddy Brown Date: Wed, 9 Nov 2022 17:48:33 +0000 Subject: [PATCH] Update Python and Django support --- .github/workflows/tox.yml | 33 ++++++++------------------------- .pre-commit-config.yaml | 8 ++++---- CHANGELOG.md | 10 ++++++++++ LICENSE | 2 +- README.md | 2 +- pyproject.toml | 15 +++++++-------- s3upload/__init__.py | 1 - tox.ini | 7 +++---- 8 files changed, 34 insertions(+), 44 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 3b74a3e0..c2bcca0e 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -20,12 +20,12 @@ jobs: steps: - name: Check out the repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - - name: Set up Python 3.9 - uses: actions/setup-python@v1 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: "3.11" - name: Install and run tox run: | @@ -37,35 +37,18 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [3.9] - django: [22,32,main] + python: ["3.8", "3.10", "3.11"] + django: [32,41,main] env: TOXENV: py${{ matrix.python }}-django${{ matrix.django }} - # services: - # postgres: - # image: postgres:12 - # env: - # POSTGRES_USER: postgres - # POSTGRES_PASSWORD: postgres - # POSTGRES_DB: onfido - # # Set health checks to wait until postgres has started - # options: >- - # --health-cmd pg_isready - # --health-interval 10s - # --health-timeout 5s - # --health-retries 5 - # ports: - # # Maps tcp port 5432 on service container to the host - # - 5432:5432 - steps: - name: Check out the repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 14896d20..85452d86 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,18 +1,18 @@ repos: # python import sorting - will amend files - repo: https://github.com/pre-commit/mirrors-isort - rev: v5.9.3 + rev: v5.10.1 hooks: - id: isort # python code formatting - will amend files - repo: https://github.com/ambv/black - rev: 21.9b0 + rev: 22.10.0 hooks: - id: black - repo: https://github.com/asottile/pyupgrade - rev: v2.29.0 + rev: v3.2.0 hooks: - id: pyupgrade @@ -30,7 +30,7 @@ repos: # python static type checking - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.910-1 + rev: v0.990 hooks: - id: mypy # additional_dependencies: diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..6b6a0c38 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## v0.5 + +- Drops support for Python 3.7 +- Drops support for Django 2.2, 3.0 and 3.1 +- Adds support for Python 3.11 +- Adds support for Django 4.0 and 4.1 diff --git a/LICENSE b/LICENSE index 8db54619..1daa74bb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 YunoJuno Ltd +Copyright (c) 2022 YunoJuno Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index c97f55c2..f3749071 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ django-s3-upload Compatibility ------------- -This library now supports Python3 and Django v1.11 and above only. +This library now supports Python 3.8 and Django v3.2 and above only. [![Build Status](https://travis-ci.org/yunojuno/django-s3upload.svg?branch=master)](https://travis-ci.org/yunojuno/django-s3upload) diff --git a/pyproject.toml b/pyproject.toml index 02d356cf..2e62556d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "django-s3-upload" -version = "0.4" +version = "0.5" description = "Integrates direct client-side uploading to s3 with Django." authors = ["YunoJuno "] license = "MIT" @@ -13,27 +13,26 @@ classifiers = [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", - "Framework :: Django :: 2.2", - "Framework :: Django :: 3.0", - "Framework :: Django :: 3.1", "Framework :: Django :: 3.2", + "Framework :: Django :: 4.0", + "Framework :: Django :: 4.1", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ] packages = [{ include = "s3upload" }] [tool.poetry.dependencies] -python = "^3.7" -django = "^2.2 || ^3.0 || ^4.0" +python = "^3.8" +django = "^3.2 || ^4.0" boto3 = "^1.14" [tool.poetry.dev-dependencies] -black = {version = "*", allow-prereleases = true} +black = "*" coverage = "*" flake8 = "*" flake8-bandit = "*" diff --git a/s3upload/__init__.py b/s3upload/__init__.py index 241b0c93..e69de29b 100644 --- a/s3upload/__init__.py +++ b/s3upload/__init__.py @@ -1 +0,0 @@ -default_app_config = "s3upload.apps.S3UploadAppConfig" diff --git a/tox.ini b/tox.ini index a7874d26..533faac4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] isolated_build = True -envlist = fmt, lint, mypy, py{3.7,3.8,3.9,3.10}-django{22,30,31,32,main} +envlist = fmt, lint, mypy, py{3.8,3.9,3.10,3.11}-django{32,40,41,main} [testenv] deps = @@ -8,10 +8,9 @@ deps = pytest pytest-cov pytest-django - django22: Django>=2.2,<2.3 - django30: Django>=3.0,<3.1 - django31: Django>=3.1,<3.2 django32: Django>=3.2,<3.3 + django40: Django>=4.0,<4.1 + django41: Django>=4.1,<4.2 djangomain: https://github.com/django/django/archive/main.tar.gz commands =