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

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
2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,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 @@ -51,7 +51,7 @@ coverage==5.5
# -r requirements/quality.txt
# codecov
# pytest-cov
diff-cover==6.3.1
diff-cover==6.3.3
# via -r requirements/dev.in
distlib==0.3.2
# via
Expand Down Expand Up @@ -127,6 +127,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 @@ -149,7 +151,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 @@ -216,7 +218,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 @@ -236,7 +238,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 @@ -120,7 +120,7 @@ sqlparse==0.4.1
# via
# -r requirements/test.txt
# django
stevedore==3.3.0
stevedore==3.4.0
# via doc8
toml==0.10.2
# via
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 @@ -54,6 +54,8 @@ packaging==21.0
# pytest
pbr==5.6.0
# via stevedore
platformdirs==2.2.0
# via pylint
pluggy==0.13.1
# via
# -r requirements/test.txt
Expand All @@ -66,7 +68,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 @@ -109,7 +111,7 @@ sqlparse==0.4.1
# via
# -r requirements/test.txt
# django
stevedore==3.3.0
stevedore==3.4.0
# via code-annotations
text-unidecode==1.3
# via python-slugify
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
Expand All @@ -35,7 +35,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()
Copy link
Member

@UsamaSadiq UsamaSadiq Aug 23, 2021

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.

if is_requirement(line.strip())
)
return list(requirements)
Expand Down Expand Up @@ -66,8 +66,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='xss-utils',
Expand Down