refactor(py)!: encapsulate dotpromptz internal modules behind private prefixes - #626
Merged
huangjeff5 merged 10 commits intoOct 5, 2026
Merged
Conversation
huangjeff5
force-pushed
the
feat/dotpromptz-private-api
branch
2 times, most recently
from
October 2, 2026 06:40
6b8d787 to
affaad3
Compare
huangjeff5
added this pull request to stack #625
October 2, 2026 06:44
huangjeff5
force-pushed
the
feat/dotpromptz-private-api
branch
from
October 2, 2026 07:09
affaad3 to
8a2303f
Compare
huangjeff5
force-pushed
the
feat/dotpromptz-private-api
branch
from
October 2, 2026 09:29
dde6105 to
ce8961f
Compare
pavelgj
reviewed
Oct 2, 2026
pavelgj
left a comment
Collaborator
There was a problem hiding this comment.
A few comments/questions
huangjeff5
force-pushed
the
feat/dotpromptz-private-api
branch
4 times, most recently
from
October 3, 2026 00:45
eb2774c to
d36cd9a
Compare
pavelgj
approved these changes
Oct 5, 2026
Collaborator
Author
|
@gemini review |
huangjeff5
force-pushed
the
feat/dotpromptz-private-api
branch
from
October 5, 2026 16:52
5a66541 to
dad6a96
Compare
huangjeff5
force-pushed
the
feat/dotpromptz-private-api
branch
from
October 5, 2026 18:52
dad6a96 to
024541e
Compare
…e root API surface - Rename dotpromptz internal modules with leading underscores (_dotprompt.py, _errors.py, _helpers.py, _models.py, _parse.py, _picoschema.py, _picoschema_reverse.py, _resolvers.py, _typing.py, _util.py, _validate.py). - Rename internal subpackages to _stores/ and _adapters/. - Standardize dotpromptz/__init__.py to re-export only the intentional public API surface (Dotprompt, DataArgument, PromptData, PromptMetadata, RenderedPrompt, Message, Role, Part, TextPart, MediaPart, DataPart, DirStore, DirStoreSync, DirStoreOptions, DotpromptError, FrontmatterError, PartialCycleError, ResolverFailedError, picoschema_to_json_schema). - Update tests and documentation to import public symbols from the root package.
huangjeff5
force-pushed
the
feat/dotpromptz-private-api
branch
from
October 5, 2026 19:00
024541e to
c0a9ac2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New code imports from
dotpromptz. Published genkit still imports the old module paths. Those imports do not warn.Decisions
pip install genkitdepends ondotpromptz>=0.1.5with no ceiling and importsdotpromptz.dotpromptanddotpromptz.typing. Those modules, plusstores,errors,helpers,parse,picoschema,resolvers, andutil, re-export the private modules and print nothing. We chose silence over aDeprecationWarningbecause that import lives inside published genkit, and the app cannot change it. Remove the modules once genkit no longer installs this package that way.compile()returnsPromptFunction, and the constructor takesHelperFn,EscapeFunction,JsonSchema,PromptInputConfig,ModelConfigT, andVariablesT. Those names are exported fromdotpromptz.dotpromptzis the door for new code: Implementation modules are_dotprompt,_typing,_stores, and the other_modules. New callers import fromdotpromptz, not from those files.