Skip to content

feat: relax Python version requirement to >=3.11 or >=3.10 #30

@KimigaiiWuyi

Description

@KimigaiiWuyi

Context

Python>=3.13 is quite restrictive, as many environments (including CI systems and production setups) are still on Python 3.10–3.12, all of which are actively used and supported.

Problem

Image

The strict requirement on Python>=3.13 prevents installation and usage in otherwise compatible environments.

From testing and inspection:

  • The codebase works on Python >=3.11 without any changes
  • With a small modification, it can also support Python 3.10

Evidence

  • Python 3.11+: works out of the box (no syntax or runtime issues)
  • Python 3.10: only requires replacing StrEnum with Enum in:

from enum import StrEnum

memv/src/memv/models.py

Lines 15 to 18 in c567227

class MessageRole(StrEnum):
USER = "user"
ASSISTANT = "assistant"
SYSTEM = "system"

memv/src/memv/models.py

Lines 159 to 163 in c567227

class ProcessStatus(StrEnum):
PENDING = "pending"
RUNNING = "running"
COMPLETED = "completed"
FAILED = "failed"

fix with:

from enum import Enum 

class MessageRole(str, Enum):
    USER = "user"
    ASSISTANT = "assistant"
    SYSTEM = "system"

class ProcessStatus(str, Enum):
    PENDING = "pending"
    RUNNING = "running"
    COMPLETED = "completed"
    FAILED = "failed"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions