Skip to content

Commit

Permalink
Raise error when trying to import mesop below py3.11 (#209)
Browse files Browse the repository at this point in the history
* Raise error when trying to import mesop below py3.11

* Update rc version

* Use python version 3.11 in pre-commit CI
  • Loading branch information
kumaranvpl authored Sep 13, 2024
1 parent 2ed0d4f commit 77d21f3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"
- name: Set $PY environment variable
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion fastagency/__about__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""The fastest way to bring multi-agent workflows to production."""

__version__ = "0.1.0rc0"
__version__ = "0.1.0rc1"
7 changes: 7 additions & 0 deletions fastagency/ui/mesop/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
import threading
from collections.abc import Generator, Iterator
from contextlib import contextmanager
Expand All @@ -8,6 +9,12 @@
from typing import ClassVar, Optional
from uuid import uuid4

import typer

if sys.version_info < (3, 11):
typer.echo("Error: Mesop requires Python 3.11 or higher", err=True)
raise typer.Exit(code=1)

from mesop.bin.bin import FLAGS as MESOP_FLAGS
from mesop.bin.bin import main as mesop_main

Expand Down

0 comments on commit 77d21f3

Please sign in to comment.