feat: add support for Python 3.13 (#5238)

* chore: update Python version requirement and remove deprecated dependencies in pyproject.toml files

* Updated Python version requirement to allow up to 3.14 in both main and base pyproject.toml files.
* Removed deprecated dependencies: cohere and pyautogen from the main dependencies list.

* chore: update Python version requirements and add support for Python 3.13 in uv.lock

* Updated the required Python version to allow up to 3.14.
* Adjusted resolution markers for Python versions to include 3.13.
* Added markers for the 'typing-extensions' dependency to restrict it for Python versions below 3.13.
* Included additional wheel files for various packages to support Python 3.13 compatibility.

* Update Python version requirements in README files to support Python 3.13

* Update Python version in GitHub Actions workflow to 3.13

* Update Python version in GitHub Actions workflows to include 3.13

* Update installation documentation to support Python 3.13 and clarify troubleshooting steps

* revert changes to docs until we release

* chore: add ag2 dependency and update uv.lock for Python 3.13 compatibility

* Added ag2 version 0.3.2 and 0.5.2 to pyproject.toml and uv.lock with appropriate resolution markers for Python versions.
* Included flaml version 2.3.2 in uv.lock to ensure compatibility with the new ag2 dependency.
* Updated dependency specifications to support Python 3.13 and above.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-12-12 17:24:43 -03:00 committed by GitHub
commit c6b1eaba60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 620 additions and 37 deletions

View file

@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
python-version:
- "3.12"
- "3.13"
steps:
- name: Check out the code at a specific ref
uses: actions/checkout@v4

View file

@ -13,7 +13,7 @@ on:
description: "(Optional) Python versions to test"
required: true
type: string
default: "['3.10', '3.11', '3.12']"
default: "['3.10', '3.11', '3.12', '3.13']"
ref:
description: "(Optional) ref to checkout"
required: false

View file

@ -7,7 +7,7 @@ on:
description: "(Optional) Python versions to test"
required: true
type: string
default: "['3.10', '3.11', '3.12']"
default: "['3.10', '3.11', '3.12', '3.13']"
ref:
description: "(Optional) ref to checkout"
required: false
@ -23,7 +23,7 @@ on:
description: "(Optional) Python versions to test"
required: true
type: string
default: "['3.10', '3.11', '3.12']"
default: "['3.10', '3.11', '3.12', '3.13']"
env:
POETRY_VERSION: "1.8.2"
NODE_VERSION: "21"

View file

@ -47,7 +47,7 @@ jobs:
name: CI
uses: ./.github/workflows/ci.yml
with:
python-versions: "['3.10', '3.11', '3.12']"
python-versions: "['3.10', '3.11', '3.12', '3.13']"
frontend-tests-folder: "tests"
release: true

View file

@ -12,9 +12,9 @@ Install Langflow locally with [uv (recommended)](https://docs.astral.sh/uv/getti
### Prerequisites
* [Python 3.10 to 3.12](https://www.python.org/downloads/release/python-3100/) installed
* [uv](https://docs.astral.sh/uv/getting-started/installation/), [pip](https://pypi.org/project/pip/), or [pipx](https://pipx.pypa.io/stable/installation/) installed
* Before installing Langflow, we recommend creating a virtual environment to isolate your Python dependencies with [uv](https://docs.astral.sh/uv/pip/environments), [venv](https://docs.python.org/3/library/venv.html), or [conda](https://anaconda.org/anaconda/conda)
- [Python 3.10 to 3.12](https://www.python.org/downloads/release/python-3100/) installed
- [uv](https://docs.astral.sh/uv/getting-started/installation/), [pip](https://pypi.org/project/pip/), or [pipx](https://pipx.pypa.io/stable/installation/) installed
- Before installing Langflow, we recommend creating a virtual environment to isolate your Python dependencies with [uv](https://docs.astral.sh/uv/pip/environments), [venv](https://docs.python.org/3/library/venv.html), or [conda](https://anaconda.org/anaconda/conda)
### Install Langflow with pip or pipx
@ -91,9 +91,11 @@ This is a list of possible issues that you may encounter when installing and run
### No `langflow.__main__` module
When you try to run Langflow with the command `langflow run`, you encounter the following error:
```bash
> No module named 'langflow.__main__'
```
1. Run `python -m langflow run` instead of `langflow run`.
2. If that doesn't work, reinstall the latest Langflow version with `python -m pip install langflow -U`.
3. If that doesn't work, reinstall Langflow and its dependencies with `python -m pip install langflow --pre -U --force-reinstall`.
@ -146,4 +148,4 @@ To run Langflow with uv:
```plain
uv run langflow run
```
```

View file

@ -12,7 +12,7 @@ packages = ["src/backend/langflow"]
name = "langflow"
version = "1.1.1"
description = "A Python package with a built-in web application"
requires-python = ">=3.10,<3.13"
requires-python = ">=3.10,<3.14"
license = "MIT"
keywords = ["nlp", "langchain", "openai", "gpt", "gui"]
readme = "README.md"
@ -40,7 +40,6 @@ dependencies = [
"wikipedia==1.4.0",
"qdrant-client==1.9.2",
"weaviate-client==4.9.6",
"cohere==5.13.3",
"faiss-cpu==1.9.0.post1",
"types-cachetools==5.5.0.20240820",
"pymongo==4.10.1",
@ -58,7 +57,6 @@ dependencies = [
"numexpr==2.10.2",
"qianfan==0.3.5",
"pgvector==0.3.6",
"pyautogen==0.5.0",
"langchain==0.3.10",
"elasticsearch==8.16.0",
"pytube==15.0.0",
@ -114,6 +112,7 @@ dependencies = [
"arize-phoenix-otel>=0.6.1",
"openinference-instrumentation-langchain==0.1.29",
"crewai~=0.86.0",
"ag2>=0.3.2",
]
[project.urls]

View file

@ -89,7 +89,7 @@ build-backend = "hatchling.build"
name = "langflow-base"
version = "0.1.1"
description = "A Python package with a built-in web application"
requires-python = ">=3.10,<3.13"
requires-python = ">=3.10,<3.14"
license = "MIT"
keywords = ["nlp", "langchain", "openai", "gpt", "gui"]
readme = "README.md"

630
uv.lock generated

File diff suppressed because it is too large Load diff