Skip to content
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

Regression introduced by cattrs v23.2.1 with Any | None #301

Closed
jhossbach opened this issue Nov 21, 2023 · 3 comments · Fixed by #303
Closed

Regression introduced by cattrs v23.2.1 with Any | None #301

jhossbach opened this issue Nov 21, 2023 · 3 comments · Fixed by #303
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority needs PR

Comments

@jhossbach
Copy link
Contributor

Takeaway from python-lsp/python-lsp-ruff#61:

I managed to track it down. There's a type in lsprotocol.types, LSPAny, typed as Union[Any, None].
Looks like there's a regression in unstructuring this type, it used to be unstructured as the runtime type, and now is unstructured as Any.

Originally posted by @Tinche in python-lsp/python-lsp-ruff#61 (comment)

The issue is solved with cattrs>=23.2.2. Can we make the cattrs dependency more strict?

@karthiknadig
Copy link
Member

@jhossbach Feel free to provide the PR.
Add it in these two places:
https://github.com/microsoft/lsprotocol/blob/main/requirements.in : This is used for CI/CD and local development
https://github.com/microsoft/lsprotocol/blob/main/packages/python/pyproject.toml : This is the actual package deps

@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug needs PR important Issue identified as high-priority and removed triage-needed labels Nov 21, 2023
@jhossbach
Copy link
Contributor Author

Gladly, just a question: Do I also need to touch packages/python/requirements.in?

@karthiknadig
Copy link
Member

Nope, I plan on removing those as we have the dependencies described now in pyproject.toml

karthiknadig added a commit to karthiknadig/lsprotocol that referenced this issue Dec 2, 2023
luabud pushed a commit to luabud/lsprotocol that referenced this issue Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority needs PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants