Skip to content

Commit 12fa135

Browse files
authored
Merge pull request #76 from StarrFox/uv
switch to uv
2 parents 6b4bedf + c40e378 commit 12fa135

File tree

6 files changed

+325
-265
lines changed

6 files changed

+325
-265
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,31 @@ name: Publish
33
on:
44
workflow_dispatch:
55
push:
6-
branches: ["main"]
6+
tags:
7+
- '*'
78

89
jobs:
9-
test:
10-
11-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
12-
10+
run:
1311
runs-on: windows-latest
1412
environment:
1513
name: pypi
16-
url: https://pypi.org/p/memobj
1714
permissions:
1815
id-token: write
16+
contents: read
1917

2018
steps:
21-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v5
2220
- name: Set up Python
2321
uses: actions/setup-python@v5
2422
with:
2523
python-version: "3.13"
2624
- name: Update pip
2725
run: python -m pip install -U pip
28-
- name: Set up Poetry
29-
uses: abatilo/actions-poetry@v4
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v6
3028
- name: Install dependencies
31-
run: poetry install
29+
run: uv sync --all-groups
3230
- name: Build
33-
run: poetry build
31+
run: uv build
3432
- name: Publish
35-
uses: pypa/gh-action-pypi-publish@release/v1.10
33+
uses: uv publish

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
python-version: ${{ matrix.python-version }}
3434
- name: Update pip
3535
run: python -m pip install -U pip
36-
- name: Set up Poetry
37-
uses: abatilo/actions-poetry@v4
36+
- name: Install uv
37+
uses: astral-sh/setup-uv@v6
3838
- name: Install dependencies
39-
run: poetry install
39+
run: uv sync --all-groups
4040
- name: Run tests
41-
run: poetry run pytest
41+
run: uv run pytest

memobj/utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
import struct
33
import operator
44
from enum import Enum
5-
from typing import Callable
5+
from typing import Callable, Generic, TypeVar
66

77

8-
class ValueWaiter[T]:
8+
# TODO: remove when dropping 3.11 support
9+
T = TypeVar("T")
10+
11+
12+
class ValueWaiter(Generic[T]):
913
def __init__(self, callback: Callable[[], T]):
1014
"""A utility class to wait for changes from a callable
1115

0 commit comments

Comments
 (0)