swig/Source/Modules
William S Fulton f06d86749c [Python] Fix empty classes and imported bases in .pyi files
A generated stub class with no wrapped members had an empty suite, which
is invalid Python syntax. Stubs could also refer to base classes from
%imported modules without importing the corresponding Python proxy
module, leaving those names unresolved.

Track whether each stub class emits a member and use an ellipsis when
its body would otherwise be empty. Collect modules referenced through
%import and emit them before declarations, using the same package and
relative import rules as the generated Python proxy.

Keep annotation tests active with -pyi by parsing annotations from the
generated stub instead of expecting them on runtime objects. Include
each generated .pyi file in multi-module Pyrefly checks.

Add Python 3.14 Linux CI configurations for -pyi -typehints with and
without -builtin.

See #3473.

Assisted-by: Codex (GPT-5.6 Sol)
2026-08-04 23:41:57 +01:00
..
README File move 2002-12-03 20:33:35 +00:00
allocate.cxx Inherit constructors named through a typedef base 2026-06-17 01:47:06 +01:00
c.cxx Beautify using swig specific .clang-format 2026-03-04 21:53:30 +00:00
contract.cxx Replace all uses of sprintf with snprintf and poison sprintf 2026-08-01 09:42:44 +01:00
csharp.cxx C#, D: Always initialise the return type in the C/C++ code 2026-03-19 08:13:48 +00:00
d.cxx C#, D: Always initialise the return type in the C/C++ code 2026-03-19 08:13:48 +00:00
directors.cxx Add director emit dynamic cast protection 2026-03-19 08:12:43 +00:00
emit.cxx Beautify using swig specific .clang-format 2026-03-04 21:53:30 +00:00
go.cxx Go: Honour %rename of an enum for the generated Go type name 2026-07-15 08:51:28 +01:00
guile.cxx Replace all uses of sprintf with snprintf and poison sprintf 2026-08-01 09:42:44 +01:00
interface.cxx Beautify using swig specific .clang-format 2026-03-04 21:53:30 +00:00
java.cxx [Java] Suppress -Wlong-long warning on the enum value parsing code 2026-07-31 21:36:23 +01:00
javascript.cxx [JavaScript] Fix the v8 and node engines for v8 13.x (Node.js 24) 2026-08-01 09:42:44 +01:00
lang.cxx C++17: skip class template argument deduction variables 2026-05-30 00:51:25 +01:00
lua.cxx Replace all uses of sprintf with snprintf and poison sprintf 2026-08-01 09:42:44 +01:00
main.cxx Beautify using swig specific .clang-format 2026-03-04 21:53:30 +00:00
nested.cxx Beautify using swig specific .clang-format 2026-03-04 21:53:30 +00:00
ocaml.cxx Replace all uses of sprintf with snprintf and poison sprintf 2026-08-01 09:42:44 +01:00
octave.cxx Replace all uses of sprintf with snprintf and poison sprintf 2026-08-01 09:42:44 +01:00
overload.cxx Replace all uses of sprintf with snprintf and poison sprintf 2026-08-01 09:42:44 +01:00
perl5.cxx Replace all uses of sprintf with snprintf and poison sprintf 2026-08-01 09:42:44 +01:00
php.cxx Replace all uses of sprintf with snprintf and poison sprintf 2026-08-01 09:42:44 +01:00
python.cxx [Python] Fix empty classes and imported bases in .pyi files 2026-08-04 23:41:57 +01:00
r.cxx R: Honour %rename of an enum for the generated R enum name 2026-07-15 08:52:25 +01:00
ruby.cxx Replace all uses of sprintf with snprintf and poison sprintf 2026-08-01 09:42:44 +01:00
scilab.cxx Add director emit dynamic cast protection 2026-03-19 08:12:43 +00:00
swigmain.cxx Beautify using swig specific .clang-format 2026-03-04 21:53:30 +00:00
swigmod.h Add director emit dynamic cast protection 2026-03-19 08:12:43 +00:00
tcl8.cxx Replace all uses of sprintf with snprintf and poison sprintf 2026-08-01 09:42:44 +01:00
typepass.cxx Fix protected/private nested class referenced in generated upcast helper 2026-07-11 21:02:49 +01:00
utils.cxx Beautify using swig specific .clang-format 2026-03-04 21:53:30 +00:00
xml.cxx Beautify using swig specific .clang-format 2026-03-04 21:53:30 +00:00

README

06/25/2002

This directory contains all of the SWIG language modules.  Many of these
modules contain code that dates back to SWIG1.0.  The module API has changed
a lot in the development releases so this is fairly messy.  We're working on
cleaning it up, but you'll have to bear with us until it's done.

-- Dave