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 Requirements Update #83

Merged
merged 2 commits into from
Oct 4, 2023
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
2 changes: 1 addition & 1 deletion openedx_learning/core/publishing/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def create_publishable_entity_version(
version_num=version_num,
title=title,
created=created,
created_by=created_by,
created_by_id=created_by,
farhan marked this conversation as resolved.
Show resolved Hide resolved
)
Draft.objects.create(
entity_id=entity_id,
Expand Down
20 changes: 16 additions & 4 deletions openedx_tagging/core/tagging/models/system_defined.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ def validate_value(self, value: str):
Check if 'value' is part of this Taxonomy, based on the specified model.
"""
try:
self.tag_class_model.objects.get(**{f"{self.tag_class_value_field}__iexact": value})
# See https://github.com/typeddjango/django-stubs/issues/1684 for why we need to ignore this.
self.tag_class_model.objects.get( # type: ignore[attr-defined]
**{f"{self.tag_class_value_field}__iexact": value}
)
return True
except ObjectDoesNotExist:
return False
Expand All @@ -100,7 +103,10 @@ def tag_for_value(self, value: str):
try:
# First we look up the instance by value.
# We specify 'iexact' but whether it's case sensitive or not on MySQL depends on the model's collation.
instance = self.tag_class_model.objects.get(**{f"{self.tag_class_value_field}__iexact": value})
# See https://github.com/typeddjango/django-stubs/issues/1684 for why we need to ignore this.
instance = self.tag_class_model.objects.get( # type: ignore[attr-defined]
**{f"{self.tag_class_value_field}__iexact": value}
)
except ObjectDoesNotExist as exc:
raise Tag.DoesNotExist from exc
# Use the canonical value from here on (possibly with different case from the value given as a parameter)
Expand All @@ -120,7 +126,10 @@ def validate_external_id(self, external_id: str):
Check if 'external_id' is part of this Taxonomy.
"""
try:
self.tag_class_model.objects.get(**{f"{self.tag_class_key_field}__iexact": external_id})
# See https://github.com/typeddjango/django-stubs/issues/1684 for why we need to ignore this.
self.tag_class_model.objects.get( # type: ignore[attr-defined]
**{f"{self.tag_class_key_field}__iexact": external_id}
)
return True
except ObjectDoesNotExist:
return False
Expand All @@ -136,7 +145,10 @@ def tag_for_external_id(self, external_id: str):
try:
# First we look up the instance by external_id
# We specify 'iexact' but whether it's case sensitive or not on MySQL depends on the model's collation.
instance = self.tag_class_model.objects.get(**{f"{self.tag_class_key_field}__iexact": external_id})
# See https://github.com/typeddjango/django-stubs/issues/1684 for why we need to ignore this.
instance = self.tag_class_model.objects.get( # type: ignore[attr-defined]
**{f"{self.tag_class_key_field}__iexact": external_id}
)
except ObjectDoesNotExist as exc:
raise Tag.DoesNotExist from exc
value = getattr(instance, self.tag_class_value_field)
Expand Down
45 changes: 25 additions & 20 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
Expand All @@ -10,9 +10,13 @@ asgiref==3.7.2
# via django
attrs==23.1.0
# via -r requirements/base.in
backports-zoneinfo[tzdata]==0.2.1
# via
# celery
# kombu
billiard==4.1.0
# via celery
celery==5.3.1
celery==5.3.4
# via -r requirements/base.in
certifi==2023.7.22
# via requests
Expand All @@ -22,7 +26,7 @@ cffi==1.15.1
# pynacl
charset-normalizer==3.2.0
# via requests
click==8.1.6
click==8.1.7
# via
# celery
# click-didyoumean
Expand All @@ -35,9 +39,9 @@ click-plugins==1.1.1
# via celery
click-repl==0.3.0
# via celery
cryptography==41.0.3
cryptography==41.0.4
# via pyjwt
django==3.2.19
django==3.2.21
# via
# -c requirements/constraints.txt
# -r requirements/base.in
Expand All @@ -62,15 +66,15 @@ drf-jwt==1.19.2
# via edx-drf-extensions
edx-django-utils==5.7.0
# via edx-drf-extensions
edx-drf-extensions==8.8.0
edx-drf-extensions==8.10.0
# via -r requirements/base.in
edx-opaque-keys==2.4.0
edx-opaque-keys==2.5.1
# via edx-drf-extensions
idna==3.4
# via requests
kombu==5.3.1
kombu==5.3.2
# via celery
newrelic==8.9.0
newrelic==9.0.0
# via edx-django-utils
pbr==5.11.1
# via stevedore
Expand All @@ -89,10 +93,8 @@ pymongo==3.13.0
pynacl==1.5.0
# via edx-django-utils
python-dateutil==2.8.2
# via
# celery
# edx-drf-extensions
pytz==2023.3
# via celery
pytz==2023.3.post1
# via
# django
# djangorestframework
Expand All @@ -103,20 +105,23 @@ rules==3.3
semantic-version==2.10.0
# via edx-drf-extensions
six==1.16.0
# via
# edx-drf-extensions
# python-dateutil
# via python-dateutil
sqlparse==0.4.4
# via django
stevedore==5.1.0
# via
# edx-django-utils
# edx-opaque-keys
typing-extensions==4.6.3
# via asgiref
typing-extensions==4.8.0
# via
# asgiref
# edx-opaque-keys
# kombu
tzdata==2023.3
# via celery
urllib3==2.0.4
# via
# backports-zoneinfo
# celery
urllib3==2.0.5
# via requests
vine==5.0.0
# via
Expand Down
20 changes: 10 additions & 10 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
#
click==8.1.6
click==8.1.7
# via import-linter
distlib==0.3.6
distlib==0.3.7
# via virtualenv
filelock==3.12.2
filelock==3.12.4
# via
# tox
# virtualenv
grimp==2.4
grimp==3.0
# via import-linter
import-linter==1.9.0
import-linter==1.12.0
# via -r requirements/ci.in
packaging==23.1
# via tox
platformdirs==3.6.0
platformdirs==3.10.0
# via virtualenv
pluggy==1.0.0
pluggy==1.3.0
# via tox
py==1.11.0
# via tox
Expand All @@ -34,9 +34,9 @@ tox==3.28.0
# via
# -c requirements/constraints.txt
# -r requirements/ci.in
typing-extensions==4.6.3
typing-extensions==4.8.0
# via
# grimp
# import-linter
virtualenv==20.23.1
virtualenv==20.24.5
# via tox
Loading
Loading