Skip to content

Releases: bellini666/pytest-language-server

v0.18.0

17 Jan 15:00
f1ded63

Choose a tag to compare

🎯 Summary

Feature release focused on robustness, stability, and developer experience improvements.

✨ New Features

  • Document Symbol Ranges: Fixture symbols now include full function body ranges

    • Enables proper code folding in editors
    • Improves breadcrumb navigation accuracy
    • Added end_line tracking to FixtureDefinition
  • CI Code Coverage: Added automated coverage reporting with tarpaulin and Codecov integration

🐛 Bug Fixes

  • Windows URI Malformation (#54): Fixed "Go to definition" returning malformed URIs on Windows

    • Strip \\?\ extended-length path prefix before URI conversion
    • Resolves file://///%3F/D%3A/... becoming proper file:///D:/... URIs
  • Multi-level Relative Imports: Fixed import level extraction for from ..module import *

    • Now correctly handles any number of leading dots in relative imports
    • Previously all relative imports were treated as single-dot imports
  • Code Lens Safety: Replaced unsafe unwrap() calls with proper error handling

    • Prevents potential panics on malformed data during code lens generation

🔧 Improvements

  • Parse Error Recovery: Keep existing fixture data when file has syntax errors

    • Provides better LSP experience during active editing
    • Fixtures remain available even when code is temporarily invalid
  • Permission Error Reporting: Aggregate and report permission errors during workspace scan

    • Clear logging of how many files were skipped due to permission issues
    • Helps diagnose missing fixture detection in restricted directories
  • Bounded Cache: Added cache eviction (2000 file limit) to prevent unbounded memory growth

    • Safety net for very large workspaces
    • Evicts ~25% of entries when limit exceeded to avoid frequent re-eviction

🧪 Tests

  • Added tests for parse error recovery behavior
  • Added tests for fixture end_line tracking
  • Added tests for multi-level relative import handling
  • Added tests for cache handling with many files

Full Changelog: v0.17.3...v0.18.0

What's Changed

  • deps(vscode)(deps-dev): bump typescript-eslint from 8.50.1 to 8.51.0 in /extensions/vscode-extension in the npm-minor-patch group by @dependabot[bot] in #51
  • deps(deps): bump the rust-minor-patch group with 3 updates by @dependabot[bot] in #50
  • deps(deps): bump the rust-minor-patch group with 3 updates by @dependabot[bot] in #52
  • deps(deps): bump the rust-minor-patch group with 2 updates by @dependabot[bot] in #55
  • deps(vscode)(deps-dev): bump the npm-minor-patch group in /extensions/vscode-extension with 3 updates by @dependabot[bot] in #53
  • chore(deps): bump the uv group across 1 directory with 2 updates by @dependabot[bot] in #56

Full Changelog: v0.17.3...v0.18.0

v0.17.3

01 Jan 19:54
84d18eb

Choose a tag to compare

🎯 Summary

Patch release fixing a deprecated API warning in the IntelliJ plugin.

🐛 Bug Fixes

  • IntelliJ Plugin: Replace deprecated PluginDescriptor.isEnabled() with PluginManagerCore.isDisabled()
    • Fixes deprecation warning shown in JetBrains plugin verifier
    • Uses the recommended non-deprecated API for checking plugin/module status

ℹ️ Note

The warning about com.intellij.modules.python being unavailable is expected and harmless - it's an optional dependency that enables Python-specific features when available (e.g., in PyCharm). The plugin works correctly without it.


Full Changelog: v0.17.2...v0.17.3

Full Changelog: v0.17.2...v0.17.3

v0.17.2

01 Jan 19:41
73d4cef

Choose a tag to compare

🎯 Summary

Patch release with a bug fix for the IntelliJ plugin showing duplicate entries in PyCharm Professional 2025.2+.

🐛 Bug Fixes

  • IntelliJ Plugin: Fixed duplicate LSP server entries in "Language Services" UI (#49)
    • In PyCharm Professional 2025.2+, both com.intellij.modules.lsp and com.intellij.modules.ultimate are present
    • Previously, both optional config files were loaded, causing the LSP provider to be registered twice
    • Now uses ExtensionNotApplicableException in the fallback provider to prevent duplicate registration
    • This is the documented JetBrains way to conditionally opt-out of extension registration at runtime

Full Changelog: v0.17.1...v0.17.2

What's Changed

  • deps(deps): bump the rust-minor-patch group with 3 updates by @dependabot[bot] in #47
  • deps(vscode)(deps-dev): bump typescript-eslint from 8.50.0 to 8.50.1 in /extensions/vscode-extension in the npm-minor-patch group by @dependabot[bot] in #48

Full Changelog: v0.17.1...v0.17.2

v0.17.1

24 Dec 15:59
b05e36d

Choose a tag to compare

🎯 Summary

Patch release with bug fixes and performance improvements for imported fixtures resolution.

🐛 Bug Fixes

  • Resolver Cache Check: Fixed conftest.py resolution to check file cache in addition to filesystem
    • Previously, fixtures from conftest files only in the cache (not yet written) were not resolved
    • Now properly checks both path.exists() and file_cache.contains_key()

⚡ Performance

  • Imported Fixtures Cache: Added caching layer for imported fixtures computation

    • Dual invalidation strategy using content hash and definitions version
    • Avoids redundant AST parsing when files haven't changed
  • Standard Library Lookup: Replaced linear array search with O(1) HashSet lookup

    • Uses once_cell::Lazy for static initialization
    • Faster module classification during import resolution
  • Transitive Import Scanning: Added iterative scanning for fixture modules

    • Discovers modules imported by conftest files after initial workspace scan
    • Handles transitive imports (A → B → C) by looping until no new modules found

🧪 Tests

  • Added 15 new unit tests in test_fixtures.rs covering import scenarios
  • Added 9 new e2e tests in test_e2e.rs for real project testing
  • Extended test project with nested/transitive import structure

Full Changelog: v0.17.0...v0.17.1

What's Changed

  • deps(intellij)(deps): bump org.jetbrains.kotlin.jvm from 2.2.21 to 2.3.0 in /extensions/intellij-plugin by @dependabot[bot] in #45
  • deps(vscode)(deps-dev): bump the npm-minor-patch group in /extensions/vscode-extension with 3 updates by @dependabot[bot] in #46
  • deps(deps): bump the rust-minor-patch group with 4 updates by @dependabot[bot] in #44

Full Changelog: v0.17.0...v0.17.1

v0.17.0

22 Dec 13:32
770efbe

Choose a tag to compare

🎯 Summary

Feature release with fixture import resolution and IntelliJ plugin migration.

✨ New Features

  • Fixture Import Resolution: Support for fixtures imported via star imports in conftest.py

    • Resolve fixtures from from .module import * statements
    • Handle relative imports with proper level detection
    • Support transitive imports through multiple levels of star imports
    • Include imported fixtures in available fixtures for test files
    • Follow pytest's fixture resolution priority rules
  • IntelliJ Plugin Migration: Migrated from LSP4IJ to native IntelliJ LSP API

    • Better performance and stability
    • Native integration with PyCharm Professional 2023.2+
    • Conditional LSP module loading for different IDE versions
    • Removed third-party LSP4IJ dependency

🐛 Fixes

  • Import Resolution: Fixed AST parsing for relative imports with leading dots
  • File Resolution: Enhanced import resolution to check both filesystem and file cache
  • Available Fixtures: Fixed compute_available_fixtures() to include imported fixtures from conftest.py

🧪 Tests

  • Comprehensive Import Testing: Added unit tests for star imports, explicit imports, circular imports, and transitive imports
  • E2E Testing: Updated snapshots to reflect new fixture detection capabilities
  • Real-world Validation: Tested with complex projects using multi-level import hierarchies

📚 Documentation

  • Import Resolution: Added documentation for the new fixture import feature
  • Test Coverage: Expanded test suite with import scenario coverage

Full Changelog: v0.16.2...v0.17.0

Full Changelog: v0.16.2...v0.17.0

v0.16.2

16 Dec 18:41
177f0a9

Choose a tag to compare

🐛 Bug Fixes

  • Inlay Hints: Fixed hints showing for already-annotated fixture parameters

    • Now correctly detects existing type annotations and skips redundant hints
    • Fixed end_char calculation to use parameter name length instead of AST range
  • Inlay Hints: Removed extra blank line after inlay hints

    • Changed padding_right from true to false
  • Editor Sync: Fixed inlay hints not updating when adding/removing annotations

    • Added workspace/inlayHint/refresh request on document changes
    • Ensures editors like Neovim properly refresh hints after edits

🧪 Tests

  • Added comprehensive tests for annotation detection
  • Added tests for Unicode parameter names (PEP 3131)
  • Added tests for multiline function signatures with mixed annotations
  • Added tests for edge cases (no return types, out of bounds, etc.)

Full Changelog: v0.16.1...v0.16.2

What's Changed

  • deps(vscode)(deps-dev): bump @types/node from 24.10.1 to 25.0.2 in /extensions/vscode-extension by @dependabot[bot] in #42
  • ci(deps): bump actions/upload-artifact from 5 to 6 by @dependabot[bot] in #39
  • deps(deps): bump toml from 0.8.23 to 0.9.8 by @dependabot[bot] in #40
  • ci(deps): bump actions/cache from 4 to 5 by @dependabot[bot] in #38
  • ci(deps): bump actions/download-artifact from 6 to 7 by @dependabot[bot] in #37
  • fix: resolve dependabot label warnings and deprecation notice by @bellini666 in #43
  • deps(vscode)(deps-dev): bump the npm-minor-patch group in /extensions/vscode-extension with 4 updates by @dependabot[bot] in #41

Full Changelog: v0.16.1...v0.16.2

v0.16.1

14 Dec 15:11
40f2525

Choose a tag to compare

📚 Documentation

  • Extension READMEs: Synced feature lists across all extension READMEs (VS Code, IntelliJ, Zed) with the main README

    • Added: Go to Implementation, Call Hierarchy, Document Symbols, Workspace Symbols, Code Lens, Inlay Hints
    • Updated diagnostics description to include scope mismatches and circular dependencies
  • AGENTS.md: Added reminder to keep extension docs in sync when adding new LSP features

🧹 Maintenance

  • bump-version.sh: Removed dead code that tried to update non-existent <version> tag in plugin.xml
  • extensions/README.md: Fixed version synchronization documentation

Full Changelog: v0.16.0...v0.16.1

Full Changelog: v0.16.0...v0.16.1

v0.16.0

14 Dec 14:42
1f574ad

Choose a tag to compare

🎯 Summary

Major release with performance optimizations, new LSP features, and configuration file support.

✨ New Features

  • Configuration File Support: Configure the LSP via pyproject.toml under [tool.pytest-language-server]

    • disabled_diagnostics: Suppress specific diagnostic codes
    • exclude: Glob patterns to exclude from scanning
  • Call Hierarchy: Visualize fixture dependencies with incoming/outgoing calls

    • See which fixtures/tests use a fixture (incoming)
    • See which fixtures a fixture depends on (outgoing)
  • Go to Implementation: Jump to the yield statement in generator fixtures

  • Fixture Scope Validation: Diagnostics when broader-scoped fixtures depend on narrower-scoped ones

    • Detects invalid patterns like session-scoped fixtures using function-scoped fixtures
  • Fixtures Unused CLI Command: Find unused fixtures with CI-friendly exit codes

    • pytest-language-server fixtures unused <path>
    • Supports --format json for programmatic use
  • Circular Dependency Detection: Errors when fixtures have circular dependencies

  • Inlay Hints: Show fixture return types inline

⚡ Performance

  • Reverse Usage Index: O(1) reference lookups via usage_by_fixture index
  • Available Fixtures Cache: Version-based cache invalidation for get_available_fixtures()
  • Cached AST Reuse: find_containing_function() now uses cached AST instead of re-parsing
  • Memory Management: Clean uri_cache on did_close to prevent leaks
  • SIMD Line Indexing: Use memchr for accelerated line index building

🐛 Fixes

  • Call Hierarchy/Implementation: Now works on fixture definition lines, not just usages

📚 Documentation

  • AGENTS.md: Simplified from 803 to 96 lines (essential info only)
  • Crate Documentation: Added comprehensive docs to src/lib.rs

🧪 Tests

  • 425 total tests (up from 386)
    • 14 new Call Hierarchy tests
    • 8 new Go-to-Implementation tests
    • 4 new performance/caching tests
    • 13 new config tests

Full Changelog: v0.15.0...v0.16.0

Full Changelog: v0.15.0...v0.16.0

v0.15.0

09 Dec 19:46
6a78207

Choose a tag to compare

🎯 Summary

Minor release adding support for pytest-asyncio fixtures.

✨ New Features

  • pytest-asyncio Support: Added recognition of @pytest_asyncio.fixture decorator (#34) by @dbzix
    • All LSP features (go-to-definition, hover, references, completions) now work with async fixtures

🐛 Fixes

  • Tests: Resolved intermittent deadlock in test_conftest_hierarchy_with_changes
  • IntelliJ Plugin: Updated Kotlin API/language version from 1.9 to 2.0

🔧 Maintenance

  • IntelliJ Plugin: Upgraded Gradle 8.13 → 9.2.1
  • CI: Added extension validation jobs for VSCode, IntelliJ, and Zed
  • Docs: Consolidated extension documentation into extensions/README.md

Full Changelog: v0.14.1...v0.15.0

What's Changed

  • feat: add support for @pytest_asyncio.fixture decorator by @dbzix in #34

Full Changelog: v0.14.1...v0.15.0

v0.14.1

07 Dec 02:05
1726d7e

Choose a tag to compare

🎯 Summary

Patch release fixing VSCode extension publishing.

🐛 Fixes

  • VSCode Extension: Updated engines.vscode from ^1.75.0 to ^1.106.0 to match @types/vscode version requirement

Full Changelog: v0.14.0...v0.14.1

Full Changelog: v0.14.0...v0.14.1