From fff7c66e0fc41fa3da1d3e91996550f98d1b4bd8 Mon Sep 17 00:00:00 2001 From: Paul Prescod Date: Thu, 12 May 2022 13:57:04 -0700 Subject: [PATCH] Dependencies Update (#660) * Dependencies Update * Build fixes to work around pip-tools problems. --- .github/workflows/ci.yml | 9 +- ...extra-checks-after-pull-request-review.yml | 3 +- requirements/dev.in | 2 +- requirements/dev.txt | 87 +++++++++---------- requirements/prod.in | 3 + requirements/prod.txt | 18 ++-- .../mkdocs_plugins/main_mkdocs_plugin.py | 16 ++-- 7 files changed, 72 insertions(+), 66 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6eb53269..dcbab971 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: run: | python -VV python -m pip install --upgrade pip - make dev-install + pip install -r requirements_dev.txt - name: "Run tox targets for ${{ matrix.python-version }}" run: python -m tox @@ -51,7 +51,7 @@ jobs: run: | python -VV python -m pip install --upgrade pip - make dev-install + pip install -r requirements_dev.txt python -m pip install cumulusci - name: Run Tests @@ -69,7 +69,8 @@ jobs: - name: Install dependencies run: | python -VV - make dev-install + pip install -r requirements_dev.txt + # docs build requires a proper install python setup.py install - name: Make Docs @@ -116,7 +117,7 @@ jobs: run: | python -VV python -m pip install --upgrade pip - make dev-install + pip install -r requirements_dev.txt - name: Run Tests run: python -m pytest diff --git a/.github/workflows/extra-checks-after-pull-request-review.yml b/.github/workflows/extra-checks-after-pull-request-review.yml index 6311f811..61f7b5ee 100644 --- a/.github/workflows/extra-checks-after-pull-request-review.yml +++ b/.github/workflows/extra-checks-after-pull-request-review.yml @@ -19,7 +19,8 @@ jobs: - name: Install dependencies run: | python -VV - make dev-install + pip install -r requirements_dev.txt + # docs build requires a proper install python setup.py install - name: Make Docs diff --git a/requirements/dev.in b/requirements/dev.in index 0c1fb616..876a657d 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -2,7 +2,7 @@ black coverage coveralls -mkdocs +mkdocs<1.3.0 # need to change Snowfakery monkey-patching before upgrade mkdocs-exclude-search pre-commit pytest diff --git a/requirements/dev.txt b/requirements/dev.txt index f9c03488..cd6a8c64 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.9 # To update, run: # # pip-compile --allow-unsafe requirements/dev.in @@ -8,7 +8,7 @@ attrs==21.4.0 # via # jsonschema # pytest -black==22.1.0 +black==22.3.0 # via -r requirements/dev.in certifi==2021.10.8 # via @@ -16,16 +16,16 @@ certifi==2021.10.8 # requests cfgv==3.3.1 # via pre-commit -charset-normalizer==2.0.11 +charset-normalizer==2.0.12 # via # -r requirements/prod.txt # requests -click==8.0.3 +click==8.1.3 # via # -r requirements/prod.txt # black # mkdocs -coverage[toml]==6.3 +coverage[toml]==6.3.2 # via # -r requirements/dev.in # coveralls @@ -36,17 +36,17 @@ distlib==0.3.4 # via virtualenv docopt==0.6.2 # via coveralls -faker-microservice==2.0.0 - # via -r requirements/dev.in -faker==12.0.0 +faker==12.3.3 # via # -r requirements/prod.txt # faker-microservice -filelock==3.4.2 +faker-microservice==2.0.0 + # via -r requirements/dev.in +filelock==3.6.0 # via # tox # virtualenv -ghp-import==2.0.2 +ghp-import==2.1.0 # via mkdocs greenlet==1.1.2 # via @@ -54,30 +54,28 @@ greenlet==1.1.2 # sqlalchemy gvgen==1.0 # via -r requirements/prod.txt -identify==2.4.7 +identify==2.5.0 # via pre-commit idna==3.3 # via # -r requirements/prod.txt # requests # yarl -importlib-metadata==4.10.1 +importlib-metadata==4.11.3 # via # markdown # mkdocs -importlib-resources==5.4.0 - # via - # jsonschema - # tox-gh-actions +importlib-resources==5.7.1 + # via tox-gh-actions iniconfig==1.1.1 # via pytest jinja2==2.11.3 # via # -r requirements/prod.txt # mkdocs -jsonschema==4.4.0 +jsonschema==4.5.1 # via -r requirements/dev.in -markdown==3.3.6 +markdown==3.3.7 # via mkdocs markupsafe==2.0.1 # via @@ -85,12 +83,12 @@ markupsafe==2.0.1 # jinja2 mergedeep==1.3.4 # via mkdocs -mkdocs-exclude-search==0.6.4 - # via -r requirements/dev.in -mkdocs==1.2.3 +mkdocs==1.2.4 # via # -r requirements/dev.in # mkdocs-exclude-search +mkdocs-exclude-search==0.6.4 + # via -r requirements/dev.in multidict==6.0.2 # via yarl mypy-extensions==0.4.3 @@ -104,7 +102,7 @@ packaging==21.3 # tox pathspec==0.9.0 # via black -platformdirs==2.4.1 +platformdirs==2.5.2 # via # black # virtualenv @@ -112,7 +110,7 @@ pluggy==1.0.0 # via # pytest # tox -pre-commit==2.17.0 +pre-commit==2.19.0 # via -r requirements/dev.in py==1.11.0 # via @@ -120,19 +118,19 @@ py==1.11.0 # tox pydantic==1.9.0 # via -r requirements/prod.txt -pyparsing==3.0.7 +pyparsing==3.0.9 # via packaging pyrsistent==0.18.1 # via jsonschema -pytest-cov==3.0.0 - # via -r requirements/dev.in -pytest-vcr==1.0.2 - # via -r requirements/dev.in -pytest==6.2.5 +pytest==7.1.2 # via # -r requirements/dev.in # pytest-cov # pytest-vcr +pytest-cov==3.0.0 + # via -r requirements/dev.in +pytest-vcr==1.0.2 + # via -r requirements/dev.in python-baseconv==1.2.2 # via -r requirements/prod.txt python-dateutil==2.8.2 @@ -140,8 +138,6 @@ python-dateutil==2.8.2 # -r requirements/prod.txt # faker # ghp-import -pyyaml-env-tag==0.1 - # via mkdocs pyyaml==6.0 # via # -r requirements/prod.txt @@ -149,46 +145,47 @@ pyyaml==6.0 # pre-commit # pyyaml-env-tag # vcrpy +pyyaml-env-tag==0.1 + # via mkdocs requests==2.27.1 # via # -r requirements/prod.txt # coveralls # responses -responses==0.17.0 +responses==0.20.0 # via -r requirements/dev.in six==1.16.0 # via # -r requirements/prod.txt # python-dateutil - # responses # tox # vcrpy # virtualenv -sqlalchemy==1.4.31 +sqlalchemy==1.4.36 # via -r requirements/prod.txt toml==0.10.2 # via # pre-commit - # pytest # tox -tomli==2.0.0 +tomli==2.0.1 # via # black # coverage -tox-gh-actions==2.9.1 - # via -r requirements/dev.in -tox==3.24.5 + # pytest +tox==3.25.0 # via # -r requirements/dev.in # tox-gh-actions +tox-gh-actions==2.9.1 + # via -r requirements/dev.in typeguard==2.10.0 # via -r requirements/dev.in -typing-extensions==4.0.1 +typing-extensions==4.2.0 # via # -r requirements/prod.txt # black # pydantic -urllib3==1.26.8 +urllib3==1.26.9 # via # -r requirements/prod.txt # requests @@ -197,17 +194,17 @@ vcrpy==4.1.1 # via # -r requirements/dev.in # pytest-vcr -virtualenv==20.13.0 +virtualenv==20.14.1 # via # pre-commit # tox -watchdog==2.1.6 +watchdog==2.1.7 # via mkdocs -wrapt==1.13.3 +wrapt==1.14.1 # via vcrpy yarl==1.7.2 # via vcrpy -zipp==3.7.0 +zipp==3.8.0 # via # importlib-metadata # importlib-resources diff --git a/requirements/prod.in b/requirements/prod.in index dfb59c50..c12d129f 100644 --- a/requirements/prod.in +++ b/requirements/prod.in @@ -1,4 +1,5 @@ SQLAlchemy +# Remove this when Faker/Docs building issue is cleared up. Faker jinja2<3 # until CCI is compatible PyYAML @@ -8,3 +9,5 @@ gvgen pydantic python-baseconv requests +# This whole line should be deleted when Jinja and MarkupSafe are compatible: +MarkupSafe<2.1.0 \ No newline at end of file diff --git a/requirements/prod.txt b/requirements/prod.txt index eab18a71..d6182c82 100644 --- a/requirements/prod.txt +++ b/requirements/prod.txt @@ -1,16 +1,16 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.9 # To update, run: # # pip-compile --allow-unsafe requirements/prod.in # certifi==2021.10.8 # via requests -charset-normalizer==2.0.11 +charset-normalizer==2.0.12 # via requests -click==8.0.3 +click==8.1.3 # via -r requirements/prod.in -faker==12.0.0 +faker==12.3.3 # via -r requirements/prod.in greenlet==1.1.2 # via sqlalchemy @@ -21,7 +21,9 @@ idna==3.3 jinja2==2.11.3 # via -r requirements/prod.in markupsafe==2.0.1 - # via jinja2 + # via + # -r requirements/prod.in + # jinja2 pydantic==1.9.0 # via -r requirements/prod.in python-baseconv==1.2.2 @@ -36,9 +38,9 @@ requests==2.27.1 # via -r requirements/prod.in six==1.16.0 # via python-dateutil -sqlalchemy==1.4.31 +sqlalchemy==1.4.36 # via -r requirements/prod.in -typing-extensions==4.0.1 +typing-extensions==4.2.0 # via pydantic -urllib3==1.26.8 +urllib3==1.26.9 # via requests diff --git a/tools/faker_docs_utils/mkdocs_plugins/main_mkdocs_plugin.py b/tools/faker_docs_utils/mkdocs_plugins/main_mkdocs_plugin.py index 729ceeb6..eb181978 100644 --- a/tools/faker_docs_utils/mkdocs_plugins/main_mkdocs_plugin.py +++ b/tools/faker_docs_utils/mkdocs_plugins/main_mkdocs_plugin.py @@ -2,11 +2,9 @@ import sys import os from unittest.mock import patch -from functools import lru_cache from logging import Logger from mkdocs.plugins import BasePlugin -from faker.factory import Factory class Plugin(BasePlugin): @@ -35,12 +33,16 @@ def new_warning(self, *args, **kwargs): logger_patch = patch("logging.Logger.warning", new=new_warning) # speed up a critical function - lru_patch = patch( - "faker.factory.Factory._get_provider_class", - lru_cache(maxsize=10_000)(Factory._get_provider_class), - ) + # + # Disabled due to Faker refactoring. After release can look into + # whether it is still needed. + # + # lru_patch = patch( + # "faker.factory.Factory._get_provider_class", + # lru_cache(maxsize=10_000)(Factory._get_provider_class), + # ) - with sys_path_patch, lru_patch, logger_patch: + with sys_path_patch, logger_patch: # lru_patch, from tools.faker_docs_utils.faker_markdown import ( generate_markdown_for_all_locales, generate_markdown_for_fakers,