Skip to content

Suggest a more complete annotation pkg for lxml #16284

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

Closed
wants to merge 1 commit into from
Closed

Suggest a more complete annotation pkg for lxml #16284

wants to merge 1 commit into from

Conversation

abelcheung
Copy link

This is a continuation of PR #14737 ; I'd want to officially recommend external annotation I've been working over lxml-stubs, because annotation of the whole lxml package is basically complete (except a few minor submodules that I'm doubtful anybody is using at all), and I'm still actively maintaining it.

@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Oct 18, 2023

Thanks for maintaining those stubs!

As the comment mentions, from mypy's perspective, we have to be very careful when recommending packages here. These suggestions will be blindly installed by trusting humans or directly by mypy via --install-types. This is concerning, since Python packages can execute arbitrary code on installation. The policy I suggested in #14328 (comment) was therefore that mypy only suggest stubs maintained by typeshed or by maintainers of the actual project (as far as I can tell you don't have PyPI upload permissions on lxml), since such stub packages do not expand the web of trust for users.

I'm curious what it would take to merge types-lxml into the lxml-stubs that upstream maintains?

@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@abelcheung abelcheung closed this Oct 19, 2023
@abelcheung abelcheung deleted the suggest-types-lxml branch October 19, 2023 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants