Skip to content

Commit

Permalink
feat: deprecate py3.8 (#602)
Browse files Browse the repository at this point in the history
* feat: deprecate py3.8

Signed-off-by: Keming <[email protected]>

* bump version

Signed-off-by: Keming <[email protected]>

---------

Signed-off-by: Keming <[email protected]>
  • Loading branch information
kemingy authored Nov 26, 2024
1 parent d0f9cb7 commit f4f58ec
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 91 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9
- name: Install dependencies
run: make install
- name: install node for pyright
Expand All @@ -61,11 +61,9 @@ jobs:
strategy:
max-parallel: 18
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest , macos-13, macos-14]
exclude:
- python-version: "3.8"
os: "macos-14"
- python-version: "3.9"
os: "macos-14"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
fetch-depth: 0
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Set up Python 3.8
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
104 changes: 52 additions & 52 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion examples/rerank/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from typing import List

from msgspec import Struct
from sentence_transformers import CrossEncoder
from sentence_transformers import CrossEncoder # type: ignore

from mosec import Server, Worker
from mosec.mixin import TypedMsgPackMixin
Expand Down
18 changes: 12 additions & 6 deletions examples/server_side_event/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,21 @@
import httpx
from httpx_sse import connect_sse

with httpx.Client() as client, connect_sse(
client, "POST", "http://127.0.0.1:8000/inference", json={"text": "mosec"}
) as event_source:
with (
httpx.Client() as client,
connect_sse(
client, "POST", "http://127.0.0.1:8000/inference", json={"text": "mosec"}
) as event_source,
):
for sse in event_source.iter_sse():
print(f"Event({sse.event}): {sse.data}")

# error handling
with httpx.Client() as client, connect_sse(
client, "POST", "http://127.0.0.1:8000/inference", json={"error": "mosec"}
) as event_source:
with (
httpx.Client() as client,
connect_sse(
client, "POST", "http://127.0.0.1:8000/inference", json={"error": "mosec"}
) as event_source,
):
for sse in event_source.iter_sse():
print(f"Event({sse.event}): {sse.data}")
Loading

0 comments on commit f4f58ec

Please sign in to comment.