From 95252f1a817c735d88b97fff2a72e57f53658afd Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 5 Nov 2018 22:45:41 -0500 Subject: [PATCH] Run caniusepython3.pylint_checker --- lms/djangoapps/courseware/views/views.py | 2 +- pylintrc | 8 +++++--- pylintrc_tweaks | 5 ++++- requirements/edx/development.txt | 12 +++++++----- requirements/edx/testing.in | 1 + requirements/edx/testing.txt | 13 ++++++++----- 6 files changed, 26 insertions(+), 15 deletions(-) diff --git a/lms/djangoapps/courseware/views/views.py b/lms/djangoapps/courseware/views/views.py index 599efdc153..33cc4969ee 100644 --- a/lms/djangoapps/courseware/views/views.py +++ b/lms/djangoapps/courseware/views/views.py @@ -561,7 +561,7 @@ class CourseTabView(EdxFragmentView): @staticmethod def handle_exceptions(request, course_key, course, exception): - """ + u""" Handle exceptions raised when rendering a view. """ if isinstance(exception, Redirect) or isinstance(exception, Http404): diff --git a/pylintrc b/pylintrc index f664b86f3e..33c88dfa0d 100644 --- a/pylintrc +++ b/pylintrc @@ -55,7 +55,7 @@ [MASTER] ignore = ,.git,.tox,migrations,node_modules,.pycharm_helpers persistent = yes -load-plugins = edx_lint.pylint,pylint_django,pylint_celery +load-plugins = edx_lint.pylint,pylint_django,pylint_celery,caniusepython3.pylint_checker init-hook = "import sys; sys.path.extend(['lms/djangoapps', 'cms/djangoapps', 'common/djangoapps'])" [MESSAGES CONTROL] @@ -345,7 +345,9 @@ disable = unpacking-in-except, using-cmp-argument, xrange-builtin, - zip-builtin-not-iterating,,unicode-format-string + zip-builtin-not-iterating, + unicode-format-string, + native-string, [REPORTS] output-format = text @@ -445,4 +447,4 @@ int-import-graph = [EXCEPTIONS] overgeneral-exceptions = Exception -# c8b8d35a9a123f3c2eb3ce0cb466156bab2beedc +# 4285ece9aa125ff8efc6f77ed6d34579e65e2d96 diff --git a/pylintrc_tweaks b/pylintrc_tweaks index 6b4126f96c..e813d8b6ca 100644 --- a/pylintrc_tweaks +++ b/pylintrc_tweaks @@ -2,10 +2,13 @@ [MASTER] ignore+ = ,.git,.tox,migrations,node_modules,.pycharm_helpers init-hook="import sys; sys.path.extend(['lms/djangoapps', 'cms/djangoapps', 'common/djangoapps'])" +load-plugins+=,caniusepython3.pylint_checker [MESSAGES CONTROL] # Disable unicode-format-string until we can agree to turn it on. -disable+ = ,unicode-format-string +disable+ = + unicode-format-string, + native-string, [BASIC] attr-rgx = [a-z_][a-z0-9_]{2,40}$ diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 045ee47e20..4653142f18 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 @@ -64,6 +64,7 @@ bok-choy==0.9.0 boto3==1.4.8 boto==2.39.0 botocore==1.8.17 +caniusepython3==7.0.0 celery==3.1.25 certifi==2018.11.29 cffi==1.11.5 @@ -84,6 +85,7 @@ decorator==4.3.2 defusedxml==0.5.0 dicttoxml==1.7.4 diff-cover==0.9.8 +distlib==0.2.8 django-appconf==1.0.2 django-babel-underscore==0.5.2 django-babel==0.6.2 @@ -162,7 +164,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 @@ -224,7 +226,7 @@ oauth2==1.9.0.post1 oauthlib==2.1.0 openapi-codec==1.3.2 pa11ycrawler==1.6.2 -packaging==19.0 # via sphinx +packaging==19.0 parsel==1.5.1 path.py==8.2.1 pathlib2==2.3.3 @@ -268,7 +270,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 +332,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.in b/requirements/edx/testing.in index cb63e2fe57..2c644b78ae 100644 --- a/requirements/edx/testing.in +++ b/requirements/edx/testing.in @@ -20,6 +20,7 @@ beautifulsoup4 # Library for extracting data from HTML and XML files before_after # Syntactic sugar for mock, only used in one test case, not Python 3 compatible bok-choy # Framework for browser automation tests, based on selenium +caniusepython3 # Library for checking the ability to upgrade to python3 cssselect # Used to extract HTML fragments via CSS selectors in 2 test cases and pyquery ddt # Run a test case multiple times with different input; used in many, many of our tests edx-i18n-tools>=0.4.6 # Commands for developers and translators to extract, compile and validate translations diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index b94cb73c21..ba777092e5 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 @@ -61,6 +61,7 @@ bok-choy==0.9.0 boto3==1.4.8 boto==2.39.0 botocore==1.8.17 +caniusepython3==7.0.0 celery==3.1.25 certifi==2018.11.29 cffi==1.11.5 @@ -81,6 +82,7 @@ decorator==4.3.2 defusedxml==0.5.0 dicttoxml==1.7.4 # via moto diff-cover==0.9.8 +distlib==0.2.8 # via caniusepython3 django-appconf==1.0.2 django-babel-underscore==0.5.2 django-babel==0.6.2 @@ -156,13 +158,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 @@ -216,6 +218,7 @@ oauth2==1.9.0.post1 oauthlib==2.1.0 openapi-codec==1.3.2 pa11ycrawler==1.6.2 +packaging==19.0 # via caniusepython3 parsel==1.5.1 # via scrapy path.py==8.2.1 pathlib2==2.3.3 # via pytest, pytest-django @@ -257,7 +260,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 +318,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