Title: pytype conformance tests crash if no `python3.11` executable is in `PATH` · Issue #1758 · python/typing · GitHub
Open Graph Title: pytype conformance tests crash if no `python3.11` executable is in `PATH` · Issue #1758 · python/typing
X Title: pytype conformance tests crash if no `python3.11` executable is in `PATH` · Issue #1758 · python/typing
Description: I attempted to run the conformance tests locally using Python 3.12, following the instructions given in https://github.com/python/typing/blob/main/conformance/README.md#running-the-conformance-test-tool. The mypy, pyright and pyre tests ...
Open Graph Description: I attempted to run the conformance tests locally using Python 3.12, following the instructions given in https://github.com/python/typing/blob/main/conformance/README.md#running-the-conformance-test...
X Description: I attempted to run the conformance tests locally using Python 3.12, following the instructions given in https://github.com/python/typing/blob/main/conformance/README.md#running-the-conformance-test...
Opengraph URL: https://github.com/python/typing/issues/1758
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"pytype conformance tests crash if no `python3.11` executable is in `PATH`","articleBody":"I attempted to run the conformance tests locally using Python 3.12, following the instructions given in https://github.com/python/typing/blob/main/conformance/README.md#running-the-conformance-test-tool. The mypy, pyright and pyre tests all ran, but the pytype tests crashed with the following traceback:\r\n\r\n```pytb\r\nRunning tests for pytype\r\nTraceback (most recent call last):\r\n File \"/Users/alexw/dev/typing/conformance/.venv/lib/python3.12/site-packages/pytype/config.py\", line 704, in _store_python_version\r\n self.output_options.python_exe = compiler.get_python_executable(version)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/Users/alexw/dev/typing/conformance/.venv/lib/python3.12/site-packages/pytype/pyc/compiler.py\", line 135, in get_python_executable\r\n raise PythonNotFoundError()\r\npytype.pyc.compiler.PythonNotFoundError\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"/Users/alexw/dev/typing/conformance/src/main.py\", line 258, in \u003cmodule>\r\n main()\r\n File \"/Users/alexw/dev/typing/conformance/src/main.py\", line 251, in main\r\n run_tests(root_dir, type_checker, test_cases, skip_timing=options.skip_timing)\r\n File \"/Users/alexw/dev/typing/conformance/src/main.py\", line 30, in run_tests\r\n tests_output = type_checker.run_tests([file.name for file in test_cases])\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/Users/alexw/dev/typing/conformance/src/type_checker.py\", line 287, in run_tests\r\n options = pytype_config.Options.create(python_version=(3, 11), quick=True)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/Users/alexw/dev/typing/conformance/.venv/lib/python3.12/site-packages/pytype/config.py\", line 107, in create\r\n return cls(options)\r\n ^^^^^^^^^^^^\r\n File \"/Users/alexw/dev/typing/conformance/.venv/lib/python3.12/site-packages/pytype/config.py\", line 88, in __init__\r\n Postprocessor(names, opt_map, options, self).process()\r\n File \"/Users/alexw/dev/typing/conformance/.venv/lib/python3.12/site-packages/pytype/config.py\", line 587, in process\r\n node.processor(value)\r\n File \"/Users/alexw/dev/typing/conformance/.venv/lib/python3.12/site-packages/pytype/config.py\", line 706, in _store_python_version\r\n self.error(\"Need a valid python%d.%d executable in $PATH\" % version)\r\n File \"/Users/alexw/dev/typing/conformance/.venv/lib/python3.12/site-packages/pytype/config.py\", line 594, in error\r\n raise PostprocessingError(message)\r\npytype.config.PostprocessingError: Need a valid python3.11 executable in $PATH\r\n```\r\n\r\nIt sounded like pytype wanted Python 3.11, so I tried again, this time creating an environment with Python 3.11. But I didn't get nearly as far:\r\n\r\n```pytb\r\n(311-env) ~/dev/typing/conformance/src (type-type)⚡ % python main.py\r\nTraceback (most recent call last):\r\n File \"/Users/alexw/dev/typing/conformance/src/main.py\", line 258, in \u003cmodule>\r\n main()\r\n File \"/Users/alexw/dev/typing/conformance/src/main.py\", line 230, in main\r\n assert sys.version_info >= (3, 12)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\nAssertionError\r\n```","author":{"url":"https://github.com/AlexWaygood","@type":"Person","name":"AlexWaygood"},"datePublished":"2024-06-02T17:01:41Z","url":"https://github.com/python/typing/issues/1758"}
| 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:270690d7-cc57-b921-b12b-7a86c81102e6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C9D6:3DAD59:220C92D:2D2244A:6B004C01 |
| html-safe-nonce | 487ba33d26e74ffcfd2ac6677c74c0c944586e8f00c43a5a30551ba820aecdfe |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUQ2OjNEQUQ1OToyMjBDOTJEOjJEMjI0NEE6NkIwMDRDMDEiLCJ2aXNpdG9yX2lkIjoiNTUwNTAzMDY5MjI4MDQ4NjkxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a8fc81d021fe3a6c6ace2a2183d9df4a45dd510f1e055d76fcf044ec68e39923 |
| hovercard-subject-tag | issue:2329763545 |
| 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/typing/1758/issue_layout |
| twitter:image | https://opengraph.githubassets.com/21cc8ffe6809269b68510529069f45c87ef92187e97c1866ea0129be8db6ac1a/python/typing/issues/1758 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/21cc8ffe6809269b68510529069f45c87ef92187e97c1866ea0129be8db6ac1a/python/typing/issues/1758 |
| og:image:alt | I attempted to run the conformance tests locally using Python 3.12, following the instructions given in https://github.com/python/typing/blob/main/conformance/README.md#running-the-conformance-test... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AlexWaygood |
| hostname | github.com |
| expected-hostname | github.com |
| None | f9517bf360d46638a1e5e7daee7158842fe5ef43c9000afa0e127564a7c2f39b |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typing git https://github.com/python/typing.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 24604008 |
| octolytics-dimension-repository_nwo | python/typing |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24604008 |
| octolytics-dimension-repository_network_root_nwo | python/typing |
| 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 | b27c5dde30676028abd5c5fc53ce5c9b625f8281 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width