Commit Graph

2 Commits

Author SHA1 Message Date
William S Fulton c8f052749e [Python] Fix alternate constructors with -builtin
With -builtin, alternate constructor aliases such as pair = new_pair
were emitted as pure Python code. Pyrefly could not resolve the internal
new_ entry points imported from the native module, so these assignments
caused type checking to fail.

Register alternate constructor wrappers under their public names in the
low-level module. Do not expose internal new_ names or generate Python
assignments to provide the public names.

This covers explicitly renamed constructors, named constructor template
instantiations and implicit constructors for renamed C structs.

Add a Python 3.14 CI build with -builtin -typehints to exercise the
generated type hints with Pyrefly.

Assisted-by: Codex (GPT-5.6 Sol)
2026-08-04 23:41:57 +01:00
Haoyu Bai 2450c4b108 fix regression of Python constructor renaming introduced by py3k work
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11997 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-04-25 14:07:14 +00:00