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

Raise minimum Python version to 3.8 #192

Merged
merged 8 commits into from
Sep 25, 2023
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
7 changes: 6 additions & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
name: 'Setup wasmtime-py CI'
inputs:
python-version:
description: 'Version of Python to configure'
required: false
default: '3.x'
runs:
using: "composite"
steps:
# Setup Python and the Python dependencies of this project
- uses: actions/setup-python@v4
with:
python-version: '3.x'
python-version: ${{ inputs.python-version }}
- run: pip install -e ".[testing]"
shell: bash

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.x']
python-version: ['3.x', '3.8']
exclude:
# Looks like pypy on Windows is 32-bit, so don't test it since we
# only work with 64-bit builds
Expand All @@ -29,7 +30,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# Tests are flaky on Windows. It's something to do with generating modules
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To install `wasmtime-py`, run this command in your terminal:
$ pip install wasmtime
```

The package currently supports 64-bit builds of Python 3.6+ on x86\_64 Windows,
The package currently supports 64-bit builds of Python 3.8+ on x86\_64 Windows,
macOS, and Linux, as well as on arm64 macOS and Linux.

## Versioning
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
packages=['wasmtime'],
include_package_data=True,
package_data={"wasmtime": ["py.typed"]},
python_requires='>=3.6',
python_requires='>=3.8',
test_suite="tests",
extras_require={
'testing': [
Expand All @@ -50,10 +50,10 @@
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Compilers',
Expand Down
3 changes: 1 addition & 2 deletions wasmtime/_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from wasmtime import Module, WasmtimeError
from ._extern import wrap_extern, get_extern_ptr
from ._exportable import AsExtern
from typing import Sequence, Optional, Iterator
from collections.abc import Mapping
from typing import Sequence, Optional, Iterator, Mapping
from ._store import Storelike
from ._func import enter_wasm

Expand Down
8 changes: 4 additions & 4 deletions wasmtime/_wasi.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from ctypes import *
from ctypes import c_char, POINTER, cast, c_char_p, c_int
import ctypes
from wasmtime import WasmtimeError
from . import _ffi as ffi
from ._config import setter_property
from typing import List, Iterable
from typing import List, Iterable, Union
from os import PathLike


def _encode_path(path: str | bytes | PathLike) -> bytes:
def _encode_path(path: Union[str, bytes, PathLike]) -> bytes:
if isinstance(path, (bytes, str)):
path2 = path
else:
Expand Down Expand Up @@ -60,7 +60,7 @@ def inherit_env(self) -> None:
ffi.wasi_config_inherit_env(self._ptr)

@setter_property
def stdin_file(self, path: str | bytes | PathLike) -> None:
def stdin_file(self, path: Union[str, bytes, PathLike]) -> None:
"""
Configures a file to be used as the stdin stream of this WASI
configuration.
Expand Down
Loading