Skip to content

Commit f579153

Browse files
authored
Upgrade to Python 12 (#920)
* Upgrade to Python 3.12 * pkill
1 parent 27cda09 commit f579153

8 files changed

Lines changed: 13 additions & 13 deletions

File tree

.github/workflows/code-static-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ jobs:
3333
steps:
3434
- name: Checkout repository
3535
uses: actions/checkout@v4
36-
- name: Set up Python 3.8
36+
- name: Set up Python 3.12
3737
if: ${{ matrix.language == 'python' }}
3838
uses: actions/setup-python@v5
3939
with:
40-
python-version: '3.8'
40+
python-version: '3.12'
4141
- name: Install dependencies
4242
if: ${{ matrix.language == 'python' }}
4343
run: |

.github/workflows/predeploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
uses: actions/setup-node@v4
2626
with:
2727
node-version: '20'
28-
- name: Set up Python 3.8
28+
- name: Set up Python 3.12
2929
uses: actions/setup-python@v5
3030
with:
31-
python-version: '3.8'
31+
python-version: '3.12'
3232
- name: Run the website
3333
run: ./tools/scripts/run_and_test_website.sh
3434
- name: Update timestamps

.github/workflows/test-website.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
uses: actions/setup-node@v4
2525
with:
2626
node-version: '20'
27-
- name: Set up Python 3.8
27+
- name: Set up Python 3.12
2828
uses: actions/setup-python@v5
2929
with:
30-
python-version: '3.8'
30+
python-version: '3.12'
3131
- name: Run the website
3232
run: ./tools/scripts/run_and_test_website.sh
3333
- name: Remove node modules to avoid linting errors

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ sudo pip install virtualenv
1414
2. Create an isolated Python environment, and install dependencies:
1515

1616
```
17-
virtualenv --python python3.8 .venv
17+
virtualenv --python python3.12 .venv
1818
source .venv/bin/activate
1919
pip install -r requirements.txt
2020
```

app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
runtime: python38
1+
runtime: python312
22
entrypoint: gunicorn -b :$PORT main:app
33
default_expiration: 3h
44

tools/scripts/deploy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ git pull
8888

8989
if [ "$(pgrep -if 'python main.py')" ]; then
9090
echo "Killing existing server to run a fresh version"
91-
pkill -9 python main.py
91+
pkill -9 -if "python main.py"
9292
fi
9393

9494
echo "Run and test website"
@@ -109,7 +109,7 @@ echo "Y" | gcloud app deploy --project httparchive
109109

110110
if [ "$(pgrep -if 'python main.py')" ]; then
111111
echo "Killing server so backgrounded version isn't left there"
112-
pkill -9 -f "python main.py"
112+
pkill -9 -if "python main.py"
113113
fi
114114

115115
echo

tools/scripts/run_and_test_website.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ rem # This script installs all the required dependencies needed to run the
66
rem # HTTP Archive website providing you have python and node installed.
77
rem #
88
rem # It 's a simplified version of run_and_test_website.sh for windows users
9-
rem # It depends on Python 3.8, pip and nodejs 12 being installed already
9+
rem # It depends on Python 3.12, pip and nodejs 20 being installed already
1010
rem #
1111

1212
echo "Kill any existing instances of the webserver"

tools/scripts/run_and_test_website.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fi
4848

4949
if [ "$(pgrep -if 'python main.py')" ]; then
5050
echo "Killing existing server to run a fresh version"
51-
pkill -9 -f "python main.py"
51+
pkill -9 -if "python main.py"
5252
fi
5353

5454
echo "Installing and testing python environment"
@@ -87,7 +87,7 @@ if [ "${debug}" == "1" ]; then
8787

8888
if [ "$(pgrep -if 'python main.py')" ]; then
8989
echo "Killing server to run a fresh version in debug mode"
90-
pkill -9 -f "python main.py"
90+
pkill -9 -if "python main.py"
9191
fi
9292

9393
echo "Starting website in foreground mode so it reloads on file changes"

0 commit comments

Comments
 (0)