From 0e5e2ef0ebc6002f67aefc2fe4639118a67b3c9b Mon Sep 17 00:00:00 2001 From: ANSHUL SINGH <72524975+ekanshul@users.noreply.github.com> Date: Wed, 19 Aug 2026 21:10:03 +0530 Subject: [PATCH] [cffi] Bump to 2.1.* cffi 2.1 adds a public cffi.gen_src module (a thin entry point for `python -m cffi.gen_src`; the implementation lives in the private cffi._cffi_gen_src module) and a new recompiler.FREE_THREADED_BUILD constant read from sysconfig.get_config_var("Py_GIL_DISABLED"). USE_LIMITED_API depends on the platform and on whether the build is free-threaded (it was already False on free-threaded builds in 2.0), so `Final = True` was never accurate; type it as a plain bool. Co-Authored-By: Claude Fable 5 --- stubs/cffi/METADATA.toml | 2 +- stubs/cffi/cffi/gen_src.pyi | 1 + stubs/cffi/cffi/recompiler.pyi | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 stubs/cffi/cffi/gen_src.pyi diff --git a/stubs/cffi/METADATA.toml b/stubs/cffi/METADATA.toml index b42e584ae0b2..443f8d492847 100644 --- a/stubs/cffi/METADATA.toml +++ b/stubs/cffi/METADATA.toml @@ -1,4 +1,4 @@ -version = "2.0.*" +version = "2.1.*" upstream-repository = "https://github.com/python-cffi/cffi/" dependencies = ["types-setuptools"] diff --git a/stubs/cffi/cffi/gen_src.pyi b/stubs/cffi/cffi/gen_src.pyi new file mode 100644 index 000000000000..bac2cd9f246d --- /dev/null +++ b/stubs/cffi/cffi/gen_src.pyi @@ -0,0 +1 @@ +# Entry point for `python -m cffi.gen_src`; the implementation lives in the private module `cffi._cffi_gen_src` diff --git a/stubs/cffi/cffi/recompiler.pyi b/stubs/cffi/cffi/recompiler.pyi index f95c84932278..bb73ccf88479 100644 --- a/stubs/cffi/cffi/recompiler.pyi +++ b/stubs/cffi/cffi/recompiler.pyi @@ -8,7 +8,8 @@ from .error import VerificationError as VerificationError VERSION_BASE: Final = 9729 VERSION_EMBEDDED: Final = 9985 VERSION_CHAR16CHAR32: Final = 10241 -USE_LIMITED_API: Final = True +FREE_THREADED_BUILD: Final[int | None] +USE_LIMITED_API: Final[bool] class GlobalExpr: name: Incomplete