Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
experimental: true
- os: windows-latest
python: "3.13"
experimental: true
experimental: false
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
Expand Down
2 changes: 2 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Changelog
=========

* Bump dask[distributed] to 2024.10.1 for Windows compatibility
* Bump greenlet to 3.1.0 for compatibility with 3.13
* Bump tornado to 6.2.0

Version 1.11.0 (2024-03-09)
--------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import pyperf
import websockets.server
import websockets.client
import websockets.exceptions
import asyncio

CHUNK_SIZE = 1024 ** 2
Expand All @@ -23,13 +24,20 @@ async def handler(websocket) -> None:
stop.set()


async def send(ws):
try:
await ws.send(DATA)
except websockets.exceptions.ConnectionClosedOK:
pass


async def main() -> None:
global stop
t0 = pyperf.perf_counter()
stop = asyncio.Event()
async with websockets.server.serve(handler, "", 8001):
async with websockets.client.connect("ws://localhost:8001") as ws:
await asyncio.gather(*[ws.send(DATA) for _ in range(100)])
await asyncio.gather(*[send(ws) for _ in range(100)])
await stop.wait()
return pyperf.perf_counter() - t0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def train(data: str):

def bench_bpe_tokeniser(loops: int) -> float:
DATA = Path(__file__).parent / "data" / "frankenstein_intro.txt"
with open(DATA, "r") as f:
with open(DATA, "r", encoding="utf8") as f:
data = f.read()

range_it = range(loops)
Expand Down
2 changes: 1 addition & 1 deletion pyperformance/data-files/benchmarks/bm_dask/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pyperformance_bm_dask"
requires-python = ">=3.8"
requires-python = ">=3.12"
dependencies = ["pyperf"]
urls = {repository = "https://github.com/python/pyperformance"}
dynamic = ["version"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dask[distributed]==2022.2.0
dask[distributed]==2024.10.0
5 changes: 0 additions & 5 deletions pyperformance/data-files/benchmarks/bm_dask/run_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
Author: Matt Rocklin, Michael Droettboom
"""

import sys

from dask.distributed import Client, Worker, Scheduler, wait
from dask import distributed

Expand All @@ -29,9 +27,6 @@ async def benchmark():


if __name__ == "__main__":
if distributed.__version__ <= "2024.5.0" and sys.version_info >= (3, 13) and sys.platform == "win32":
raise RuntimeError("Benchmark doesn't work with Python 3.13 on Windows")

runner = pyperf.Runner()
runner.metadata['description'] = "Benchmark dask"
runner.bench_async_func('dask', benchmark)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
tornado==6.1
tornado==6.2
Loading