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

Add support for python 3.12 #159

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
python-version: ["3.8"]
python-version: ["3.8", "3.12"]
toxenv:
[
quality,
docs,
pii_check,
django32-celery53,
django42-celery53,
]

Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ Change Log

.. There should always be an "Unreleased" section for changes pending release.

Unreleased
[1.1.0] - Unreleased
~~~~~~~~~~~~~~~~~~~~

* Added support for python 3.12.


[1.0.2] - 2023-06-14
Expand Down
2 changes: 1 addition & 1 deletion bulk_grades/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Support for bulk scoring and grading.
"""

__version__ = '1.0.2'
__version__ = '1.1.0'

default_app_config = 'bulk_grades.apps.BulkGradesConfig' # pylint: disable=invalid-name
3 changes: 2 additions & 1 deletion bulk_grades/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def get(self, request, course_id, *args, **kwargs):
filename = self.get_export_filename(course_id)

response = StreamingHttpResponse(iterator, content_type='text/csv')
response['Content-Disposition'] = f'attachment; filename="{filename}"'
response_content = 'attachment;'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reference for this change ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement was raising pylint error Multiple statements on one line (semicolon) (E702)

response['Content-Disposition'] = f'{response_content} filename="{filename}"'

log.info('Exporting %s CSV for %s', course_id, self.__class__)
return response
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ amqp==5.1.1
# via kombu
asgiref==3.7.2
# via django
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1; python_version < '3.9'
# via
# celery
# kombu
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ astroid==2.15.6
# -r requirements/quality.txt
# pylint
# pylint-celery
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1; python_version < '3.9'
# via
# -r requirements/quality.txt
# backports-zoneinfo
Expand Down
2 changes: 1 addition & 1 deletion requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ babel==2.12.1
# via
# pydata-sphinx-theme
# sphinx
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1; python_version < '3.9'
# via
# -r requirements/test.txt
# backports-zoneinfo
Expand Down
2 changes: 1 addition & 1 deletion requirements/pii_check.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ asgiref==3.7.2
# via
# -r requirements/base.txt
# django
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1; python_version < '3.9'
# via
# -r requirements/base.txt
# backports-zoneinfo
Expand Down
6 changes: 3 additions & 3 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#
# make upgrade
#
wheel==0.36.2
wheel==0.42.0
# via -r requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
pip==21.2.1
pip==24.0
# via -r requirements/pip.in
setuptools==57.4.0
setuptools==69.1.0
# via -r requirements/pip.in
2 changes: 1 addition & 1 deletion requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ astroid==2.15.6
# via
# pylint
# pylint-celery
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1; python_version < '3.9'
# via
# -r requirements/test.txt
# backports-zoneinfo
Expand Down
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ asgiref==3.7.2
# via
# -r requirements/base.txt
# django
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1; python_version < '3.9'
# via
# -r requirements/base.txt
# backports-zoneinfo
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,13 @@ def is_requirement(line):
classifiers=[
'Development Status :: 3 - Alpha',
'Framework :: Django',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
'Framework :: Django :: 4.2',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.12',
],
entry_points={
'lms.djangoapp': [
Expand Down
9 changes: 7 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{32,42}-celery{53},quality,docs,pii_check
envlist = py{38,312}-django{42}-celery{53},quality,docs,pii_check

[pytest]
DJANGO_SETTINGS_MODULE = test_settings
Expand All @@ -10,8 +10,8 @@ norecursedirs = .* docs requirements site-packages
setenv =
PYTHONPATH = {toxinidir}/mock_apps/
deps =
setuptools
-r{toxinidir}/requirements/test.txt
django32: Django>=3.2,<4.0
django42: Django>=4.2,<4.3
celery53: -r{toxinidir}/requirements/celery53.txt
commands =
Expand All @@ -25,6 +25,8 @@ allowlist_externals =
make
rm
deps =
setuptools
wheel
-r{toxinidir}/requirements/doc.txt
commands =
doc8 --ignore-path docs/_build README.rst docs
Expand All @@ -44,6 +46,8 @@ allowlist_externals =
rm
touch
deps =
setuptools
wheel
-r{toxinidir}/requirements/quality.txt
commands =
touch tests/__init__.py
Expand All @@ -58,6 +62,7 @@ setenv =
DJANGO_SETTINGS_MODULE = test_settings
PYTHONPATH = {toxinidir}/mock_apps/
deps =
setuptools
-r{toxinidir}/requirements/pii_check.txt
commands =
code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage
Expand Down
Loading