From 4f83a1529537d8afacc3bdbcb098ca321a0af8c5 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 14 Jun 2021 16:59:52 +0200 Subject: [PATCH 01/17] Simplify GitHub Actions --- .github/workflows/ci.yaml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 895ad48..cb61122 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,6 +14,7 @@ jobs: python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3] runs-on: ubuntu-latest + name: ${{ matrix.os }} - Python ${{ matrix.python-version }} steps: - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" uses: actions/checkout@v2 @@ -24,13 +25,6 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install tox -r requirements.txt; - - name: Test with pytest - env: - PYTHON_VERSION: ${{ matrix.python-version }} - run: | - # Remove . from python version - ENV_NAME="${PYTHON_VERSION/./}" - # Add "py" suffix for plain python version - [[ ${ENV_NAME} =~ ^[0-9]+$ ]] && ENV_NAME="py${ENV_NAME}" - tox -e "${ENV_NAME}" + pip install tox + - name: Test with tox + run: tox -e py From 69083c52c91d359917f86321094205bc820998f6 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 14 Jun 2021 17:08:40 +0200 Subject: [PATCH 02/17] Remove obsolete badges, and add new ones --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 59570fb..e12a657 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # Flask-Compress +[![Build](https://github.com/colour-science/flask-compress/actions/workflows/ci.yaml/badge.svg)](https://github.com/colour-science/flask-compress/actions/workflows/ci.yaml) [![Version](https://img.shields.io/pypi/v/flask-compress.svg)](https://pypi.python.org/pypi/Flask-Compress) -[![Build Status](https://travis-ci.org/libwilliam/flask-compress.png)](https://travis-ci.org/libwilliam/flask-compress) -[![Coverage](https://coveralls.io/repos/libwilliam/flask-compress/badge.svg)](https://coveralls.io/github/libwilliam/flask-compress) -[![License](https://img.shields.io/pypi/l/flask-compress.svg)](https://github.com/libwilliam/flask-compress/blob/master/LICENSE.txt) +[![Downloads](https://pypip.in/d/Flask-Compress/badge.png)](https://pypi.python.org/pypi/Flask-Compress) Flask-Compress allows you to easily compress your [Flask](http://flask.pocoo.org/) application's responses with gzip, deflate or brotli. From 9ad250a1410d6d9c5e99ec1e449c3371f1ffb6b2 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 14 Jun 2021 17:16:11 +0200 Subject: [PATCH 03/17] Use setuptools_scm to manage versions --- pyproject.toml | 3 +++ setup.py | 2 +- tox.ini | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..cc6f2c6 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index 2e05c65..9316326 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='Flask-Compress', - version='1.9.0', + use_scm_version=True, url='https://github.com/colour-science/flask-compress', license='MIT', author='Thomas Mansencal', diff --git a/tox.ini b/tox.ini index 57635a8..2fae25a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,4 +1,5 @@ [tox] +isolated_build = True skip_missing_interpreters = true envlist = py27,py35,py36,py37,py38,py39,pypy2,pypy3 From 2d4b947cd35cddf31ed07921c8a7aae6fc642b24 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 14 Jun 2021 17:18:42 +0200 Subject: [PATCH 04/17] Update GitHub Actions to build the packages --- .github/workflows/ci.yaml | 68 +++++++++++++++++++++++++++++++-------- 1 file changed, 54 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cb61122..d9a6790 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,24 +7,64 @@ on: branches: [ master ] jobs: - build: + test: strategy: fail-fast: false matrix: python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3] runs-on: ubuntu-latest - name: ${{ matrix.os }} - Python ${{ matrix.python-version }} + name: Python ${{ matrix.python-version }} steps: - - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" - 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 - - name: Test with tox - run: tox -e py + - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" + 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 + - name: Test with tox + run: tox -e py + + dist: + runs-on: ubuntu-latest + needs: [test] + name: Build Python packages + steps: + - uses: actions/checkout@v2 + - name: Get history and tags for SCM versioning to work + run: | + git fetch --prune --unshallow + git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - uses: actions/setup-python@v2 + with: + python-version: "3.8" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --upgrade wheel setuptools build + - name: Build package + run: python -m build -s -w -o dist/ + - uses: actions/upload-artifact@v2 + with: + name: dist + path: dist + + dist_check: + runs-on: ubuntu-latest + needs: [dist] + name: Twine check + steps: + - uses: actions/setup-python@v2 + with: + python-version: "3.8" + - name: Install dependencies + run: pip install twine + - uses: actions/download-artifact@v2 + with: + name: dist + path: dist + - run: twine check dist/* From 07239ad643b0b3a16b874c0e98447881c79cfe8a Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 14 Jun 2021 17:26:13 +0200 Subject: [PATCH 05/17] Trigger GitHub Action on tags, and fix missing tags when cloning --- .github/workflows/ci.yaml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d9a6790..9f4ad0f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,24 +1,29 @@ name: Unit tests on: - push: - branches: [ master ] pull_request: - branches: [ master ] + push: + branches: + - master + tags: + - "v*" jobs: test: + runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3] - runs-on: ubuntu-latest name: Python ${{ matrix.python-version }} steps: - - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" - uses: actions/checkout@v2 - - name: Set up Python - ${{ matrix.python-version }} + - uses: actions/checkout@v2 + - name: Get history and tags for SCM versioning to work + run: | + git fetch --prune --unshallow + git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} From af2f16335279044e8baeab42e0b182d3e05861b4 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 14 Jun 2021 17:50:28 +0200 Subject: [PATCH 06/17] Create an actual package, for easier distribution --- flask_compress/__init__.py | 1 + flask_compress.py => flask_compress/flask_compress.py | 0 setup.py | 6 +++--- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 flask_compress/__init__.py rename flask_compress.py => flask_compress/flask_compress.py (100%) diff --git a/flask_compress/__init__.py b/flask_compress/__init__.py new file mode 100644 index 0000000..c1b168b --- /dev/null +++ b/flask_compress/__init__.py @@ -0,0 +1 @@ +from .flask_compress import Compress diff --git a/flask_compress.py b/flask_compress/flask_compress.py similarity index 100% rename from flask_compress.py rename to flask_compress/flask_compress.py diff --git a/setup.py b/setup.py index 9316326..b4aef13 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,9 @@ -import setuptools +from setuptools import setup, find_packages with open('README.md') as fl: LONG_DESCRIPTION = fl.read() -setuptools.setup( +setup( name='Flask-Compress', use_scm_version=True, url='https://github.com/colour-science/flask-compress', @@ -13,7 +13,7 @@ description='Compress responses in your Flask app with gzip, deflate or brotli.', long_description=LONG_DESCRIPTION, long_description_content_type='text/markdown', - py_modules=['flask_compress'], + packages=find_packages(), zip_safe=False, include_package_data=True, platforms='any', From cd7411943ca14e311c5c0b563b797e87c504a9e3 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 14 Jun 2021 17:51:29 +0200 Subject: [PATCH 07/17] Remove unused files --- index.html | 132 ----------------------------------------------- params.json | 6 --- requirements.txt | 2 - 3 files changed, 140 deletions(-) delete mode 100644 index.html delete mode 100644 params.json delete mode 100644 requirements.txt diff --git a/index.html b/index.html deleted file mode 100644 index a8212cf..0000000 --- a/index.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - Flask-Compress by libwilliam - - - - - - - -
-
-

Flask-Compress

-

Compress responses in your Flask app with gzip.

- -

View the Project on GitHub libwilliam/flask-compress

- - - -
-
-

-Flask-Compress

- -

Version -Build Status -Coverage -License

- -

Flask-Compress allows you to easily compress your Flask application's responses with gzip.

- -

The preferred solution is to have a server (like Nginx) automatically compress the static files for you. If you don't have that option Flask-Compress will solve the problem for you.

- -

-How it works

- -

Flask-Compress both adds the various headers required for a compressed response and gzips the response data. This makes serving gzip compressed static files extremely easy.

- -

Internally, every time a request is made the extension will check if it matches one of the compressible MIME types and will automatically attach the appropriate headers.

- -

-Installation

- -

If you use pip then installation is simply:

- -
$ pip install flask-compress
- -

or, if you want the latest github version:

- -
$ pip install git+git://github.com/libwilliam/flask-compress.git
- -

You can also install Flask-Compress via Easy Install:

- -
$ easy_install flask-compress
- -

-Using Flask-Compress

- -

Flask-Compress is incredibly simple to use. In order to start gzip'ing your Flask application's assets, the first thing to do is let Flask-Compress know about your flask.Flask application object.

- -
from flask import Flask
-from flask_compress import Compress
-
-app = Flask(__name__)
-Compress(app)
- -

In many cases, however, one cannot expect a Flask instance to be ready at import time, and a common pattern is to return a Flask instance from within a function only after other configuration details have been taken care of. In these cases, Flask-Compress provides a simple function, flask_compress.Compress.init_app, which takes your application as an argument.

- -
from flask import Flask
-from flask_compress import Compress
-
-compress = Compress()
-
-def start_app():
-    app = Flask(__name__)
-    compress.init_app(app)
-    return app
- -

In terms of automatically compressing your assets using gzip, passing your flask.Flask object to the flask_compress.Compress object is all that needs to be done.

- -

-Options

- -

Within your Flask application's settings you can provide the following settings to control the behavior of Flask-Compress. None of the settings are required.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionDescriptionDefault
COMPRESS_MIMETYPESSet the list of mimetypes to compress here. -[
'text/html',
'text/css',
'text/xml',
'application/json',
'application/javascript'
] -
COMPRESS_LEVELSpecifies the gzip compression level.6
COMPRESS_MIN_SIZESpecifies the minimum file size threshold for compressing files.500
-
- -
- - - - diff --git a/params.json b/params.json deleted file mode 100644 index 0f6178f..0000000 --- a/params.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Flask-Compress", - "tagline": "Compress responses in your Flask app with gzip.", - "body": "# Flask-Compress\r\n\r\n[![Version](https://img.shields.io/pypi/v/flask-compress.svg)](https://pypi.python.org/pypi/Flask-Compress)\r\n[![Build Status](https://travis-ci.org/libwilliam/flask-compress.png)](https://travis-ci.org/libwilliam/flask-compress)\r\n[![Coverage](https://coveralls.io/repos/libwilliam/flask-compress/badge.svg)](https://coveralls.io/github/libwilliam/flask-compress)\r\n[![License](https://img.shields.io/pypi/l/flask-compress.svg)](https://github.com/libwilliam/flask-compress/blob/master/LICENSE.txt)\r\n\r\nFlask-Compress allows you to easily compress your [Flask](http://flask.pocoo.org/) application's responses with gzip.\r\n\r\nThe preferred solution is to have a server (like [Nginx](http://wiki.nginx.org/Main)) automatically compress the static files for you. If you don't have that option Flask-Compress will solve the problem for you.\r\n\r\n\r\n## How it works\r\n\r\nFlask-Compress both adds the various headers required for a compressed response and gzips the response data. This makes serving gzip compressed static files extremely easy.\r\n\r\nInternally, every time a request is made the extension will check if it matches one of the compressible MIME types and will automatically attach the appropriate headers.\r\n\r\n\r\n## Installation\r\n\r\nIf you use pip then installation is simply:\r\n\r\n```shell\r\n$ pip install flask-compress\r\n```\r\n\r\nor, if you want the latest github version:\r\n\r\n```shell\r\n$ pip install git+git://github.com/libwilliam/flask-compress.git\r\n```\r\n\r\nYou can also install Flask-Compress via Easy Install:\r\n\r\n```shell\r\n$ easy_install flask-compress\r\n```\r\n\r\n\r\n## Using Flask-Compress\r\n\r\nFlask-Compress is incredibly simple to use. In order to start gzip'ing your Flask application's assets, the first thing to do is let Flask-Compress know about your [`flask.Flask`](http://flask.pocoo.org/docs/latest/api/#flask.Flask) application object.\r\n\r\n```python\r\nfrom flask import Flask\r\nfrom flask_compress import Compress\r\n\r\napp = Flask(__name__)\r\nCompress(app)\r\n```\r\n\r\nIn many cases, however, one cannot expect a Flask instance to be ready at import time, and a common pattern is to return a Flask instance from within a function only after other configuration details have been taken care of. In these cases, Flask-Compress provides a simple function, `flask_compress.Compress.init_app`, which takes your application as an argument.\r\n\r\n```python\r\nfrom flask import Flask\r\nfrom flask_compress import Compress\r\n\r\ncompress = Compress()\r\n\r\ndef start_app():\r\n\tapp = Flask(__name__)\r\n compress.init_app(app)\r\n return app\r\n```\r\n\r\nIn terms of automatically compressing your assets using gzip, passing your [`flask.Flask`](http://flask.pocoo.org/docs/latest/api/#flask.Flask) object to the `flask_compress.Compress` object is all that needs to be done.\r\n\r\n\r\n## Options\r\n\r\nWithin your Flask application's settings you can provide the following settings to control the behavior of Flask-Compress. None of the settings are required.\r\n\r\n| Option | Description | Default |\r\n| ------ | ----------- | ------- |\r\n| `COMPRESS_MIMETYPES` | Set the list of mimetypes to compress here. | `[`
`'text/html',`
`'text/css',`
`'text/xml',`
`'application/json',`
`'application/javascript'`
`]` |\r\n| `COMPRESS_LEVEL` | Specifies the gzip compression level. | `6` |\r\n| `COMPRESS_MIN_SIZE` | Specifies the minimum file size threshold for compressing files. | `500` |\r\n", - "note": "Don't delete this file! It's used internally to help with page regeneration." -} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 1893345..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -flask -brotli From 1e16067ce11739abbbe7c09debaeebe3b8938ea1 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 14 Jun 2021 18:08:32 +0200 Subject: [PATCH 08/17] Use setuptools_scm to write __version__ file --- .gitignore | 2 ++ flask_compress/__init__.py | 8 ++++++++ pyproject.toml | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/.gitignore b/.gitignore index 77a95a1..a57a25f 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ venv* /.tox /.cache /.pytest_cache +# Generated by setuptools_scm +flask_compress/_version.py diff --git a/flask_compress/__init__.py b/flask_compress/__init__.py index c1b168b..0a643ec 100644 --- a/flask_compress/__init__.py +++ b/flask_compress/__init__.py @@ -1 +1,9 @@ from .flask_compress import Compress + +# _version.py is generated by setuptools_scm when building the package, it is not versioned. +# If missing, this means that the imported code was most likely the git repository, that was +# installed without the "editable" mode. +try: + from ._version import __version__ +except ImportError: + __version__ = "0" diff --git a/pyproject.toml b/pyproject.toml index cc6f2c6..1c9f2ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,7 @@ [build-system] requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"] build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] +write_to = "flask_compress/_version.py" +write_to_template = "__version__ = \"{version}\"\n" From 1fea73fdefa91ce9a256e71207d0ce676da7b6bd Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 14 Jun 2021 18:09:07 +0200 Subject: [PATCH 09/17] setuptools_scm makes MANIFEST.in redundant, since all versioned files are included --- MANIFEST.in | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index f5458f8..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,4 +0,0 @@ -include LICENSE.txt -include README.md -recursive-include tests * -recursive-exclude tests *.pyc From beffcfed229cc1568048f84f61735c872c75b0fb Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 14 Jun 2021 18:14:53 +0200 Subject: [PATCH 10/17] Remove assets that look unused --- javascripts/scale.fix.js | 17 -- stylesheets/github-light.css | 124 -------------- stylesheets/styles.css | 324 ----------------------------------- 3 files changed, 465 deletions(-) delete mode 100644 javascripts/scale.fix.js delete mode 100644 stylesheets/github-light.css delete mode 100644 stylesheets/styles.css diff --git a/javascripts/scale.fix.js b/javascripts/scale.fix.js deleted file mode 100644 index 87a40ca..0000000 --- a/javascripts/scale.fix.js +++ /dev/null @@ -1,17 +0,0 @@ -var metas = document.getElementsByTagName('meta'); -var i; -if (navigator.userAgent.match(/iPhone/i)) { - for (i=0; i Date: Mon, 14 Jun 2021 18:26:50 +0200 Subject: [PATCH 11/17] Update CHANGELOG --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7e3b00..519dc94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to `flask-compress` will be documented in this file. +## 1.10 (development) + +- Improve GitHub Actions +- The layout is now an actual package rather than a single module +- Use `setuptools_scm` to manage packaging +- Clean up unused files + ## 1.9.0 (2021-02-12) - Add support for the `identity` value in *accept-encoding*, fixes [#19](https://github.com/colour-science/flask-compress/issues/19) From 289a8dd74fd497eacce77ce618ae502ecb7907cd Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 14 Jun 2021 18:37:25 +0200 Subject: [PATCH 12/17] Automate the release process with GitHub Actions --- .github/workflows/ci.yaml | 16 ++++++++++++++++ CHANGELOG.md | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9f4ad0f..e8a32e4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -73,3 +73,19 @@ jobs: name: dist path: dist - run: twine check dist/* + + dist_upload: + runs-on: ubuntu-latest + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + needs: [dist_check] + name: PyPI upload + steps: + - uses: actions/download-artifact@v2 + with: + name: dist + path: dist + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 519dc94..d7513d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,9 @@ All notable changes to `flask-compress` will be documented in this file. ## 1.10 (development) -- Improve GitHub Actions +- Automate the release process with GitHub Actions +- Use `setuptools_scm` to manage package versions - The layout is now an actual package rather than a single module -- Use `setuptools_scm` to manage packaging - Clean up unused files ## 1.9.0 (2021-02-12) From 675900136c6efc3b5972f139f53940ea1445d453 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 15 Jun 2021 13:36:14 +0200 Subject: [PATCH 13/17] Fix token name in GitHub Actions --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e8a32e4..b8ab3b2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -88,4 +88,4 @@ jobs: uses: pypa/gh-action-pypi-publish@master with: user: __token__ - password: ${{ secrets.PYPI_TOKEN }} + password: ${{ secrets.PYPI_API_TOKEN }} From 9e439c41d86c895af57d081e237de400945f2769 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 15 Jun 2021 13:37:24 +0200 Subject: [PATCH 14/17] Bump to version 1.10.0 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7513d6..89a2baf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to `flask-compress` will be documented in this file. -## 1.10 (development) +## 1.10.0 (2021-06-15) - Automate the release process with GitHub Actions - Use `setuptools_scm` to manage package versions From e560756259e3b016e02e71297aa7d6a2e807c0f1 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 15 Jun 2021 16:08:59 +0200 Subject: [PATCH 15/17] Now that the repo has been de-forked, add a mention of Flask-gzip in the README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e12a657..a671e21 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Version](https://img.shields.io/pypi/v/flask-compress.svg)](https://pypi.python.org/pypi/Flask-Compress) [![Downloads](https://pypip.in/d/Flask-Compress/badge.png)](https://pypi.python.org/pypi/Flask-Compress) -Flask-Compress allows you to easily compress your [Flask](http://flask.pocoo.org/) application's responses with gzip, deflate or brotli. +Flask-Compress allows you to easily compress your [Flask](http://flask.pocoo.org/) application's responses with gzip, deflate or brotli. It originally started as a fork of [Flask-gzip](https://github.com/closeio/Flask-gzip). The preferred solution is to have a server (like [Nginx](http://wiki.nginx.org/Main)) automatically compress the static files for you. If you don't have that option Flask-Compress will solve the problem for you. From 293fa7f99954405ad102e5ce34a79493cf9271a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 15 Jun 2021 23:25:03 +0200 Subject: [PATCH 16/17] Do not install top-level "tests" package Fixes a regression in af2f16335279044e8baeab42e0b182d3e05861b4 that causes "tests" to be installed as a top-level package to site-packages. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b4aef13..afbe57a 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ description='Compress responses in your Flask app with gzip, deflate or brotli.', long_description=LONG_DESCRIPTION, long_description_content_type='text/markdown', - packages=find_packages(), + packages=find_packages(exclude=['tests']), zip_safe=False, include_package_data=True, platforms='any', From 30fe5575f0a2a52f406006ac73c57f6299d97a53 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 16 Jun 2021 10:16:59 +0200 Subject: [PATCH 17/17] tests directory has no reason to be a package --- setup.py | 1 - tests/__init__.py | 0 2 files changed, 1 deletion(-) delete mode 100644 tests/__init__.py diff --git a/setup.py b/setup.py index afbe57a..f40d50d 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,6 @@ 'flask', 'brotli' ], - test_suite='tests', classifiers=[ 'Environment :: Web Environment', 'Intended Audience :: Developers', diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index e69de29..0000000