Skip to content

remove pydantic #58

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

Merged
merged 9 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ authors = [
]
description = "A language-agnostic LSP client in Python, with a library interface. Intended to be used to build applications around language servers. Currently multilspy supports language servers for Python, Rust, Java, Go, JavaScript and C#. Originally appeared as part of Monitor-Guided Decoding (https://github.com/microsoft/monitors4codegen)"
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.8, <4.0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you kindly undo the "<4.0" change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as I wrote if I do it poetry lock command failed with
For jedi-language-server, a possible solution would be to set the python property to ">=3.8,<4.0"

classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
Expand All @@ -27,8 +27,8 @@ classifiers = [

dependencies = [
"jedi-language-server==0.41.1",
"pydantic>=1.10.5, <2",
"requests==2.32.3"
"requests==2.32.3",
"typing-extensions>=4.2.0"
]

[project.urls]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
jedi-language-server==0.41.1
pytest==7.3.1
pydantic>=1.10.5, <2
pytest-asyncio==0.21.1
requests==2.32.3
typing-extensions>=4.2.0
9 changes: 5 additions & 4 deletions src/multilspy/multilspy_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
Multilspy logger module.
"""
import inspect
import json
import logging
from datetime import datetime
from pydantic import BaseModel
from typing_extensions import TypedDict

class LogLine(BaseModel):
class LogLine(TypedDict):
"""
Represents a line in the Multilspy log
"""
Expand Down Expand Up @@ -49,10 +50,10 @@ def log(self, debug_message: str, level: int, sanitized_error_message: str = "")
caller_file=caller_file,
caller_name=caller_name,
caller_line=caller_line,
message=debug_message,
message=debug_message
)

self.logger.log(
level=level,
msg=debug_log_line.json(),
msg=json.dumps(debug_log_line),
)
Loading