Title: Improvements around stubtest · Issue #3728 · python/typeshed · GitHub
Open Graph Title: Improvements around stubtest · Issue #3728 · python/typeshed
X Title: Improvements around stubtest · Issue #3728 · python/typeshed
Description: Creating this issue to discuss and document areas of improvement from using stubtest. Note when I use "in CI" below, I mean as in current draft pull request #3727 Fixing existing errors and burning down the whitelists. Some notes: Watch ...
Open Graph Description: Creating this issue to discuss and document areas of improvement from using stubtest. Note when I use "in CI" below, I mean as in current draft pull request #3727 Fixing existing errors and burning...
X Description: Creating this issue to discuss and document areas of improvement from using stubtest. Note when I use "in CI" below, I mean as in current draft pull request #3727 Fixing existing errors a...
Opengraph URL: https://github.com/python/typeshed/issues/3728
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improvements around stubtest","articleBody":"Creating this issue to discuss and document areas of improvement from using stubtest. Note when I use \"in CI\" below, I mean as in current draft pull request #3727 \r\n\r\n- Fixing existing errors and burning down the whitelists. Some notes:\r\n - Watch out for unnecessary branches. `inspect.signature` sometimes throws, in which case `stubtest` doesn't analyse further. However, the functions it fails for differ from python version to python version. If you're not sure whether you need to branch on version, run stubtest without the branch (the documentation is also helpful). \r\n - Similarly, as per discussion in #3693, in CI, we don't check positional-only accuracy for versions other than py38, so don't branch for that.\r\n - For whitelist entries that shouldn't be fixed, it might be worth adding comments to save effort and prevent others from attempting the fix (e.g., `cmath.log`). For avoidable stubtest false positives, please tag me!\r\n - To see existing errors, check the links in https://github.com/python/typeshed/issues/754#issuecomment-576530895 (I've kept them up-to-date) — or run stubtest yourself!\r\n- In CI, we run stubtest with `--ignore-missing-stub`. Running stubtest without this flag is an easy way to find missing stubs to add.\r\n- In CI, we only run on Linux. Running stubtest on different platforms could be a good way of fixing platform differences/availability (be careful about `--ignore-missing-stub`). \r\n- In CI, we only check stdlib. Running stubtest against third party stubs would be good (potentially in CI as well).\r\n- Note that new Python releases will require reworking of the whitelists. This can apply to point releases too (which would break CI), e.g, when the backport of https://bugs.python.org/issue39493 gets released and Travis updates.\r\n - Stubtest can be useful for helping update typeshed, see details:\r\n\r\n\u003cdetails>\r\n\r\nChanges:\r\n\r\n```\r\npython3.8 stubtest.py --custom-typeshed-dir ~/dev/typeshed --ignore-missing-stub --check-typeshed --generate-whitelist > py38wl.txt\r\npython3.9 stubtest.py --custom-typeshed-dir ~/dev/typeshed --ignore-missing-stub --check-typeshed --whitelist py38wl.txt\r\n```\r\nAdditions:\r\n```\r\npython3.9 stubtest.py --custom-typeshed-dir ~/dev/typeshed --ignore-missing-stub --check-typeshed --generate-whitelist > py39wl.txt\r\npython3.8 stubtest.py --custom-typeshed-dir ~/dev/typeshed --check-typeshed --generate-whitelist > py38wl2.txt\r\npython3.9 stubtest.py --custom-typeshed-dir ~/dev/typeshed --check-typeshed --concise --whitelist py38wl2.txt --whitelist py39wl.txt\r\n```\r\n\u003c/details>","author":{"url":"https://github.com/hauntsaninja","@type":"Person","name":"hauntsaninja"},"datePublished":"2020-02-05T20:54:18Z","url":"https://github.com/python/typeshed/issues/3728"}
| 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:ea785228-22f0-ab9c-0c46-a79be877aef9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B22C:5537E:1BF66FA:24FD000:6B002BB9 |
| html-safe-nonce | 89a2bb6f8c73e66ba798494ff325d11b39c8c5a43f09546722d72d221f3504c7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjJDOjU1MzdFOjFCRjY2RkE6MjRGRDAwMDo2QjAwMkJCOSIsInZpc2l0b3JfaWQiOiI1MjQ4MDUzMTU2NzU5MjE5MTI5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 60d8983dba7050564db0ba160141c3aeea7d2a28b011dda9d23187942282502d |
| hovercard-subject-tag | issue:560622981 |
| 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/3728/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fd6abe196fa4318d5fe4e30766f3a4ebeb5be0c37f822917fbec1363934a82a8/python/typeshed/issues/3728 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fd6abe196fa4318d5fe4e30766f3a4ebeb5be0c37f822917fbec1363934a82a8/python/typeshed/issues/3728 |
| og:image:alt | Creating this issue to discuss and document areas of improvement from using stubtest. Note when I use "in CI" below, I mean as in current draft pull request #3727 Fixing existing errors and burning... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hauntsaninja |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| 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 | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width