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 #133

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,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:
return version_match.group(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_version(*file_paths):
version string
"""
filename = os.path.join(os.path.dirname(__file__), *file_paths)
version_file = open(filename).read()
version_file = open(filename, encoding="utf8").read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def get_version(*file_paths):
version string
"""
filename = os.path.join(os.path.dirname(__file__), *file_paths)
version_file = open(filename).read()
version_file = open(filename, encoding="utf8").read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
Expand All @@ -38,7 +38,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 @@ -79,8 +79,8 @@ def package_data(pkg, roots):
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='{{ cookiecutter.repo_name }}',
Expand Down
8 changes: 5 additions & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ arrow==0.13.2
# via
# -c requirements/constraints.txt
# jinja2-time
astroid==2.6.6
astroid==2.7.2
# via
# pylint
# pylint-celery
Expand Down Expand Up @@ -57,9 +57,11 @@ mccabe==0.6.1
# via pylint
pbr==5.6.0
# via stevedore
platformdirs==2.2.0
# via pylint
poyo==0.5.0
# via cookiecutter
pylint==2.9.6
pylint==2.10.2
# via
# edx-lint
# pylint-celery
Expand Down Expand Up @@ -92,7 +94,7 @@ six==1.16.0
# python-dateutil
sqlparse==0.4.1
# via django
stevedore==3.3.0
stevedore==3.4.0
# via code-annotations
text-unidecode==1.3
# via python-slugify
Expand Down
2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,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
virtualenv==20.7.2
# via tox
9 changes: 5 additions & 4 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ arrow==0.13.2
# -c requirements/constraints.txt
# -r requirements/test.txt
# jinja2-time
astroid==2.6.6
astroid==2.7.2
# via
# -r requirements/test.txt
# pylint
Expand Down Expand Up @@ -166,6 +166,7 @@ platformdirs==2.2.0
# via
# -r requirements/ci.txt
# -r requirements/test.txt
# pylint
# virtualenv
pluggy==0.13.1
# via
Expand Down Expand Up @@ -193,7 +194,7 @@ pygments==2.10.0
# doc8
# readme-renderer
# sphinx
pylint==2.9.6
pylint==2.10.2
# via
# -r requirements/test.txt
# edx-lint
Expand Down Expand Up @@ -307,7 +308,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 All @@ -327,7 +328,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
11 changes: 7 additions & 4 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ arrow==0.13.2
# -c requirements/constraints.txt
# -r requirements/base.txt
# jinja2-time
astroid==2.6.6
astroid==2.7.2
# via
# -r requirements/base.txt
# pylint
Expand Down Expand Up @@ -133,7 +133,10 @@ pbr==5.6.0
# -r requirements/base.txt
# stevedore
platformdirs==2.2.0
# via virtualenv
# via
# -r requirements/base.txt
# pylint
# virtualenv
pluggy==0.13.1
# via pytest
poyo==0.5.0
Expand All @@ -151,7 +154,7 @@ pygments==2.10.0
# doc8
# readme-renderer
# sphinx
pylint==2.9.6
pylint==2.10.2
# via
# -r requirements/base.txt
# edx-lint
Expand Down Expand Up @@ -243,7 +246,7 @@ sqlparse==0.4.1
# via
# -r requirements/base.txt
# django
stevedore==3.3.0
stevedore==3.4.0
# via
# -r requirements/base.txt
# code-annotations
Expand Down