From 2bb310c5110518143a6358f3cf1b8685e811421b Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Wed, 11 Aug 2021 09:50:23 -0400 Subject: [PATCH 1/4] Try to run codechecks3 on CI --- .circleci/config.yml | 20 +++++++++++++++++++- newsfragments/3760.minor | 0 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 newsfragments/3760.minor diff --git a/.circleci/config.yml b/.circleci/config.yml index 1fb7558de..153b29089 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -150,7 +150,7 @@ jobs: # Since this job is never scheduled this step is never run so the # actual value here is irrelevant. - lint: + codechecks: docker: - <<: *DOCKERHUB_AUTH image: "circleci/python:2" @@ -168,6 +168,24 @@ jobs: command: | ~/.local/bin/tox -e codechecks + codechecks3: + docker: + - <<: *DOCKERHUB_AUTH + image: "circleci/python:3" + + steps: + - "checkout" + + - run: + name: "Install tox" + command: | + pip install --user tox + + - run: + name: "Static-ish code checks" + command: | + ~/.local/bin/tox -e codechecks3 + pyinstaller: docker: - <<: *DOCKERHUB_AUTH diff --git a/newsfragments/3760.minor b/newsfragments/3760.minor new file mode 100644 index 000000000..e69de29bb From 97008b70b2592c94ee60c4f040a62d526c44f9c2 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Wed, 11 Aug 2021 10:25:42 -0400 Subject: [PATCH 2/4] Avoid renaming a job, it causes operational hassle --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8aa459583..5b123dfa8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -140,7 +140,7 @@ jobs: # Since this job is never scheduled this step is never run so the # actual value here is irrelevant. - codechecks: + lint: docker: - <<: *DOCKERHUB_AUTH image: "circleci/python:2" From a1112e4cd0dbbe1ddfb542d371203b1a0cb846ab Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Wed, 11 Aug 2021 10:25:49 -0400 Subject: [PATCH 3/4] Add the new job to the workflow --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5b123dfa8..28e4c8d58 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,6 +53,8 @@ workflows: # Other assorted tasks and configurations - "lint": {} + - "codechecks3": + {} - "pyinstaller": {} - "deprecations": From 9a8faae28319c40e7e480a451c10072d90ca822b Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Fri, 13 Aug 2021 09:24:00 -0400 Subject: [PATCH 4/4] Remove PYTHONIOENCODING, set for towncrier, no longer run here --- tox.ini | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tox.ini b/tox.ini index 13b2b999c..9b0f71038 100644 --- a/tox.ini +++ b/tox.ini @@ -114,13 +114,6 @@ commands = [testenv:codechecks] basepython = python2.7 setenv = - # Workaround an error when towncrier is run under the VCS hook, - # https://stackoverflow.com/a/4027726/624787: - # File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/codechecks/lib/python2.7/site-packages/towncrier/check.py", line 44, in __main - # .decode(getattr(sys.stdout, "encoding", "utf8")) - # `TypeError: decode() argument 1 must be string, not None` - PYTHONIOENCODING=utf_8 - # If no positional arguments are given, try to run the checks on the # entire codebase, including various pieces of supporting code. DEFAULT_FILES=src integration static misc setup.py @@ -190,7 +183,7 @@ passenv = TAHOE_LAFS_* PIP_* SUBUNITREPORTER_* USERPROFILE HOMEDRIVE HOMEPATH HO whitelist_externals = git deps = - # see comment in [testenv] about "certifi" + # see comment in [testenv] about "certifi" certifi towncrier==21.3.0 commands =