Added beartype package#484
Conversation
|
I couldn't understand why tests fail: What I've checked: I found no clue of why import may fail in the tests. :( Could it be too many import nesting levels? |
agriyakhetarpal
left a comment
There was a problem hiding this comment.
Hi @jolaf, thank you for this PR! Yes, based on the repodata artifacts available at https://github.com/pyodide/pyodide-recipes/actions/runs/21222889001/artifacts/5209590752 (linked on the summary page at https://github.com/pyodide/pyodide-recipes/actions/runs/21222889001?pr=484), the conftest.py file was not included in the built wheel. For size reasons, we usually unvendor the tests from the wheel, as this helps reduce bandwidth usage when downloading packages in a browser.
There are two ways to fix this, and either can be chosen:
- set
unvendor-tests: falseto stop this from happening: https://pyodide.org/en/latest/development/meta-yaml.html#build-unvendor-tests - use this undocumented key to list the files that are needed for the package to be importable and should not be unvendored:
pyodide-recipes/packages/scipy/meta.yaml
Lines 128 to 130 in 7d74638
I would recommend the second one in this case.
So, while this is fixable for now, perhaps you could avoid it in a new version by restructuring the imports upstream to not rely on conftest.py, if possible?
Yes, I understand. But this package does not contain tests. It is a runtime type checker, and the word "test" is extensively used in the code with the meaning of "check that the value type is as expected". And
The second options looks more appropriate, because the first one sounds like "let's allow this package to keep its tests", which is not the case.
Ok, we agree on this.
I understand what you mean, but I don't think that would be appropriate. This file, as well as other 16 similarly named files in the package, are not something that can be "not relied on", they are part of its core functionality. Also, I'm not a developer of the package, but just a user who's willing to make products one uses (PyScript/Pyodide, in this case) better. |
…med so in the package
…ls, with unvendor-tests
|
Well, So I'm switching to |
Package Build ResultsTotal packages built: 28 Package Build Times (click to expand)
Longest build: libopenssl (2m 41s) |
Ah, thanks for checking and catching this! Considering that we unvendor the tests from the wheels anyway since |
ryanking13
left a comment
There was a problem hiding this comment.
Same for this package (#485 (review)). beartype is a pure Python package that can be installed through micropip, so why do you want to add this package explicitly?
No description provided.