Skip to content

Commit

Permalink
fix: install backports-zoneinfo only for python<3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
UsamaSadiq committed Mar 21, 2024
1 parent 07582e1 commit 67148bc
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 8 deletions.
6 changes: 4 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ asgiref==3.8.0
# via django
attrs==23.2.0
# via openedx-events
backports-zoneinfo==0.2.1
# via django
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# django
cffi==1.16.0
# via pynacl
click==8.1.7
Expand Down
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 @@

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

# backports.zoneinfo is needed for Python 3.8 + Django 4.2 compatibility
backports.zoneinfo; python_version<'3.9'
3 changes: 2 additions & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ avro==1.11.3
# via
# -r requirements/quality.txt
# confluent-kafka
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/quality.txt
# django
build==1.1.1
Expand Down
3 changes: 2 additions & 1 deletion requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ babel==2.14.0
# via
# pydata-sphinx-theme
# sphinx
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# django
beautifulsoup4==4.12.3
Expand Down
3 changes: 2 additions & 1 deletion requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ avro==1.11.3
# via
# -r requirements/test.txt
# confluent-kafka
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# django
certifi==2024.2.2
Expand Down
3 changes: 2 additions & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ attrs==23.2.0
# openedx-events
avro==1.11.3
# via confluent-kafka
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
# django
certifi==2024.2.2
Expand Down
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ norecursedirs = .* docs requirements site-packages

[testenv]
deps =
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
setuptools
django42: Django>=4.2,<4.3
-r{toxinidir}/requirements/test.txt
commands =
python manage.py check
Expand All @@ -53,6 +53,7 @@ allowlist_externals =
make
rm
deps =
setuptools
-r{toxinidir}/requirements/doc.txt
commands =
doc8 --ignore-path docs/_build README.rst docs
Expand Down Expand Up @@ -86,6 +87,7 @@ commands =
setenv =
DJANGO_SETTINGS_MODULE = test_settings
deps =
setuptools
-r{toxinidir}/requirements/test.txt
commands =
code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage

0 comments on commit 67148bc

Please sign in to comment.