Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Requirements Update #155

Merged
merged 2 commits into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ pytz==2021.1
# via django
sqlparse==0.4.1
# via django
stevedore==3.3.0
stevedore==3.4.0
# via -r requirements/base.in
2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ six==1.16.0
# virtualenv
toml==0.10.2
# via tox
tox==3.24.1
tox==3.24.3
# via
# -r requirements/ci.in
# tox-battery
Expand Down
12 changes: 7 additions & 5 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# make upgrade
#
astroid==2.6.6
astroid==2.7.2
# via
# -r requirements/quality.txt
# pylint
Expand Down Expand Up @@ -53,7 +53,7 @@ coverage==5.5
# pytest-cov
ddt==1.4.2
# via -r requirements/quality.txt
diff-cover==6.3.1
diff-cover==6.3.3
# via -r requirements/dev.in
distlib==0.3.2
# via
Expand Down Expand Up @@ -140,6 +140,8 @@ pip-tools==6.2.0
platformdirs==2.2.0
# via
# -r requirements/ci.txt
# -r requirements/quality.txt
# pylint
# virtualenv
pluggy==0.13.1
# via
Expand All @@ -164,7 +166,7 @@ pydocstyle==6.1.1
# via -r requirements/quality.txt
pygments==2.10.0
# via diff-cover
pylint==2.9.6
pylint==2.10.2
# via
# -r requirements/quality.txt
# edx-lint
Expand Down Expand Up @@ -231,7 +233,7 @@ sqlparse==0.4.1
# via
# -r requirements/quality.txt
# django
stevedore==3.3.0
stevedore==3.4.0
# via
# -r requirements/quality.txt
# code-annotations
Expand All @@ -251,7 +253,7 @@ tomli==1.2.1
# via
# -r requirements/pip-tools.txt
# pep517
tox==3.24.1
tox==3.24.3
# via
# -r requirements/ci.txt
# tox-battery
Expand Down
2 changes: 1 addition & 1 deletion requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ sqlparse==0.4.1
# via
# -r requirements/test.txt
# django
stevedore==3.3.0
stevedore==3.4.0
# via
# -r requirements/test.txt
# doc8
Expand Down
8 changes: 5 additions & 3 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# make upgrade
#
astroid==2.6.6
astroid==2.7.2
# via
# pylint
# pylint-celery
Expand Down Expand Up @@ -67,6 +67,8 @@ pbr==5.6.0
# via
# -r requirements/test.txt
# stevedore
platformdirs==2.2.0
# via pylint
pluggy==0.13.1
# via
# -r requirements/test.txt
Expand All @@ -81,7 +83,7 @@ pycodestyle==2.7.0
# via -r requirements/quality.in
pydocstyle==6.1.1
# via -r requirements/quality.in
pylint==2.9.6
pylint==2.10.2
# via
# edx-lint
# pylint-celery
Expand Down Expand Up @@ -124,7 +126,7 @@ sqlparse==0.4.1
# via
# -r requirements/test.txt
# django
stevedore==3.3.0
stevedore==3.4.0
# via
# -r requirements/test.txt
# code-annotations
Expand Down
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ sqlparse==0.4.1
# via
# -r requirements/base.txt
# django
stevedore==3.3.0
stevedore==3.4.0
# via -r requirements/base.txt
toml==0.10.2
# via
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def get_version(*file_paths):
Extract the version string from the file at the given relative path fragments.
"""
filename = os.path.join(os.path.dirname(__file__), *file_paths)
version_file = open(filename).read()
version_file = open(filename, encoding="utf8").read()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pylint version 2.10.0 deprecated the use of open() without explicitly specifying any encoding. See pylint-dev/pylint#3826 for details.

version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
Expand All @@ -36,7 +36,7 @@ def load_requirements(*requirements_paths):
requirements = set()
for path in requirements_paths:
requirements.update(
line.split('#')[0].strip() for line in open(path).readlines()
line.split('#')[0].strip() for line in open(path, encoding="utf8").readlines()
if is_requirement(line.strip())
)
return list(requirements)
Expand Down Expand Up @@ -67,8 +67,8 @@ def is_requirement(line):
os.system("git push --tags")
sys.exit()

README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
CHANGELOG = open(os.path.join(os.path.dirname(__file__), 'CHANGELOG.rst')).read()
README = open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding="utf8").read()
CHANGELOG = open(os.path.join(os.path.dirname(__file__), 'CHANGELOG.rst'), encoding="utf8").read()

setup(
name='edx-django-utils',
Expand Down