Skip to content

Keep every underscore helper of the generated wrappers out of the exports - #49

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:gen/private-helpers-unexported
Nov 2, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:gen/private-helpers-unexported

Conversation

@estebanzimanyi

@estebanzimanyi estebanzimanyi commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

The package's all lists each function functions.py defines except
the helpers the generated wrappers call. The generator recognizes such a
helper by its leading underscore, so _check_error, _read_string,
_take_string and _take_bytes stay private, and so does any helper the
template adds later.

Witness: init.py lists "_read_string", "_take_string" and
"_take_bytes" in all, so "from pymeos_cffi import *" binds them.

Measured: the generator's export step over functions.py (5049
definitions, four with a leading underscore) writes an init.py that
differs from the committed one by those three names alone, which this
change removes.

…orts

The package's __all__ lists each function functions.py defines except
the helpers the generated wrappers call. The generator recognizes such a
helper by its leading underscore, so _check_error, _read_string,
_take_string and _take_bytes stay private, and so does any helper the
template adds later.

Witness: __init__.py lists "_read_string", "_take_string" and
"_take_bytes" in __all__, so "from pymeos_cffi import *" binds them.

Measured: the generator's export step over functions.py (5049
definitions, four with a leading underscore) writes an __init__.py that
differs from the committed one by those three names alone, which this
change removes.
@estebanzimanyi
estebanzimanyi force-pushed the gen/private-helpers-unexported branch from da2a829 to 63ace22 Compare November 2, 2026 08:12
@estebanzimanyi
estebanzimanyi merged commit 313896c into MobilityDB:master Nov 2, 2026
4 checks passed
@estebanzimanyi
estebanzimanyi deleted the gen/private-helpers-unexported branch November 2, 2026 08:20
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.

1 participant