The hardcoded DEFAULT_DEPS dependencies fastapi, pydantic, uvicorn, and prisma need special treatment,
because if they are included in the packages of a generated function,
those requirements are not scrutinized during code validation, allowing invalid versions.
version.parse(..) raises an error when given an empty string. package.version is not required, so the case of not package.version must be checked before trying to parse it.
The hardcoded
DEFAULT_DEPS
dependenciesfastapi
,pydantic
,uvicorn
, andprisma
need special treatment, because if they are included in thepackages
of a generated function, those requirements are not scrutinized during code validation, allowing invalid versions.version.parse(..)
raises an error when given an empty string.package.version
is not required, so the case ofnot package.version
must be checked before trying to parse it.