From 041f92fbd30a25e20ca6a512ca771aa9a4742110 Mon Sep 17 00:00:00 2001 From: johnthagen Date: Sat, 23 Oct 2021 11:52:57 -0400 Subject: [PATCH 01/13] Add support for Python 3.9-3.10 and Django 3.2 --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index c9a9549..9359cc6 100644 --- a/tox.ini +++ b/tox.ini @@ -2,13 +2,14 @@ envlist = flake8, py{35,36,37}-drf3-django{22}, - py{36,37,38}-drf3-django{30,31} + py{36,37,38,39,310}-drf3-django{30,31,32} [testenv] deps = django22: Django>=2.2,<2.3 django30: Django>=3.0,<3.1 django31: Django>=3.1,<3.2 + django32: Django>=3.2,<3.3 drf3: djangorestframework>=3 -r requirements_dev.txt commands = From d0dd52ccdda4fc67ea124053c737b8ae77e6ecd5 Mon Sep 17 00:00:00 2001 From: johnthagen Date: Sat, 23 Oct 2021 11:54:53 -0400 Subject: [PATCH 02/13] Add Python 3.9-3.10 to the test matrix --- .travis.yml | 2 ++ setup.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index fa6682a..ca55387 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ python: - "3.6" - "3.7" - "3.8" + - "3.9" + - "3.10" install: - pip install tox-travis diff --git a/setup.py b/setup.py index 03676cd..f4d3f2b 100644 --- a/setup.py +++ b/setup.py @@ -41,6 +41,8 @@ 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], From 86cdde6ccf2fadd8bb23e08d21988beb2c2e3b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Abac=C4=B1?= Date: Tue, 26 Oct 2021 22:25:15 +0300 Subject: [PATCH 03/13] Replace Travis with GitHub Actions --- .github/workflows/tests.yml | 27 +++++++++++++++++++++++++++ .travis.yml | 25 ------------------------- README.md | 2 +- setup.py | 2 +- tox.ini | 19 ++++++++++--------- 5 files changed, 39 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..a2db4b6 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,27 @@ +name: Tests and Coverage + +on: [push, pull_request] + +jobs: + tox: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.5, 3.6, 3.7, 3.8, 3.9, 3.10] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox tox-gh-actions + - name: Run tests with tox + run: tox + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2.1.0 + with: + fail_ci_if_error: true + verbose: true \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ca55387..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: python - -dist: bionic - -python: - - "3.5" - - "3.6" - - "3.7" - - "3.8" - - "3.9" - - "3.10" - -install: - - pip install tox-travis - - pip install codecov - - sudo apt-get install gdal-bin - -script: - - tox - -notifications: - email: false - -after_success: - - codecov diff --git a/README.md b/README.md index 7529058..fadf38a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Extra Fields for Django Rest Framework **Possible breaking change in v3.1.0**: In this version we have changed file class used in `Base64FileField` from `ContentFile` to `SimpleUploadedFile` (you may see the change [here](https://github.com/Hipo/drf-extra-fields/pull/149/files#diff-5f77bcb61083cd9c026f6dfb3b77bf8fa824c45e620cdb7826ad713bde7b65f8L72-R85)). -[![Build Status](https://travis-ci.org/Hipo/drf-extra-fields.svg?branch=master)](https://travis-ci.org/Hipo/drf-extra-fields) +[![Build Status](https://github.com/Hipo/drf-extra-fields/workflows/tests/badge.svg?branch=master)](https://github.com/Hipo/drf-extra-fields/actions) [![codecov](https://codecov.io/gh/Hipo/drf-extra-fields/branch/master/graph/badge.svg)](https://codecov.io/gh/Hipo/drf-extra-fields) [![PyPI Version](https://img.shields.io/pypi/v/drf-extra-fields.svg)](https://pypi.org/project/drf-extra-fields) [![Python Versions](https://img.shields.io/pypi/pyversions/drf-extra-fields.svg)](https://pypi.org/project/drf-extra-fields) diff --git a/setup.py b/setup.py index f4d3f2b..6f6293c 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( name='drf-extra-fields', - version='3.1.1', + version='3.2.0', packages=['drf_extra_fields', 'drf_extra_fields.runtests'], include_package_data=True, diff --git a/tox.ini b/tox.ini index 9359cc6..b3403e0 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,16 @@ +[gh-actions] +python = + 3.5: py35 + 3.6: py36 + 3.7: py37 + 3.8: py38 + 3.9: py39 + 3.10: py310 + [tox] envlist = flake8, - py{35,36,37}-drf3-django{22}, + py{35,36,37,38,39,310}-drf3-django{22}, py{36,37,38,39,310}-drf3-django{30,31,32} [testenv] @@ -14,16 +23,8 @@ deps = -r requirements_dev.txt commands = py.test {posargs} --cov-report=xml --cov -passenv = - CI - TRAVIS - TRAVIS_* [testenv:flake8] deps = flake8 commands = flake8 -passenv = - CI - TRAVIS - TRAVIS_* From db63df67f9434a400e78aedcc391067b4db1069f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Abac=C4=B1?= Date: Tue, 26 Oct 2021 22:34:28 +0300 Subject: [PATCH 04/13] Enclose python-versions with single quotes --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a2db4b6..75c1b5e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.5, 3.6, 3.7, 3.8, 3.9, 3.10] + python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10'] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} From 1e922fc7f07650cfcaac22bed494a55ca4287679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Abac=C4=B1?= Date: Tue, 26 Oct 2021 22:38:29 +0300 Subject: [PATCH 05/13] Add command to install gdal-bin during tests --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 75c1b5e..7cd0de4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,6 +18,7 @@ jobs: run: | python -m pip install --upgrade pip pip install tox tox-gh-actions + sudo apt-get install gdal-bin - name: Run tests with tox run: tox - name: Upload coverage to Codecov From 214a2b7c38c794f298bd0d2273b077dcf85206f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Abac=C4=B1?= Date: Tue, 26 Oct 2021 22:40:04 +0300 Subject: [PATCH 06/13] Rename GitHub workflow --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7cd0de4..8b50c8d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ -name: Tests and Coverage +name: Tests on: [push, pull_request] From 843a90f6abd0c0d13a8991def080c108c6851c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Abac=C4=B1?= Date: Tue, 26 Oct 2021 22:44:22 +0300 Subject: [PATCH 07/13] Prevent tests running twice --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8b50c8d..e208031 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,6 @@ name: Tests -on: [push, pull_request] +on: [push] jobs: tox: From 2f32df06eeb146e789699d15cfe279e7cf2dc162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Abac=C4=B1?= Date: Tue, 26 Oct 2021 22:49:07 +0300 Subject: [PATCH 08/13] Update workflow status badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fadf38a..7515d16 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Extra Fields for Django Rest Framework **Possible breaking change in v3.1.0**: In this version we have changed file class used in `Base64FileField` from `ContentFile` to `SimpleUploadedFile` (you may see the change [here](https://github.com/Hipo/drf-extra-fields/pull/149/files#diff-5f77bcb61083cd9c026f6dfb3b77bf8fa824c45e620cdb7826ad713bde7b65f8L72-R85)). -[![Build Status](https://github.com/Hipo/drf-extra-fields/workflows/tests/badge.svg?branch=master)](https://github.com/Hipo/drf-extra-fields/actions) +[![Build Status](https://github.com/Hipo/drf-extra-fields/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/Hipo/drf-extra-fields/actions) [![codecov](https://codecov.io/gh/Hipo/drf-extra-fields/branch/master/graph/badge.svg)](https://codecov.io/gh/Hipo/drf-extra-fields) [![PyPI Version](https://img.shields.io/pypi/v/drf-extra-fields.svg)](https://pypi.org/project/drf-extra-fields) [![Python Versions](https://img.shields.io/pypi/pyversions/drf-extra-fields.svg)](https://pypi.org/project/drf-extra-fields) From 524b4cbe1ed9622358b0026f443888156aea3674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Abac=C4=B1?= Date: Wed, 27 Oct 2021 10:28:31 +0300 Subject: [PATCH 09/13] Add new line to tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e208031..360abdd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,4 +25,4 @@ jobs: uses: codecov/codecov-action@v2.1.0 with: fail_ci_if_error: true - verbose: true \ No newline at end of file + verbose: true From 3b86d2c5246c7c28f1b9d72a67f8f85116e264b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Abac=C4=B1?= Date: Wed, 27 Oct 2021 11:11:28 +0300 Subject: [PATCH 10/13] Drop support for Python 3.5 --- .github/workflows/tests.yml | 2 +- tox.ini | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 360abdd..90ce6ec 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10'] + python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/tox.ini b/tox.ini index b3403e0..656c236 100644 --- a/tox.ini +++ b/tox.ini @@ -10,8 +10,7 @@ python = [tox] envlist = flake8, - py{35,36,37,38,39,310}-drf3-django{22}, - py{36,37,38,39,310}-drf3-django{30,31,32} + py{36,37,38,39,310}-drf3-django{22,30,31,32} [testenv] deps = From e5f0e5714bd7330284c6487215248c056f790c11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Abac=C4=B1?= Date: Wed, 27 Oct 2021 11:11:50 +0300 Subject: [PATCH 11/13] Update README.md file to inform about latest changes --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7515d16..bfb83fd 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,24 @@ DRF-EXTRA-FIELDS Extra Fields for Django Rest Framework -**Possible breaking change in v3.1.0**: In this version we have changed file class used in `Base64FileField` from `ContentFile` to `SimpleUploadedFile` (you may see the change [here](https://github.com/Hipo/drf-extra-fields/pull/149/files#diff-5f77bcb61083cd9c026f6dfb3b77bf8fa824c45e620cdb7826ad713bde7b65f8L72-R85)). - [![Build Status](https://github.com/Hipo/drf-extra-fields/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/Hipo/drf-extra-fields/actions) [![codecov](https://codecov.io/gh/Hipo/drf-extra-fields/branch/master/graph/badge.svg)](https://codecov.io/gh/Hipo/drf-extra-fields) [![PyPI Version](https://img.shields.io/pypi/v/drf-extra-fields.svg)](https://pypi.org/project/drf-extra-fields) [![Python Versions](https://img.shields.io/pypi/pyversions/drf-extra-fields.svg)](https://pypi.org/project/drf-extra-fields) +Latest Changes +============== + +- **v3.2.0** + - Support for Python 3.5 is ended. + - Python 3.9 and 3.10 are now supported. + - Django 3.2 is now supported. +- **v3.1.1** + - `psycopg2` dependency is made optional. +- **v3.1.0** + - **Possible Breaking Change**: + - In this version we have changed file class used in `Base64FileField` from `ContentFile` to `SimpleUploadedFile` (you may see the change [here](https://github.com/Hipo/drf-extra-fields/pull/149/files#diff-5f77bcb61083cd9c026f6dfb3b77bf8fa824c45e620cdb7826ad713bde7b65f8L72-R85)). + Usage ================ From 6f4035abed76b79a205d0daf0b330e17a332349d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Abac=C4=B1?= Date: Wed, 27 Oct 2021 18:12:13 +0300 Subject: [PATCH 12/13] Update unused Python 3.5 references --- Dockerfile | 7 +++---- setup.py | 3 +-- tox.ini | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index b5b7b36..278e4a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,15 @@ -FROM ubuntu:18.04 - -MAINTAINER Marco Chiappetta +FROM ubuntu:latest # Needed to be able to install python versions. RUN apt-get update && apt-get install -y software-properties-common RUN add-apt-repository ppa:deadsnakes/ppa RUN apt-get update && apt-get install -y \ - python3.5 \ python3.6 \ python3.7 \ python3.8 \ + python3.9 \ + python3.10 \ gdal-bin \ python3-pip diff --git a/setup.py b/setup.py index 6f6293c..d3acdd3 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ author='hipo', author_email='pypi@hipolabs.com', url='https://github.com/Hipo/drf-extra-fields', - python_requires=">=3.5", + python_requires=">3.6", install_requires=requirements, classifiers=[ 'Environment :: Web Environment', @@ -37,7 +37,6 @@ 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', diff --git a/tox.ini b/tox.ini index 656c236..5cb1011 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,5 @@ [gh-actions] python = - 3.5: py35 3.6: py36 3.7: py37 3.8: py38 From 9c65cc4fb8de5b7a7cce82052e4944dfdb2d2a4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Abac=C4=B1?= Date: Wed, 27 Oct 2021 18:12:24 +0300 Subject: [PATCH 13/13] Add helper bash script to run development --- README.md | 3 +-- tools/run_development.sh | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 tools/run_development.sh diff --git a/README.md b/README.md index bfb83fd..ad2f8da 100644 --- a/README.md +++ b/README.md @@ -452,8 +452,7 @@ $ tox Or, if you prefer using Docker (recommended): ```bash -docker build -t drf_extra_fields . -docker run -v $(pwd):/app -it drf_extra_fields /bin/bash +source tools/run_development.sh tox ``` diff --git a/tools/run_development.sh b/tools/run_development.sh new file mode 100644 index 0000000..5637f16 --- /dev/null +++ b/tools/run_development.sh @@ -0,0 +1,2 @@ +docker build -t drf_extra_fields . +docker run -v $(pwd):/app -it drf_extra_fields /bin/bash \ No newline at end of file