Title: Regression from 310 to 931: Module has no attribute "NETLINK_ROUTE" · Issue #7077 · python/typeshed · GitHub
Open Graph Title: Regression from 310 to 931: Module has no attribute "NETLINK_ROUTE" · Issue #7077 · python/typeshed
X Title: Regression from 310 to 931: Module has no attribute "NETLINK_ROUTE" · Issue #7077 · python/typeshed
Description: Bug Report mypy 931 returns an error (Module has no attribute "NETLINK_ROUTE") for socket.NETLINK_ROUTE on Linux. The attribute exists as the code runs fine. Mypy 310 did not expose the problem To Reproduce Suppose the following program ...
Open Graph Description: Bug Report mypy 931 returns an error (Module has no attribute "NETLINK_ROUTE") for socket.NETLINK_ROUTE on Linux. The attribute exists as the code runs fine. Mypy 310 did not expose the problem To ...
X Description: Bug Report mypy 931 returns an error (Module has no attribute "NETLINK_ROUTE") for socket.NETLINK_ROUTE on Linux. The attribute exists as the code runs fine. Mypy 310 did not expose the p...
Opengraph URL: https://github.com/python/typeshed/issues/7077
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Regression from 310 to 931: Module has no attribute \"NETLINK_ROUTE\"","articleBody":"**Bug Report**\r\n\r\nmypy 931 returns an error (Module has no attribute \"NETLINK_ROUTE\") for `socket.NETLINK_ROUTE` on Linux. The attribute exists as the code runs fine. Mypy 310 did not expose the problem\r\n\r\n**To Reproduce**\r\n\r\n1. Suppose the following program `route.py`\r\n```python\r\nimport socket\r\nimport sys\r\n\r\nprint(sys.platform)\r\ns = socket.socket(socket.AF_NETLINK, socket.SOCK_RAW, socket.NETLINK_ROUTE)\r\nprint(s)\r\n\r\n```\r\n2. Run `mypy route.py`\r\n\r\n**Expected Behavior**\r\n\r\nmypy should not return an error: `Success: no issues found in 1 source file`\r\n\r\n**Actual Behavior**\r\n\r\n```\r\nroute.py:5: error: Module has no attribute \"NETLINK_ROUTE\"\r\nFound 1 error in 1 file (checked 1 source file)\r\n```\r\n\r\n**Your Environment**\r\n\r\n- Mypy version used: 910 and 931\r\n- Mypy command-line flags: None, but `--platform=linux` does not work either\r\n- Mypy configuration options from `mypy.ini` (and other config files): No `mypy.ini` file used\r\n- Python version used: 3.7, but 3.9 is affected as well\r\n- Operating system and version: Linux, Gentoo. Both Python versions were tested in virtual environments with mypy installed via pip (`pip install mypy==0.910`, e.g.).","author":{"url":"https://github.com/christgau","@type":"Person","name":"christgau"},"datePublished":"2022-01-29T16:57:21Z","url":"https://github.com/python/typeshed/issues/7077"}
| 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:deb23b28-b00b-6daf-2741-5b577d717ae6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A23E:2E9DBB:178F8EE:1FD00B8:6AFFF12B |
| html-safe-nonce | 5de11fc07a891ba13e3cd6bc1609986a1f21749f4b7436f017b76740277c585a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjNFOjJFOURCQjoxNzhGOEVFOjFGRDAwQjg6NkFGRkYxMkIiLCJ2aXNpdG9yX2lkIjoiMTQwMzQ2Mzc5NzkzNDM4NzQ5OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9476ceeef22a4c99e5a55f0c6f1fcfe7b9df9efed45aa7bb7de2aeb420b10037 |
| hovercard-subject-tag | issue:1118274208 |
| 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/typeshed/7077/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5f5cd6216220e28e53d83d2384ac2ec6dcab2274cb473b41fbb23fcfbfe28cd4/python/typeshed/issues/7077 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5f5cd6216220e28e53d83d2384ac2ec6dcab2274cb473b41fbb23fcfbfe28cd4/python/typeshed/issues/7077 |
| og:image:alt | Bug Report mypy 931 returns an error (Module has no attribute "NETLINK_ROUTE") for socket.NETLINK_ROUTE on Linux. The attribute exists as the code runs fine. Mypy 310 did not expose the problem To ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | christgau |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| 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 | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width