Merge pull request #19099 from edx/robrap/ARCH-255-update-legacy-imports

ARCH-255: update legacy imports
This commit is contained in:
Robert Raposa
2018-10-17 02:14:03 -04:00
committed by GitHub
29 changed files with 46 additions and 38 deletions

View File

@@ -1,6 +1,6 @@
from django.conf import settings
from django.http import Http404
from edx_rest_framework_extensions.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from opaque_keys.edx.keys import CourseKey
from rest_framework import parsers, permissions, status, viewsets
from rest_framework.authentication import SessionAuthentication

View File

@@ -10,7 +10,8 @@ from django.db import transaction
from django.contrib.auth import get_user_model
from django.core.exceptions import ObjectDoesNotExist
from django.utils.decorators import method_decorator
from edx_rest_framework_extensions.authentication import JwtAuthentication, SessionAuthenticationAllowInactiveUser
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser
from enrollment import api
from enrollment.errors import CourseEnrollmentError, CourseEnrollmentExistsError, CourseModeNotFoundError
from opaque_keys import InvalidKeyError

View File

@@ -5,7 +5,7 @@ from django.db.models import Q
from django.http import HttpResponseBadRequest
from django.utils import timezone
from django_filters.rest_framework import DjangoFilterBackend
from edx_rest_framework_extensions.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from edx_rest_framework_extensions.paginators import DefaultPagination
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey

View File

@@ -4,7 +4,7 @@ Third Party Auth REST API views
from django.contrib.auth.models import User
from django.db.models import Q
from django.http import Http404
from edx_rest_framework_extensions.authentication import SessionAuthenticationAllowInactiveUser
from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser
from rest_framework import exceptions, status
from rest_framework.generics import ListAPIView
from rest_framework.response import Response

View File

@@ -1,7 +1,7 @@
"""
API views for badges
"""
from edx_rest_framework_extensions.authentication import SessionAuthenticationAllowInactiveUser
from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser
from opaque_keys import InvalidKeyError
from opaque_keys.edx.django.models import CourseKeyField
from opaque_keys.edx.keys import CourseKey

View File

@@ -2,7 +2,7 @@
API views for Bulk Enrollment
"""
import json
from edx_rest_framework_extensions.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView

View File

@@ -9,7 +9,8 @@ from ccx_keys.locator import CCXLocator
from django.contrib.auth.models import User
from django.db import transaction
from django.http import Http404
from edx_rest_framework_extensions.authentication import JwtAuthentication, SessionAuthenticationAllowInactiveUser
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey, UsageKey
from rest_framework import status

View File

@@ -5,7 +5,8 @@ from rest_framework.generics import GenericAPIView
from rest_framework.response import Response
from edx_rest_framework_extensions import permissions
from edx_rest_framework_extensions.authentication import JwtAuthentication, SessionAuthenticationAllowInactiveUser
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser
from lms.djangoapps.certificates.api import get_certificate_for_user
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey

View File

@@ -3,7 +3,7 @@ import logging
from django.contrib.auth.models import User
from django.http import Http404
from edx_rest_api_client import exceptions
from edx_rest_framework_extensions.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from rest_framework.authentication import SessionAuthentication
from rest_framework.generics import ListAPIView, RetrieveUpdateAPIView
from rest_framework.permissions import IsAuthenticated

View File

@@ -9,7 +9,7 @@ from django.conf import settings
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.http import JsonResponse
from edx_rest_framework_extensions.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from eventtracking import tracker
from opaque_keys.edx.keys import CourseKey
from openedx.core.lib.api.permissions import IsStaffOrOwner

View File

@@ -3,7 +3,7 @@ Discussion API views
"""
from django.core.exceptions import ValidationError
from django.contrib.auth import get_user_model
from edx_rest_framework_extensions.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from opaque_keys.edx.keys import CourseKey
from rest_framework import permissions
from rest_framework import status

View File

@@ -20,7 +20,7 @@ from rest_framework.views import APIView
from courseware.courses import get_course_with_access
from courseware.model_data import FieldDataCache
from courseware.module_render import get_module_for_descriptor
from edx_rest_framework_extensions.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from edxmako.shortcuts import render_to_response
from edxnotes.exceptions import EdxNotesParseError, EdxNotesServiceUnavailable
from edxnotes.helpers import (

View File

@@ -1,7 +1,8 @@
from django.contrib.auth import get_user_model
from django.db import transaction
from django_filters.rest_framework import DjangoFilterBackend
from edx_rest_framework_extensions.authentication import JwtAuthentication, SessionAuthenticationAllowInactiveUser
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser
from rest_framework import permissions, viewsets
from rest_framework.decorators import list_route
from rest_framework.response import Response

View File

@@ -15,7 +15,8 @@ from six import text_type
from courseware.courses import get_course_with_access
from edx_rest_framework_extensions import permissions
from edx_rest_framework_extensions.authentication import JwtAuthentication, SessionAuthenticationAllowInactiveUser
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser
from enrollment import data as enrollment_data
from lms.djangoapps.grades.api.serializers import StudentGradebookEntrySerializer
from lms.djangoapps.grades.config.waffle import waffle_flags, WRITABLE_GRADEBOOK

View File

@@ -3167,7 +3167,7 @@ JWT_AUTH = {
'JWT_PAYLOAD_GET_USERNAME_HANDLER': lambda d: d.get('username'),
'JWT_LEEWAY': 1,
'JWT_DECODE_HANDLER': 'edx_rest_framework_extensions.utils.jwt_decode_handler',
'JWT_DECODE_HANDLER': 'edx_rest_framework_extensions.auth.jwt.decoder.jwt_decode_handler',
# Number of seconds before JWTs expire
'JWT_EXPIRATION': 30,

View File

@@ -3,7 +3,7 @@ API Views.
"""
from django_filters.rest_framework import DjangoFilterBackend
from edx_rest_framework_extensions.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from rest_framework.authentication import SessionAuthentication
from rest_framework.permissions import IsAuthenticated
from rest_framework.generics import ListAPIView

View File

@@ -10,7 +10,7 @@ import pytz
from django.conf import settings
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from edx_rest_framework_extensions.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
from rest_framework import generics, mixins, permissions, views, viewsets

View File

@@ -92,7 +92,7 @@ Authentication by REST endpoints
user of its EdXOpenIdConnect_ class is the edx-analytics-dashboard_.
.. _Django Rest Framework (DRF): https://github.com/encode/django-rest-framework
.. _JwtAuthentication: https://github.com/edx/edx-drf-extensions/blob/1db9f5e3e5130a1e0f43af2035489b3ed916d245/edx_rest_framework_extensions/authentication.py#L153
.. _JwtAuthentication: https://github.com/edx/edx-drf-extensions/blob/4569b9bf7e54a917d4acdd545b10c058c960dd1a/edx_rest_framework_extensions/auth/jwt/authentication.py#L17
.. _authentication_classes: http://www.django-rest-framework.org/api-guide/authentication/#setting-the-authentication-scheme
.. _edx-drf-extensions: https://github.com/edx/edx-drf-extensions
.. _django-rest-framework-jwt: https://github.com/GetBlimp/django-rest-framework-jwt

View File

@@ -189,7 +189,8 @@ See 0007-include-organizations-in-tokens_ for decisions on this.
.. _function-based Django views: https://docs.djangoproject.com/en/2.0/topics/http/views/
.. _Django Rest Framework (DRF): http://www.django-rest-framework.org/
.. _Python decorator: http://www.django-rest-framework.org/tutorial/2-requests-and-responses/#wrapping-api-views
.. _JwtAuthentication: https://github.com/edx/edx-drf-extensions/blob/1db9f5e3e5130a1e0f43af2035489b3ed916d245/edx_rest_framework_extensions/authentication.py#L153
.. _JwtAuthentication: https://github.com/edx/edx-drf-extensions/blob/4569b9bf7e54a917d4acdd545b10c058c960dd1a/edx_rest_framework_extensions/auth/jwt/authentication.py#L17
Consequences
------------

View File

@@ -8,7 +8,7 @@ from contextlib import closing
from pytz import UTC
from django.utils.translation import ugettext as _
from edx_rest_framework_extensions.authentication import SessionAuthenticationAllowInactiveUser
from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser
from rest_framework import permissions, status
from rest_framework.parsers import FormParser, MultiPartParser
from rest_framework.response import Response

View File

@@ -17,7 +17,8 @@ from django.db import transaction
from django.utils.translation import ugettext as _
from edx_ace import ace
from edx_ace.recipient import Recipient
from edx_rest_framework_extensions.authentication import JwtAuthentication, SessionAuthenticationAllowInactiveUser
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser
from enterprise.models import EnterpriseCourseEnrollment, EnterpriseCustomerUser, PendingEnterpriseCustomerUser
from integrated_channels.degreed.models import DegreedLearnerDataTransmissionAudit
from integrated_channels.sap_success_factors.models import SapSuccessFactorsLearnerDataTransmissionAudit

View File

@@ -11,7 +11,7 @@ from rest_framework import permissions
from django.db import transaction
from django.utils.translation import ugettext as _
from edx_rest_framework_extensions.authentication import SessionAuthenticationAllowInactiveUser
from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser
from openedx.core.lib.api.authentication import OAuth2AuthenticationAllowInactiveUser
from openedx.core.lib.api.parsers import MergePatchParser

View File

@@ -1,6 +1,6 @@
""" Verification API v1 views. """
from django.http import Http404
from edx_rest_framework_extensions.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from rest_framework.authentication import SessionAuthentication
from rest_framework.generics import RetrieveAPIView
from rest_framework_oauth.authentication import OAuth2Authentication

View File

@@ -17,7 +17,7 @@ from six import text_type
import accounts
from django_comment_common.models import Role
from edx_rest_framework_extensions.authentication import SessionAuthenticationAllowInactiveUser
from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser
from opaque_keys import InvalidKeyError
from opaque_keys.edx import locator
from opaque_keys.edx.keys import CourseKey

View File

@@ -4,7 +4,8 @@ Utilities related to API views
from django.core.exceptions import NON_FIELD_ERRORS, ObjectDoesNotExist, ValidationError
from django.http import Http404
from django.utils.translation import ugettext as _
from edx_rest_framework_extensions.authentication import JwtAuthentication, SessionAuthenticationAllowInactiveUser
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser
from rest_framework import status
from rest_framework.exceptions import APIException
from rest_framework.generics import GenericAPIView

View File

@@ -32,7 +32,7 @@ boto3==1.4.8 # Amazon Web Services SDK for Python
botocore==1.8.17 # via boto3, s3transfer
celery==3.1.25 # Asynchronous task execution library
defusedxml==0.4.1 # XML bomb protection for common XML parsers
Django==1.11.15 # Web application framework
Django==1.11.16 # Web application framework
django-babel-underscore # underscore template extractor for django-babel (internationalization utilities)
django-config-models # Configuration models for Django allowing config management with auditing
django-cors-headers==2.1.0 # Used to allow to configure CORS headers for cross-domain requests

View File

@@ -112,18 +112,18 @@ edx-ace==0.1.9
edx-analytics-data-api-client==0.14.4
edx-ccx-keys==0.2.1
edx-celeryutils==0.2.7
edx-completion==0.1.10
edx-completion==1.0.0
edx-django-oauth2-provider==1.3.5
edx-django-release-util==0.3.1
edx-django-sites-extensions==2.3.1
edx-django-utils==1.0.1
edx-drf-extensions==1.11.0
edx-enterprise==0.73.6
edx-drf-extensions==2.0.0
edx-enterprise==1.0.0
edx-i18n-tools==0.4.6
edx-milestones==0.1.13
edx-oauth2-provider==1.2.2
edx-opaque-keys[django]==0.4.4
edx-organizations==0.4.10
edx-organizations==1.0.0
edx-proctoring==1.4.0
edx-rest-api-client==1.8.2
edx-search==1.2.1

View File

@@ -131,19 +131,19 @@ edx-ace==0.1.9
edx-analytics-data-api-client==0.14.4
edx-ccx-keys==0.2.1
edx-celeryutils==0.2.7
edx-completion==0.1.10
edx-completion==1.0.0
edx-django-oauth2-provider==1.3.5
edx-django-release-util==0.3.1
edx-django-sites-extensions==2.3.1
edx-django-utils==1.0.1
edx-drf-extensions==1.11.0
edx-enterprise==0.73.6
edx-drf-extensions==2.0.0
edx-enterprise==1.0.0
edx-i18n-tools==0.4.6
edx-lint==0.5.5
edx-milestones==0.1.13
edx-oauth2-provider==1.2.2
edx-opaque-keys[django]==0.4.4
edx-organizations==0.4.10
edx-organizations==1.0.0
edx-proctoring==1.4.0
edx-rest-api-client==1.8.2
edx-search==1.2.1

View File

@@ -126,19 +126,19 @@ edx-ace==0.1.9
edx-analytics-data-api-client==0.14.4
edx-ccx-keys==0.2.1
edx-celeryutils==0.2.7
edx-completion==0.1.10
edx-completion==1.0.0
edx-django-oauth2-provider==1.3.5
edx-django-release-util==0.3.1
edx-django-sites-extensions==2.3.1
edx-django-utils==1.0.1
edx-drf-extensions==1.11.0
edx-enterprise==0.73.6
edx-drf-extensions==2.0.0
edx-enterprise==1.0.0
edx-i18n-tools==0.4.6
edx-lint==0.5.5
edx-milestones==0.1.13
edx-oauth2-provider==1.2.2
edx-opaque-keys[django]==0.4.4
edx-organizations==0.4.10
edx-organizations==1.0.0
edx-proctoring==1.4.0
edx-rest-api-client==1.8.2
edx-search==1.2.1