Skip to content

Commit

Permalink
fix: Don't import HttpClientError from edx-rest-api-client
Browse files Browse the repository at this point in the history
edx-rest-api-client was doing a wildcard import of the underlying
Slumber exception.  This wildcard impart has been droped in the latest
release 6.0.0

This change updates the edx-enterprise code to not rely on this
indirection to import the exception class.
  • Loading branch information
feanil committed Sep 24, 2024
1 parent 3ce3b38 commit 13e58d0
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 10 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Unreleased
----------
* nothing unreleased

[4.25.14]
---------
* fix: Don't import HttpClientError from edx-rest-api-client

[4.25.13]
----------
* feat: add logging to debug SAP SuccessFactors transmission issues
Expand Down Expand Up @@ -257,7 +261,7 @@ Unreleased

[4.20.7]
--------
* fix: add name from profile to group membership details
* fix: add name from profile to group membership details

[4.20.6]
--------
Expand Down
2 changes: 1 addition & 1 deletion enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Your project description goes here.
"""

__version__ = "4.25.13"
__version__ = "4.25.14"
2 changes: 1 addition & 1 deletion enterprise/api/v1/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
from collections.abc import Iterable

import pytz
from edx_rest_api_client.exceptions import HttpClientError
from oauth2_provider.generators import generate_client_id, generate_client_secret
from rest_framework import serializers
from rest_framework.fields import empty
from rest_framework.settings import api_settings
from slumber.exceptions import HttpClientError

from django.contrib import auth
from django.contrib.sites.models import Site
Expand Down
2 changes: 1 addition & 1 deletion enterprise/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
from config_models.models import ConfigurationModel
from django_countries.fields import CountryField
from edx_rbac.models import UserRole, UserRoleAssignment
from edx_rest_api_client.exceptions import HttpClientError
from fernet_fields import EncryptedCharField
from jsonfield.encoder import JSONEncoder
from jsonfield.fields import JSONField
from multi_email_field.fields import MultiEmailField
from requests.exceptions import HTTPError
from simple_history.models import HistoricalRecords
from slumber.exceptions import HttpClientError

from django.apps import apps
from django.conf import settings
Expand Down
2 changes: 1 addition & 1 deletion enterprise/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import pytz
from edx_django_utils.cache import TieredCache
from edx_django_utils.cache import get_cache_key as get_django_cache_key
from edx_rest_api_client.exceptions import HttpClientError
from slumber.exceptions import HttpClientError

from django.apps import apps
from django.conf import settings
Expand Down
2 changes: 1 addition & 1 deletion enterprise/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
import waffle # pylint: disable=invalid-django-waffle-import
from dateutil.parser import parse
from edx_django_utils import monitoring
from edx_rest_api_client.exceptions import HttpClientError
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
from slumber.exceptions import HttpClientError

from django.apps import apps
from django.conf import settings
Expand Down
2 changes: 1 addition & 1 deletion test_utils/fake_enrollment_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import json
import re

from edx_rest_api_client.exceptions import HttpClientError
from slumber.exceptions import HttpClientError

from django.conf import settings

Expand Down
2 changes: 1 addition & 1 deletion tests/test_admin/test_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
from urllib.parse import urlencode

import ddt
from edx_rest_api_client.exceptions import HttpClientError
from pytest import mark
from slumber.exceptions import HttpClientError

from django.conf import settings
from django.contrib import auth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

import ddt
from dateutil.parser import parse
from edx_rest_api_client.exceptions import HttpClientError
from pytest import mark
from slumber.exceptions import HttpClientError

from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
Expand Down
2 changes: 1 addition & 1 deletion tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

import ddt
import responses
from edx_rest_api_client.exceptions import HttpClientError
from faker import Factory as FakerFactory
from freezegun.api import freeze_time
from opaque_keys.edx.keys import CourseKey
from pytest import mark, raises
from slumber.exceptions import HttpClientError
from testfixtures import LogCapture

from django.conf import settings
Expand Down

0 comments on commit 13e58d0

Please sign in to comment.