Fix pyodide tests#544
Merged
Merged
Conversation
This PR should fix the pyodide test suite - as well as bumping the version of pyodide we test to the latest. The issue came down to dependency resolution... (something that I think has bitten us before?). The version of `attrs` available by default [1] in pyodide was too old relative to the version of `cattrs` being selected by `micropip`. (`cattrs` was attempting to import `attrs.NothingType` which was only introduced in `attrs v24.3.0`) I would have assumed that the version bound [2] on `attrs` supplied by `cattrs` itself would have been taken into account when installing `pygls` under pyodide but that does not seem to be the case. So instead, I have added an explicit dependency on `attrs` to pygls itself, with a minimum version bound that ensures `attrs.NothingType` is always available [1]: https://github.com/pyodide/pyodide/blob/28fcc1bf138732e62e7bbc926ea70a0f13149f54/packages/attrs/meta.yaml#L3 [2]: python-attrs/cattrs@d987382#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R43
Collaborator
Author
|
Lint failure is just commitlint complaining about some of the urls I included in my commit message
|
tombh
approved these changes
Jun 4, 2025
Collaborator
Author
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description (e.g. "Related to ...", etc.)
This PR should fix the pyodide test suite - as well as bumping the version of pyodide we test to the latest.
The issue came down to dependency resolution... (something that I think has bitten us before?). The version of
attrsavailable by default in pyodide was too old relative to the version ofcattrsbeing selected bymicropip.(
cattrswas attempting to importattrs.NothingTypewhich was only introduced inattrs v24.3.0)I would have assumed that the version bound on
attrssupplied bycattrsitself would have been taken into account when installingpyglsunder pyodide but that does not seem to be the case.So instead, I have added an explicit dependency on
attrsto pygls itself, with a minimum version bound that ensuresattrs.NothingTypeis always availableCode review checklist (for code reviewer to complete)
Automated linters
You can run the lints that are run on CI locally with: