Skip to content

Conversation

kasium
Copy link
Contributor

@kasium kasium commented Oct 2, 2025

No description provided.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@kasium
Copy link
Contributor Author

kasium commented Oct 6, 2025

Fails with stub_uploader.metadata.InvalidRequires: Expected dependency lxml-stubs to be present in the stub_uploader allowlist. Can someone please support

@srittau
Copy link
Collaborator

srittau commented Oct 6, 2025

It seems that the lxml project instead recommends to use types-lxml instead: That said, I'm a bit wary to officially depend on a non-typeshed project that uses the types- prefix, which we unfortunately couldn't reserve as PyPI still doesn't support namespaces (pypi/warehouse#4967, pypi/warehouse#4164, pypi/warehouse#2589).

@kasium
Copy link
Contributor Author

kasium commented Oct 6, 2025

Okay, but should I use then? If I don't add any subs it fails too :)

@srittau
Copy link
Collaborator

srittau commented Oct 6, 2025

One option is to just alias it for now:

ET: TypeAlias = Any  # lxml.etree._ElementTree

This is the version I'm most comfortable with, considering that types-lxml is not a name I want to support, and lxml-stubs is outdated.

This comment has been minimized.

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks mostly good. Two remarks.

Copy link
Contributor

github-actions bot commented Oct 7, 2025

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau srittau merged commit bc49fc5 into python:main Oct 7, 2025
48 checks passed
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