Skip to content

Add an extra which specifies the lxml dependency #9105

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
sirosen opened this issue Jul 6, 2020 · 1 comment
Closed

Add an extra which specifies the lxml dependency #9105

sirosen opened this issue Jul 6, 2020 · 1 comment
Labels
feature topic-configuration Configuration files and flags

Comments

@sirosen
Copy link

sirosen commented Jul 6, 2020

I'm aware of #909 , which indicates that mypy wants to remove the use of lxml altogether.
And in #1001, someone was suggesting making lxml a strict requirement. I don't want that either.

I think it would be preferable, for users managing their dependencies, to state mypy[report] or similar and have that extra pull in lxml.
i.e.

# test-requirements.txt

mypy
lxml<4

is less nice to work with than

# test-requirements.txt
mypy[report]

This is really just about letting users document their requirements better by means of the extra.
Yes, you can do it with comments, but I think the extra better encodes things.

I'd rather submit as an issue than come out with a PR because I have a bunch of questions.

  • Does mypy have a stance against extras? I see that the project doesn't use any today.
  • Is it an issue that mypy[report] might be supported by some, but not all, versions? (I've had cases where an extra sticks around, empty, until a major version bump, because you want to maintain compatibility for install commands.)
  • Is a move off of XML and XSLT imminent? (rendering this obsolete?)
  • Is there a better name? mypy[coverage]? mypy[xml]?
@AlexWaygood AlexWaygood added feature topic-configuration Configuration files and flags labels Mar 29, 2022
@rnestler
Copy link

Looks like this is fixed:

mypy/setup.py

Lines 220 to 225 in 3c5f368

extras_require={
"dmypy": "psutil >= 4.0",
"python2": "typed_ast >= 1.4.0, < 2",
"reports": "lxml",
"install-types": "pip",
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature topic-configuration Configuration files and flags
Projects
None yet
Development

No branches or pull requests

3 participants