Skip to content

Commit c44e97f

Browse files
authored
V2 (#30)
* Replace with #27 when merged * v2 init * fix cache stats * fix decorator test * fix timerwheel expire race * use asyncio loop for proactively expire * add collision test * update memoize decorator * use iter counter and update mutex * refactor benchmark and add trace * fix mypy error * update get API * fix typing test * minor clean * more typing test * add new through benchmark * remove old throughput bench * update bench * add async typing test * add v1/v2 module * minor clean * fix typing * using core v2 branch and remove v1 * fix lint * fix bug update tests and benchmarks * refactor write buffer * fix ci * fix ci * fix ci * fix tests * update readme * update readme * add free threading to ci * uv * remove zstd * update * add parallel correctness tests * more tests * fix tests * update tests * update * update tests * add bench group to uv * fix a decorator race bug * fix flaky test * update throughput benchmark script * update readme * tmp * add twitter trace hr result * add more tests * update readme * update * update CI * add more tests * bump core to 2.0.0rc1 * Update README.md * Update README.md * update doc * Update README.md * Update test.yaml * Update README.md * bump core version and update bench script * update readme * regenerate benchmarks
1 parent e0f5b3c commit c44e97f

43 files changed

Lines changed: 3175 additions & 972 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yaml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,18 @@ jobs:
1515

1616
steps:
1717
- uses: "actions/checkout@v3"
18-
- uses: "actions/setup-python@v4"
18+
- uses: "actions/setup-python@v5"
1919
with:
20-
python-version: '3.10'
21-
- name: Install Poetry
22-
uses: abatilo/actions-poetry@v2
20+
python-version: "${{ matrix.python-version }}"
21+
- name: Install UV
22+
uses: astral-sh/setup-uv@v5
2323
with:
24-
version: 1.3
25-
- name: Setup Poetry
26-
run: "poetry config virtualenvs.in-project true"
27-
- name: Cache Deps
28-
uses: actions/cache@v4
29-
id: cached-poetry-dependencies
30-
with:
31-
path: .venv
32-
key: python-3.10-pydeps-${{ hashFiles('**/poetry.lock') }}
33-
- name: "Install Dependencies"
34-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
35-
run: "poetry install --no-interaction --no-root"
36-
- name: "Build Package"
37-
run: "poetry build"
38-
- name: "Publish to PyPI"
39-
run: "poetry publish"
24+
enable-cache: true
25+
- name: Install Dependencies
26+
run: "uv sync --locked --all-extras --dev"
27+
- name: Build Package
28+
run: "uv build"
29+
- name: Publish to PyPI
30+
run: "uv publish"
4031
env:
41-
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
32+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yaml

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,37 +21,29 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13"]
24+
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13", "3.13.6t"]
2525

2626
steps:
2727
- uses: "actions/checkout@v3"
28-
- uses: "actions/setup-python@v4"
28+
- uses: "actions/setup-python@v5"
2929
with:
30-
python-version: "${{ matrix.python-version }}"
31-
- name: Install Poetry
32-
uses: abatilo/actions-poetry@v2
30+
python-version: ${{ matrix.python-version }}
31+
- name: Install UV
32+
uses: astral-sh/setup-uv@v5
3333
with:
34-
version: 1.3
35-
- name: Setup Poetry
36-
run: "poetry config virtualenvs.in-project true"
37-
- name: Cache Deps
38-
uses: actions/cache@v4
39-
id: cached-poetry-dependencies
40-
with:
41-
path: .venv
42-
key: python-${{ matrix.python-version }}-pydeps-${{ hashFiles('**/poetry.lock') }}
43-
- name: "Install Dependencies"
44-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
45-
run: "poetry install --no-interaction --no-root --all-extras"
46-
- name: "Run Lint"
47-
run: "make lint"
48-
- name: "Mypy api success"
49-
run: "make lint-pass"
50-
- name: "Mypy api failed"
34+
enable-cache: true
35+
python-version: ${{ matrix.python-version }}
36+
- name: Install Dependencies
37+
run: uv sync --locked --all-extras --dev
38+
- name: Run Lint
39+
run: make lint
40+
- name: Mypy Success
41+
run: make lint-pass
42+
- name: Mypy Failed
5143
run: |
5244
error_count=$(make lint-failed 2>&1 | grep -c 'error:')
53-
[ "$error_count" -eq 4 ]
54-
- name: "Run Tests"
45+
[ "$error_count" -eq 8 ]
46+
- name: Run Tests
5547
env:
5648
CI: "TRUE"
57-
run: "make test"
49+
run: make test

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ site/
1010
venv*/
1111
.python-version
1212
build/
13-
dist/
13+
dist/
14+
benchmarks/trace

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
.PHONY: test
22
test:
3-
poetry run pytest --benchmark-skip
3+
uv run pytest --benchmark-skip
44

55
.PHONY: benchmark
66
benchmark:
7-
poetry run pytest --benchmark-only
7+
uv run pytest --benchmark-only
88

99
.PHONY: lint
1010
lint:
11-
poetry run mypy .
11+
uv run mypy .
1212

1313
.PHONY: lint-pass
1414
lint-pass:
15-
poetry run mypy tests/typing/api_pass.py
15+
uv run mypy tests/typing/api_pass.py
1616

1717
.PHONY: lint-failed
1818
lint-failed:
19-
poetry run mypy tests/typing/api_failed.py
19+
uv run mypy tests/typing/api_failed.py
2020

2121
trace_bench:
22-
poetry run python -m benchmarks.trace_bench
22+
uv run python -m benchmarks.trace_bench

0 commit comments

Comments
 (0)