Skip to content

Switch active Python LSP modules from Pyright to ty#475

Merged
ryantm merged 2 commits intomainfrom
zerg/ty-python-lsp
Mar 12, 2026
Merged

Switch active Python LSP modules from Pyright to ty#475
ryantm merged 2 commits intomainfrom
zerg/ty-python-lsp

Conversation

@ryantm
Copy link
Collaborator

@ryantm ryantm commented Mar 12, 2026

Why

We want all active (non-historical) Python module configurations to use Astral's ty language server instead of Pyright.

What changed

  • Added a new active ty module at pkgs/modules/ty/default.nix that exposes replit.dev.languageServers.ty.
  • Updated active Python tool modules (python-*) to register ty as their language server instead of pyright-extended.
  • Replaced active module imports of pyright and pyright-extended with ty in pkgs/modules/default.nix.
  • Added upgrade-map entries so legacy module IDs pyright and pyright-extended resolve to ty.
  • Updated python-base module copy to reference the ty module.
[ryantm@replit2:~/replit/nixmodules]$ /nix/store/775cppcslcvxd4x2v8x4k78xw94zg88a-ty-0.0.21/bin/ty --version
ty 0.0.21

Test plan

  • nix build '.#activeModules."python-3.11"' '.#activeModules.ty'
  • nix eval --raw '.#modules.pyright.outPath'
  • nix eval --raw '.#modules."pyright-extended".outPath'
    • Verified both legacy IDs resolve to the same module outPath as ty.
  • nix flake check --no-build
    • Evaluates the flake outputs, but still hits the existing repo issue where packages.x86_64-linux.deploymentModules is not a derivation.

Rollout

No special rollout steps required.

  • This is fully backward and forward compatible

Revertibility

Safe to revert. This change only updates module wiring and language server configuration (no schema/data migrations or irreversible infra changes).

~ written by Zerg 👾

@ryantm ryantm added the zergling-authored Authored by Zerg agent label Mar 12, 2026
@ryantm ryantm marked this pull request as ready for review March 12, 2026 16:30
@ryantm ryantm requested a review from a team as a code owner March 12, 2026 16:30
@ryantm ryantm requested review from cbrewster and removed request for a team March 12, 2026 16:30
@ryantm ryantm force-pushed the zerg/ty-python-lsp branch from d0c3d7f to 8ee4fff Compare March 12, 2026 16:30
@ryantm ryantm merged commit 75c5607 into main Mar 12, 2026
3 checks passed
@ryantm ryantm deleted the zerg/ty-python-lsp branch March 12, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

zergling-authored Authored by Zerg agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants