forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: make safe_lxml an ordinary folder in openedx/core/lib (open…
- Loading branch information
1 parent
2ef25e3
commit 25df9ca
Showing
24 changed files
with
58 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
"""Code run by pylint before running any tests.""" | ||
from safe_lxml import defuse_xml_libs | ||
|
||
# Patch the xml libs before anything else. | ||
from openedx.core.lib.safe_lxml import defuse_xml_libs | ||
|
||
defuse_xml_libs() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
""" | ||
Code run by pytest before running any tests in the safe_lxml directory. | ||
""" | ||
from openedx.core.lib.safe_lxml import defuse_xml_libs | ||
|
||
|
||
defuse_xml_libs() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 9 additions & 1 deletion
10
common/lib/safe_lxml/safe_lxml/tests.py → openedx/core/lib/safe_lxml/tests.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,6 @@ | |
# via -r requirements/edx/local.in | ||
-e git+https://github.com/edx/[email protected]#egg=rate-xblock | ||
# via -r requirements/edx/github.in | ||
-e common/lib/safe_lxml | ||
# via -r requirements/edx/local.in | ||
-e common/lib/sandbox-packages | ||
# via -r requirements/edx/local.in | ||
-e openedx/core/lib/xblock_builtin/xblock_discussion | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,6 @@ | |
# via -r requirements/edx/testing.txt | ||
-e git+https://github.com/edx/[email protected]#egg=rate-xblock | ||
# via -r requirements/edx/testing.txt | ||
-e common/lib/safe_lxml | ||
# via -r requirements/edx/testing.txt | ||
-e common/lib/sandbox-packages | ||
# via -r requirements/edx/testing.txt | ||
-e openedx/core/lib/xblock_builtin/xblock_discussion | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,6 @@ | |
# via -r requirements/edx/base.txt | ||
-e git+https://github.com/edx/[email protected]#egg=rate-xblock | ||
# via -r requirements/edx/base.txt | ||
-e common/lib/safe_lxml | ||
# via -r requirements/edx/base.txt | ||
-e common/lib/sandbox-packages | ||
# via -r requirements/edx/base.txt | ||
-e openedx/core/lib/xblock_builtin/xblock_discussion | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
""" | ||
Temporary import path shim module. | ||
Previously, the safe_lxml package was housed in common/lib/safe_lxml. | ||
It was installed as its own Python project, so instead of its import path | ||
being, as one would expect: | ||
import common.lib.safe_lxml.safe_lxml | ||
it was instead just: | ||
import safe_lxml | ||
To increase the sanity of edx-platform and simplify its tooling, we are | ||
moving the safe_lxml package to openedx/core/lib (in tihs same repo) and | ||
changing its import path to: | ||
import openedx.core.lib.safe_lxml | ||
In order to maintain backwards-compatibility with code using the | ||
old import path for one release, we expose this compatibility module. | ||
Jira ticket (public, but requires account): https://openedx.atlassian.net/browse/BOM-2583 | ||
Target removal for this shim module: by Olive. | ||
""" | ||
|
||
from openedx.core.lib.safe_lxml import * # pylint: disable=unused-wildcard-import,wrong-import-order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,4 +47,3 @@ multi_line_output=3 | |
skip= | ||
envs | ||
migrations | ||
common/lib/safe_lxml/safe_lxml/etree.py |