Title: Consider recommending types-lxml instead of lxml-stubs in import-untyped hint · Issue #20187 · python/mypy · GitHub
Open Graph Title: Consider recommending types-lxml instead of lxml-stubs in import-untyped hint · Issue #20187 · python/mypy
X Title: Consider recommending types-lxml instead of lxml-stubs in import-untyped hint · Issue #20187 · python/mypy
Description: Bug Report The import-untyped hint for lxml recommends installing lxml-stubs. The lxml-stubs README seems to recommend the types-lxml fork instead, though: This repository contains external type annotations (see PEP 484) for the lxml pac...
Open Graph Description: Bug Report The import-untyped hint for lxml recommends installing lxml-stubs. The lxml-stubs README seems to recommend the types-lxml fork instead, though: This repository contains external type an...
X Description: Bug Report The import-untyped hint for lxml recommends installing lxml-stubs. The lxml-stubs README seems to recommend the types-lxml fork instead, though: This repository contains external type an...
Opengraph URL: https://github.com/python/mypy/issues/20187
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Consider recommending types-lxml instead of lxml-stubs in import-untyped hint","articleBody":"**Bug Report**\n\nThe `import-untyped` hint for lxml recommends installing [lxml-stubs](https://github.com/lxml/lxml-stubs). The lxml-stubs README seems to recommend the [types-lxml](https://github.com/abelcheung/types-lxml) fork instead, though:\n\n>This repository contains external type annotations (see PEP 484) for the lxml package.\n> NOTE: It was superceded by the more complete and externally maintained types-lxml fork.\n\nIt seems better to recommend types-lxml to users, but it might be more risky for use with `--install-types` because it is a third-party package.\n\n**To Reproduce**\n\n```python\nimport lxml\n```\n\n**Actual Behavior**\n\n```\na.py:1: error: Library stubs not installed for \"lxml\" [import-untyped]\na.py:1: note: Hint: \"python3 -m pip install lxml-stubs\"\na.py:1: note: (or run \"mypy --install-types\" to install all missing stub packages)\na.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports\n```\n\n**Your Environment**\n\n- Mypy version used: 1.18.2 and 45aa599\n- Mypy command-line flags: N/A\n- Mypy configuration options from `mypy.ini` (and other config files): N/A\n- Python version used: 3.13.7\n","author":{"url":"https://github.com/correctmost","@type":"Person","name":"correctmost"},"datePublished":"2025-11-05T21:16:50Z","url":"https://github.com/python/mypy/issues/20187"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:23213291-d0ba-0d3d-1b4e-1a2c9fd52bce |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 81BC:4D1C6:21A2542:2DC17C0:6B0026F2 |
| html-safe-nonce | 92144f33af92c5761b3d88c7751e9d3fe95f9dfd322931219116e089abce63d7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MUJDOjREMUM2OjIxQTI1NDI6MkRDMTdDMDo2QjAwMjZGMiIsInZpc2l0b3JfaWQiOiIxNDI5ODAyMDg3ODc2NjY3MTIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d6011caebebe88d48c55af8df57c120682a77ebccbd03b2e00c38e26a7f47085 |
| hovercard-subject-tag | issue:3592839009 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/20187/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5e210e2a3dc9cedf22bc09a34ba46994dc6a25d92b1d9e7f80eeead8992cdfd7/python/mypy/issues/20187 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5e210e2a3dc9cedf22bc09a34ba46994dc6a25d92b1d9e7f80eeead8992cdfd7/python/mypy/issues/20187 |
| og:image:alt | Bug Report The import-untyped hint for lxml recommends installing lxml-stubs. The lxml-stubs README seems to recommend the types-lxml fork instead, though: This repository contains external type an... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | correctmost |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width