Skip to content

Commit 3df2172

Browse files
committed
Fix failing python tests
The requests module 1.2.3 is no longer compatible with python >=3.10.0. So, instead use 2.26.0, the most recent version that is compatible with our supported python versions at the time of this commit.
1 parent 1ebb0a0 commit 3df2172

File tree

19 files changed

+343
-44
lines changed

19 files changed

+343
-44
lines changed

.github/workflows/python-deps.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ jobs:
123123
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
124124
- uses: actions/checkout@v2
125125

126+
- uses: actions/setup-python@v2
127+
with:
128+
python-version: ${{ matrix.python-version }}
129+
126130
- name: Initialize CodeQL
127131
uses: ./init
128132
with:

python-setup/tests/check_requests_123.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ $env:PYTHONPATH=$FOUND_PYTHONPATH
1818

1919
$INSTALLED_REQUESTS_VERSION = (py -3 -c "import requests; print(requests.__version__)")
2020

21-
$EXPECTED_REQUESTS="1.2.3"
21+
$EXPECTED_REQUESTS="2.26.0"
2222

2323
if ($INSTALLED_REQUESTS_VERSION -ne $EXPECTED_REQUESTS) {
2424
write-host "Using $FOUND_PYTHONPATH as PYTHONPATH, we found version $INSTALLED_REQUESTS_VERSION of requests, but expected $EXPECTED_REQUESTS"
2525
exit 1
2626
} else {
2727
write-host "Using $FOUND_PYTHONPATH as PYTHONPATH, we found version $INSTALLED_REQUESTS_VERSION of requests, which was expected"
28-
}
28+
}

python-setup/tests/check_requests_123.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ PYTHON_EXE="python${EXPECTED_VERSION}"
2222

2323
INSTALLED_REQUESTS_VERSION=$(PYTHONPATH="${FOUND_PYTHONPATH}" "${PYTHON_EXE}" -c 'import requests; print(requests.__version__)')
2424

25-
EXPECTED_REQUESTS="1.2.3"
25+
EXPECTED_REQUESTS="2.26.0"
2626

2727
if [[ "$INSTALLED_REQUESTS_VERSION" != "$EXPECTED_REQUESTS" ]]; then
2828
echo "Using ${FOUND_PYTHONPATH} as PYTHONPATH, we found version $INSTALLED_REQUESTS_VERSION of requests, but expected $EXPECTED_REQUESTS"
2929
exit 1
3030
else
3131
echo "Using ${FOUND_PYTHONPATH} as PYTHONPATH, we found version $INSTALLED_REQUESTS_VERSION of requests, which was expected"
32-
fi
32+
fi

python-setup/tests/pipenv/python-3.8/Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ verify_ssl = true
66
[dev-packages]
77

88
[packages]
9-
requests = "*"
9+
requests = "2.26.0"
1010

1111
[requires]
1212
python_version = "3.8"

python-setup/tests/pipenv/python-3.8/Pipfile.lock

Lines changed: 35 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python-setup/tests/pipenv/requests-2/Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ verify_ssl = true
66
[dev-packages]
77

88
[packages]
9-
requests = "*"
9+
requests = "2.26.0"
1010

1111
[requires]
1212
python_version = "2.7"

python-setup/tests/pipenv/requests-2/Pipfile.lock

Lines changed: 35 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python-setup/tests/pipenv/requests-3/Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ verify_ssl = true
66
[dev-packages]
77

88
[packages]
9-
requests = "*"
9+
requests = "2.26.0"
1010

1111
[requires]

python-setup/tests/pipenv/requests-3/Pipfile.lock

Lines changed: 36 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python-setup/tests/poetry/python-3.8/poetry.lock

Lines changed: 73 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)