|
8 | 8 | - jython
|
9 | 9 | - python
|
10 | 10 | date: 2024-03-01 12:56 -0800
|
11 |
| -last-updated: 2024-03-01 17:00 -0800 |
| 11 | +last-updated: 2024-09-05 17:00 -0700 |
12 | 12 | ---
|
13 | 13 | ## TOC
|
14 | 14 |
|
@@ -88,7 +88,76 @@ The same thing happened when Python 3.12 was released, but I have recently teste
|
88 | 88 |
|
89 | 89 | ~~As of the time of the posting of this article, `mypy[python2]==0.971` fails to install on 3.13.0a4.~~
|
90 | 90 |
|
91 |
| -Update: I just tried installing `mypy[python2]==0.971` using Python 3.13.0a4 and it worked. Securing my GitHub workflows and Azure Pipelines till October 2029. |
| 91 | +~~Update (2024-03-01): I just tried installing `mypy[python2]==0.971` using Python 3.13.0a4 and it worked. Securing my GitHub workflows and Azure Pipelines till October 2029.~~ |
| 92 | + |
| 93 | +Update (2024-09-05): Unfortunately Python 3.13 does not allow `mypy[python2]==0.971` to be installed. |
| 94 | + |
| 95 | +Trying to install it results in the following error: |
| 96 | + |
| 97 | +```sh |
| 98 | +$ python -m pip install 'mypy[python2]==0.971' |
| 99 | +Collecting mypy==0.971 (from mypy[python2]==0.971) |
| 100 | + Downloading mypy-0.971-py3-none-any.whl.metadata (1.8 kB) |
| 101 | +Collecting typing-extensions>=3.10 (from mypy==0.971->mypy[python2]==0.971) |
| 102 | + Downloading typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB) |
| 103 | +Collecting mypy-extensions>=0.4.3 (from mypy==0.971->mypy[python2]==0.971) |
| 104 | + Downloading mypy_extensions-1.0.0-py3-none-any.whl.metadata (1.1 kB) |
| 105 | +Collecting typed-ast<2,>=1.4.0 (from mypy[python2]==0.971) |
| 106 | + Downloading typed_ast-1.5.5.tar.gz (252 kB) |
| 107 | + Preparing metadata (setup.py) ... done |
| 108 | +Downloading mypy-0.971-py3-none-any.whl (2.6 MB) |
| 109 | + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.6/2.6 MB 17.1 MB/s eta 0:00:00 |
| 110 | +Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB) |
| 111 | +Downloading typing_extensions-4.12.2-py3-none-any.whl (37 kB) |
| 112 | +Building wheels for collected packages: typed-ast |
| 113 | + Building wheel for typed-ast (setup.py) ... error |
| 114 | + error: subprocess-exited-with-error |
| 115 | + |
| 116 | + × python setup.py bdist_wheel did not run successfully. |
| 117 | + │ exit code: 1 |
| 118 | + ╰─> [30 lines of output] |
| 119 | + running bdist_wheel |
| 120 | + running build |
| 121 | + running build_py |
| 122 | + creating build |
| 123 | + creating build/lib.linux-x86_64-cpython-313 |
| 124 | + creating build/lib.linux-x86_64-cpython-313/typed_ast |
| 125 | + copying typed_ast/ast27.py -> build/lib.linux-x86_64-cpython-313/typed_ast |
| 126 | + copying typed_ast/conversions.py -> build/lib.linux-x86_64-cpython-313/typed_ast |
| 127 | + copying typed_ast/ast3.py -> build/lib.linux-x86_64-cpython-313/typed_ast |
| 128 | + copying typed_ast/__init__.py -> build/lib.linux-x86_64-cpython-313/typed_ast |
| 129 | + creating build/lib.linux-x86_64-cpython-313/typed_ast/tests |
| 130 | + copying ast3/tests/test_basics.py -> build/lib.linux-x86_64-cpython-313/typed_ast/tests |
| 131 | + running build_ext |
| 132 | + building '_ast27' extension |
| 133 | + creating build/temp.linux-x86_64-cpython-313 |
| 134 | + creating build/temp.linux-x86_64-cpython-313/ast27 |
| 135 | + creating build/temp.linux-x86_64-cpython-313/ast27/Custom |
| 136 | + creating build/temp.linux-x86_64-cpython-313/ast27/Parser |
| 137 | + creating build/temp.linux-x86_64-cpython-313/ast27/Python |
| 138 | + gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -Iast27/Include -I/usr/local/include/python3.13 -c ast27/Custom/typed_ast.c -o build/temp.linux-x86_64-cpython-313/ast27/Custom/typed_ast.o |
| 139 | + In file included from /usr/local/include/python3.13/pyport.h:358, |
| 140 | + from /usr/local/include/python3.13/Python.h:50, |
| 141 | + from ast27/Custom/typed_ast.c:1: |
| 142 | + ast27/Custom/../Include/compile.h:12:12: error: unknown type name ‘PyFutureFeatures’ |
| 143 | + 12 | PyAPI_FUNC(PyFutureFeatures *) PyFuture_FromAST(struct _mod *, const char *); |
| 144 | + | ^~~~~~~~~~~~~~~~ |
| 145 | + /usr/local/include/python3.13/exports.h:94:53: note: in definition of macro ‘PyAPI_FUNC’ |
| 146 | + 94 | # define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE |
| 147 | + | ^~~~~ |
| 148 | + error: command '/usr/bin/gcc' failed with exit code 1 |
| 149 | + [end of output] |
| 150 | + |
| 151 | + note: This error originates from a subprocess, and is likely not a problem with pip. |
| 152 | + ERROR: Failed building wheel for typed-ast |
| 153 | + Running setup.py clean for typed-ast |
| 154 | +Failed to build typed-ast |
| 155 | +ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (typed-ast) |
| 156 | +``` |
| 157 | + |
| 158 | +This is because starting with version 3.13.0a6 `PyFutureFeatures` was moved to an internal header and made private. Breaking installation for all future releases. |
| 159 | + |
| 160 | +This means 3.12 is the last version to allow installation of `mypy[python2]==0.971`, so we will be covered till October 2028. |
92 | 161 |
|
93 | 162 | ## Packaging and publishing
|
94 | 163 |
|
|
0 commit comments