Skip to content

Commit 3f95bd0

Browse files
authored
Merge branch 'develop' into develop
2 parents 3b703ab + 19fc07a commit 3f95bd0

22 files changed

Lines changed: 215 additions & 47 deletions

.github/workflows/static.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222
OS: 'linux'
2323
timeout-minutes: 2
2424
steps:
25-
- uses: actions/cache@v4
25+
- uses: actions/cache@v6
2626
with:
2727
path: ~/.cache/pip
2828
key: static-pip-${{ hashFiles('pyproject.toml') }}
2929
restore-keys: static-pip-
30-
- uses: actions/checkout@v4
31-
- uses: actions/setup-python@v5
30+
- uses: actions/checkout@v7
31+
- uses: actions/setup-python@v6
3232
with:
3333
python-version: '3.9'
3434
architecture: 'x64'

.github/workflows/test-linux.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
PYTHON_VERSION: ['3.11', '3.10', '3.9']
27+
PYTHON_VERSION: ['3.14', '3.13', '3.12', '3.11', '3.10', '3.9']
2828
timeout-minutes: 10
2929
steps:
30-
- uses: actions/cache@v4
30+
- uses: actions/cache@v6
3131
with:
3232
path: ~/.cache/pip
3333
key: ${{ runner.os }}-${{ matrix.PYTHON_VERSION }}-pip-${{ hashFiles('pyproject.toml') }}
3434
restore-keys: ${{ runner.os }}-${{ matrix.PYTHON_VERSION }}-pip-
35-
- uses: actions/checkout@v4
36-
- uses: actions/setup-python@v5
35+
- uses: actions/checkout@v7
36+
- uses: actions/setup-python@v6
3737
with:
3838
python-version: ${{ matrix.PYTHON_VERSION }}
3939
architecture: 'x64'

.github/workflows/test-mac.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@ concurrency:
1616
jobs:
1717
build:
1818
name: Mac Py${{ matrix.PYTHON_VERSION }}
19-
runs-on: macos-13
19+
runs-on: macos-14
2020
env:
2121
CI: 'true'
2222
OS: 'macos'
2323
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
PYTHON_VERSION: ['3.11', '3.10', '3.9']
27+
PYTHON_VERSION: ['3.14', '3.12', '3.11']
2828
timeout-minutes: 10
2929
steps:
30-
- uses: actions/cache@v4
30+
- uses: actions/cache@v6
3131
with:
3232
path: ~/Library/Caches/pip
3333
key: ${{ runner.os }}-${{ matrix.PYTHON_VERSION }}-pip-${{ hashFiles('pyproject.toml') }}
3434
restore-keys: ${{ runner.os }}-${{ matrix.PYTHON_VERSION }}-pip-
35-
- uses: actions/checkout@v4
36-
- uses: actions/setup-python@v5
35+
- uses: actions/checkout@v7
36+
- uses: actions/setup-python@v6
3737
with:
3838
python-version: ${{ matrix.PYTHON_VERSION }}
3939
architecture: 'x64'

.github/workflows/test-win.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
PYTHON_VERSION: ['3.11', '3.10', '3.9']
27+
PYTHON_VERSION: ['3.14', '3.12', '3.9']
2828
timeout-minutes: 10
2929
steps:
30-
- uses: actions/cache@v4
30+
- uses: actions/cache@v6
3131
with:
3232
path: ~\AppData\Local\pip\Cache
3333
key: ${{ runner.os }}-${{ matrix.PYTHON_VERSION }}-pip-${{ hashFiles('pyproject.toml') }}
3434
restore-keys: ${{ runner.os }}-${{ matrix.PYTHON_VERSION }}-pip-
35-
- uses: actions/checkout@v4
36-
- uses: actions/setup-python@v5
35+
- uses: actions/checkout@v7
36+
- uses: actions/setup-python@v6
3737
with:
3838
python-version: ${{ matrix.PYTHON_VERSION }}
3939
architecture: 'x64'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ ENV/
100100

101101
# Spyder project settings
102102
.spyderproject
103+
.spyproject
103104

104105
# Rope project settings
105106
.ropeproject

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# History of changes
22

3+
## Version 1.14.0 (2025/12/06)
4+
5+
### New features
6+
* Add `pylsp.signature.include_docstring` to hide docstring in signatures.
7+
* Add support for Pylint 4.
8+
* Fix support for Python 3.14.
9+
10+
### Pull Requests Merged
11+
12+
* [PR 690](https://github.com/python-lsp/python-lsp-server/pull/690) - Fix starting the server for Python 3.14 and run tests with that version, by [@ccordoba12](https://github.com/ccordoba12)
13+
* [PR 689](https://github.com/python-lsp/python-lsp-server/pull/689) - Adjust test based on Jedi version, by [@aeliton](https://github.com/aeliton)
14+
* [PR 687](https://github.com/python-lsp/python-lsp-server/pull/687) - Bump allowed pylint to less than 4.1, by [@tiltingpenguin](https://github.com/tiltingpenguin)
15+
* [PR 686](https://github.com/python-lsp/python-lsp-server/pull/686) - Add option to hide docstring in signatures, by [@tomekwojcik](https://github.com/tomekwojcik)
16+
17+
In this release 4 pull requests were closed.
18+
19+
----
20+
21+
## Version 1.13.2 (2025/11/19)
22+
23+
### Pull Requests Merged
24+
25+
* [PR 683](https://github.com/python-lsp/python-lsp-server/pull/683) - Prevent showing cmd on Windows when running flake8, by [@dalthviz](https://github.com/dalthviz)
26+
* [PR 669](https://github.com/python-lsp/python-lsp-server/pull/669) - Fix license entries in `pyproject.toml` due to pep 639, by [@ccordoba12](https://github.com/ccordoba12)
27+
28+
In this release 2 pull requests were closed.
29+
30+
----
31+
332
## Version 1.13.1 (2025/08/26)
433

534
### Pull Requests Merged

CONFIGURATION.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ This server can be configured using the `workspace/didChangeConfiguration` metho
7777
| `pylsp.rope.extensionModules` | `string` | Builtin and c-extension modules that are allowed to be imported and inspected by rope. | `null` |
7878
| `pylsp.rope.ropeFolder` | `array` of unique `string` items | The name of the folder in which rope stores project configurations and data. Pass `null` for not using such a folder at all. | `null` |
7979
| `pylsp.signature.formatter` | `string` (one of: `'black'`, `'ruff'`, `None`) | Formatter to use for reformatting signatures in docstrings. | `"black"` |
80-
| `pylsp.signature.line_length` | `number` | Maximum line length in signatures. | `88` |
80+
| `pylsp.signature.include_docstring` | `boolean` | Include signature docstring. | `true` |
81+
| `pylsp.signature.line_length` | `integer` | Maximum line length in signatures. | `88` |
8182

8283
This documentation was generated from `pylsp/config/schema.json`. Please do not edit this file directly.

pylsp/_utils.py

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,13 @@ def find_parents(root, path, names):
9696
# Split the relative by directory, generate all the parent directories, then check each of them.
9797
# This avoids running a loop that has different base-cases for unix/windows
9898
# e.g. /a/b and /a/b/c/d/e.py -> ['/a/b', 'c', 'd']
99-
dirs = [root] + os.path.relpath(os.path.dirname(path), root).split(os.path.sep)
99+
try:
100+
dirs = [root] + os.path.relpath(os.path.dirname(path), root).split(os.path.sep)
101+
except ValueError:
102+
# On Windows, relpath raises ValueError when path and root are on different mounts
103+
# (e.g. a UNC share root vs a drive-letter path). Nothing to find in this case.
104+
log.warning("Path %r not in %r", path, root)
105+
return []
100106

101107
# Search each of /a/b/c, /a/b, /a
102108
while dirs:
@@ -315,17 +321,24 @@ def format_docstring(
315321
contents = ""
316322

317323
if markup_kind == "markdown":
318-
try:
319-
value = docstring_to_markdown.convert(contents)
320-
except docstring_to_markdown.UnknownFormatError:
321-
# try to escape the Markdown syntax instead:
322-
value = escape_markdown(contents)
323-
324-
if signatures:
325-
wrapped_signatures = convert_signatures_to_markdown(
326-
signatures, config=signature_config or {}
327-
)
328-
value = wrapped_signatures + "\n\n" + value
324+
wrapped_signatures = convert_signatures_to_markdown(
325+
signatures if signatures is not None else [], config=signature_config or {}
326+
)
327+
328+
if contents != "":
329+
try:
330+
value = docstring_to_markdown.convert(contents)
331+
except docstring_to_markdown.UnknownFormatError:
332+
# try to escape the Markdown syntax instead:
333+
value = escape_markdown(contents)
334+
335+
if signatures:
336+
value = wrapped_signatures + "\n\n" + value
337+
else:
338+
value = contents
339+
340+
if signatures:
341+
value = wrapped_signatures
329342

330343
return {"kind": "markdown", "value": value}
331344
value = contents

pylsp/config/schema.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@
9191
"description": "List of errors and warnings to ignore (or skip)."
9292
},
9393
"pylsp.plugins.flake8.maxComplexity": {
94-
"type": "integer",
94+
"type": [
95+
"integer",
96+
"null"
97+
],
9598
"default": null,
9699
"description": "Maximum allowed complexity threshold."
97100
},
@@ -530,8 +533,13 @@
530533
"default": "black",
531534
"description": "Formatter to use for reformatting signatures in docstrings."
532535
},
536+
"pylsp.signature.include_docstring": {
537+
"type": "boolean",
538+
"default": true,
539+
"description": "Include signature docstring."
540+
},
533541
"pylsp.signature.line_length": {
534-
"type": "number",
542+
"type": "integer",
535543
"default": 88,
536544
"description": "Maximum line length in signatures."
537545
}

pylsp/plugins/definition.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ def pylsp_definitions(
7171
},
7272
}
7373
for d in definitions
74-
if d.is_definition() and (follow_builtin_defns or _not_internal_definition(d))
74+
if d.is_definition()
75+
and d.line is not None
76+
and d.column is not None
77+
and (follow_builtin_defns or _not_internal_definition(d))
7578
]
7679

7780

0 commit comments

Comments
 (0)