Skip to content

Commit b79954c

Browse files
author
Feanil Patel
authored
Merge pull request #101 from awais786/python-support
Python support 3.11 and 3.12
2 parents 767eeda + b95b1ec commit b79954c

File tree

20 files changed

+223
-155
lines changed

20 files changed

+223
-155
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ubuntu-20.04]
17-
python-version: ['3.8']
18-
toxenv: [quality, docs, django32, django42]
17+
python-version: ['3.8', '3.11', '3.12']
18+
toxenv: [quality, docs, django42]
1919

2020
steps:
2121
- uses: actions/checkout@v2

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ Change Log
1414
Unreleased
1515
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1616

17+
[1.8.0] - 2024-03-31
18+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19+
20+
* Added python3.11 and 3.12 support. Dropped django32 support.
21+
22+
1723
[1.6.0] - 2024-01-31
1824
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1925

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,13 @@ docs: ## generate Sphinx HTML documentation, including API docs
3737
tox -e docs
3838
$(BROWSER) docs/_build/html/index.html
3939

40+
COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt
41+
.PHONY: $(COMMON_CONSTRAINTS_TXT)
42+
$(COMMON_CONSTRAINTS_TXT):
43+
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)"
44+
4045
upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
41-
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
46+
upgrade: $(COMMON_CONSTRAINTS_TXT) # update the requirements/*.txt files with the latest packages satisfying requirements/*.in
4247
pip install -qr requirements/pip-tools.txt
4348
# Make sure to compile files after any other files they include!
4449
pip-compile --upgrade --allow-unsafe -o requirements/pip.txt requirements/pip.in

code_annotations/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Extensible tools for parsing annotations in codebases.
33
"""
44

5-
__version__ = '1.7.0'
5+
__version__ = '1.8.0'

code_annotations/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def django_find_annotations(
111111
annotation_count, elapsed.total_seconds()
112112
))
113113

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

@@ -169,7 +169,7 @@ def static_find_annotations(config_file, source_path, report_path, verbosity, li
169169

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

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

@@ -212,6 +212,6 @@ def generate_docs(
212212

213213
elapsed = datetime.datetime.now() - start_time
214214
click.echo(f"Report rendered in {elapsed.total_seconds()} seconds.")
215-
except Exception as exc: # pylint: disable=broad-except
215+
except Exception as exc:
216216
click.echo(traceback.print_exc())
217217
fail(str(exc))

code_annotations/contrib/sphinx/extensions/featuretoggles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def iter_nodes(self):
111111
for opt in optional_attrs:
112112
if toggle.get(f".. toggle_{opt}:") not in (None, "None", "n/a", "N/A"):
113113
toggle_section += nodes.paragraph(
114-
text=f'{opt.title().replace("_"," ")}: {toggle[f".. toggle_{opt}:"]}',
114+
text=f'{opt.title().replace("_", " ")}: {toggle[f".. toggle_{opt}:"]}',
115115
ids=[f"{opt}-{toggle_name}"],
116116
)
117117
yield toggle_section

requirements/base.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
#
77
click==8.1.7
88
# via -r requirements/base.in
9-
jinja2==3.1.2
9+
jinja2==3.1.3
1010
# via -r requirements/base.in
11-
markupsafe==2.1.3
11+
markupsafe==2.1.5
1212
# via jinja2
1313
pbr==6.0.0
1414
# via stevedore
15-
python-slugify==8.0.1
15+
python-slugify==8.0.4
1616
# via -r requirements/base.in
1717
pyyaml==6.0.1
1818
# via -r requirements/base.in
19-
stevedore==5.1.0
19+
stevedore==5.2.0
2020
# via -r requirements/base.in
2121
text-unidecode==1.3
2222
# via python-slugify

requirements/ci.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
#
55
# make upgrade
66
#
7-
distlib==0.3.7
7+
distlib==0.3.8
88
# via virtualenv
9-
filelock==3.13.1
9+
filelock==3.13.3
1010
# via
1111
# tox
1212
# virtualenv
13-
packaging==23.2
13+
packaging==24.0
1414
# via tox
15-
platformdirs==4.1.0
15+
platformdirs==4.2.0
1616
# via virtualenv
17-
pluggy==1.3.0
17+
pluggy==1.4.0
1818
# via tox
1919
py==1.11.0
2020
# via tox
@@ -26,5 +26,5 @@ tox==3.28.0
2626
# via
2727
# -c requirements/constraints.txt
2828
# -r requirements/ci.in
29-
virtualenv==20.25.0
29+
virtualenv==20.25.1
3030
# via tox

requirements/common_constraints.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This is a temporary solution to override the real common_constraints.txt
2+
# In edx-lint, until the pyjwt constraint in edx-lint has been removed.
3+
# See BOM-2721 for more details.
4+
# Below is the copied and edited version of common_constraints
5+
6+
# A central location for most common version constraints
7+
# (across edx repos) for pip-installation.
8+
#
9+
# Similar to other constraint files this file doesn't install any packages.
10+
# It specifies version constraints that will be applied if a package is needed.
11+
# When pinning something here, please provide an explanation of why it is a good
12+
# idea to pin this package across all edx repos, Ideally, link to other information
13+
# that will help people in the future to remove the pin when possible.
14+
# Writing an issue against the offending project and linking to it here is good.
15+
#
16+
# Note: Changes to this file will automatically be used by other repos, referencing
17+
# this file from Github directly. It does not require packaging in edx-lint.
18+
19+
20+
# using LTS django version
21+
Django<5.0
22+
23+
# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process.
24+
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
25+
elasticsearch<7.14.0
26+
27+
# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected
28+
django-simple-history==3.0.0
29+
30+
# opentelemetry requires version 6.x at the moment:
31+
# https://github.com/open-telemetry/opentelemetry-python/issues/3570
32+
# Normally this could be added as a constraint in edx-django-utils, where we're
33+
# adding the opentelemetry dependency. However, when we compile pip-tools.txt,
34+
# that uses version 7.x, and then there's no undoing that when compiling base.txt.
35+
# So we need to pin it globally, for now.
36+
# Ticket for unpinning: https://github.com/openedx/edx-lint/issues/407
37+
importlib-metadata<7

requirements/constraints.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
# pin when possible. Writing an issue against the offending project and
99
# linking to it here is good.
1010

11-
# Common constraints for edx repos
12-
-c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
13-
11+
# This file contains all common constraints for edx-repos
12+
-c common_constraints.txt
1413
# tox>4.0.0 isn't yet compatible with many tox plugins, causing CI failures in almost all repos.
1514
# Details can be found in this discussion: https://github.com/tox-dev/tox/discussions/1810
1615
tox<4.0.0
16+
17+
# Temporary to Support the python 3.11 Upgrade
18+
backports.zoneinfo;python_version<"3.9" # Newer versions have zoneinfo available in the standard library

requirements/dev.txt

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,21 @@
44
#
55
# make upgrade
66
#
7-
asgiref==3.7.2
7+
asgiref==3.8.1
88
# via
99
# -r requirements/quality.txt
1010
# django
11-
astroid==3.0.1
11+
astroid==3.1.0
1212
# via
1313
# -r requirements/quality.txt
1414
# pylint
1515
# pylint-celery
16-
build==1.0.3
16+
backports-zoneinfo==0.2.1 ; python_version < "3.9"
17+
# via
18+
# -c requirements/constraints.txt
19+
# -r requirements/quality.txt
20+
# django
21+
build==1.2.1
1722
# via
1823
# -r requirements/pip-tools.txt
1924
# pip-tools
@@ -31,58 +36,58 @@ click-log==0.4.0
3136
# via
3237
# -r requirements/quality.txt
3338
# edx-lint
34-
code-annotations==1.5.0
39+
code-annotations==1.7.0
3540
# via
3641
# -r requirements/quality.txt
3742
# edx-lint
38-
coverage[toml]==7.3.2
43+
coverage[toml]==7.4.4
3944
# via
4045
# -r requirements/quality.txt
41-
# coverage
4246
# pytest-cov
43-
diff-cover==8.0.1
47+
diff-cover==8.0.3
4448
# via -r requirements/dev.in
45-
dill==0.3.7
49+
dill==0.3.8
4650
# via
4751
# -r requirements/quality.txt
4852
# pylint
49-
distlib==0.3.7
53+
distlib==0.3.8
5054
# via
5155
# -r requirements/ci.txt
5256
# virtualenv
53-
django==3.2.23
57+
django==4.2.11
5458
# via
55-
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
59+
# -c requirements/common_constraints.txt
5660
# -r requirements/quality.txt
5761
edx-lint==5.3.6
5862
# via -r requirements/quality.txt
5963
exceptiongroup==1.2.0
6064
# via
6165
# -r requirements/quality.txt
6266
# pytest
63-
filelock==3.13.1
67+
filelock==3.13.3
6468
# via
6569
# -r requirements/ci.txt
6670
# tox
6771
# virtualenv
68-
importlib-metadata==7.0.0
72+
importlib-metadata==6.11.0
6973
# via
74+
# -c requirements/common_constraints.txt
7075
# -r requirements/pip-tools.txt
7176
# build
7277
iniconfig==2.0.0
7378
# via
7479
# -r requirements/quality.txt
7580
# pytest
76-
isort==5.12.0
81+
isort==5.13.2
7782
# via
7883
# -r requirements/quality.txt
7984
# pylint
80-
jinja2==3.1.2
85+
jinja2==3.1.3
8186
# via
8287
# -r requirements/quality.txt
8388
# code-annotations
8489
# diff-cover
85-
markupsafe==2.1.3
90+
markupsafe==2.1.5
8691
# via
8792
# -r requirements/quality.txt
8893
# jinja2
@@ -92,7 +97,7 @@ mccabe==0.7.0
9297
# pylint
9398
mock==5.1.0
9499
# via -r requirements/quality.txt
95-
packaging==23.2
100+
packaging==24.0
96101
# via
97102
# -r requirements/ci.txt
98103
# -r requirements/pip-tools.txt
@@ -104,15 +109,15 @@ pbr==6.0.0
104109
# via
105110
# -r requirements/quality.txt
106111
# stevedore
107-
pip-tools==7.3.0
112+
pip-tools==7.4.1
108113
# via -r requirements/pip-tools.txt
109-
platformdirs==4.1.0
114+
platformdirs==4.2.0
110115
# via
111116
# -r requirements/ci.txt
112117
# -r requirements/quality.txt
113118
# pylint
114119
# virtualenv
115-
pluggy==1.3.0
120+
pluggy==1.4.0
116121
# via
117122
# -r requirements/ci.txt
118123
# -r requirements/quality.txt
@@ -129,7 +134,7 @@ pydocstyle==6.3.0
129134
# via -r requirements/quality.txt
130135
pygments==2.17.2
131136
# via diff-cover
132-
pylint==3.0.2
137+
pylint==3.1.0
133138
# via
134139
# -r requirements/quality.txt
135140
# edx-lint
@@ -153,20 +158,17 @@ pyproject-hooks==1.0.0
153158
# via
154159
# -r requirements/pip-tools.txt
155160
# build
156-
pytest==7.4.3
161+
# pip-tools
162+
pytest==8.1.1
157163
# via
158164
# -r requirements/quality.txt
159165
# pytest-cov
160-
pytest-cov==4.1.0
166+
pytest-cov==5.0.0
161167
# via -r requirements/quality.txt
162-
python-slugify==8.0.1
168+
python-slugify==8.0.4
163169
# via
164170
# -r requirements/quality.txt
165171
# code-annotations
166-
pytz==2023.3.post1
167-
# via
168-
# -r requirements/quality.txt
169-
# django
170172
pyyaml==6.0.1
171173
# via
172174
# -r requirements/quality.txt
@@ -185,7 +187,7 @@ sqlparse==0.4.4
185187
# via
186188
# -r requirements/quality.txt
187189
# django
188-
stevedore==5.1.0
190+
stevedore==5.2.0
189191
# via
190192
# -r requirements/quality.txt
191193
# code-annotations
@@ -205,29 +207,29 @@ tomli==2.0.1
205207
# pyproject-hooks
206208
# pytest
207209
# tox
208-
tomlkit==0.12.3
210+
tomlkit==0.12.4
209211
# via
210212
# -r requirements/quality.txt
211213
# pylint
212214
tox==3.28.0
213215
# via
214216
# -c requirements/constraints.txt
215217
# -r requirements/ci.txt
216-
typing-extensions==4.8.0
218+
typing-extensions==4.10.0
217219
# via
218220
# -r requirements/quality.txt
219221
# asgiref
220222
# astroid
221223
# pylint
222-
virtualenv==20.25.0
224+
virtualenv==20.25.1
223225
# via
224226
# -r requirements/ci.txt
225227
# tox
226-
wheel==0.42.0
228+
wheel==0.43.0
227229
# via
228230
# -r requirements/pip-tools.txt
229231
# pip-tools
230-
zipp==3.17.0
232+
zipp==3.18.1
231233
# via
232234
# -r requirements/pip-tools.txt
233235
# importlib-metadata

0 commit comments

Comments
 (0)