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

Python support 3.11 and 3.12 #101

Merged
merged 2 commits into from
Apr 5, 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 @@ -14,8 +14,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [quality, docs, django32, django42]
python-version: ['3.8', '3.11', '3.12']
toxenv: [quality, docs, django42]

steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ Change Log
Unreleased
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[1.8.0] - 2024-03-31
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Added python3.11 and 3.12 support. Dropped django32 support.


[1.6.0] - 2024-01-31
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ docs: ## generate Sphinx HTML documentation, including API docs
tox -e docs
$(BROWSER) docs/_build/html/index.html

COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt
.PHONY: $(COMMON_CONSTRAINTS_TXT)
$(COMMON_CONSTRAINTS_TXT):
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)"

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
upgrade: $(COMMON_CONSTRAINTS_TXT) # update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -qr requirements/pip-tools.txt
# Make sure to compile files after any other files they include!
pip-compile --upgrade --allow-unsafe -o requirements/pip.txt requirements/pip.in
Expand Down
2 changes: 1 addition & 1 deletion code_annotations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Extensible tools for parsing annotations in codebases.
"""

__version__ = '1.7.0'
__version__ = '1.8.0'
6 changes: 3 additions & 3 deletions code_annotations/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def django_find_annotations(
annotation_count, elapsed.total_seconds()
))

except Exception as exc: # pylint: disable=broad-except
except Exception as exc:
click.echo(traceback.print_exc())
fail(str(exc))

Expand Down Expand Up @@ -169,7 +169,7 @@ def static_find_annotations(config_file, source_path, report_path, verbosity, li

click.echo(f"Search found {annotation_count} annotations in {elapsed}.")

except Exception as exc: # pylint: disable=broad-except
except Exception as exc:
click.echo(traceback.print_exc())
fail(str(exc))

Expand Down Expand Up @@ -212,6 +212,6 @@ def generate_docs(

elapsed = datetime.datetime.now() - start_time
click.echo(f"Report rendered in {elapsed.total_seconds()} seconds.")
except Exception as exc: # pylint: disable=broad-except
except Exception as exc:
click.echo(traceback.print_exc())
fail(str(exc))
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def iter_nodes(self):
for opt in optional_attrs:
if toggle.get(f".. toggle_{opt}:") not in (None, "None", "n/a", "N/A"):
toggle_section += nodes.paragraph(
text=f'{opt.title().replace("_"," ")}: {toggle[f".. toggle_{opt}:"]}',
text=f'{opt.title().replace("_", " ")}: {toggle[f".. toggle_{opt}:"]}',
ids=[f"{opt}-{toggle_name}"],
)
yield toggle_section
Expand Down
8 changes: 4 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
#
click==8.1.7
# via -r requirements/base.in
jinja2==3.1.2
jinja2==3.1.3
# via -r requirements/base.in
markupsafe==2.1.3
markupsafe==2.1.5
# via jinja2
pbr==6.0.0
# via stevedore
python-slugify==8.0.1
python-slugify==8.0.4
# via -r requirements/base.in
pyyaml==6.0.1
# via -r requirements/base.in
stevedore==5.1.0
stevedore==5.2.0
# via -r requirements/base.in
text-unidecode==1.3
# via python-slugify
12 changes: 6 additions & 6 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
#
# make upgrade
#
distlib==0.3.7
distlib==0.3.8
# via virtualenv
filelock==3.13.1
filelock==3.13.3
# via
# tox
# virtualenv
packaging==23.2
packaging==24.0
# via tox
platformdirs==4.1.0
platformdirs==4.2.0
# via virtualenv
pluggy==1.3.0
pluggy==1.4.0
# via tox
py==1.11.0
# via tox
Expand All @@ -26,5 +26,5 @@ tox==3.28.0
# via
# -c requirements/constraints.txt
# -r requirements/ci.in
virtualenv==20.25.0
virtualenv==20.25.1
# via tox
37 changes: 37 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This is a temporary solution to override the real common_constraints.txt
# In edx-lint, until the pyjwt constraint in edx-lint has been removed.
# See BOM-2721 for more details.
# Below is the copied and edited version of common_constraints

# A central location for most common version constraints
# (across edx repos) for pip-installation.
#
# Similar to other constraint files this file doesn't install any packages.
# It specifies version constraints that will be applied if a package is needed.
# When pinning something here, please provide an explanation of why it is a good
# idea to pin this package across all edx repos, Ideally, link to other information
# that will help people in the future to remove the pin when possible.
# Writing an issue against the offending project and linking to it here is good.
#
# Note: Changes to this file will automatically be used by other repos, referencing
# this file from Github directly. It does not require packaging in edx-lint.


# using LTS django version
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
8 changes: 5 additions & 3 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
# pin when possible. Writing an issue against the offending project and
# linking to it here is good.

# Common constraints for edx repos
-c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt

# This file contains all common constraints for edx-repos
-c common_constraints.txt
# tox>4.0.0 isn't yet compatible with many tox plugins, causing CI failures in almost all repos.
# Details can be found in this discussion: https://github.com/tox-dev/tox/discussions/1810
tox<4.0.0

# Temporary to Support the python 3.11 Upgrade
backports.zoneinfo;python_version<"3.9" # Newer versions have zoneinfo available in the standard library
70 changes: 36 additions & 34 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@
#
# make upgrade
#
asgiref==3.7.2
asgiref==3.8.1
# via
# -r requirements/quality.txt
# django
astroid==3.0.1
astroid==3.1.0
# via
# -r requirements/quality.txt
# pylint
# pylint-celery
build==1.0.3
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/quality.txt
# django
build==1.2.1
# via
# -r requirements/pip-tools.txt
# pip-tools
Expand All @@ -31,58 +36,58 @@ click-log==0.4.0
# via
# -r requirements/quality.txt
# edx-lint
code-annotations==1.5.0
code-annotations==1.7.0
# via
# -r requirements/quality.txt
# edx-lint
coverage[toml]==7.3.2
coverage[toml]==7.4.4
# via
# -r requirements/quality.txt
# coverage
# pytest-cov
diff-cover==8.0.1
diff-cover==8.0.3
# via -r requirements/dev.in
dill==0.3.7
dill==0.3.8
# via
# -r requirements/quality.txt
# pylint
distlib==0.3.7
distlib==0.3.8
# via
# -r requirements/ci.txt
# virtualenv
django==3.2.23
django==4.2.11
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/quality.txt
edx-lint==5.3.6
# via -r requirements/quality.txt
exceptiongroup==1.2.0
# via
# -r requirements/quality.txt
# pytest
filelock==3.13.1
filelock==3.13.3
# via
# -r requirements/ci.txt
# tox
# virtualenv
importlib-metadata==7.0.0
importlib-metadata==6.11.0
# via
# -c requirements/common_constraints.txt
# -r requirements/pip-tools.txt
# build
iniconfig==2.0.0
# via
# -r requirements/quality.txt
# pytest
isort==5.12.0
isort==5.13.2
# via
# -r requirements/quality.txt
# pylint
jinja2==3.1.2
jinja2==3.1.3
# via
# -r requirements/quality.txt
# code-annotations
# diff-cover
markupsafe==2.1.3
markupsafe==2.1.5
# via
# -r requirements/quality.txt
# jinja2
Expand All @@ -92,7 +97,7 @@ mccabe==0.7.0
# pylint
mock==5.1.0
# via -r requirements/quality.txt
packaging==23.2
packaging==24.0
# via
# -r requirements/ci.txt
# -r requirements/pip-tools.txt
Expand All @@ -104,15 +109,15 @@ pbr==6.0.0
# via
# -r requirements/quality.txt
# stevedore
pip-tools==7.3.0
pip-tools==7.4.1
# via -r requirements/pip-tools.txt
platformdirs==4.1.0
platformdirs==4.2.0
# via
# -r requirements/ci.txt
# -r requirements/quality.txt
# pylint
# virtualenv
pluggy==1.3.0
pluggy==1.4.0
# via
# -r requirements/ci.txt
# -r requirements/quality.txt
Expand All @@ -129,7 +134,7 @@ pydocstyle==6.3.0
# via -r requirements/quality.txt
pygments==2.17.2
# via diff-cover
pylint==3.0.2
pylint==3.1.0
# via
# -r requirements/quality.txt
# edx-lint
Expand All @@ -153,20 +158,17 @@ pyproject-hooks==1.0.0
# via
# -r requirements/pip-tools.txt
# build
pytest==7.4.3
# pip-tools
pytest==8.1.1
# via
# -r requirements/quality.txt
# pytest-cov
pytest-cov==4.1.0
pytest-cov==5.0.0
# via -r requirements/quality.txt
python-slugify==8.0.1
python-slugify==8.0.4
# via
# -r requirements/quality.txt
# code-annotations
pytz==2023.3.post1
# via
# -r requirements/quality.txt
# django
pyyaml==6.0.1
# via
# -r requirements/quality.txt
Expand All @@ -185,7 +187,7 @@ sqlparse==0.4.4
# via
# -r requirements/quality.txt
# django
stevedore==5.1.0
stevedore==5.2.0
# via
# -r requirements/quality.txt
# code-annotations
Expand All @@ -205,29 +207,29 @@ tomli==2.0.1
# pyproject-hooks
# pytest
# tox
tomlkit==0.12.3
tomlkit==0.12.4
# via
# -r requirements/quality.txt
# pylint
tox==3.28.0
# via
# -c requirements/constraints.txt
# -r requirements/ci.txt
typing-extensions==4.8.0
typing-extensions==4.10.0
# via
# -r requirements/quality.txt
# asgiref
# astroid
# pylint
virtualenv==20.25.0
virtualenv==20.25.1
# via
# -r requirements/ci.txt
# tox
wheel==0.42.0
wheel==0.43.0
# via
# -r requirements/pip-tools.txt
# pip-tools
zipp==3.17.0
zipp==3.18.1
# via
# -r requirements/pip-tools.txt
# importlib-metadata
Expand Down
Loading
Loading