From ac9ae6cc9037cff3ff08c29c2b53ae648692a3e6 Mon Sep 17 00:00:00 2001 From: Mohammad Ahtasham ul Hassan Date: Fri, 19 Nov 2021 14:38:25 +0500 Subject: [PATCH] chore: drop py36 and release with py38 --- .github/workflows/ci.yml | 8 +- .../workflows/upgrade-python-requirements.yml | 2 +- pylintrc | 403 ++++++++++-------- requirements/base.txt | 54 +-- requirements/ci.txt | 52 ++- requirements/dev.txt | 188 ++++---- requirements/doc.txt | 109 ++--- requirements/pip-tools.txt | 16 +- requirements/pip.txt | 8 +- requirements/quality.txt | 128 +++--- requirements/test.txt | 71 +-- setup.py | 31 +- tests/test_decorators.py | 4 +- tox.ini | 2 +- 14 files changed, 569 insertions(+), 507 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9207437..655842f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,12 +13,8 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ['3.6', '3.7', '3.8'] - toxenv: ['py'] - include: - - os: ubuntu-20.04 - python-version: "3.8" - toxenv: "quality" + python-version: ['3.7', '3.8'] + toxenv: ['py', 'quality'] steps: - name: checkout repo diff --git a/.github/workflows/upgrade-python-requirements.yml b/.github/workflows/upgrade-python-requirements.yml index bc265b0..69c0210 100644 --- a/.github/workflows/upgrade-python-requirements.yml +++ b/.github/workflows/upgrade-python-requirements.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: - python-version: ["3.6"] + python-version: ["3.7"] steps: - name: setup target branch diff --git a/pylintrc b/pylintrc index 165523d..d15530f 100644 --- a/pylintrc +++ b/pylintrc @@ -2,12 +2,16 @@ # ** DO NOT EDIT THIS FILE ** # *************************** # -# This file was generated by edx-lint: http://github.com/edx/edx-lint +# This file was generated by edx-lint: https://github.com/edx/edx-lint # # If you want to change this file, you have two choices, depending on whether # you want to make a local change that applies only to this repo, or whether # you want to make a central change that applies to all repos using edx-lint. # +# Note: If your pylintrc file is simply out-of-date relative to the latest +# pylintrc in edx-lint, ensure you have the latest edx-lint installed +# and then follow the steps for a "LOCAL CHANGE". +# # LOCAL CHANGE: # # 1. Edit the local pylintrc_tweaks file to add changes just to this @@ -32,19 +36,16 @@ # # 3. Run (in edx-lint): # -# # uses pylintrc_tweaks from edx-lint for linting in edx-lint -# # NOTE: Use Python 3.x, which no longer includes comments in the output file # $ edx_lint write pylintrc # # 4. Make a new version of edx_lint, submit and review a pull request with the -# pylintrc update, and after merging, update the edx-lint version by -# creating a new tag in the repo (uses pbr). +# pylintrc update, and after merging, update the edx-lint version and +# publish the new version. # # 5. In your local repo, install the newer version of edx-lint. # # 6. Run: # -# # uses local pylintrc_tweaks # $ edx_lint write pylintrc # # 7. This will modify the local file. Submit a pull request to get it @@ -63,6 +64,8 @@ # SERIOUSLY. # # ------------------------------ +# Generated by edx-lint version: 5.2.1 +# ------------------------------ [MASTER] ignore = persistent = yes @@ -73,136 +76,150 @@ enable = blacklisted-name, line-too-long, - syntax-error, - init-is-generator, - return-in-init, - function-redefined, - not-in-loop, - return-outside-function, - yield-outside-function, - return-arg-in-generator, - nonexistent-operator, - duplicate-argument-name, abstract-class-instantiated, - bad-reversed-sequence, - continue-in-finally, - method-hidden, + abstract-method, access-member-before-definition, - no-method-argument, - no-self-argument, - invalid-slots-object, + anomalous-backslash-in-string, + anomalous-unicode-escape-in-string, + arguments-differ, + assert-on-tuple, assigning-non-slot, - invalid-slots, - inherit-non-class, - inconsistent-mro, + assignment-from-no-return, + assignment-from-none, + attribute-defined-outside-init, + bad-except-order, + bad-format-character, + bad-format-string-key, + bad-format-string, + bad-open-mode, + bad-reversed-sequence, + bad-staticmethod-argument, + bad-str-strip-call, + bad-super-call, + binary-op-exception, + boolean-datetime, + catching-non-exception, + cell-var-from-loop, + confusing-with-statement, + continue-in-finally, + cyclical-import, + dangerous-default-value, + dict-items-not-iterating, + dict-keys-not-iterating, + dict-values-not-iterating, + duplicate-argument-name, duplicate-bases, - non-iterator-returned, - unexpected-special-method-signature, - invalid-length-returned, + duplicate-except, + duplicate-key, + eq-without-hash, + exception-escape, + exception-message-attribute, + expression-not-assigned, + filter-builtin-not-iterating, + format-combined-specification, + format-needs-mapping, + function-redefined, + global-variable-undefined, import-error, - used-before-assignment, - undefined-variable, - undefined-all-variable, + import-self, + inconsistent-mro, + indexing-exception, + inherit-non-class, + init-is-generator, invalid-all-object, - no-name-in-module, - unbalance-tuple-unpacking, - unpacking-non-sequence, - bad-except-order, - raising-bad-type, - misplaced-bare-raise, - raising-non-exception, - nonimplemented-raised, - catching-non-exception, - slots-on-old-class, - super-on-old-class, - bad-super-call, - missing-super-argument, - no-member, - not-callable, - assignment-from-no-return, - no-value-for-parameter, - too-many-function-args, - unexpected-keyword-arg, - redundant-keyword-arg, + invalid-encoded-data, + invalid-format-index, + invalid-length-returned, invalid-sequence-index, invalid-slice-index, - assignment-from-none, - not-context-manager, + invalid-slots-object, + invalid-slots, + invalid-str-codec, invalid-unary-operand-type, - unsupported-binary-operation, - repeated-keyword, - not-an-iterable, - not-a-mapping, - unsupported-membership-test, - unsubscriptable-object, - logging-unsupported-format, - logging-too-many-args, logging-too-few-args, - bad-format-character, - truncated-format-string, - mixed-fomat-string, - format-needs-mapping, + logging-too-many-args, + logging-unsupported-format, + lost-exception, + map-builtin-not-iterating, + method-hidden, + misplaced-bare-raise, + misplaced-future, + missing-format-argument-key, + missing-format-attribute, missing-format-string-key, - too-many-format-args, - too-few-format-args, - bad-str-strip-call, + missing-super-argument, + mixed-fomat-string, model-unicode-not-callable, - super-method-not-called, + no-member, + no-method-argument, + no-name-in-module, + no-self-argument, + no-value-for-parameter, + non-iterator-returned, non-parent-method-called, - test-inherits-tests, - translation-of-non-string, - redefined-variable-type, - cyclical-import, - unreachable, - dangerous-default-value, + nonexistent-operator, + nonimplemented-raised, + nonstandard-exception, + not-a-mapping, + not-an-iterable, + not-callable, + not-context-manager, + not-in-loop, pointless-statement, pointless-string-statement, - expression-not-assigned, - duplicate-key, - confusing-with-statement, - using-constant-test, - lost-exception, - assert-on-tuple, - attribute-defined-outside-init, - bad-staticmethod-argument, - arguments-differ, - signature-differs, - abstract-method, - super-init-not-called, - relative-import, - import-self, - misplaced-future, - invalid-encoded-data, - global-variable-undefined, - redefined-outer-name, + property-on-old-class, + raising-bad-type, + raising-non-exception, + raising-string, + range-builtin-not-iterating, redefined-builtin, redefined-in-handler, + redefined-outer-name, + redefined-variable-type, + redundant-keyword-arg, + relative-import, + repeated-keyword, + return-arg-in-generator, + return-in-init, + return-outside-function, + signature-differs, + slots-on-old-class, + super-init-not-called, + super-method-not-called, + super-on-old-class, + syntax-error, + sys-max-int, + test-inherits-tests, + too-few-format-args, + too-many-format-args, + too-many-function-args, + translation-of-non-string, + truncated-format-string, + unbalance-tuple-unpacking, + undefined-all-variable, undefined-loop-variable, - cell-var-from-loop, - duplicate-except, - nonstandard-exception, - binary-op-exception, - property-on-old-class, - bad-format-string-key, - unused-format-string-key, - bad-format-string, - missing-format-argument-key, + undefined-variable, + unexpected-keyword-arg, + unexpected-special-method-signature, + unpacking-non-sequence, + unreachable, + unsubscriptable-object, + unsupported-binary-operation, + unsupported-membership-test, unused-format-string-argument, - format-combined-specification, - missing-format-attribute, - invalid-format-index, - anomalous-backslash-in-string, - anomalous-unicode-escape-in-string, - bad-open-mode, - boolean-datetime, + unused-format-string-key, + used-before-assignment, + using-constant-test, + yield-outside-function, + zip-builtin-not-iterating, - fatal, astroid-error, - parse-error, - method-check-failed, + django-not-available-placeholder, django-not-available, + fatal, + method-check-failed, + parse-error, raw-checker-failed, - django-not-available-placeholder, empty-docstring, invalid-characters-in-docstring, @@ -210,156 +227,170 @@ enable = wrong-spelling-in-comment, wrong-spelling-in-docstring, + unused-argument, unused-import, unused-variable, - unused-argument, - exec-used, eval-used, + exec-used, bad-classmethod-argument, bad-mcs-classmethod-argument, bad-mcs-method-argument, bad-whitespace, + bare-except, + broad-except, consider-iterating-dictionary, consider-using-enumerate, + global-at-module-level, + global-variable-not-assigned, literal-used-as-attribute, + logging-format-interpolation, + logging-not-lazy, + metaclass-assignment, + model-has-unicode, + model-missing-unicode, + model-no-explicit-unicode, multiple-imports, multiple-statements, + no-classmethod-decorator, + no-staticmethod-decorator, + old-raise-syntax, old-style-class, + protected-access, + redundant-unittest-assert, + reimported, + simplifiable-if-statement, simplifiable-range, singleton-comparison, superfluous-parens, unidiomatic-typecheck, - unneeded-not, - wrong-assert-type, - simplifiable-if-statement, - no-classmethod-decorator, - no-staticmethod-decorator, - unnecessary-pass, unnecessary-lambda, - useless-else-on-loop, + unnecessary-pass, unnecessary-semicolon, - reimported, - global-variable-not-assigned, - global-at-module-level, - bare-except, - broad-except, - logging-not-lazy, - redundant-unittest-assert, - model-missing-unicode, - model-has-unicode, - model-no-explicit-unicode, - protected-access, + unneeded-not, + useless-else-on-loop, + wrong-assert-type, - deprecated-module, deprecated-method, + deprecated-module, + too-many-boolean-expressions, too-many-nested-blocks, too-many-statements, - too-many-boolean-expressions, + wildcard-import, wrong-import-order, wrong-import-position, - wildcard-import, missing-final-newline, + mixed-indentation, mixed-line-endings, trailing-newlines, trailing-whitespace, unexpected-line-ending-format, - mixed-indentation, + bad-inline-option, bad-option-value, + deprecated-pragma, unrecognized-inline-option, useless-suppression, - bad-inline-option, - deprecated-pragma, + + cmp-method, + coerce-method, + delslice-method, + dict-iter-method, + dict-view-method, + div-method, + getslice-method, + hex-method, + idiv-method, + next-method-called, + next-method-defined, + nonzero-method, + oct-method, + rdiv-method, + setslice-method, + using-cmp-argument, disable = bad-continuation, - invalid-name, - misplaced-comparison-constant, - file-ignored, bad-indentation, - lowercase-l-suffix, - unused-wildcard-import, + consider-using-f-string, + duplicate-code, + file-ignored, + fixme, global-statement, + invalid-name, + locally-disabled, + locally-enabled, + lowercase-l-suffix, + misplaced-comparison-constant, no-else-return, + no-init, + no-self-use, + suppressed-message, + too-few-public-methods, + too-many-ancestors, + too-many-arguments, + too-many-branches, + too-many-instance-attributes, + too-many-lines, + too-many-locals, + too-many-public-methods, + too-many-return-statements, + ungrouped-imports, + unspecified-encoding, + unused-wildcard-import, + use-maxsplit-arg, + + feature-toggle-needs-doc, + illegal-waffle-usage, apply-builtin, backtick, + bad-python3-import, basestring-builtin, buffer-builtin, cmp-builtin, - cmp-method, coerce-builtin, - coerce-method, - delslice-method, - dict-iter-method, - dict-view-method, - duplicate-code, + deprecated-itertools-function, + deprecated-operator-function, + deprecated-str-translate-call, + deprecated-string-function, + deprecated-sys-function, + deprecated-types-field, + deprecated-urllib-function, execfile-builtin, - feature-toggle-needs-doc, file-builtin, - filter-builtin-not-iterating, - fixme, - getslice-method, - hex-method, - illegal-waffle-usage, import-star-module-level, - indexing-exception, input-builtin, intern-builtin, - locally-disabled, - locally-enabled, - logging-format-interpolation, long-builtin, long-suffix, - map-builtin-not-iterating, - metaclass-assignment, - next-method-called, no-absolute-import, - no-init, - no-self-use, - nonzero-method, - oct-method, + non-ascii-bytes-literal, old-division, old-ne-operator, old-octal-literal, - old-raise-syntax, parameter-unpacking, print-statement, - raising-string, - range-builtin-not-iterating, raw_input-builtin, reduce-builtin, reload-builtin, round-builtin, - setslice-method, standarderror-builtin, - suppressed-message, - too-few-public-methods, - too-many-ancestors, - too-many-arguments, - too-many-branches, - too-many-instance-attributes, - too-many-lines, - too-many-locals, - too-many-public-methods, - too-many-return-statements, - ungrouped-imports, unichr-builtin, unicode-builtin, unpacking-in-except, - using-cmp-argument, xrange-builtin, - zip-builtin-not-iterating, + + logging-fstring-interpolation, [REPORTS] output-format = text files-output = no reports = no -evaluation = 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) +score = no [BASIC] bad-functions = map,filter,apply,input @@ -453,4 +484,4 @@ int-import-graph = [EXCEPTIONS] overgeneral-exceptions = Exception -# c20aad982acbdec4aab06985b08c75c4355e5266 +# 226a052a238e3a010afaf50d23347ed8a6e3b30c diff --git a/requirements/base.txt b/requirements/base.txt index d9d7073..395f391 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,73 +1,77 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.7 # To update, run: # # make upgrade # -aiohttp==3.7.4.post0 +aiohttp==3.8.1 # via # github.py # pytest-aiohttp -async-timeout==3.0.1 +aiosignal==1.2.0 + # via aiohttp +async-timeout==4.0.1 + # via aiohttp +asynctest==0.13.0 # via aiohttp attrs==21.2.0 # via # aiohttp # pytest -chardet==3.0.4 +charset-normalizer==2.0.7 + # via aiohttp +frozenlist==1.2.0 # via - # -c requirements/constraints.txt # aiohttp -gitdb==4.0.7 + # aiosignal +gitdb==4.0.9 # via gitpython -git+https://github.com/ShineyDev/github.py.git@8e3514010eb35a91e012f2935f48138b3c35cef6#egg=github.py==1.0.0a495+g8e35140 +github.py @ git+https://github.com/ShineyDev/github.py.git@8e3514010eb35a91e012f2935f48138b3c35cef6 # via -r requirements/github.in -gitpython==3.1.18 +gitpython==3.1.24 # via -r requirements/base.in -idna-ssl==1.1.0 - # via aiohttp idna==2.10 # via # -c requirements/constraints.txt - # idna-ssl # yarl -importlib-metadata==2.1.1 +importlib-metadata==2.1.2 # via # -c requirements/constraints.txt # pluggy # pytest iniconfig==1.1.1 # via pytest -multidict==5.1.0 +multidict==5.2.0 # via # aiohttp # yarl -packaging==20.9 +packaging==21.3 # via pytest -pluggy==0.13.1 +pluggy==1.0.0 # via pytest -py==1.10.0 +py==1.11.0 # via pytest -pyparsing==2.4.7 +pyparsing==3.0.6 # via packaging -pytest-aiohttp==0.3.0 - # via -r requirements/base.in -pytest==6.2.4 +pytest==6.2.5 # via # -r requirements/base.in # pytest-aiohttp -pyyaml==5.4.1 +pytest-aiohttp==0.3.0 + # via -r requirements/base.in +pyyaml==6.0 # via -r requirements/base.in -smmap==4.0.0 +smmap==5.0.0 # via gitdb toml==0.10.2 # via pytest -typing-extensions==3.10.0.0 +typing-extensions==4.0.0 # via # aiohttp + # async-timeout # gitpython # yarl -yarl==1.6.3 +yarl==1.7.2 # via aiohttp -zipp==3.4.1 +zipp==3.6.0 # via importlib-metadata diff --git a/requirements/ci.txt b/requirements/ci.txt index 37bbcfc..21a9116 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,24 +1,22 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.7 # To update, run: # # make upgrade # -appdirs==1.4.4 +backports.entry-points-selectable==1.1.1 # via virtualenv -certifi==2021.5.30 +certifi==2021.10.8 # via requests -chardet==3.0.4 - # via - # -c requirements/constraints.txt - # requests -codecov==2.1.11 +charset-normalizer==2.0.7 + # via requests +codecov==2.1.12 # via -r requirements/ci.in -coverage==5.5 +coverage==6.1.2 # via codecov -distlib==0.3.2 +distlib==0.3.3 # via virtualenv -filelock==3.0.12 +filelock==3.4.0 # via # tox # virtualenv @@ -26,23 +24,23 @@ idna==2.10 # via # -c requirements/constraints.txt # requests -importlib-metadata==2.1.1 +importlib-metadata==2.1.2 # via # -c requirements/constraints.txt # pluggy # tox # virtualenv -importlib-resources==5.1.4 - # via virtualenv -packaging==20.9 +packaging==21.3 # via tox -pluggy==0.13.1 +platformdirs==2.4.0 + # via virtualenv +pluggy==1.0.0 # via tox -py==1.10.0 +py==1.11.0 # via tox -pyparsing==2.4.7 +pyparsing==3.0.6 # via packaging -requests==2.25.1 +requests==2.26.0 # via codecov six==1.16.0 # via @@ -50,17 +48,15 @@ six==1.16.0 # virtualenv toml==0.10.2 # via tox -tox-battery==0.6.1 - # via -r requirements/ci.in -tox==3.23.1 +tox==3.24.4 # via # -r requirements/ci.in # tox-battery -urllib3==1.26.5 +tox-battery==0.6.1 + # via -r requirements/ci.in +urllib3==1.26.7 # via requests -virtualenv==20.4.7 +virtualenv==20.10.0 # via tox -zipp==3.4.1 - # via - # importlib-metadata - # importlib-resources +zipp==3.6.0 + # via importlib-metadata diff --git a/requirements/dev.txt b/requirements/dev.txt index 5eab5aa..d2e7a6f 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,24 +1,28 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.7 # To update, run: # # make upgrade # -aiohttp==3.7.4.post0 +aiohttp==3.8.1 # via # -r requirements/quality.txt # github.py # pytest-aiohttp -appdirs==1.4.4 +aiosignal==1.2.0 # via - # -r requirements/ci.txt - # virtualenv -astroid==2.5.6 + # -r requirements/quality.txt + # aiohttp +astroid==2.8.5 # via # -r requirements/quality.txt # pylint # pylint-celery -async-timeout==3.0.1 +async-timeout==4.0.1 + # via + # -r requirements/quality.txt + # aiohttp +asynctest==0.13.0 # via # -r requirements/quality.txt # aiohttp @@ -27,22 +31,21 @@ attrs==21.2.0 # -r requirements/quality.txt # aiohttp # pytest -certifi==2021.5.30 +backports.entry-points-selectable==1.1.1 + # via + # -r requirements/ci.txt + # virtualenv +certifi==2021.10.8 # via # -r requirements/ci.txt # requests -chardet==3.0.4 +charset-normalizer==2.0.7 # via - # -c requirements/constraints.txt # -r requirements/ci.txt # -r requirements/quality.txt # aiohttp # requests -click-log==0.3.2 - # via - # -r requirements/quality.txt - # edx-lint -click==8.0.1 +click==8.0.3 # via # -r requirements/pip-tools.txt # -r requirements/quality.txt @@ -50,13 +53,17 @@ click==8.0.1 # code-annotations # edx-lint # pip-tools -code-annotations==1.1.2 +click-log==0.3.2 + # via + # -r requirements/quality.txt + # edx-lint +code-annotations==1.2.0 # via # -r requirements/quality.txt # edx-lint -codecov==2.1.11 +codecov==2.1.12 # via -r requirements/ci.txt -coverage==5.5 +coverage[toml]==6.1.2 # via # -r requirements/ci.txt # -r requirements/quality.txt @@ -66,48 +73,44 @@ diff-cover==4.1.1 # via # -c requirements/constraints.txt # -r requirements/dev.in -distlib==0.3.2 +distlib==0.3.3 # via # -r requirements/ci.txt # virtualenv -django==2.2.24 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -r requirements/quality.txt - # edx-lint -edx-lint==5.0.0 +edx-lint==5.2.1 # via -r requirements/quality.txt -filelock==3.0.12 +filelock==3.4.0 # via # -r requirements/ci.txt # tox # virtualenv -gitdb==4.0.7 +frozenlist==1.2.0 + # via + # -r requirements/quality.txt + # aiohttp + # aiosignal +gitdb==4.0.9 # via # -r requirements/quality.txt # gitpython -git+https://github.com/ShineyDev/github.py.git@8e3514010eb35a91e012f2935f48138b3c35cef6#egg=github.py==1.0.0a495+g8e35140 +github.py @ git+https://github.com/ShineyDev/github.py.git@8e3514010eb35a91e012f2935f48138b3c35cef6 # via -r requirements/quality.txt -gitpython==3.1.18 +gitpython==3.1.24 # via -r requirements/quality.txt -idna-ssl==1.1.0 - # via - # -r requirements/quality.txt - # aiohttp idna==2.10 # via # -c requirements/constraints.txt # -r requirements/ci.txt # -r requirements/quality.txt - # idna-ssl # requests # yarl -importlib-metadata==2.1.1 +importlib-metadata==2.1.2 # via # -c requirements/constraints.txt # -r requirements/ci.txt # -r requirements/pip-tools.txt # -r requirements/quality.txt + # backports.entry-points-selectable # click # pep517 # pluggy @@ -115,28 +118,24 @@ importlib-metadata==2.1.1 # stevedore # tox # virtualenv -importlib-resources==5.1.4 - # via - # -r requirements/ci.txt - # virtualenv inflect==5.3.0 # via jinja2-pluralize iniconfig==1.1.1 # via # -r requirements/quality.txt # pytest -isort==5.9.1 +isort==5.10.1 # via # -r requirements/quality.txt # pylint -jinja2-pluralize==0.3.0 - # via diff-cover -jinja2==3.0.1 +jinja2==3.0.3 # via # -r requirements/quality.txt # code-annotations # diff-cover # jinja2-pluralize +jinja2-pluralize==0.3.0 + # via diff-cover lazy-object-proxy==1.6.0 # via # -r requirements/quality.txt @@ -149,46 +148,59 @@ mccabe==0.6.1 # via # -r requirements/quality.txt # pylint -multidict==5.1.0 +multidict==5.2.0 # via # -r requirements/quality.txt # aiohttp # yarl -packaging==20.9 +packaging==21.3 # via # -r requirements/ci.txt # -r requirements/quality.txt # pytest # tox -pbr==5.6.0 +pbr==5.8.0 # via # -r requirements/quality.txt # stevedore -pep517==0.10.0 +pep517==0.12.0 # via # -r requirements/pip-tools.txt # pip-tools -pip-tools==6.2.0 +pip-tools==6.4.0 # via -r requirements/pip-tools.txt -pluggy==0.13.1 +platformdirs==2.4.0 + # via + # -r requirements/ci.txt + # -r requirements/quality.txt + # pylint + # virtualenv +pluggy==1.0.0 # via # -r requirements/ci.txt # -r requirements/quality.txt # diff-cover # pytest # tox -py==1.10.0 +py==1.11.0 # via # -r requirements/ci.txt # -r requirements/quality.txt # pytest # tox -pycodestyle==2.7.0 +pycodestyle==2.8.0 # via -r requirements/quality.txt pydocstyle==6.1.1 # via -r requirements/quality.txt -pygments==2.9.0 +pygments==2.10.0 # via diff-cover +pylint==2.11.1 + # via + # -r requirements/quality.txt + # edx-lint + # pylint-celery + # pylint-django + # pylint-plugin-utils pylint-celery==0.3 # via # -r requirements/quality.txt @@ -202,40 +214,29 @@ pylint-plugin-utils==0.6 # -r requirements/quality.txt # pylint-celery # pylint-django -pylint==2.8.3 - # via - # -r requirements/quality.txt - # edx-lint - # pylint-celery - # pylint-django - # pylint-plugin-utils -pyparsing==2.4.7 +pyparsing==3.0.6 # via # -r requirements/ci.txt # -r requirements/quality.txt # packaging -pytest-aiohttp==0.3.0 - # via -r requirements/quality.txt -pytest-cov==2.12.1 - # via -r requirements/quality.txt -pytest==6.2.4 +pytest==6.2.5 # via # -r requirements/quality.txt # pytest-aiohttp # pytest-cov +pytest-aiohttp==0.3.0 + # via -r requirements/quality.txt +pytest-cov==3.0.0 + # via -r requirements/quality.txt python-slugify==5.0.2 # via # -r requirements/quality.txt # code-annotations -pytz==2021.1 - # via - # -r requirements/quality.txt - # django -pyyaml==5.4.1 +pyyaml==6.0 # via # -r requirements/quality.txt # code-annotations -requests==2.25.1 +requests==2.26.0 # via # -r requirements/ci.txt # codecov @@ -246,19 +247,15 @@ six==1.16.0 # edx-lint # tox # virtualenv -smmap==4.0.0 +smmap==5.0.0 # via # -r requirements/quality.txt # gitdb -snowballstemmer==2.1.0 +snowballstemmer==2.2.0 # via # -r requirements/quality.txt # pydocstyle -sqlparse==0.4.1 - # via - # -r requirements/quality.txt - # django -stevedore==3.3.0 +stevedore==3.5.0 # via # -r requirements/quality.txt # code-annotations @@ -269,56 +266,61 @@ text-unidecode==1.3 toml==0.10.2 # via # -r requirements/ci.txt - # -r requirements/pip-tools.txt # -r requirements/quality.txt - # pep517 # pylint # pytest - # pytest-cov # tox -tox-battery==0.6.1 - # via -r requirements/ci.txt -tox==3.23.1 +tomli==1.2.2 + # via + # -r requirements/pip-tools.txt + # -r requirements/quality.txt + # coverage + # pep517 +tox==3.24.4 # via # -r requirements/ci.txt # tox-battery -typed-ast==1.4.3 +tox-battery==0.6.1 + # via -r requirements/ci.txt +typed-ast==1.5.0 # via # -r requirements/quality.txt # astroid -typing-extensions==3.10.0.0 +typing-extensions==4.0.0 # via # -r requirements/quality.txt # aiohttp + # astroid + # async-timeout # gitpython + # pylint # yarl -urllib3==1.26.5 +urllib3==1.26.7 # via # -r requirements/ci.txt # requests -virtualenv==20.4.7 +virtualenv==20.10.0 # via # -r requirements/ci.txt # tox -wheel==0.36.2 +wheel==0.37.0 # via # -r requirements/pip-tools.txt # pip-tools -wrapt==1.12.1 +wrapt==1.13.3 # via # -r requirements/quality.txt # astroid -yarl==1.6.3 +yarl==1.7.2 # via # -r requirements/quality.txt # aiohttp -zipp==3.4.1 +zipp==3.6.0 # via # -r requirements/ci.txt # -r requirements/pip-tools.txt # -r requirements/quality.txt # importlib-metadata - # importlib-resources # pep517 # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/doc.txt b/requirements/doc.txt index 0831386..8518e58 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,17 +1,25 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.7 # To update, run: # # make upgrade # -aiohttp==3.7.4.post0 +aiohttp==3.8.1 # via # -r requirements/test.txt # github.py # pytest-aiohttp +aiosignal==1.2.0 + # via + # -r requirements/test.txt + # aiohttp alabaster==0.7.12 # via sphinx -async-timeout==3.0.1 +async-timeout==4.0.1 + # via + # -r requirements/test.txt + # aiohttp +asynctest==0.13.0 # via # -r requirements/test.txt # aiohttp @@ -22,54 +30,51 @@ attrs==21.2.0 # pytest babel==2.9.1 # via sphinx -bleach==3.3.0 +bleach==4.1.0 # via readme-renderer -certifi==2021.5.30 +certifi==2021.10.8 # via requests -chardet==3.0.4 +charset-normalizer==2.0.7 # via - # -c requirements/constraints.txt # -r requirements/test.txt # aiohttp - # doc8 # requests -coverage==5.5 +coverage[toml]==6.1.2 # via # -r requirements/test.txt # pytest-cov -doc8==0.8.1 +doc8==0.10.1 # via -r requirements/doc.in -docutils==0.16 +docutils==0.17.1 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # doc8 # readme-renderer # restructuredtext-lint # sphinx -edx-sphinx-theme==2.1.0 +edx-sphinx-theme==3.0.0 # via -r requirements/doc.in -gitdb==4.0.7 +frozenlist==1.2.0 + # via + # -r requirements/test.txt + # aiohttp + # aiosignal +gitdb==4.0.9 # via # -r requirements/test.txt # gitpython -git+https://github.com/ShineyDev/github.py.git@8e3514010eb35a91e012f2935f48138b3c35cef6#egg=github.py==1.0.0a495+g8e35140 +github.py @ git+https://github.com/ShineyDev/github.py.git@8e3514010eb35a91e012f2935f48138b3c35cef6 # via -r requirements/test.txt -gitpython==3.1.18 +gitpython==3.1.24 # via -r requirements/test.txt -idna-ssl==1.1.0 - # via - # -r requirements/test.txt - # aiohttp idna==2.10 # via # -c requirements/constraints.txt # -r requirements/test.txt - # idna-ssl # requests # yarl -imagesize==1.2.0 +imagesize==1.3.0 # via sphinx -importlib-metadata==2.1.1 +importlib-metadata==2.1.2 # via # -c requirements/constraints.txt # -r requirements/test.txt @@ -80,72 +85,70 @@ iniconfig==1.1.1 # via # -r requirements/test.txt # pytest -jinja2==3.0.1 +jinja2==3.0.3 # via sphinx markupsafe==2.0.1 # via jinja2 -multidict==5.1.0 +multidict==5.2.0 # via # -r requirements/test.txt # aiohttp # yarl -packaging==20.9 +packaging==21.3 # via # -r requirements/test.txt # bleach # pytest # sphinx -pbr==5.6.0 +pbr==5.8.0 # via stevedore -pluggy==0.13.1 +pluggy==1.0.0 # via # -r requirements/test.txt # pytest -py==1.10.0 +py==1.11.0 # via # -r requirements/test.txt # pytest -pygments==2.9.0 +pygments==2.10.0 # via # doc8 # readme-renderer # sphinx -pyparsing==2.4.7 +pyparsing==3.0.6 # via # -r requirements/test.txt # packaging -pytest-aiohttp==0.3.0 - # via -r requirements/test.txt -pytest-cov==2.12.1 - # via -r requirements/test.txt -pytest==6.2.4 +pytest==6.2.5 # via # -r requirements/test.txt # pytest-aiohttp # pytest-cov -pytz==2021.1 +pytest-aiohttp==0.3.0 + # via -r requirements/test.txt +pytest-cov==3.0.0 + # via -r requirements/test.txt +pytz==2021.3 # via babel -pyyaml==5.4.1 +pyyaml==6.0 # via -r requirements/test.txt -readme-renderer==29.0 +readme-renderer==30.0 # via -r requirements/doc.in -requests==2.25.1 +requests==2.26.0 # via sphinx restructuredtext-lint==1.3.2 # via doc8 six==1.16.0 # via # bleach - # doc8 # edx-sphinx-theme - # readme-renderer -smmap==4.0.0 +smmap==5.0.0 # via # -r requirements/test.txt # gitdb -snowballstemmer==2.1.0 +snowballstemmer==2.2.0 # via sphinx -sphinx==4.0.2 +sphinx==4.3.0 # via # -r requirements/doc.in # edx-sphinx-theme @@ -161,28 +164,32 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -stevedore==3.3.0 +stevedore==3.5.0 # via doc8 toml==0.10.2 # via # -r requirements/test.txt # pytest - # pytest-cov -typing-extensions==3.10.0.0 +tomli==1.2.2 + # via + # -r requirements/test.txt + # coverage +typing-extensions==4.0.0 # via # -r requirements/test.txt # aiohttp + # async-timeout # gitpython # yarl -urllib3==1.26.5 +urllib3==1.26.7 # via requests webencodings==0.5.1 # via bleach -yarl==1.6.3 +yarl==1.7.2 # via # -r requirements/test.txt # aiohttp -zipp==3.4.1 +zipp==3.6.0 # via # -r requirements/test.txt # importlib-metadata diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 7b36ded..735887a 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -1,25 +1,25 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.7 # To update, run: # # make upgrade # -click==8.0.1 +click==8.0.3 # via pip-tools -importlib-metadata==2.1.1 +importlib-metadata==2.1.2 # via # -c requirements/constraints.txt # click # pep517 -pep517==0.10.0 +pep517==0.12.0 # via pip-tools -pip-tools==6.2.0 +pip-tools==6.4.0 # via -r requirements/pip-tools.in -toml==0.10.2 +tomli==1.2.2 # via pep517 -wheel==0.36.2 +wheel==0.37.0 # via pip-tools -zipp==3.4.1 +zipp==3.6.0 # via # importlib-metadata # pep517 diff --git a/requirements/pip.txt b/requirements/pip.txt index 905a198..1e81b07 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,14 +1,14 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.7 # To update, run: # # make upgrade # -wheel==0.36.2 +wheel==0.37.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==21.1.2 +pip==21.3.1 # via -r requirements/pip.in -setuptools==57.0.0 +setuptools==59.2.0 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index 5152031..94a28ac 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,19 +1,27 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.7 # To update, run: # # make upgrade # -aiohttp==3.7.4.post0 +aiohttp==3.8.1 # via # -r requirements/test.txt # github.py # pytest-aiohttp -astroid==2.5.6 +aiosignal==1.2.0 + # via + # -r requirements/test.txt + # aiohttp +astroid==2.8.5 # via # pylint # pylint-celery -async-timeout==3.0.1 +async-timeout==4.0.1 + # via + # -r requirements/test.txt + # aiohttp +asynctest==0.13.0 # via # -r requirements/test.txt # aiohttp @@ -22,49 +30,44 @@ attrs==21.2.0 # -r requirements/test.txt # aiohttp # pytest -chardet==3.0.4 +charset-normalizer==2.0.7 # via - # -c requirements/constraints.txt # -r requirements/test.txt # aiohttp -click-log==0.3.2 - # via edx-lint -click==8.0.1 +click==8.0.3 # via # click-log # code-annotations # edx-lint -code-annotations==1.1.2 +click-log==0.3.2 # via edx-lint -coverage==5.5 +code-annotations==1.2.0 + # via edx-lint +coverage[toml]==6.1.2 # via # -r requirements/test.txt # pytest-cov -django==2.2.24 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # edx-lint -edx-lint==5.0.0 +edx-lint==5.2.1 # via -r requirements/quality.in -gitdb==4.0.7 +frozenlist==1.2.0 + # via + # -r requirements/test.txt + # aiohttp + # aiosignal +gitdb==4.0.9 # via # -r requirements/test.txt # gitpython -git+https://github.com/ShineyDev/github.py.git@8e3514010eb35a91e012f2935f48138b3c35cef6#egg=github.py==1.0.0a495+g8e35140 +github.py @ git+https://github.com/ShineyDev/github.py.git@8e3514010eb35a91e012f2935f48138b3c35cef6 # via -r requirements/test.txt -gitpython==3.1.18 +gitpython==3.1.24 # via -r requirements/test.txt -idna-ssl==1.1.0 - # via - # -r requirements/test.txt - # aiohttp idna==2.10 # via # -c requirements/constraints.txt # -r requirements/test.txt - # idna-ssl # yarl -importlib-metadata==2.1.1 +importlib-metadata==2.1.2 # via # -c requirements/constraints.txt # -r requirements/test.txt @@ -76,11 +79,11 @@ iniconfig==1.1.1 # via # -r requirements/test.txt # pytest -isort==5.9.1 +isort==5.10.1 # via # -r requirements/quality.in # pylint -jinja2==3.0.1 +jinja2==3.0.3 # via code-annotations lazy-object-proxy==1.6.0 # via astroid @@ -88,29 +91,37 @@ markupsafe==2.0.1 # via jinja2 mccabe==0.6.1 # via pylint -multidict==5.1.0 +multidict==5.2.0 # via # -r requirements/test.txt # aiohttp # yarl -packaging==20.9 +packaging==21.3 # via # -r requirements/test.txt # pytest -pbr==5.6.0 +pbr==5.8.0 # via stevedore -pluggy==0.13.1 +platformdirs==2.4.0 + # via pylint +pluggy==1.0.0 # via # -r requirements/test.txt # pytest -py==1.10.0 +py==1.11.0 # via # -r requirements/test.txt # pytest -pycodestyle==2.7.0 +pycodestyle==2.8.0 # via -r requirements/quality.in pydocstyle==6.1.1 # via -r requirements/quality.in +pylint==2.11.1 + # via + # edx-lint + # pylint-celery + # pylint-django + # pylint-plugin-utils pylint-celery==0.3 # via edx-lint pylint-django==2.4.4 @@ -119,44 +130,34 @@ pylint-plugin-utils==0.6 # via # pylint-celery # pylint-django -pylint==2.8.3 - # via - # edx-lint - # pylint-celery - # pylint-django - # pylint-plugin-utils -pyparsing==2.4.7 +pyparsing==3.0.6 # via # -r requirements/test.txt # packaging -pytest-aiohttp==0.3.0 - # via -r requirements/test.txt -pytest-cov==2.12.1 - # via -r requirements/test.txt -pytest==6.2.4 +pytest==6.2.5 # via # -r requirements/test.txt # pytest-aiohttp # pytest-cov +pytest-aiohttp==0.3.0 + # via -r requirements/test.txt +pytest-cov==3.0.0 + # via -r requirements/test.txt python-slugify==5.0.2 # via code-annotations -pytz==2021.1 - # via django -pyyaml==5.4.1 +pyyaml==6.0 # via # -r requirements/test.txt # code-annotations six==1.16.0 # via edx-lint -smmap==4.0.0 +smmap==5.0.0 # via # -r requirements/test.txt # gitdb -snowballstemmer==2.1.0 +snowballstemmer==2.2.0 # via pydocstyle -sqlparse==0.4.1 - # via django -stevedore==3.3.0 +stevedore==3.5.0 # via code-annotations text-unidecode==1.3 # via python-slugify @@ -165,22 +166,31 @@ toml==0.10.2 # -r requirements/test.txt # pylint # pytest - # pytest-cov -typed-ast==1.4.3 +tomli==1.2.2 + # via + # -r requirements/test.txt + # coverage +typed-ast==1.5.0 # via astroid -typing-extensions==3.10.0.0 +typing-extensions==4.0.0 # via # -r requirements/test.txt # aiohttp + # astroid + # async-timeout # gitpython + # pylint # yarl -wrapt==1.12.1 +wrapt==1.13.3 # via astroid -yarl==1.6.3 +yarl==1.7.2 # via # -r requirements/test.txt # aiohttp -zipp==3.4.1 +zipp==3.6.0 # via # -r requirements/test.txt # importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/requirements/test.txt b/requirements/test.txt index b373f37..71ee877 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,15 +1,23 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.7 # To update, run: # # make upgrade # -aiohttp==3.7.4.post0 +aiohttp==3.8.1 # via # -r requirements/base.txt # github.py # pytest-aiohttp -async-timeout==3.0.1 +aiosignal==1.2.0 + # via + # -r requirements/base.txt + # aiohttp +async-timeout==4.0.1 + # via + # -r requirements/base.txt + # aiohttp +asynctest==0.13.0 # via # -r requirements/base.txt # aiohttp @@ -18,32 +26,31 @@ attrs==21.2.0 # -r requirements/base.txt # aiohttp # pytest -chardet==3.0.4 +charset-normalizer==2.0.7 # via - # -c requirements/constraints.txt # -r requirements/base.txt # aiohttp -coverage==5.5 +coverage[toml]==6.1.2 # via pytest-cov -gitdb==4.0.7 +frozenlist==1.2.0 + # via + # -r requirements/base.txt + # aiohttp + # aiosignal +gitdb==4.0.9 # via # -r requirements/base.txt # gitpython -git+https://github.com/ShineyDev/github.py.git@8e3514010eb35a91e012f2935f48138b3c35cef6#egg=github.py==1.0.0a495+g8e35140 +github.py @ git+https://github.com/ShineyDev/github.py.git@8e3514010eb35a91e012f2935f48138b3c35cef6 # via -r requirements/base.txt -gitpython==3.1.18 +gitpython==3.1.24 # via -r requirements/base.txt -idna-ssl==1.1.0 - # via - # -r requirements/base.txt - # aiohttp idna==2.10 # via # -c requirements/constraints.txt # -r requirements/base.txt - # idna-ssl # yarl -importlib-metadata==2.1.1 +importlib-metadata==2.1.2 # via # -c requirements/constraints.txt # -r requirements/base.txt @@ -53,39 +60,39 @@ iniconfig==1.1.1 # via # -r requirements/base.txt # pytest -multidict==5.1.0 +multidict==5.2.0 # via # -r requirements/base.txt # aiohttp # yarl -packaging==20.9 +packaging==21.3 # via # -r requirements/base.txt # pytest -pluggy==0.13.1 +pluggy==1.0.0 # via # -r requirements/base.txt # pytest -py==1.10.0 +py==1.11.0 # via # -r requirements/base.txt # pytest -pyparsing==2.4.7 +pyparsing==3.0.6 # via # -r requirements/base.txt # packaging -pytest-aiohttp==0.3.0 - # via -r requirements/base.txt -pytest-cov==2.12.1 - # via -r requirements/test.in -pytest==6.2.4 +pytest==6.2.5 # via # -r requirements/base.txt # pytest-aiohttp # pytest-cov -pyyaml==5.4.1 +pytest-aiohttp==0.3.0 # via -r requirements/base.txt -smmap==4.0.0 +pytest-cov==3.0.0 + # via -r requirements/test.in +pyyaml==6.0 + # via -r requirements/base.txt +smmap==5.0.0 # via # -r requirements/base.txt # gitdb @@ -93,18 +100,20 @@ toml==0.10.2 # via # -r requirements/base.txt # pytest - # pytest-cov -typing-extensions==3.10.0.0 +tomli==1.2.2 + # via coverage +typing-extensions==4.0.0 # via # -r requirements/base.txt # aiohttp + # async-timeout # gitpython # yarl -yarl==1.6.3 +yarl==1.7.2 # via # -r requirements/base.txt # aiohttp -zipp==3.4.1 +zipp==3.6.0 # via # -r requirements/base.txt # importlib-metadata diff --git a/setup.py b/setup.py index 768c563..b93dc0c 100644 --- a/setup.py +++ b/setup.py @@ -13,9 +13,11 @@ 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_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", - version_file, re.M) + with open(filename) as version_file: + version_file = version_file.read() + version_match = re.search( + r"^__version__ = ['\"]([^'\"]*)['\"]",version_file, re.M + ) if version_match: return version_match.group(1) raise RuntimeError('Unable to find version string.') @@ -23,7 +25,7 @@ def get_version(*file_paths): def read(fname): file_path = os.path.join(os.path.dirname(__file__), fname) - return codecs.open(file_path, encoding='utf-8').read() + return codecs.open(file_path).read() def load_requirements(*requirements_paths): @@ -65,8 +67,9 @@ def add_version_constraint_or_raise(current_line, current_requirements, add_if_n if is_requirement(line): add_version_constraint_or_raise(line, requirements, True) if line and line.startswith('-c') and not line.startswith('-c http'): - constraint_files.add(os.path.dirname(path) + '/' + line.split('#')[0].replace('-c', '').strip()) - + constraint_files.add( + os.path.dirname(path) + '/' + line.split('#')[0].replace('-c', '').strip() + ) # process constraint files and add any new constraints found to existing requirements for constraint_file in constraint_files: with open(constraint_file) as reader: @@ -75,7 +78,9 @@ def add_version_constraint_or_raise(current_line, current_requirements, add_if_n add_version_constraint_or_raise(line, requirements, False) # process back into list of pkg><=constraints strings - constrained_requirements = [f'{pkg}{version or ""}' for (pkg, version) in sorted(requirements.items())] + constrained_requirements = [ + f'{pkg}{version or ""}' for (pkg, version) in sorted(requirements.items()) + ] return constrained_requirements @@ -92,13 +97,16 @@ def is_requirement(line): return line and line.strip() and not line.startswith(('-r', '#', '-e', 'git+', '-c')) -README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() -CHANGELOG = open(os.path.join(os.path.dirname(__file__), 'CHANGELOG.rst')).read() +with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme_file: + README = readme_file.read() + +with open(os.path.join(os.path.dirname(__file__), 'CHANGELOG.rst')) as changelog_file: + CHANGELOG = changelog_file.read() VERSION = get_version('pytest_repo_health', '__init__.py') if sys.argv[-1] == 'tag': print("Tagging the version on github:") - os.system("git tag -a %s -m '%s'" % (VERSION, VERSION)) + os.system(f"git tag -a ${VERSION} -m '${VERSION}'") os.system("git push --tags") sys.exit() @@ -111,7 +119,7 @@ def is_requirement(line): description='A pytest plugin to report on repository standards conformance', long_description=read('README.rst'), packages=find_packages(exclude=["tests"]), - python_requires=">=3.6", + python_requires=">=3.7", install_requires=load_requirements('requirements/base.in'), zip_safe=False, keywords='pytest edx', @@ -124,7 +132,6 @@ def is_requirement(line): 'Topic :: Software Development :: Testing', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', ], diff --git a/tests/test_decorators.py b/tests/test_decorators.py index c66e1a7..2efb6b8 100644 --- a/tests/test_decorators.py +++ b/tests/test_decorators.py @@ -28,7 +28,7 @@ def test_health_metadata(testdir): assert (metadata_yaml_path).exists() # converting metadata_yaml_path to str cause pathlib doesn't work will with open in python 3.5 with open(str(metadata_yaml_path)) as y_f: - content = yaml.load(y_f) + content = yaml.load(y_f, Loader=yaml.Loader) # name based on kwrg input to run_checks funtion assert "check_test_health_metadata.py" in content.keys() assert "check_decorator" in content["check_test_health_metadata.py"] @@ -61,7 +61,7 @@ def test_add_key_to_metadata(testdir): assert (metadata_yaml_path).exists() # converting metadata_yaml_path to str cause pathlib doesn't work will with open in python 3.5 with open(str(metadata_yaml_path)) as y_f: - content = yaml.load(y_f) + content = yaml.load(y_f, Loader=yaml.Loader) # name based on kwrg input to run_checks funtion assert "check_test_add_key_to_metadata.py" in content.keys() assert "check_decorator" in content["check_test_add_key_to_metadata.py"] diff --git a/tox.ini b/tox.ini index 77b7acc..9cbd1e5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py36,py37,py38,quality +envlist = py37,py38,quality [doc8] max-line-length = 120