Skip to content

Commit

Permalink
feat: Upgrade Python to 3.8 (#1778)
Browse files Browse the repository at this point in the history
* update Pipfile

* update github workflow

* update Dockerfiles
  • Loading branch information
cewei8483 committed Jun 23, 2023
1 parent d92982e commit ebf6131
Show file tree
Hide file tree
Showing 15 changed files with 542 additions and 467 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.7"
python-version: "3.8"
architecture: "x64"
- name: Use Node.js
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.7"
python-version: "3.8"
architecture: "x64"
- name: Use Node.js
uses: actions/setup-node@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Setup python-version
uses: actions/setup-python@v4
with:
python-version: "3.7"
python-version: "3.8"
architecture: "x64"
- name: Install Python dependencies
run: |
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Generate requirements
run: pip freeze --all > requirements.txt
- name: Run Snyk to check for vulnerabilities in Python
uses: snyk/actions/python-3.7@master
uses: snyk/actions/python-3.8@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ wheel = "*"
importlib-metadata = "<5" # Using version 5 causes an issue when trying to run pytest. Not sure why, linked to: https://stackoverflow.com/questions/73929564/entrypoints-object-has-no-attribute-get-digital-ocean

[requires]
python_version = "3.7"
python_version = "3.8"

[pipenv]
allow_prereleases = true
457 changes: 266 additions & 191 deletions Pipfile.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions aimmo-game-creator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM python:3.7.12-buster as builder
FROM python:3.8.17-buster as builder
LABEL Author='codeforlife@ocado.com'
RUN pip install pipenv=="2018.11.26"
COPY ["Pipfile", "Pipfile.lock", "setup.py", "./"]
RUN pipenv install --system --deploy

FROM python:3.7.12-buster as base
COPY --from=builder /usr/local/lib/python3.7/site-packages /usr/local/lib/python3.7/site-packages
FROM python:3.8.17-buster as base
COPY --from=builder /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
COPY . .

FROM base as tester
Expand Down
2 changes: 1 addition & 1 deletion aimmo-game-creator/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ aimmo-game-creator = { editable = true, path = "." }
google-cloud-logging = "*"

[requires]
python_version = "3.7"
python_version = "3.8"

[dev-packages]
black = "==20.8b1"
Expand Down
390 changes: 195 additions & 195 deletions aimmo-game-creator/Pipfile.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions aimmo-game-worker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM python:3.7.12-buster as builder
FROM python:3.8.17-buster as builder
LABEL Author='codeforlife@ocado.com'

RUN pip install pipenv=="2018.11.26"
COPY ["Pipfile", "Pipfile.lock", "setup.py", "./"]
RUN pipenv install --system --deploy

FROM python:3.7.12-buster as base
COPY --from=builder /usr/local/lib/python3.7/site-packages /usr/local/lib/python3.7/site-packages
FROM python:3.8.17-buster as base
COPY --from=builder /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
COPY . .

FROM base as tester
Expand Down
2 changes: 1 addition & 1 deletion aimmo-game-worker/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ aiohttp-cors = "*"
idna-ssl = "*"

[requires]
python_version = "3.7"
python_version = "3.8"

[dev-packages]
"autopep8" = "*"
52 changes: 26 additions & 26 deletions aimmo-game-worker/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions aimmo-game/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM python:3.7.12-buster as builder
FROM python:3.8.17-buster as builder
LABEL Author='codeforlife@ocado.com'

RUN pip install pipenv=="2018.11.26"
COPY ["Pipfile", "Pipfile.lock", "setup.py", "./"]
RUN pipenv install --system --deploy

FROM python:3.7.12-buster as base
COPY --from=builder /usr/local/lib/python3.7/site-packages /usr/local/lib/python3.7/site-packages
FROM python:3.8.17-buster as base
COPY --from=builder /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
COPY . .

FROM base as tester
Expand Down
2 changes: 1 addition & 1 deletion aimmo-game/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ kubernetes = "==26.1.0"
docker = "<6"

[requires]
python_version = "3.7"
python_version = "3.8"
Loading

0 comments on commit ebf6131

Please sign in to comment.