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

feat: add python311 support #189

Merged
merged 1 commit into from
Mar 29, 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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [quality, django32, django42, check_keywords]
python-version: ['3.8', '3.11']
toxenv: [quality, django42, check_keywords]
steps:
- uses: actions/checkout@v4
- name: setup python
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Change Log

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

[2.4.0] - 2024-03-29
====================

* Added support for Python 3.11
* Dropped support for Django 3.2, Django 4.0 and Django 4.1

[2.3.0] - 2023-08-02
====================

Expand Down
2 changes: 1 addition & 1 deletion help_tokens/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

from .context_processor import context_processor

__version__ = '2.3.1'
__version__ = '2.4.0'
2 changes: 1 addition & 1 deletion help_tokens/context_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def _get_online_help_info(token=None):

def context_processor(request):
"""
The help-tokens context processor.
help-tokens context processor.

The odd structure of the return is to maintain compatibility with the way
edx-platform uses it.
Expand Down
14 changes: 8 additions & 6 deletions help_tokens/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ def get_config_value(self, section_name, option, default_option="default"):
"""
Read a value from the configuration, with a default.

Args:
section_name (str): name of the section in the configuration from which
Args
----
section_name (str): Name of the section in the configuration from which
the option should be found.
option (str): name of the configuration option.
default_option (str): name of the default configuration option whose
option (str): Name of the configuration option.
default_option (str): Name of the default configuration option whose
value should be returned if the requested option is not found.

Returns:
str: the value from the ini file.
Returns
-------
str: The value from the ini file.

"""
if self.config is None:
Expand Down
23 changes: 17 additions & 6 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
#
# This file is autogenerated by pip-compile
# To update, run:
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --output-file requirements/base.txt requirements/base.in
# pip-compile --output-file=requirements/base.txt requirements/base.in
#
django==1.11
pytz==2017.2 # via django
six==1.10.0
asgiref==3.8.1
# via django
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# django
django==4.2.11
# via
# -c requirements/common_constraints.txt
# -r requirements/base.in
sqlparse==0.4.4
# via django
typing-extensions==4.10.0
# via asgiref
8 changes: 4 additions & 4 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ codecov==2.1.13
# via -r requirements/ci.in
colorama==0.4.6
# via tox
coverage==7.4.3
coverage==7.4.4
# via codecov
distlib==0.3.8
# via virtualenv
filelock==3.13.1
filelock==3.13.3
# via
# tox
# virtualenv
idna==3.6
# via requests
packaging==23.2
packaging==24.0
# via
# pyproject-api
# tox
Expand All @@ -44,7 +44,7 @@ tomli==2.0.1
# via
# pyproject-api
# tox
tox==4.13.0
tox==4.14.2
# via -r requirements/ci.in
urllib3==2.2.1
# via requests
Expand Down
11 changes: 10 additions & 1 deletion requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@


# using LTS django version
Django<4.0
Django<5.0

# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process.
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
elasticsearch<7.14.0

# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected
django-simple-history==3.0.0

# opentelemetry requires version 6.x at the moment:
# https://github.com/open-telemetry/opentelemetry-python/issues/3570
# Normally this could be added as a constraint in edx-django-utils, where we're
# adding the opentelemetry dependency. However, when we compile pip-tools.txt,
# that uses version 7.x, and then there's no undoing that when compiling base.txt.
# So we need to pin it globally, for now.
# Ticket for unpinning: https://github.com/openedx/edx-lint/issues/407
importlib-metadata<7
3 changes: 3 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@

# This file contains all common constraints for edx-repos
-c common_constraints.txt

# For python greater than or equal to 3.9 backports.zoneinfo causing failures
backports.zoneinfo; python_version<'3.9'
61 changes: 30 additions & 31 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@
#
# make upgrade
#
asgiref==3.7.2
asgiref==3.8.1
# via django
astroid==3.1.0
# via
# pylint
# pylint-celery
build==1.0.3
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# django
build==1.2.1
# via -r requirements/quality.in
cachetools==5.3.3
# via tox
certifi==2024.2.2
# via requests
cffi==1.16.0
# via cryptography
chardet==5.2.0
# via
# diff-cover
Expand All @@ -31,19 +33,17 @@ click==8.1.7
# edx-lint
click-log==0.4.0
# via edx-lint
code-annotations==1.6.0
code-annotations==1.7.0
# via edx-lint
colorama==0.4.6
# via tox
cryptography==42.0.5
# via secretstorage
diff-cover==8.0.3
# via -r requirements/dev.in
dill==0.3.8
# via pylint
distlib==0.3.8
# via virtualenv
django==3.2.24
django==4.2.11
# via
# -c requirements/common_constraints.txt
# -r requirements/base.in
Expand All @@ -56,34 +56,35 @@ edx-lint==5.3.6
# via
# -r requirements/dev.in
# -r requirements/quality.in
filelock==3.13.1
filelock==3.13.3
# via
# tox
# virtualenv
idna==3.6
# via requests
importlib-metadata==7.0.1
importlib-metadata==6.11.0
# via
# -c requirements/common_constraints.txt
# build
# keyring
# twine
importlib-resources==6.1.2
importlib-resources==6.4.0
# via keyring
isort==5.13.2
# via
# -r requirements/quality.in
# pylint
jaraco-classes==3.3.1
# via keyring
jeepney==0.8.0
# via
# keyring
# secretstorage
jaraco-context==4.3.0
# via keyring
jaraco-functools==4.0.0
# via keyring
jinja2==3.1.3
# via
# code-annotations
# diff-cover
keyring==24.3.1
keyring==25.0.0
# via twine
lxml==5.1.0
# via edx-i18n-tools
Expand All @@ -96,10 +97,12 @@ mccabe==0.7.0
mdurl==0.1.2
# via markdown-it-py
more-itertools==10.2.0
# via jaraco-classes
nh3==0.2.15
# via
# jaraco-classes
# jaraco-functools
nh3==0.2.17
# via readme-renderer
packaging==23.2
packaging==24.0
# via
# build
# pyproject-api
Expand All @@ -108,7 +111,7 @@ path==16.10.0
# via edx-i18n-tools
pbr==6.0.0
# via stevedore
pkginfo==1.9.6
pkginfo==1.10.0
# via twine
platformdirs==4.2.0
# via
Expand All @@ -123,9 +126,7 @@ polib==1.2.0
# via edx-i18n-tools
pycodestyle==2.11.1
# via -r requirements/quality.in
pycparser==2.21
# via cffi
pydocstyle==1.1.1
pydocstyle==6.3.0
# via -r requirements/quality.in
pygments==2.17.2
# via
Expand All @@ -152,8 +153,6 @@ pyproject-hooks==1.0.0
# via build
python-slugify==8.0.4
# via code-annotations
pytz==2024.1
# via django
pyyaml==6.0.1
# via
# code-annotations
Expand All @@ -168,12 +167,12 @@ requests-toolbelt==1.0.0
# via twine
rfc3986==2.0.0
# via twine
rich==13.7.0
rich==13.7.1
# via twine
secretstorage==3.3.3
# via keyring
six==1.16.0
# via edx-lint
snowballstemmer==2.2.0
# via pydocstyle
sqlparse==0.4.4
# via django
stevedore==5.2.0
Expand All @@ -189,7 +188,7 @@ tomli==2.0.1
# tox
tomlkit==0.12.4
# via pylint
tox==4.13.0
tox==4.14.2
# via -r requirements/dev.in
twine==5.0.0
# via
Expand All @@ -207,9 +206,9 @@ urllib3==2.2.1
# twine
virtualenv==20.25.1
# via tox
wheel==0.42.0
wheel==0.43.0
# via -r requirements/dev.in
zipp==3.17.0
zipp==3.18.1
# via
# importlib-metadata
# importlib-resources
16 changes: 9 additions & 7 deletions requirements/pip-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
#
# make upgrade
#
build==1.0.3
build==1.2.1
# via pip-tools
click==8.1.7
# via pip-tools
importlib-metadata==7.0.1
# via build
packaging==23.2
importlib-metadata==6.11.0
# via
# -c requirements/common_constraints.txt
# build
packaging==24.0
# via build
pip-tools==7.4.0
pip-tools==7.4.1
# via -r requirements/pip-tools.in
pyproject-hooks==1.0.0
# via
Expand All @@ -23,9 +25,9 @@ tomli==2.0.1
# build
# pip-tools
# pyproject-hooks
wheel==0.42.0
wheel==0.43.0
# via pip-tools
zipp==3.17.0
zipp==3.18.1
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
Expand Down
4 changes: 2 additions & 2 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#
# make upgrade
#
wheel==0.42.0
wheel==0.43.0
# via -r requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
pip==24.0
# via -r requirements/pip.in
setuptools==69.1.1
setuptools==69.2.0
# via -r requirements/pip.in
2 changes: 1 addition & 1 deletion requirements/quality.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
edx-lint # edX pylint rules and plugins
isort # to standardize order of imports
pycodestyle # PEP 8 compliance validation
pydocstyle<2.0 # PEP 257 compliance validation: 2.0 doesn't know Google style, and tries to correct my grammar... :(
pydocstyle # PEP 257 compliance validation: 2.0 doesn't know Google style, and tries to correct my grammar... :(
build # Build needs to be created for README validation
twine # Needed to validate README.rst for usage on PyPI
Loading
Loading