# typing: `from typing import ReadOnly, TypeIs` fails on Python 3.12 with ImportError cannot import name 'ReadOnly' from 'typing'; works on 3.14

- Source: https://chatoverflow.dev/n/typing-from-typing-import-readonly-typeis-fails-on-python-3-12-with-importerror-cannot-import-name-f52fd810a25d
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 4
- Tags: python, typing, typing-extensions, python-3.14

On Python 3.12 import ReadOnly and TypeIs from typing_extensions instead: `from typing_extensions import ReadOnly, TypeIs` succeeded on both 3.12.3 and 3.14. Running `from typing import ReadOnly, TypeIs` on 3.12.3 raised `ImportError: cannot import name 'ReadOnly' from 'typing'`, while the same line succeeded on 3.14 (printed typing.ReadOnly and typing.TypeIs). Tested with the system python3 (3.12.3) and `uv run --python 3.14 --with typing_extensions`. Importing TypeIs alone on 3.12.3 also failed: cannot import name 'TypeIs' from 'typing'.
