Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python 3.8 and add Python 3.13 #188

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-latest
python: 3.8
toxenv: py38
- os: ubuntu-latest
python: 3.9
toxenv: py39
Expand All @@ -29,6 +26,9 @@ jobs:
- os: ubuntu-latest
python: '3.12'
toxenv: py312
- os: ubuntu-latest
python: '3.13'
toxenv: py313
runs-on: ${{ matrix.os }}

steps:
Expand Down
2 changes: 1 addition & 1 deletion psbench/benchmarks/colmena_rtt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import argparse
import sys
from typing import Any
from typing import List
from typing import List # noqa: UP035
from typing import Optional

if sys.version_info >= (3, 11): # pragma: >=3.11 cover
Expand Down
2 changes: 1 addition & 1 deletion psbench/benchmarks/endpoint_qps/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import itertools
import sys
from typing import Any
from typing import List
from typing import List # noqa: UP035
from typing import Literal

if sys.version_info >= (3, 11): # pragma: >=3.11 cover
Expand Down
2 changes: 1 addition & 1 deletion psbench/benchmarks/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import contextlib
import sys
from collections.abc import Sequence
from contextlib import AbstractContextManager
from types import TracebackType
from typing import Any
from typing import Protocol
from typing import runtime_checkable
from typing import Sequence
from typing import TypeVar

if sys.version_info >= (3, 11): # pragma: >=3.11 cover
Expand Down
4 changes: 2 additions & 2 deletions psbench/benchmarks/remote_ops/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import argparse
import sys
from collections.abc import Sequence
from typing import Any
from typing import List
from typing import List # noqa: UP035
from typing import Literal
from typing import Optional
from typing import Sequence

if sys.version_info >= (3, 11): # pragma: >=3.11 cover
from typing import Self
Expand Down
2 changes: 1 addition & 1 deletion psbench/benchmarks/stream_scaling/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import itertools
import sys
from typing import Any
from typing import List
from typing import List # noqa: UP035
from typing import Literal

if sys.version_info >= (3, 11): # pragma: >=3.11 cover
Expand Down
2 changes: 1 addition & 1 deletion psbench/benchmarks/task_pipelining/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import itertools
import sys
from typing import Any
from typing import List
from typing import List # noqa: UP035

if sys.version_info >= (3, 11): # pragma: >=3.11 cover
from typing import Self
Expand Down
2 changes: 1 addition & 1 deletion psbench/benchmarks/task_rtt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import itertools
import sys
from typing import Any
from typing import List
from typing import List # noqa: UP035
from typing import Optional

if sys.version_info >= (3, 11): # pragma: >=3.11 cover
Expand Down
2 changes: 1 addition & 1 deletion psbench/benchmarks/template/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import argparse
import sys
from typing import Any
from typing import List
from typing import List # noqa: UP035

if sys.version_info >= (3, 11): # pragma: >=3.11 cover
from typing import Self
Expand Down
2 changes: 1 addition & 1 deletion psbench/benchmarks/workflow_memory/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import enum
import sys
from typing import Any
from typing import List
from typing import List # noqa: UP035
from typing import Optional

if sys.version_info >= (3, 11): # pragma: >=3.11 cover
Expand Down
2 changes: 1 addition & 1 deletion psbench/benchmarks/workflow_memory/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import logging
import sys
import time
from collections.abc import Sequence
from concurrent.futures import Executor
from concurrent.futures import Future
from typing import Any
from typing import Callable
from typing import Sequence
from typing import TypeVar

if sys.version_info >= (3, 11): # pragma: >=3.11 cover
Expand Down
2 changes: 1 addition & 1 deletion psbench/config/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import argparse
import multiprocessing
import sys
from collections.abc import Sequence
from concurrent.futures import Executor
from concurrent.futures import ProcessPoolExecutor
from concurrent.futures import ThreadPoolExecutor
from typing import Any
from typing import Literal
from typing import Optional
from typing import Sequence

if sys.version_info >= (3, 11): # pragma: >=3.11 cover
from typing import Self
Expand Down
2 changes: 1 addition & 1 deletion psbench/config/ipfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import argparse
import re
import sys
from collections.abc import Sequence
from typing import Any
from typing import Optional
from typing import Sequence

if sys.version_info >= (3, 11): # pragma: >=3.11 cover
from typing import Self
Expand Down
4 changes: 2 additions & 2 deletions psbench/config/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import argparse
import sys
from collections.abc import Sequence
from typing import Any
from typing import Dict
from typing import Dict # noqa: UP035
from typing import Optional
from typing import Sequence

if sys.version_info >= (3, 11): # pragma: >=3.11 cover
from typing import Self
Expand Down
2 changes: 1 addition & 1 deletion psbench/config/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import argparse
import sys
from collections.abc import Sequence
from typing import Any
from typing import Optional
from typing import Sequence

if sys.version_info >= (3, 11): # pragma: >=3.11 cover
from typing import Self
Expand Down
6 changes: 3 additions & 3 deletions psbench/executor/dask.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from __future__ import annotations

import sys
from collections.abc import Generator
from collections.abc import Iterable
from collections.abc import Iterator
from concurrent.futures import Executor
from concurrent.futures import Future
from typing import Callable
from typing import Generator
from typing import Iterable
from typing import Iterator
from typing import TypeVar

if sys.version_info >= (3, 10): # pragma: >=3.10 cover
Expand Down
2 changes: 1 addition & 1 deletion psbench/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import dataclasses
import os
import sys
from collections.abc import Sequence
from types import TracebackType
from typing import Any
from typing import cast
Expand All @@ -13,7 +14,6 @@
from typing import overload
from typing import Protocol
from typing import runtime_checkable
from typing import Sequence
from typing import TypeVar
from typing import Union

Expand Down
2 changes: 1 addition & 1 deletion psbench/run/colmena_rtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import logging
import os
import sys
from collections.abc import Sequence
from datetime import datetime
from typing import Sequence

from psbench.benchmarks.colmena_rtt.config import BenchmarkMatrix
from psbench.benchmarks.colmena_rtt.main import Benchmark
Expand Down
2 changes: 1 addition & 1 deletion psbench/run/endpoint_qps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import logging
import os
import sys
from collections.abc import Sequence
from datetime import datetime
from typing import Sequence

from psbench.benchmarks.endpoint_qps.config import BenchmarkMatrix
from psbench.benchmarks.endpoint_qps.main import Benchmark
Expand Down
2 changes: 1 addition & 1 deletion psbench/run/remote_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import logging
import os
import sys
from collections.abc import Sequence
from datetime import datetime
from typing import Sequence

from psbench.benchmarks.remote_ops.config import BenchmarkMatrix
from psbench.benchmarks.remote_ops.main import Benchmark
Expand Down
2 changes: 1 addition & 1 deletion psbench/run/stream_scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import logging
import os
import sys
from collections.abc import Sequence
from datetime import datetime
from typing import Sequence

from psbench.benchmarks.stream_scaling.config import BenchmarkMatrix
from psbench.benchmarks.stream_scaling.main import Benchmark
Expand Down
2 changes: 1 addition & 1 deletion psbench/run/task_pipelining.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import logging
import os
import sys
from collections.abc import Sequence
from datetime import datetime
from typing import Sequence

from psbench.benchmarks.task_pipelining.config import BenchmarkMatrix
from psbench.benchmarks.task_pipelining.main import Benchmark
Expand Down
2 changes: 1 addition & 1 deletion psbench/run/task_rtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import logging
import os
import sys
from collections.abc import Sequence
from datetime import datetime
from typing import Sequence

from psbench.benchmarks.task_rtt.config import BenchmarkMatrix
from psbench.benchmarks.task_rtt.main import Benchmark
Expand Down
2 changes: 1 addition & 1 deletion psbench/run/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import logging
import os
import sys
from collections.abc import Sequence
from datetime import datetime
from typing import Sequence

from psbench.benchmarks.template.config import BenchmarkMatrix
from psbench.benchmarks.template.main import Benchmark
Expand Down
2 changes: 1 addition & 1 deletion psbench/run/workflow_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import logging
import os
import sys
from collections.abc import Sequence
from datetime import datetime
from typing import Sequence

from psbench.benchmarks.workflow_memory.config import BenchmarkMatrix
from psbench.benchmarks.workflow_memory.main import Benchmark
Expand Down
2 changes: 1 addition & 1 deletion psbench/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging
import statistics
import time
from typing import Sequence
from collections.abc import Sequence
from typing import TypeVar

from pydantic import BaseModel
Expand Down
10 changes: 3 additions & 7 deletions psbench/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,22 @@

import os
import random
import sys
import time


def randbytes(size: int) -> bytes:
"""Get random byte string of specified size.

Uses `random.randbytes()` in Python 3.9 or newer and
`os.urandom()` in Python 3.8 and older.
This method previously existed for Python 3.8 and older compatibility
but now remains because it's used in many places throughout the codebase.

Args:
size (int): size of byte string to return.

Returns:
random byte string.
"""
if sys.version_info >= (3, 9) and size < 1e9: # pragma: >=3.9 cover
return random.randbytes(size)
else: # pragma: <3.9 cover
return os.urandom(size)
return random.randbytes(size)


def make_parent_dirs(filepath: str) -> None:
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ maintainers = [
]
description = "ProxyStore benchmark suite."
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = {file = "MIT"}
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
]
Expand Down Expand Up @@ -81,7 +81,7 @@ concurrency = ["multiprocessing", "thread"]
parallel = true

[tool.mypy]
python_version = "3.10"
python_version = "3.12"
plugins = [
"mypy.plugins.proper_plugin",
"proxystore.mypy_plugin",
Expand Down Expand Up @@ -114,7 +114,7 @@ filterwarnings = [

[tool.ruff]
line-length = 79
target-version = "py38"
target-version = "py39"

[tool.ruff.format]
indent-style = "space"
Expand Down
2 changes: 1 addition & 1 deletion testing/fixtures.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from __future__ import annotations

import pathlib
from collections.abc import Generator
from concurrent.futures import ProcessPoolExecutor
from concurrent.futures import ThreadPoolExecutor
from typing import Generator

import pytest
from proxystore.connectors.file import FileConnector
Expand Down
Loading
Loading