Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
chore: Python Requirements Update (with fix for pylint 2.15) (#208)
Browse files Browse the repository at this point in the history
* chore: Updating Python Requirements

* chore: pin pylint to < 2.15.0 because the new release is not working

* chore: un-pin pylint (required hack in pylintrc_tweaks)

* chore: remove pyblake2, use correct python version

Co-authored-by: edX requirements bot <devops+edx-requirements-bot@edx.org>
  • Loading branch information
bradenmacdonald and edx-requirements-bot committed Oct 17, 2022
1 parent 6ecde29 commit 35d7d17
Show file tree
Hide file tree
Showing 14 changed files with 129 additions and 127 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ html_coverage: ## Generate HTML coverage report

quality: ## Run quality checks
${VENV_BIN}/pycodestyle --config=pycodestyle blockstore *.py
${VENV_BIN}/pylint --django-settings-module=blockstore.settings.test --rcfile=pylintrc blockstore *.py
${VENV_BIN}/pylint --django-settings-module=blockstore.settings.test blockstore *.py

validate: test quality ## Run tests and quality checks

Expand Down
2 changes: 1 addition & 1 deletion blockstore/apps/bundles/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"""
from contextlib import contextmanager
from datetime import datetime, timezone
from hashlib import blake2b
from pathlib import Path
from uuid import UUID
import codecs
Expand All @@ -22,7 +23,6 @@
from django.core.files.base import ContentFile, File
from django.dispatch import Signal
import attr
from pyblake2 import blake2b

from .links import Dependency, Link, LinkCollection, LinkChangeSet
from .storage import default_asset_storage
Expand Down
2 changes: 1 addition & 1 deletion blockstore/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
urlpatterns += make_docs_urls(api_info)

if settings.DEBUG: # pragma: no cover
import debug_toolbar # pylint: disable=import-error
import debug_toolbar # pylint: disable=import-error,useless-suppression
urlpatterns.append(url(r'^__debug__/', include(debug_toolbar.urls)))

if settings.DEBUG or os.environ['DJANGO_SETTINGS_MODULE'] == 'blockstore.settings.test':
Expand Down
9 changes: 5 additions & 4 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@
# SERIOUSLY.
#
# ------------------------------
# Generated by edx-lint version: 5.2.5
# Generated by edx-lint version: 5.3.0
# ------------------------------
[MASTER]
ignore = ,migrations, settings, setup.py, wsgi.py
persistent = yes
load-plugins = edx_lint.pylint,pylint_django,pylint_celery
init-hook = 'import sys; sys.path.append("")'

[MESSAGES CONTROL]
enable =
Expand Down Expand Up @@ -285,7 +286,7 @@ disable =
feature-toggle-needs-doc,
illegal-waffle-usage,

logging-fstring-interpolation,,invalid-name
logging-fstring-interpolation,,invalid-name,unsupported-binary-operation

[REPORTS]
output-format = text
Expand Down Expand Up @@ -326,7 +327,7 @@ ignore-imports = no

[TYPECHECK]
ignore-mixin-members = yes
ignored-classes = _CountingAttr
ignored-classes = SQLObject
unsafe-load-any-extension = yes
generated-members =
REQUEST,
Expand Down Expand Up @@ -382,4 +383,4 @@ int-import-graph =
[EXCEPTIONS]
overgeneral-exceptions = Exception

# af4b89c321cd6c4fd061d9367951e9d91f546565
# 3a1a71317c6216efa3b67e5336f5665ba2fbeb12
12 changes: 6 additions & 6 deletions pylintrc_tweaks
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[MASTER]
ignore+= ,migrations, settings, setup.py, wsgi.py
# For some reason, pylint 2.15+ isn't working without this fix. Normally
# sys.path contains "" as the first entry, but for some reason it's missing.
init-hook='import sys; sys.path.append("")'

[BASIC]
const-rgx = (([A-Z_][A-Z0-9_]*)|(__.*__)|log|urlpatterns|logger|User)$

[MESSAGES CONTROL]
DISABLE+= ,invalid-name

# Our version of pylint doesn't understand attr() generated classes.
# Can remove this once edx-lint is updated to the latest pylint
[TYPECHECK]
ignored-classes=_CountingAttr
# The 'unsupported-binary-operation' check needs to be disabled on Python<3.10 but can be left enabled once we upgrade
# to 3.10+
DISABLE+= ,invalid-name,unsupported-binary-operation
1 change: 0 additions & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
-c constraints.txt

attrs
pyblake2
django
django-environ
django-waffle
Expand Down
34 changes: 17 additions & 17 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ asgiref==3.5.2
# via django
attrs==22.1.0
# via -r requirements/base.in
certifi==2022.6.15
certifi==2022.9.24
# via requests
cffi==1.15.1
# via
Expand All @@ -24,15 +24,15 @@ coreschema==0.0.4
# via
# coreapi
# drf-yasg
cryptography==37.0.4
cryptography==38.0.1
# via
# pyjwt
# social-auth-core
defusedxml==0.7.1
# via
# python3-openid
# social-auth-core
django==3.2.15
django==3.2.16
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
Expand All @@ -52,29 +52,29 @@ django-environ==0.9.0
# via -r requirements/base.in
django-filter==22.1
# via -r requirements/base.in
django-waffle==2.7.0
django-waffle==3.0.0
# via
# -r requirements/base.in
# edx-django-utils
djangorestframework==3.13.1
djangorestframework==3.14.0
# via
# -r requirements/base.in
# drf-nested-routers
# drf-yasg
# edx-api-doc-tools
drf-nested-routers==0.93.4
# via -r requirements/base.in
drf-yasg==1.21.3
drf-yasg==1.21.4
# via edx-api-doc-tools
edx-api-doc-tools==1.6.0
# via -r requirements/base.in
edx-auth-backends==4.1.0
# via -r requirements/base.in
edx-django-release-util==1.2.0
# via -r requirements/base.in
edx-django-utils==5.0.0
edx-django-utils==5.2.0
# via -r requirements/base.in
idna==3.3
idna==3.4
# via requests
inflection==0.5.1
# via drf-yasg
Expand All @@ -86,23 +86,21 @@ markupsafe==2.1.1
# via jinja2
mysqlclient==2.1.1
# via -r requirements/base.in
newrelic==8.0.0.179
newrelic==8.2.1
# via edx-django-utils
oauthlib==3.2.0
oauthlib==3.2.1
# via
# requests-oauthlib
# social-auth-core
packaging==21.3
# via drf-yasg
pbr==5.10.0
# via stevedore
psutil==5.9.1
psutil==5.9.2
# via edx-django-utils
pyblake2==1.1.2
# via -r requirements/base.in
pycparser==2.21
# via cffi
pyjwt[crypto]==2.4.0
pyjwt[crypto]==2.5.0
# via
# edx-auth-backends
# social-auth-core
Expand All @@ -112,7 +110,7 @@ pyparsing==3.0.9
# via packaging
python3-openid==3.2.0
# via social-auth-core
pytz==2022.2.1
pytz==2022.4
# via
# -r requirements/base.in
# django
Expand Down Expand Up @@ -141,12 +139,14 @@ social-auth-core==4.3.0
# via
# edx-auth-backends
# social-auth-app-django
sqlparse==0.4.2
sqlparse==0.4.3
# via
# -r requirements/base.in
# django
stevedore==4.0.0
stevedore==4.0.1
# via edx-django-utils
types-cryptography==3.3.23.1
# via pyjwt
uritemplate==4.1.1
# via
# coreapi
Expand Down
2 changes: 2 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Django<4.0
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
elasticsearch<7.14.0

# setuptools==60.0 had breaking changes and busted several service's pipeline.
# Details can be found here: https://github.com/pypa/setuptools/issues/2940
setuptools<60

# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected
Expand Down
12 changes: 6 additions & 6 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ alabaster==0.7.12
# via sphinx
babel==2.10.3
# via sphinx
certifi==2022.6.15
certifi==2022.9.24
# via requests
charset-normalizer==2.1.1
# via requests
docutils==0.19
# via sphinx
edx-sphinx-theme==3.0.0
# via -r requirements/docs.in
idna==3.3
idna==3.4
# via requests
imagesize==1.4.1
# via sphinx
importlib-metadata==4.12.0
importlib-metadata==5.0.0
# via sphinx
jinja2==3.1.2
# via sphinx
Expand All @@ -32,15 +32,15 @@ pygments==2.13.0
# via sphinx
pyparsing==3.0.9
# via packaging
pytz==2022.2.1
pytz==2022.4
# via babel
requests==2.28.1
# via sphinx
six==1.16.0
# via edx-sphinx-theme
snowballstemmer==2.2.0
# via sphinx
sphinx==5.1.1
sphinx==5.3.0
# via
# -r requirements/docs.in
# edx-sphinx-theme
Expand All @@ -58,5 +58,5 @@ sphinxcontrib-serializinghtml==1.1.5
# via sphinx
urllib3==1.26.12
# via requests
zipp==3.8.1
zipp==3.9.0
# via importlib-metadata
Loading

0 comments on commit 35d7d17

Please sign in to comment.