You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Subclassing pseudo-recursive models will now raise a warning instead of crashing, static types will still not respect the subclass, for example:
fromprisma.modelsimportUserclassMyUser(User):
@propertydeffullname(self) ->str:
returnf'{self.name}{self.surname}'# static type checkers will think that `user` is an instance of `User` when it is actually `MyUser` at runtime# you can fix this by following the steps here:# https://prisma-client-py.readthedocs.io/en/stable/reference/limitations/#removing-limitationsuser=MyUser.prisma().create(
data={
'name': 'Robert',
'surname': 'Craigie',
},
)
The default HTTP timeout used to communicate with the internal Query Engine has been increased from 5 seconds to 30 seconds, this means you should no longer encounter timeout errors when executing very large queries.
Customise the internal HTTPX Client
You can now customise the HTTPX Client used to communicate with the internal query engine, this could be useful if you need to increase the http timeout, for full reference see the documentation.
client=Client(
http={
'timeout': 100,
},
)
Prisma Upgrade
The internal Prisma binaries that Prisma Client Python makes use of have been upgraded from v3.4.0 to v3.7.0 for a full changelog see:
Create partial models without any relational fields
Instead of having to manually update the list of excluded fields when creating partial models whenever a new relation is added you can now just use exclude_relational_fields=True!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Bug fixes
What's Changed
Subclassing pseudo-recursive models
Subclassing pseudo-recursive models will now raise a warning instead of crashing, static types will still not respect the subclass, for example:
For more details, see the documentation
Default HTTP timeout increased
The default HTTP timeout used to communicate with the internal Query Engine has been increased from 5 seconds to 30 seconds, this means you should no longer encounter timeout errors when executing very large queries.
Customise the internal HTTPX Client
You can now customise the HTTPX Client used to communicate with the internal query engine, this could be useful if you need to increase the http timeout, for full reference see the documentation.
Prisma Upgrade
The internal Prisma binaries that Prisma Client Python makes use of have been upgraded from
v3.4.0
tov3.7.0
for a full changelog see:v3.5.0
changelogv3.6.0
changelogv3.7.0
changelogCreate partial models without any relational fields
Instead of having to manually update the list of excluded fields when creating partial models whenever a new relation is added you can now just use
exclude_relational_fields=True
!This discussion was created from the release v0.4.3.
Beta Was this translation helpful? Give feedback.
All reactions