Repository navigation
Replace lazy-imports library with stdlib PEP 562 __getattr__ - #80
Merged
Merged
Conversation
Address review feedback on PR zauberzeug#5303: - Use `_LAZY_IMPORTS` dict + module-level `__getattr__` instead of the third-party `lazy-imports` library - Revert clipboard.py to module-level functions (no breaking API change) - Remove `lazy-imports` dependency from pyproject.toml - Keep static `__all__` for ruff/IDE compatibility Co-Authored-By: Claude Opus 4.6 <[email protected]>
6 tasks done
Owner
Author
|
@falkoschindler since all tests pass, please review this when you have time |
|
@evnchn Let's merge and review the result in PR zauberzeug#5303. |
evnchn
marked this pull request as ready for review
February 12, 2026 12:32
falkoschindler
added a commit
that referenced
this pull request
Mar 12, 2026
### Motivation This PR addresses multiple Dependabot security alerts by bumping vulnerable dependencies to their patched versions: - [#67](https://github.com/zauberzeug/nicegui/security/dependabot/67) - `lodash-es` for vanilla-jsoneditor (json_editor element) - [#68](https://github.com/zauberzeug/nicegui/security/dependabot/68) - `fonttools` for matplotlib - [#72](https://github.com/zauberzeug/nicegui/security/dependabot/72) - `aiohttp` ≥3.13.3 - [#80](https://github.com/zauberzeug/nicegui/security/dependabot/80) - `urllib3` ≥2.6.3 - [#83](https://github.com/zauberzeug/nicegui/security/dependabot/83) - `orjson` ≥3.11.5 ### Implementation - Updated pyproject.toml with new minimum versions for `aiohttp`, `orjson`, `urllib3`, and added `fonttools` to the matplotlib extra - Pinned `lodash-es` ^4.17.23 in package.json for two elements to override vulnerable transitive dependencies - Regenerated package-lock.json files and uv.lock (`npm run build` didn't change anything in the generated bundles) ### Progress - [x] I chose a meaningful title that completes the sentence: "If applied, this PR will..." - [x] The implementation is complete. - [x] This is not a security issue in NiceGUI itself, but updating dependencies with already-public CVEs. - [x] Pytests are not necessary. - [x] Documentation is not necessary.
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.
Summary
lazy-importslibrary with Python's built-in PEP 562 module-level__getattr__clipboard.pyto module-level functions (no breaking API change)lazy-importsdependency frompyproject.tomluimodule using PEP 562__getattr__zauberzeug/nicegui#5303Test plan
ui.label,ui.clipboard, double-access all workruff check nicegui/ui.pypasses (static__all__for tooling compatibility)🤖 Generated with Claude Code