Repository: oppia/oppia

Issue:
Upgrade BeautifulSoup to its latest version.
Current version of BeautifulSoup used **4.6.0** and
latest version of BeautifulSoup avaliable **4.7.1** (upto date)

This issue is related to project **Upgrade third-party libraries** which is not yet released, but it is a starter issue for this project


Discussion:

Resolving patch:
diff --git a/appengine_config.py b/appengine_config.py
--- a/appengine_config.py
+++ b/appengine_config.py
@@ -87,6 +87,7 @@ def save(self):
     sys.path.insert(0, pil_path)
 
 THIRD_PARTY_LIBS = [
+    os.path.join(ROOT_PATH, 'third_party', 'backports.functools_lru_cache-1.5'),
     os.path.join(ROOT_PATH, 'third_party', 'bleach-1.2.2'),
     os.path.join(ROOT_PATH, 'third_party', 'html5lib-python-0.95'),
     os.path.join(ROOT_PATH, 'third_party', 'gae-mapreduce-1.9.17.0'),
@@ -95,8 +96,9 @@ def save(self):
     os.path.join(ROOT_PATH, 'third_party', 'graphy-1.0.0'),
     os.path.join(ROOT_PATH, 'third_party', 'requests-2.10.0'),
     os.path.join(ROOT_PATH, 'third_party', 'simplejson-3.7.1'),
-    os.path.join(ROOT_PATH, 'third_party', 'beautifulsoup4-4.6.0'),
+    os.path.join(ROOT_PATH, 'third_party', 'beautifulsoup4-4.7.1'),
     os.path.join(ROOT_PATH, 'third_party', 'mutagen-1.38'),
+    os.path.join(ROOT_PATH, 'third_party', 'soupsieve-1.8'),
 ]
 
 for lib_path in THIRD_PARTY_LIBS:
diff --git a/scripts/pre_commit_linter.py b/scripts/pre_commit_linter.py
--- a/scripts/pre_commit_linter.py
+++ b/scripts/pre_commit_linter.py
@@ -289,11 +289,13 @@
     os.path.join(_PARENT_DIR, 'oppia_tools', 'pylint-quotes-0.1.9'),
     os.path.join(_PARENT_DIR, 'oppia_tools', 'selenium-2.53.2'),
     os.path.join(_PARENT_DIR, 'oppia_tools', 'PIL-1.1.7'),
+    os.path.join('third_party', 'backports.functools_lru_cache-1.5'),
     os.path.join('third_party', 'gae-pipeline-1.9.17.0'),
     os.path.join('third_party', 'bleach-1.2.2'),
-    os.path.join('third_party', 'beautifulsoup4-4.6.0'),
+    os.path.join('third_party', 'beautifulsoup4-4.7.1'),
     os.path.join('third_party', 'gae-mapreduce-1.9.17.0'),
     os.path.join('third_party', 'mutagen-1.38'),
+    os.path.join('third_party', 'soupsieve-1.8'),
     os.path.join('third_party', 'gae-cloud-storage-1.9.15.0'),
 ]
 for path in _PATHS_TO_INSERT:


Test patch:
diff --git a/core/tests/gae_suite.py b/core/tests/gae_suite.py
--- a/core/tests/gae_suite.py
+++ b/core/tests/gae_suite.py
@@ -42,6 +42,7 @@
     os.path.join(OPPIA_TOOLS_DIR, 'selenium-2.53.2'),
     os.path.join(OPPIA_TOOLS_DIR, 'PIL-1.1.7'),
     CURR_DIR,
+    os.path.join(THIRD_PARTY_DIR, 'backports.functools_lru_cache-1.5'),
     os.path.join(THIRD_PARTY_DIR, 'bleach-1.2.2'),
     os.path.join(THIRD_PARTY_DIR, 'gae-cloud-storage-1.9.15.0'),
     os.path.join(THIRD_PARTY_DIR, 'gae-mapreduce-1.9.17.0'),
@@ -50,8 +51,9 @@
     os.path.join(THIRD_PARTY_DIR, 'html5lib-python-0.95'),
     os.path.join(THIRD_PARTY_DIR, 'requests-2.10.0'),
     os.path.join(THIRD_PARTY_DIR, 'simplejson-3.7.1'),
-    os.path.join(THIRD_PARTY_DIR, 'beautifulsoup4-4.6.0'),
+    os.path.join(THIRD_PARTY_DIR, 'beautifulsoup4-4.7.1'),
     os.path.join(THIRD_PARTY_DIR, 'mutagen-1.38'),
+    os.path.join(THIRD_PARTY_DIR, 'soupsieve-1.8'),
 ]
 
 _PARSER = argparse.ArgumentParser()