Skip to content

Conversation

@shanto12
Copy link

@shanto12 shanto12 commented Nov 20, 2025

Fix Python 3.14 compatibility issue by updating watchfiles dependency.

Updated watchfiles version constraint from >=0.20.0,<1.0.0 to >=0.20.0,<2.0.0 to allow watchfiles 1.1.1 which adds Python 3.14 support.

Fixes #2656


Summary by cubic

Enable Python 3.14 support by widening the watchfiles dependency and adding 3.14 to the CI matrix. Updated watchfiles from >=0.20.0,<1.0.0 to >=0.20.0,<2.0.0 to allow 1.1.1.

Written for commit 282415a. Summary will update automatically on new commits.

Fix Python 3.14 compatibility issue by updating watchfiles dependency.

Updated watchfiles version constraint from >=0.20.0,<1.0.0 to >=0.20.0,<2.0.0 to allow watchfiles 1.1.1 which adds Python 3.14 support.

Fixes Chainlit#2656
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. backend Pertains to the Python backend. labels Nov 20, 2025
@hayescode
Copy link
Contributor

@shanto12 can you add 3.14 to the CI matrix

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Added Python 3.14 to the pytest CI matrix as requested by @hayescode to ensure Python 3.14 compatibility testing.
@shanto12
Copy link
Author

Done! Added Python 3.14 to the CI matrix in .github/workflows/pytest.yaml. The tests will now run on Python 3.10, 3.11, 3.12, 3.13, and 3.14.

@shanto12
Copy link
Author

The Python 3.14 CI test is failing due to the av package (PyAV v14.4.0) not being able to build. The error shows that pkg-config cannot find the required FFmpeg libraries (libavformat, libavcodec, libavdevice, etc.).

The dependency chain is: chainlit[tests] → semantic-kernel (v1.35.3) → aiortc (v1.13.0) → av (v14.4.0)

To fix this, the CI workflow needs to install FFmpeg system libraries before running tests on Python 3.14. For Ubuntu runners, this would be:

- name: Install FFmpeg (for Python 3.14)
  if: matrix.python-version == '3.14'
  run: |
    sudo apt-get update
    sudo apt-get install -y ffmpeg libavcodec-dev libavformat-dev libavutil-dev

Alternatively, if Python 3.14 support isn't critical yet, we could temporarily exclude it from the CI matrix until the dependencies are fully compatible.

@asvishnyakov
Copy link
Member

@shanto12 I think it's fine to install such packages (you can try updating that workflow and see what happens), but it's too early to even attempt running Chainlit on Python 3.14. For example, LangChain packages depend on tiktoken, which cannot be built for Python 3.14 yet.

However, you can try adding Python 3.14 to the matrix and even leave it failing, as long as the job is skipped or the failure is ignored. Ignoring the error is preferable if possible, because it allows us to see when dependencies begin supporting 3.14 and enable it as soon as it stops failing.

@jkealey
Copy link

jkealey commented Nov 25, 2025

Just a quick note that I'd appreciate the watchfiles constraint to be updated and not blocked on python 3.14 support. I'm on 3.12 and the watchfiles constraint blocks me from installing reflex in a broader project. Thought I'd share in case others would benefit as well. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Pertains to the Python backend. size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python 3.14 Compatibility

4 participants