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

Fix Python 3.8 compatibility #91

Merged
merged 3 commits into from
Feb 9, 2024
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
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM python:3.9-bullseye
FROM ubuntu:20.04
RUN apt-get update && apt-get install -y python3-pip

RUN pip install pytest requests types-requests pytest-cov mypy twine typing-extensions
COPY . /opt/aleph-message
Expand Down
3 changes: 1 addition & 2 deletions aleph_message/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
class UnknownHashError(ValueError):
...
class UnknownHashError(ValueError): ...
4 changes: 2 additions & 2 deletions aleph_message/models/execution/program.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import Literal, Optional
from typing import Literal, Optional, List

from pydantic import Field

Expand All @@ -24,7 +24,7 @@ class CodeContent(HashableModel):
entrypoint: str
ref: ItemHash # Must reference a StoreMessage
interface: Optional[Interface] = None
args: Optional[list[str]] = None
args: Optional[List[str]] = None
use_latest: bool = False

@property
Expand Down
3 changes: 1 addition & 2 deletions aleph_message/models/execution/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ class AbstractVolume(HashableModel, ABC):
mount: Optional[str] = None

@abstractmethod
def is_read_only(self):
...
def is_read_only(self): ...

class Config:
extra = Extra.forbid
Expand Down
Loading