Title: mypy INTERNAL ERROR with v1.18.1, related to pydantic · Issue #19835 · python/mypy · GitHub
Open Graph Title: mypy INTERNAL ERROR with v1.18.1, related to pydantic · Issue #19835 · python/mypy
X Title: mypy INTERNAL ERROR with v1.18.1, related to pydantic · Issue #19835 · python/mypy
Description: Crash Report mypy crashes when running it on our internal package. this started happening with v1.18.1, it works with v1.17.1 Traceback .venv/lib/python3.12/site-packages/pydantic/env_settings.py:23: error: INTERNAL ERROR -- Please try u...
Open Graph Description: Crash Report mypy crashes when running it on our internal package. this started happening with v1.18.1, it works with v1.17.1 Traceback .venv/lib/python3.12/site-packages/pydantic/env_settings.py:2...
X Description: Crash Report mypy crashes when running it on our internal package. this started happening with v1.18.1, it works with v1.17.1 Traceback .venv/lib/python3.12/site-packages/pydantic/env_settings.py:2...
Opengraph URL: https://github.com/python/mypy/issues/19835
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mypy INTERNAL ERROR with v1.18.1, related to pydantic","articleBody":"\n**Crash Report**\n\nmypy crashes when running it on our internal package. this started happening with `v1.18.1`, it works with `v1.17.1`\n\n**Traceback**\n\n```python-traceback\n.venv/lib/python3.12/site-packages/pydantic/env_settings.py:23: error: INTERNAL ERROR -- Please try using mypy master on GitHub:\nhttps://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build\nPlease report a bug at https://github.com/python/mypy/issues\nversion: 1.18.1\nTraceback (most recent call last):\n File \"mypy/semanal.py\", line 7350, in accept\n File \"mypy/nodes.py\", line 1440, in accept\n File \"mypy/semanal.py\", line 1775, in visit_class_def\n File \"mypy/semanal.py\", line 1991, in analyze_class\n File \"mypy/semanal.py\", line 2038, in analyze_class_body_common\n File \"mypy/semanal.py\", line 2123, in apply_class_plugin_hooks\n File \"pydantic/mypy.py\", line 156, in pydantic.mypy.PydanticPlugin._pydantic_model_class_maker_callback\n File \"pydantic/mypy.py\", line 319, in pydantic.mypy.PydanticModelTransformer.transform\n File \"pydantic/mypy.py\", line 529, in pydantic.mypy.PydanticModelTransformer.add_construct_method\n File \"pydantic/mypy.py\", line 868, in pydantic.mypy.add_method\nTypeError: tuple object expected; got list\n```\n\n**To Reproduce**\n\ninstall `eo-grow` from https://github.com/sentinel-hub/eo-grow in dev mode and run `mypy eogrow` with `mypy` version `v1.18.1`\n\n```bash\ngit clone https://github.com/sentinel-hub/eo-grow \ncd eo-grow\npip install -e .[dev]\nmypy eogrow\n```\n\n\n**Your Environment**\n\n\u003c!-- Include as many relevant details about the environment you experienced the bug in -->\n\n- Mypy version used: 1.18.1\n- Python version used: 3.12.11\n- Pydantic version used: 1.10.22\n- Operating system and version: mac OS, and also gitlab CI\n\n\npyproject.toml relevant content:\n\n```\n[tool.mypy]\nfollow_imports = \"normal\"\nignore_missing_imports = true\nshow_column_numbers = true\nshow_error_codes = true\nno_implicit_optional = true\nwarn_redundant_casts = true\nwarn_unused_ignores = true\ndisallow_untyped_defs = true\ndisallow_untyped_decorators = true\nwarn_unreachable = true\nstrict_equality = true\npretty = true\nplugins = [\"pydantic.mypy\"]\nfiles = [\"eogrow\"]\n\n[tool.pydantic-mypy]\n# init_forbid_extra = true # cant be used unless we change managers\ninit_typed = true\n```","author":{"url":"https://github.com/mlubej","@type":"Person","name":"mlubej"},"datePublished":"2025-09-12T08:08:53Z","url":"https://github.com/python/mypy/issues/19835"}
| 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:32f180b8-6a45-61e1-23c5-c4c08592fda7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9F9C:1AC37C:504910:6B8D50:6B00301F |
| html-safe-nonce | df6776f3a11f271e887a0195a22a8c677d9c01844456c61cd84942b62999cf89 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjlDOjFBQzM3Qzo1MDQ5MTA6NkI4RDUwOjZCMDAzMDFGIiwidmlzaXRvcl9pZCI6Ijg3NTYwOTU0NTgxNTkzNzQzNjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 798c79bf2637263f4289740eef2f6bed9e11fb550bd6be309187dd475e2b590f |
| hovercard-subject-tag | issue:3409375210 |
| 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/19835/issue_layout |
| twitter:image | https://opengraph.githubassets.com/197aba21dfe3aac9330d5933f663130777517c30943aaafafa75f405e4d2a14b/python/mypy/issues/19835 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/197aba21dfe3aac9330d5933f663130777517c30943aaafafa75f405e4d2a14b/python/mypy/issues/19835 |
| og:image:alt | Crash Report mypy crashes when running it on our internal package. this started happening with v1.18.1, it works with v1.17.1 Traceback .venv/lib/python3.12/site-packages/pydantic/env_settings.py:2... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mlubej |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| 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 | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width