Skip to content

Conversation

@ryanking13
Copy link
Contributor

@ryanking13 ryanking13 commented Jan 19, 2026

The typing generated by ts-to-python package uses Python>=3.13 syntax (https://peps.python.org/pep-0696/), which is currently making the CI fail

FAILED tests/test_types.py::test_types - assert 'Revealed type is "js.Env"' in "src/js-stubs/__init__.pyi:109: error: Invalid syntax. Maybe you meant '==' or ':=' instead of '='?  [syntax]\nFound 1 error in 1 file (errors prevented further checking)\n"
 +  where "src/js-stubs/__init__.pyi:109: error: Invalid syntax. Maybe you meant '==' or ':=' instead of '='?  [syntax]\nFound 1 error in 1 file (errors prevented further checking)\n" = CompletedProcess(args=['uv', 'run', 'mypy'], returncode=2, stdout="src/js-stubs/__init__.pyi:109: error: Invalid synta... the workspace. Defaulting to `>=3.12`.\nDownloading mypy (11.7MiB)\n Downloaded mypy\nInstalled 7 packages in 16ms\n').stdout

The problematic syntax is setting the default value for the generic, which is supported only after Python 3.13.

type CfProperties[HostMetadata=Any]

Maybe we can improve ts-to-python library to handle this case, but to unblock other pull requests, I changed the test to be only run in python 3.13, and included Python 3.13 in CI

@ryanking13 ryanking13 changed the title fix: Run type tests only in Python>=3.13 fix: run type tests only in Python>=3.13 Jan 19, 2026
@ryanking13 ryanking13 requested review from dom96 and hoodmane and removed request for hoodmane January 19, 2026 08:58
@hoodmane
Copy link
Contributor

I think the commit message should say "chore" here since otherwise it will make a release.

Copy link
Contributor

@hoodmane hoodmane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. As I said, please change commit message to say "chore:" instead of "fix:".

@ryanking13 ryanking13 changed the title fix: run type tests only in Python>=3.13 chore: run type tests only in Python>=3.13 Jan 22, 2026
@ryanking13
Copy link
Contributor Author

I think the commit message should say "chore" here since otherwise it will make a release.

Oh, I see. Thanks for the heads up. Didn't know we are using commit message-based release.

@ryanking13 ryanking13 merged commit 21f79c9 into main Jan 22, 2026
9 checks passed
@ryanking13 ryanking13 deleted the gyeongjae/type-test branch January 22, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants