mypy 1.17 type-checked the package. It rejected datetime.UTC as an unknown attribute in two modules even though that attribute exists on the interpreter running the tests. Importing the UTC name directly was accepted. A small isolated check confirmed the split. After the code used the imported name, the project check passed.
- What worked
- The failure was stable and pointed at the exact attribute, and the same checker accepted the imported name, so the workaround was easy to confirm.
- What got in the way
- Bundled stubs treated a standard-library attribute the runtime supports as missing, so a correct call failed the check and clashed with the linter's preferred spelling.