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

Add support for Python 3.13 #697

Closed
tconbeer opened this issue Nov 20, 2024 · 8 comments · Fixed by #714
Closed

Add support for Python 3.13 #697

tconbeer opened this issue Nov 20, 2024 · 8 comments · Fixed by #714
Labels
bug Something isn't working

Comments

@tconbeer
Copy link
Owner

Looks like tree-sitter may have added 3.13 support, but now I get a numpy issue:

~ ❯ uvx --python 3.13 harlequin
Installed 28 packages in 24ms
Traceback (most recent call last):
  File "/home/tco/.cache/uv/archive-v0/93PFvqkKWBiASxR8fuac-/bin/harlequin", line 7, in <module>
    from harlequin.cli import harlequin
  File "/home/tco/.cache/uv/archive-v0/93PFvqkKWBiASxR8fuac-/lib/python3.13/site-packages/harlequin/__init__.py", line 1, in <module>
    from harlequin.app import Harlequin as Harlequin
  File "/home/tco/.cache/uv/archive-v0/93PFvqkKWBiASxR8fuac-/lib/python3.13/site-packages/harlequin/app.py", line 23, in <module>
    from harlequin.adapter import HarlequinAdapter, HarlequinCursor
  File "/home/tco/.cache/uv/archive-v0/93PFvqkKWBiASxR8fuac-/lib/python3.13/site-packages/harlequin/adapter.py", line 7, in <module>
    from textual_fastdatatable.backend import AutoBackendType
  File "/home/tco/.cache/uv/archive-v0/93PFvqkKWBiASxR8fuac-/lib/python3.13/site-packages/textual_fastdatatable/__init__.py", line 1, in <module>
    from textual_fastdatatable.backend import (
    ...<4 lines>...
    )
  File "/home/tco/.cache/uv/archive-v0/93PFvqkKWBiASxR8fuac-/lib/python3.13/site-packages/textual_fastdatatable/backend.py", line 7, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'

This is the culprit:

https://github.com/tconbeer/textual-fastdatatable/blob/29d492346e7e3be1c5cf21aedbc2c804873be693/pyproject.toml#L31-L32

Originally posted by @tconbeer in #670 (comment)

@tconbeer tconbeer added the bug Something isn't working label Nov 20, 2024
@tconbeer
Copy link
Owner Author

tconbeer commented Nov 21, 2024

i was wrong. There is still the textual/tree-sitter issue. Might need to update the textarea project to only use syntax highlighting in 3.12-, or implement our own syntax highlighting using a different tree sitter library.

Essentially blocked by:
Textualize/textual#4845

@darrenburns
Copy link

Hey Ted - I'm looking at this now from the Textual side. Can't promise anything but hopefully we'll be able to support 3.13 soon.

@darrenburns
Copy link

Support for syntax highlighting on Python 3.13 is in main in Textual now and should be released in the coming days.

Note that the new version of tree-sitter drops support for Python 3.8.

There's been a necessary few changes to the highlighting too which may affect Harlequin if you use the builtin SQL highlighting, so I recommend giving it a spin first. Let me know if there's any issues!

@tconbeer
Copy link
Owner Author

tconbeer commented Dec 4, 2024

Thanks so much, @darrenburns !

@darrenburns
Copy link

This is out now in the latest Textual release.

@ryanb8
Copy link

ryanb8 commented Jan 7, 2025

When installing with uv tool install --python 3.13 harlequin, I had to move to use uv tool install --python 3.13 --with numpy harlequin.

It installed fine with the first command, but couldn't actually find numpy at runtime (with a similar ModuleNotFoundError: No module named 'numpy' error as this issue originally started with).

@tconbeer
Copy link
Owner Author

tconbeer commented Jan 7, 2025

The latest commit on main supports 3.13; the latest release does not. Hoping to wrap one more breaking change into main and then release as 2.0. Maybe this week, we'll see.

@ryanb8
Copy link

ryanb8 commented Jan 7, 2025

Got it - thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants