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

Drop support for Python 3.8 and lower #46

Merged
merged 1 commit into from
Sep 24, 2024
Merged
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
12 changes: 9 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9']
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- 'pypy-3.9'
- 'pypy-3.10'
os: [ubuntu-latest] #, windows-latest, macos-latest]

name: ${{ matrix.os }} - ${{ matrix.python-version }}
Expand Down Expand Up @@ -49,7 +55,7 @@ jobs:
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -68,7 +74,7 @@ jobs:
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.12"
- name: Install dependencies
run: pip install twine
- uses: actions/download-artifact@v4
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `flask-compress` will be documented in this file.

## Unreleased

- Drop support for Python 3.8 and lower.

## 1.15 (2024-04-24)

- Add support of Zstandard compression.
Expand Down
13 changes: 0 additions & 13 deletions flask_compress/flask_compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Copyright (c) 2013-2017 William Fagan
# License: The MIT License (MIT)

import sys
import functools
from gzip import GzipFile
import zlib
Expand All @@ -21,18 +20,6 @@
from flask import request, after_this_request, current_app


if sys.version_info[:2] == (2, 6):
class GzipFile(GzipFile):
""" Backport of context manager support for python 2.6"""
def __enter__(self):
if self.fileobj is None:
raise ValueError("I/O operation on closed GzipFile object")
return self

def __exit__(self, *args):
self.close()


class DictCache(object):

def __init__(self):
Expand Down
12 changes: 4 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
packages=find_packages(exclude=['tests']),
zip_safe=False,
include_package_data=True,
platforms='any',
python_requires='>=3.9',
install_requires=[
'flask',
"brotli; platform_python_implementation!='PyPy'",
Expand All @@ -32,14 +32,10 @@
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'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',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[tox]
isolated_build = True
skip_missing_interpreters = true
envlist = py27,py35,py36,py37,py38,py39,py310,py311,py312,pypy2,pypy3
envlist =
py{39, 310, 311, 312}
pypy{39, 310}

[testenv]
package = wheel
Expand Down