Skip to content

Commit

Permalink
fix: fix issues preventing setup.py updates
Browse files Browse the repository at this point in the history
- no longer need backports.zoneinfo now that the project supports python version >= 3.9
- fix quality problems flagged by pylint
  • Loading branch information
justinhynes committed Jan 30, 2025
1 parent ff662ba commit 722b280
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 30 deletions.
1 change: 0 additions & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ django-model-utils # Provides TimeStampedModel abstract
edx-opaque-keys>=0.2.1 # Create and introspect course and xblock identities
six # Utilities for supporting Python 2 & 3 in the same codebase
setuptools
backports.zoneinfo; python_version<'3.9'
4 changes: 2 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
asgiref==3.8.1
# via django
django==4.2.17
django==4.2.18
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/base.in
Expand All @@ -19,7 +19,7 @@ edx-opaque-keys==2.11.0
# via -r requirements/base.in
pbr==6.1.0
# via stevedore
pymongo==4.10.1
pymongo==4.11
# via edx-opaque-keys
six==1.17.0
# via -r requirements/base.in
Expand Down
10 changes: 5 additions & 5 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
#
# make upgrade
#
cachetools==5.5.0
cachetools==5.5.1
# via tox
chardet==5.2.0
# via tox
colorama==0.4.6
# via tox
distlib==0.3.9
# via virtualenv
filelock==3.16.1
filelock==3.17.0
# via
# tox
# virtualenv
Expand All @@ -26,9 +26,9 @@ platformdirs==4.3.6
# virtualenv
pluggy==1.5.0
# via tox
pyproject-api==1.8.0
pyproject-api==1.9.0
# via tox
tox==4.23.2
tox==4.24.1
# via -r requirements/ci.in
virtualenv==20.28.1
virtualenv==20.29.1
# via tox
22 changes: 11 additions & 11 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ build==1.2.2.post1
# via
# -r requirements/pip-tools.txt
# pip-tools
cachetools==5.5.0
cachetools==5.5.1
# via
# -r requirements/ci.txt
# tox
Expand All @@ -37,7 +37,7 @@ click-log==0.4.0
# via
# -r requirements/quality.txt
# edx-lint
code-annotations==2.1.0
code-annotations==2.2.0
# via
# -r requirements/quality.txt
# edx-lint
Expand All @@ -57,7 +57,7 @@ distlib==0.3.9
# via
# -r requirements/ci.txt
# virtualenv
django==4.2.17
django==4.2.18
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/quality.txt
Expand All @@ -68,11 +68,11 @@ dnspython==2.7.0
# via
# -r requirements/quality.txt
# pymongo
edx-lint==5.4.1
edx-lint==5.6.0
# via -r requirements/quality.txt
edx-opaque-keys==2.11.0
# via -r requirements/quality.txt
filelock==3.16.1
filelock==3.17.0
# via
# -r requirements/ci.txt
# tox
Expand All @@ -81,7 +81,7 @@ iniconfig==2.0.0
# via
# -r requirements/quality.txt
# pytest
isort==5.13.2
isort==6.0.0
# via
# -r requirements/quality.txt
# pylint
Expand Down Expand Up @@ -129,7 +129,7 @@ pycodestyle==2.12.1
# via -r requirements/quality.txt
pydocstyle==6.3.0
# via -r requirements/quality.txt
pylint==3.3.3
pylint==3.3.4
# via
# -r requirements/quality.txt
# edx-lint
Expand All @@ -149,11 +149,11 @@ pylint-plugin-utils==0.8.2
# -r requirements/quality.txt
# pylint-celery
# pylint-django
pymongo==4.10.1
pymongo==4.11
# via
# -r requirements/quality.txt
# edx-opaque-keys
pyproject-api==1.8.0
pyproject-api==1.9.0
# via
# -r requirements/ci.txt
# tox
Expand Down Expand Up @@ -204,13 +204,13 @@ tomlkit==0.13.2
# via
# -r requirements/quality.txt
# pylint
tox==4.23.2
tox==4.24.1
# via -r requirements/ci.txt
typing-extensions==4.12.2
# via
# -r requirements/quality.txt
# edx-opaque-keys
virtualenv==20.28.1
virtualenv==20.29.1
# via
# -r requirements/ci.txt
# tox
Expand Down
12 changes: 6 additions & 6 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ click==8.1.8
# edx-lint
click-log==0.4.0
# via edx-lint
code-annotations==2.1.0
code-annotations==2.2.0
# via
# -r requirements/test.txt
# edx-lint
Expand All @@ -30,7 +30,7 @@ coverage[toml]==7.6.10
# pytest-cov
dill==0.3.9
# via pylint
django==4.2.17
django==4.2.18
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/test.txt
Expand All @@ -41,15 +41,15 @@ dnspython==2.7.0
# via
# -r requirements/test.txt
# pymongo
edx-lint==5.4.1
edx-lint==5.6.0
# via -r requirements/quality.in
edx-opaque-keys==2.11.0
# via -r requirements/test.txt
iniconfig==2.0.0
# via
# -r requirements/test.txt
# pytest
isort==5.13.2
isort==6.0.0
# via
# -r requirements/quality.in
# pylint
Expand Down Expand Up @@ -81,7 +81,7 @@ pycodestyle==2.12.1
# via -r requirements/quality.in
pydocstyle==6.3.0
# via -r requirements/quality.in
pylint==3.3.3
pylint==3.3.4
# via
# edx-lint
# pylint-celery
Expand All @@ -95,7 +95,7 @@ pylint-plugin-utils==0.8.2
# via
# pylint-celery
# pylint-django
pymongo==4.10.1
pymongo==4.11
# via
# -r requirements/test.txt
# edx-opaque-keys
Expand Down
4 changes: 2 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ asgiref==3.8.1
# django
click==8.1.8
# via code-annotations
code-annotations==2.1.0
code-annotations==2.2.0
# via -r requirements/test.in
coverage[toml]==7.6.10
# via
Expand Down Expand Up @@ -42,7 +42,7 @@ pbr==6.1.0
# stevedore
pluggy==1.5.0
# via pytest
pymongo==4.10.1
pymongo==4.11
# via
# -r requirements/base.txt
# edx-opaque-keys
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def check_name_consistent(package):
re_package_name_base_chars = r"a-zA-Z0-9\-_." # chars allowed in base package name

Check warning on line 64 in setup.py

View check run for this annotation

Codecov / codecov/patch

setup.py#L64

Added line #L64 was not covered by tests
# Two groups: name[maybe,extras], and optionally a constraint
requirement_line_regex = re.compile(

Check warning on line 66 in setup.py

View check run for this annotation

Codecov / codecov/patch

setup.py#L66

Added line #L66 was not covered by tests
r"([%s]+(?:\[[%s,\s]+\])?)([<>=][^#\s]+)?"
r"([%s]+(?:\[[%s,\s]+\])?)([<>=][^#\s]+)?" # pylint: disable=consider-using-f-string
% (re_package_name_base_chars, re_package_name_base_chars)
)

Expand All @@ -88,7 +88,7 @@ def add_version_constraint_or_raise(current_line, current_requirements, add_if_n
# Read requirements from .in files and store the path to any
# constraint files that are pulled in.
for path in requirements_paths:
with open(path) as reqs:
with open(path, encoding='utf-8') as reqs:

Check warning on line 91 in setup.py

View check run for this annotation

Codecov / codecov/patch

setup.py#L91

Added line #L91 was not covered by tests
for line in reqs:
if is_requirement(line):
add_version_constraint_or_raise(line, requirements, True)

Check warning on line 94 in setup.py

View check run for this annotation

Codecov / codecov/patch

setup.py#L94

Added line #L94 was not covered by tests
Expand All @@ -97,7 +97,7 @@ def add_version_constraint_or_raise(current_line, current_requirements, add_if_n

# process constraint files: add constraints to existing requirements
for constraint_file in constraint_files:
with open(constraint_file) as reader:
with open(constraint_file, encoding='utf-8') as reader:

Check warning on line 100 in setup.py

View check run for this annotation

Codecov / codecov/patch

setup.py#L100

Added line #L100 was not covered by tests
for line in reader:
if is_requirement(line):
add_version_constraint_or_raise(line, requirements, False)

Check warning on line 103 in setup.py

View check run for this annotation

Codecov / codecov/patch

setup.py#L103

Added line #L103 was not covered by tests
Expand Down

0 comments on commit 722b280

Please sign in to comment.