Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Python and Django support #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 8 additions & 25 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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 }}

Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 7 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
license = "MIT"
Expand All @@ -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 = "*"
Expand Down
1 change: 0 additions & 1 deletion s3upload/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
default_app_config = "s3upload.apps.S3UploadAppConfig"
7 changes: 3 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
[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 =
coverage
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 =
Expand Down