Revert Quality fixes
This commit is contained in:
committed by
Alex Dusenbery
parent
4ca165f690
commit
ad5ed57160
@@ -19,9 +19,9 @@ from django.test.utils import override_settings
|
||||
from lms.djangoapps.ccx.tests.factories import CcxFactory
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
from openedx.core.djangoapps.content.block_structure.api import get_course_in_cache
|
||||
from openedx.core.djangoapps.request_cache.middleware import RequestCache
|
||||
from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES
|
||||
from pytz import UTC
|
||||
from openedx.core.djangoapps.request_cache.middleware import RequestCache
|
||||
from student.models import CourseEnrollment
|
||||
from student.tests.factories import UserFactory
|
||||
from xblock.core import XBlock
|
||||
|
||||
@@ -7,10 +7,10 @@ import pytz
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from course_modes.models import CourseMode
|
||||
from openedx.core.djangoapps.request_cache import get_request
|
||||
from openedx.features.course_experience.course_tools import CourseTool
|
||||
from student.models import CourseEnrollment
|
||||
from courseware.date_summary import verified_upgrade_deadline_link
|
||||
from openedx.core.djangoapps.request_cache import get_request
|
||||
|
||||
|
||||
class VerifiedUpgradeTool(CourseTool):
|
||||
|
||||
@@ -24,7 +24,7 @@ from model_utils.models import TimeStampedModel
|
||||
from opaque_keys.edx.django.models import CourseKeyField
|
||||
|
||||
from openedx.core.djangoapps.request_cache.middleware import RequestCache, ns_request_cached
|
||||
from student.models import get_retired_username_by_username
|
||||
|
||||
|
||||
CREDIT_PROVIDER_ID_REGEX = r"[a-z,A-Z,0-9,\-]+"
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
An implementation of a RequestCache. This cache is reset at the beginning
|
||||
and end of every request.
|
||||
"""
|
||||
# pylint: disable=unused-argument
|
||||
import threading
|
||||
|
||||
import crum
|
||||
@@ -21,6 +22,9 @@ REQUEST_CACHE = _RequestCache()
|
||||
|
||||
|
||||
class RequestCache(object):
|
||||
"""
|
||||
DEPRECATED Request Cache Middleware. Will be removed very shortly.
|
||||
"""
|
||||
@classmethod
|
||||
def get_request_cache(cls, name=None):
|
||||
"""
|
||||
@@ -56,7 +60,7 @@ class RequestCache(object):
|
||||
self.clear_request_cache()
|
||||
return response
|
||||
|
||||
def process_exception(self, request, exception): # pylint: disable=unused-argument
|
||||
def process_exception(self, request, exception):
|
||||
"""
|
||||
Clear the RequestCache after a failed request.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user