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

fix!: drop support for Django<3.2 #108

Merged
merged 1 commit into from
Apr 28, 2023
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
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ jobs:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [django22, django30, django31, django32, quality,
csslint, eslint, translations_validate]
toxenv: [django32, quality, csslint, eslint, translations_validate]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## Version 3.0.0
* Removed Support for Django 2.2, 3.0 and 3.1

## Version 2.1.0
* Added support for Django 3.0, 3.1 and 3.2

Expand Down
2 changes: 2 additions & 0 deletions freetextresponse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
Instructors can specify a list of phrases, of which one must be
present in order for the student to receive credit.
"""

__version__ = "3.0.0"
21 changes: 15 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,25 @@

from setuptools import setup

version = '2.1.1'
description = __doc__.strip().split('\n')[0]
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.rst')) as file_in:
long_description = file_in.read()


def get_version(*file_paths):
"""
Extract the version string from the file at the given relative path fragments.
"""
filename = os.path.join(os.path.dirname(__file__), *file_paths)
version_file = open(filename, encoding="utf8").read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError('Unable to find version string.')


def package_data(pkg, roots):
"""
Generic function to find package_data.
Expand Down Expand Up @@ -94,10 +106,11 @@ def is_requirement(line):

return line and line.strip() and not line.startswith(('-r', '#', '-e', 'git+', '-c'))

VERSION = get_version('freetextresponse', '__init__.py')

setup(
name='xblock-free-text-response',
version=version,
version=VERSION,
description=description,
long_description=long_description,
author='stv',
Expand Down Expand Up @@ -133,12 +146,8 @@ def is_requirement(line):
'Operating System :: OS Independent',
'Programming Language :: JavaScript',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.8',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Framework :: Django :: 3.2',
'Topic :: Education',
'Topic :: Internet :: WWW/HTTP',
Expand Down
5 changes: 1 addition & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
[tox]
envlist = csslint,eslint,pycodestyle,pylint,py38-django{22,30,31,32}, translations_validate
envlist = csslint,eslint,pycodestyle,pylint,py38-django{32}, translations_validate

[testenv]
usedevelop = True
deps =
django22: Django>=2.2,<2.3
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
django32: Django>=3.2,<4.0
-rrequirements/test.txt
commands =
Expand Down