Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
398a8a2b
Commit
398a8a2b
authored
4 years ago
by
Luis Moreno
Browse files
Options
Downloads
Patches
Plain Diff
Fix python 3.8 compatibility
parent
41543edd
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/lib/xmodule/xmodule/modulestore/__init__.py
+7
-1
7 additions, 1 deletion
common/lib/xmodule/xmodule/modulestore/__init__.py
with
7 additions
and
1 deletion
common/lib/xmodule/xmodule/modulestore/__init__.py
+
7
−
1
View file @
398a8a2b
...
...
@@ -32,6 +32,12 @@ from xmodule.errortracker import make_error_tracker
from
.exceptions
import
InsufficientSpecificationError
,
InvalidLocationError
# The name of the type for patterns in re changed in Python 3.7.
try
:
Pattern
=
re
.
_pattern_type
# pylint: disable=protected-access
except
AttributeError
:
Pattern
=
re
.
Pattern
# pylint: disable=no-member
log
=
logging
.
getLogger
(
'
edx.modulestore
'
)
new_contract
(
'
CourseKey
'
,
CourseKey
)
...
...
@@ -899,7 +905,7 @@ class ModuleStoreRead(six.with_metaclass(ABCMeta, ModuleStoreAssetBase)):
"""
if
isinstance
(
target
,
list
):
return
any
(
self
.
_value_matches
(
ele
,
criteria
)
for
ele
in
target
)
elif
isinstance
(
criteria
,
re
.
_p
attern
_type
):
# pylint: disable=protected-access
elif
isinstance
(
criteria
,
P
attern
):
return
criteria
.
search
(
target
)
is
not
None
elif
callable
(
criteria
):
return
criteria
(
target
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment