From 3bb44a540ff1259d4a42f5b4d1dab186664584ef Mon Sep 17 00:00:00 2001
From: Michael Youngstrom <youngstrom.m@husky.neu.edu>
Date: Fri, 1 Feb 2019 09:35:36 -0500
Subject: [PATCH] Upgrade pycountry for python3

---
 openedx/core/djangoapps/catalog/utils.py |  4 ++--
 requirements/edx/base.in                 |  2 +-
 requirements/edx/base.txt                |  2 +-
 requirements/edx/development.txt         | 10 +++++-----
 requirements/edx/testing.txt             | 12 ++++++------
 5 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/openedx/core/djangoapps/catalog/utils.py b/openedx/core/djangoapps/catalog/utils.py
index a802075d925..61e40ce4d08 100644
--- a/openedx/core/djangoapps/catalog/utils.py
+++ b/openedx/core/djangoapps/catalog/utils.py
@@ -263,8 +263,8 @@ def get_localized_price_text(price, request):
     # Override default user_currency if location is available
     if user_location and get_currency_data:
         currency_data = get_currency_data()
-        user_country = pycountry.countries.get(alpha2=user_location)
-        user_currency = currency_data.get(user_country.alpha3, user_currency)
+        user_country = pycountry.countries.get(alpha_2=user_location)
+        user_currency = currency_data.get(user_country.alpha_3, user_currency)
 
     return format_price(
         price=(price * user_currency['rate']),
diff --git a/requirements/edx/base.in b/requirements/edx/base.in
index 17a41376ab3..2e767558c76 100644
--- a/requirements/edx/base.in
+++ b/requirements/edx/base.in
@@ -114,7 +114,7 @@ piexif==1.0.2                       # Exif image metadata manipulation, used in
 Pillow                              # Image manipulation library; used for course assets, profile images, invoice PDFs, etc.
 py2neo<4.0.0                       # Used to communicate with Neo4j, which is used internally for modulestore inspection
 PyContracts==1.7.1
-pycountry==1.20
+pycountry
 pycryptodomex==3.4.7
 pygments                            # Used to support colors in paver command output
 pygraphviz                          # No longer in use?  Optional dependency of networkx, from edx-sandbox/shared.in
diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt
index 62f5c0917ea..55bb91ad655 100644
--- a/requirements/edx/base.txt
+++ b/requirements/edx/base.txt
@@ -187,7 +187,7 @@ polib==1.1.0              # via edx-i18n-tools
 psutil==1.2.1
 py2neo==3.1.2
 pycontracts==1.7.1
-pycountry==1.20
+pycountry==18.12.8
 pycparser==2.19
 pycryptodomex==3.4.7
 pygments==2.3.1
diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt
index 045ee47e202..fd7fd0bf97f 100644
--- a/requirements/edx/development.txt
+++ b/requirements/edx/development.txt
@@ -52,7 +52,7 @@ argh==0.26.2
 argparse==1.4.0
 asn1crypto==0.24.0
 astroid==1.5.3
-atomicwrites==1.2.1
+atomicwrites==1.3.0
 attrs==17.4.0
 babel==1.3
 backports.functools-lru-cache==1.5
@@ -162,7 +162,7 @@ filelock==3.0.10
 firebase-token-generator==1.3.2
 fixtures==3.0.0
 flake8-polyfill==1.0.2
-flake8==3.7.1
+flake8==3.7.4
 flask==1.0.2
 freezegun==0.3.11
 fs-s3fs==0.1.8
@@ -245,7 +245,7 @@ pyasn1-modules==0.2.4
 pyasn1==0.4.5
 pycodestyle==2.5.0
 pycontracts==1.7.1
-pycountry==1.20
+pycountry==18.12.8
 pycparser==2.19
 pycryptodomex==3.4.7
 pydispatcher==2.0.5
@@ -268,7 +268,7 @@ pysqlite==2.8.3
 pysrt==1.1.1
 pytest-attrib==0.1.3
 pytest-cov==2.6.1
-pytest-django==3.4.5
+pytest-django==3.4.6
 pytest-forked==1.0.1
 pytest-randomly==1.2.3
 pytest-xdist==1.26.1
@@ -330,7 +330,7 @@ toml==0.10.0
 tox-battery==0.5.1
 tox==3.7.0
 traceback2==1.4.0
-transifex-client==0.13.5
+transifex-client==0.13.6
 twisted==16.6.0
 typing==3.6.6
 unicodecsv==0.14.1
diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt
index b94cb73c216..95cd4a7a26d 100644
--- a/requirements/edx/testing.txt
+++ b/requirements/edx/testing.txt
@@ -49,7 +49,7 @@ argh==0.26.2
 argparse==1.4.0
 asn1crypto==0.24.0
 astroid==1.5.3            # via edx-lint, pylint, pylint-celery
-atomicwrites==1.2.1       # via pytest
+atomicwrites==1.3.0       # via pytest
 attrs==17.4.0
 babel==1.3
 backports.functools-lru-cache==1.5
@@ -156,13 +156,13 @@ filelock==3.0.10          # via tox
 firebase-token-generator==1.3.2
 fixtures==3.0.0           # via testtools
 flake8-polyfill==1.0.2    # via radon
-flake8==3.7.1             # via flake8-polyfill
+flake8==3.7.4             # via flake8-polyfill
 flask==1.0.2              # via moto
 freezegun==0.3.11
 fs-s3fs==0.1.8
 fs==2.0.18
 funcsigs==1.0.2           # via pytest
-functools32==3.2.3.post2  # via parsel
+functools32==3.2.3.post2  # via flake8, parsel
 future==0.17.1
 futures==3.2.0 ; python_version == "2.7"
 fuzzywuzzy==0.17.0
@@ -235,7 +235,7 @@ pyasn1-modules==0.2.4     # via service-identity
 pyasn1==0.4.5             # via pyasn1-modules, service-identity
 pycodestyle==2.5.0
 pycontracts==1.7.1
-pycountry==1.20
+pycountry==18.12.8
 pycparser==2.19
 pycryptodomex==3.4.7
 pydispatcher==2.0.5       # via scrapy
@@ -257,7 +257,7 @@ pysqlite==2.8.3
 pysrt==1.1.1
 pytest-attrib==0.1.3
 pytest-cov==2.6.1
-pytest-django==3.4.5
+pytest-django==3.4.6
 pytest-forked==1.0.1      # via pytest-xdist
 pytest-randomly==1.2.3
 pytest-xdist==1.26.1
@@ -315,7 +315,7 @@ toml==0.10.0              # via tox
 tox-battery==0.5.1
 tox==3.7.0
 traceback2==1.4.0         # via testtools, unittest2
-transifex-client==0.13.5
+transifex-client==0.13.6
 twisted==16.6.0           # via pa11ycrawler, scrapy
 typing==3.6.6             # via flake8
 unicodecsv==0.14.1
-- 
GitLab