Skip to content

feat: add Python 3.14 support - #7

Merged
mfranczel merged 1 commit into
developfrom
michal/python-3.14-support
Oct 7, 2026
Merged

mfranczel merged 1 commit into
developfrom
michal/python-3.14-support

Conversation

@mfranczel

@mfranczel mfranczel commented Oct 7, 2026 •

Copy link
Copy Markdown

Summary

Adds Python 3.14 support by cherry-picking upstream fix python-lsp/python-lsp-server#690 (44f7eb0).

On Python 3.14, the server crashes when a client connects in TCP mode (the mode Deepnote uses):

TypeError: PythonLSPServer.init() got multiple values for argument 'check_parent_process'

This happens because functools.partial changed in 3.14. The fix wraps DELEGATE_CLASS in staticmethod on 3.14+ only. Older versions don't change.

Changes

  • pylsp/python_lsp.py: 3.14-only staticmethod(partial(...)) wrapper for DELEGATE_CLASS
  • CI test matrices: Linux 3.9–3.14; macOS/Windows 3.9, 3.12, 3.14
  • test/plugins/test_flake8_lint.py: use a Windows-compatible config path in the test

Cherry-picked unchanged (-x), so the commit matches upstream's.

No breaking changes

  • No dependency changes. jedi 0.19.2, parso 0.8.7 and pylint 3.3.x install on 3.14 within the current version limits.
  • requires-python is still >=3.9.
  • Deepnote-specific behaviour (TCP auth, hover format, completion_detail) is untouched.

Testing

  • Full test suite: 188 passed, 18 skipped on both 3.14 and 3.9. The one error (test_language_server.py::test_missing_message teardown) is also on develop and on 3.11, so it isn't caused by this PR.
  • Manual: on 3.14, pylsp --tcp authenticates and answers initialize. Before this fix it crashed on connect.

Summary by CodeRabbit

  • Compatibility

    • Improved TCP language-server startup compatibility with Python 3.14 and later; earlier Python versions retain their existing behavior.
  • Testing

    • Linux test coverage now includes Python 3.12–3.14 in addition to 3.9–3.11.
    • macOS and Windows test coverage now targets Python 3.9, 3.12, and 3.14.
    • Updated Flake8 configuration-path testing to account for Windows-style paths.

Contributes to BLU-6474

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 8882d0b0-c982-4f57-8f7b-a4708e8bf4c8
📥 Commits

Reviewing files that changed from the base of the PR and between 88e4ee1 and d7945fc.

📒 Files selected for processing (5)
  • .github/workflows/test-linux.yml
  • .github/workflows/test-mac.yml
  • .github/workflows/test-win.yml
  • pylsp/python_lsp.py
  • test/plugins/test_flake8_lint.py

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

The server wraps its handler partial in staticmethod on Python 3.14 and later. The Linux test matrix adds Python 3.12, 3.13, and 3.14. The macOS and Windows matrices replace Python 3.10 and 3.11 with Python 3.12 and 3.14. The Flake8 config-path test now selects a path based on the operating system.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to d7945

No actionable merge-blocking risk was identified in the reviewed changes. The Python 3.14 handler contract is supported by source inspection; the TCP path was not independently run.

🚥 Pre-merge checks | ✅ 4 | ❌ 1 | ❓ 1

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Updates Docs ❓ Inconclusive The pull request adds Python 3.14 support, but its diff contains no documentation files. The required documentation and roadmap are in separate Deepnote repositories, which are unavailable for inspect… Please update or verify the Python 3.14 support documentation in the Deepnote OSS repository and update the roadmap on the Deepnote internal landing page.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #690 is closed, so it supplies historical context only. No active directly linked issue imposes coding requirements.
Out of Scope Changes check ✅ Passed The Python 3.14 server fix, CI matrix updates, and Windows-compatible test path support the stated Python 3.14 support objective. No unrelated changes are identified in the change summary.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding Python 3.14 support.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (3 skipped: 3 unsupported.)

Full details: Updates Docs

Explanation

The pull request adds Python 3.14 support, but its diff contains no documentation files. The required documentation and roadmap are in separate Deepnote repositories, which are unavailable for inspection in this run.

  • Fix all pre-merge checks with AI
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@linear-code

linear-code Bot commented Oct 7, 2026

Copy link
Copy Markdown

BLU-6474

@mfranczel
mfranczel requested a review from m1so October 7, 2026 11:28
@mfranczel
mfranczel marked this pull request as ready for review October 7, 2026 11:28
@mfranczel
mfranczel merged commit c19c080 into develop Oct 7, 2026
11 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants