Skip to content

Commit bf38fb5

Browse files
authored
Python 3.11; aiohtpp 3.11.11; starlette 0.45.1 (#13)
1 parent 3c94444 commit bf38fb5

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v3
21-
- name: Set up Python 3.10
21+
- name: Set up Python 3.11
2222
uses: actions/setup-python@v4
2323
with:
24-
python-version: "3.10"
24+
python-version: "3.11"
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade pip
@@ -35,10 +35,10 @@ jobs:
3535
runs-on: ubuntu-latest
3636
steps:
3737
- uses: actions/checkout@v3
38-
- name: Set up Python 3.10
38+
- name: Set up Python 3.11
3939
uses: actions/setup-python@v4
4040
with:
41-
python-version: "3.10"
41+
python-version: "3.11"
4242
- name: Install dependencies
4343
run: |
4444
python -m pip install --upgrade pip

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### STEP 1: build dependencies
22

3-
FROM python:3.10-alpine3.17 as builder
3+
FROM python:3.11-alpine3.17 as builder
44

55
RUN apk add gcc==12.2.1_git20220924-r4 musl-dev==1.2.3-r5
66

@@ -11,7 +11,7 @@ RUN pip install -r requirements.txt
1111

1212
### STEP 2: assemble runtime
1313

14-
FROM python:3.10-alpine3.17
14+
FROM python:3.11-alpine3.17
1515

1616
ENV UVICORN_PORT=3000
1717
ENV UVICORN_WORKERS=1
@@ -24,7 +24,7 @@ EXPOSE ${UVICORN_PORT}
2424
LABEL maintainer="ccaruceru"
2525

2626
# copy built packages
27-
COPY --from=builder /usr/local/lib/python3.10 /usr/local/lib/python3.10
27+
COPY --from=builder /usr/local/lib/python3.11 /usr/local/lib/python3.11
2828

2929
WORKDIR /app
3030

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ Optional environment variables:
280280
- UVICORN_HOST: network interfaces to bind the server. Default to `0.0.0.0`.
281281

282282
# Development
283-
Make sure you have at least Python version **3.10**, [ngrok](https://ngrok.com/download) and [Google Cloud SDK](https://cloud.google.com/sdk/docs/install), then run:
283+
Make sure you have at least Python version **3.11**, [ngrok](https://ngrok.com/download) and [Google Cloud SDK](https://cloud.google.com/sdk/docs/install), then run:
284284
- `pip install -r requirements.txt`
285285
- in a sepparate terminal run `ngrok http 3000` and take a note of the _ngrok generated https address_
286286
- **ℹ Note**: if there is a VPN client running, ngrok might fail to establish a connection
@@ -362,7 +362,7 @@ coverage run --source=multi_reaction_add -m unittest discover
362362
coverage report -m
363363
```
364364

365-
Use the following `.vscode/settings.json` configuration to setup testing with [unittest](https://docs.python.org/3.10/library/unittest.html) for [VS Code](https://code.visualstudio.com/docs/python/testing#_enable-a-test-framework):
365+
Use the following `.vscode/settings.json` configuration to setup testing with [unittest](https://docs.python.org/3.11/library/unittest.html) for [VS Code](https://code.visualstudio.com/docs/python/testing#_enable-a-test-framework):
366366
```json
367367
{
368368
"python.testing.unittestArgs": [
@@ -380,7 +380,7 @@ Use the following `.vscode/settings.json` configuration to setup testing with [u
380380

381381
## More
382382

383-
The app uses [ASGI](https://asgi.readthedocs.io/en/latest/) with [starlette](https://www.starlette.io/) and the application is handling requests with [uvicorn](https://www.uvicorn.org/), which works on top of Python's concurrent library [asyncio](https://docs.python.org/3.10/library/asyncio.html). The choice was mostly based on the results shown in this [post](https://stackabuse.com/asynchronous-vs-synchronous-python-performance-analysis/#summarizingresults).
383+
The app uses [ASGI](https://asgi.readthedocs.io/en/latest/) with [starlette](https://www.starlette.io/) and the application is handling requests with [uvicorn](https://www.uvicorn.org/), which works on top of Python's concurrent library [asyncio](https://docs.python.org/3.11/library/asyncio.html). The choice was mostly based on the results shown in this [post](https://stackabuse.com/asynchronous-vs-synchronous-python-performance-analysis/#summarizingresults).
384384

385385
The application exposes two additional http endpoints: `/img` for serving static images, and `/_ah/warmup` for GAE [warmup requests](https://cloud.google.com/appengine/docs/standard/python3/configuring-warmup-requests).
386386

app.yaml.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ automatic_scaling:
3636

3737

3838
### Do not change this section
39-
runtime: python310
39+
runtime: python311
4040
inbound_services:
4141
- warmup
4242
handlers:

multi_reaction_add/oauth/installation_store/google_cloud_storage/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def save_bot(self, bot: Bot):
118118
)
119119
self.logger.debug("Uploaded %s to Google bucket as bot", entity)
120120

121-
def _save_entity(
121+
def _save_entity( # pylint: disable=R0917
122122
self,
123123
data_type: str,
124124
entity: str,
@@ -369,7 +369,7 @@ def _delete_entity(
369369
if blob.exists():
370370
blob.delete()
371371

372-
def _key(
372+
def _key( # pylint: disable=R0917
373373
self,
374374
data_type: str,
375375
enterprise_id: Optional[str],

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
slack-bolt==1.18.0
22
google-cloud-storage==2.7.0
33
uvicorn==0.20.0
4-
aiohttp==3.10.2
5-
starlette==0.37.1
4+
aiohttp==3.11.11
5+
starlette==0.45.1
66
python-json-logger==2.0.4
77

88
# pin the sdk dependency of bolt

0 commit comments

Comments
 (0)