Repository navigation
fix(py): drop unused pydantic[email] extra and runtime type stubs from dotpromptz - #635
Open
huangjeff5 wants to merge 1 commit into
Open
huangjeff5 wants to merge 1 commit into
huangjeff5 wants to merge 1 commit into
Conversation
…m dotpromptz pydantic[email] pulled email-validator and dnspython into every install even though dotpromptz never uses EmailStr or NameEmail. types-aiofiles and types-pyyaml are type-checker-only stubs; move them to the workspace dev group next to the other type-checking tools.
There was a problem hiding this comment.
Code Review
This pull request removes the email extra from the pydantic dependency in the dotpromptz package, resulting in the removal of dnspython and email-validator from the project's dependencies. It also moves the static type stubs types-aiofiles and types-pyyaml from the runtime dependencies of dotpromptz to the development dependencies of the Python workspace. There are no review comments to evaluate, and I have no feedback to provide.
This branch has not been deployed
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.
Trims the
dotpromptzruntime dependency set. Motivated by reducing the genkit Python install footprint, which pullsdotpromptztransitively.Main Changes
pydantic[email]extra: Previouslydotpromptzdepended onpydantic[email], which pulledemail-validatoranddnspython(~1.5 MB) into every install. We depend on plainpydanticbecause nothing inpython/dotpromptz/srcusesEmailStr,NameEmail, oremail_validator.types-aiofilesandtypes-pyyamlwere runtimedependencies, so they were installed into every user's environment. We movedtypes-aiofilesinto the workspacedevgroup next to the existingtypes-pyyaml,ty, andpyrefly, because stub packages are only read by type checkers. Also dropped them from thedotpromptzBazelpy_librarydeps; they stay resolvable viarequirements.txt.Measured install footprint
Clean
uv venvon Python 3.12,uv pip install python/handlebars python/dotpromptz:main): 21 packages, 13 MB site-packages (13164 KB)email-validator,dnspython,types-aiofiles,types-pyyaml(1764 KB)Verification
uv lock --checkandscripts/export_requirementsproduce no diffruff format --check --preview,ruff check --select I,ty check,pyrefly check: passpytestinpython/: 835 passed, 1 skippedscripts/build_distsandscripts/run_python_security_checks: pass