From 21484854cd44031dc5994875ebd2d505c971bcfa Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 4 Feb 2022 08:42:11 -0800 Subject: [PATCH 1/7] See if pinning pip works --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b161a45caa80..a47ed2d1b9b6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -83,6 +83,9 @@ jobs: - name: Checkout uses: actions/checkout@v2.3.4 + - name: Install pip 22.0.1 + run: python -m pip install --upgrade pip==22.0.1 + - name: Install core Python requirements uses: brettcannon/pip-secure-install@v1 with: From 14193cb793a3b09fce7e8af04c38c8a45750e9ae Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 4 Feb 2022 08:44:03 -0800 Subject: [PATCH 2/7] Pin in pr check --- .github/workflows/pr-check.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 7ec43a27b925..d5f09bb79290 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -58,6 +58,9 @@ jobs: - name: Checkout uses: actions/checkout@v2.3.4 + - name: Install pip 22.0.1 + run: python -m pip install --upgrade pip==22.0.1 + - name: Install base Python requirements uses: brettcannon/pip-secure-install@v1 with: From 44d7f11660e1c786af2b68cc8b2b8c3bf591af6b Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 4 Feb 2022 08:57:07 -0800 Subject: [PATCH 3/7] Pin pip everywhere else --- .github/workflows/build.yml | 4 ++++ .github/workflows/pr-check.yml | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a47ed2d1b9b6..164cef9da7bf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -148,6 +148,10 @@ jobs: with: python-version: ${{ matrix.python }} + - name: Install pip 22.0.1 + run: python -m pip install --upgrade pip==22.0.1 + if: matrix.python != 2.7 + - name: Install debugpy run: | # We need to have debugpy so that tests relying on it keep passing, but we don't need install_debugpy's logic in the test phase. diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index d5f09bb79290..1135447b975d 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -127,6 +127,10 @@ jobs: with: python-version: ${{ matrix.python }} + - name: Install pip 22.0.1 + run: python -m pip install --upgrade pip==22.0.1 + if: matrix.python != 2.7 + - name: Install debugpy run: | # We need to have debugpy so that tests relying on it keep passing, but we don't need install_debugpy's logic in the test phase. @@ -361,6 +365,9 @@ jobs: build/test-requirements.txt build/functional-test-requirements.txt + - name: Install pip 22.0.1 + run: python -m pip install --upgrade pip==22.0.1 + - name: Install base Python requirements uses: brettcannon/pip-secure-install@v1 with: From 791ecde32a33b0f870fe35ebd29f911e3d318b0f Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 4 Feb 2022 09:30:30 -0800 Subject: [PATCH 4/7] angery --- build/test-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/test-requirements.txt b/build/test-requirements.txt index d1aad4b75ed4..c19d55d670fc 100644 --- a/build/test-requirements.txt +++ b/build/test-requirements.txt @@ -8,7 +8,7 @@ yapf pylint ; python_version > '2.7' pycodestyle pydocstyle -prospector ; python_version > '2.7' +prospector>=1.6.0 ; python_version > '2.7' pytest ; python_version > '2.7' flask fastapi ; python_version > '2.7' From 66bd6bb4df94f14f58788eb395c48828c8746d7a Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 4 Feb 2022 09:39:11 -0800 Subject: [PATCH 5/7] Undo pip changes --- .github/workflows/build.yml | 7 ------- .github/workflows/pr-check.yml | 10 ---------- 2 files changed, 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 164cef9da7bf..b161a45caa80 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -83,9 +83,6 @@ jobs: - name: Checkout uses: actions/checkout@v2.3.4 - - name: Install pip 22.0.1 - run: python -m pip install --upgrade pip==22.0.1 - - name: Install core Python requirements uses: brettcannon/pip-secure-install@v1 with: @@ -148,10 +145,6 @@ jobs: with: python-version: ${{ matrix.python }} - - name: Install pip 22.0.1 - run: python -m pip install --upgrade pip==22.0.1 - if: matrix.python != 2.7 - - name: Install debugpy run: | # We need to have debugpy so that tests relying on it keep passing, but we don't need install_debugpy's logic in the test phase. diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 1135447b975d..7ec43a27b925 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -58,9 +58,6 @@ jobs: - name: Checkout uses: actions/checkout@v2.3.4 - - name: Install pip 22.0.1 - run: python -m pip install --upgrade pip==22.0.1 - - name: Install base Python requirements uses: brettcannon/pip-secure-install@v1 with: @@ -127,10 +124,6 @@ jobs: with: python-version: ${{ matrix.python }} - - name: Install pip 22.0.1 - run: python -m pip install --upgrade pip==22.0.1 - if: matrix.python != 2.7 - - name: Install debugpy run: | # We need to have debugpy so that tests relying on it keep passing, but we don't need install_debugpy's logic in the test phase. @@ -365,9 +358,6 @@ jobs: build/test-requirements.txt build/functional-test-requirements.txt - - name: Install pip 22.0.1 - run: python -m pip install --upgrade pip==22.0.1 - - name: Install base Python requirements uses: brettcannon/pip-secure-install@v1 with: From 602223a517ae075979acf936b81071b891955f3c Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 4 Feb 2022 10:02:05 -0800 Subject: [PATCH 6/7] Pin pytest < 7.0.0 --- build/test-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/test-requirements.txt b/build/test-requirements.txt index c19d55d670fc..21e3b5627820 100644 --- a/build/test-requirements.txt +++ b/build/test-requirements.txt @@ -9,7 +9,7 @@ pylint ; python_version > '2.7' pycodestyle pydocstyle prospector>=1.6.0 ; python_version > '2.7' -pytest ; python_version > '2.7' +pytest<7.0.0 ; python_version > '2.7' flask fastapi ; python_version > '2.7' uvicorn ; python_version > '2.7' From 287ff1389ed23d27284ec3f3beb999c632a0f108 Mon Sep 17 00:00:00 2001 From: Kim-Adeline Miguel Date: Fri, 4 Feb 2022 10:20:51 -0800 Subject: [PATCH 7/7] Fix linting? --- .../pythonFiles/linting/flake8config/file.py | 49 +++++++++---------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/src/test/pythonFiles/linting/flake8config/file.py b/src/test/pythonFiles/linting/flake8config/file.py index 047ba0dc679e..9abe4993dddd 100644 --- a/src/test/pythonFiles/linting/flake8config/file.py +++ b/src/test/pythonFiles/linting/flake8config/file.py @@ -2,6 +2,7 @@ __revision__ = None + class Foo(object): """block-disable test""" @@ -10,78 +11,76 @@ def __init__(self): def meth1(self, arg): """this issues a message""" - print self + print(self) def meth2(self, arg): """and this one not""" # pylint: disable=unused-argument - print self\ - + "foo" + print(self + "foo") def meth3(self): """test one line disabling""" # no error - print self.bla # pylint: disable=no-member + print(self.bla) # pylint: disable=no-member # error - print self.blop + print(self.blop) def meth4(self): """test re-enabling""" # pylint: disable=no-member # no error - print self.bla - print self.blop + print(self.bla) + print(self.blop) # pylint: enable=no-member # error - print self.blip + print(self.blip) def meth5(self): """test IF sub-block re-enabling""" # pylint: disable=no-member # no error - print self.bla + print(self.bla) if self.blop: # pylint: enable=no-member # error - print self.blip + print(self.blip) else: # no error - print self.blip + print(self.blip) # no error - print self.blip + print(self.blip) def meth6(self): """test TRY/EXCEPT sub-block re-enabling""" # pylint: disable=no-member # no error - print self.bla + print(self.bla) try: # pylint: enable=no-member # error - print self.blip - except UndefinedName: # pylint: disable=undefined-variable + print(self.blip) + except UndefinedName: # pylint: disable=undefined-variable # no error - print self.blip + print(self.blip) # no error - print self.blip + print(self.blip) def meth7(self): """test one line block opening disabling""" - if self.blop: # pylint: disable=no-member + if self.blop: # pylint: disable=no-member # error - print self.blip + print(self.blip) else: # error - print self.blip + print(self.blip) # error - print self.blip - + print(self.blip) def meth8(self): """test late disabling""" # error - print self.blip + print(self.blip) # pylint: disable=no-member # no error - print self.bla - print self.blop \ No newline at end of file + print(self.bla) + print(self.blop)