Skip to content

Commit 6414fe1

Browse files
committed
Add a little doc in comments
1 parent fae67d8 commit 6414fe1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

postgres/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,7 @@ def make_DelegatingCaster(postgres):
826826
class DelegatingCaster(CompositeCaster):
827827

828828
def make(self, values):
829+
# Override to delegate to the model registry.
829830
if self.name not in postgres.model_registry:
830831

831832
# This is probably a bug, not a normal user error. It means
@@ -840,6 +841,9 @@ def make(self, values):
840841
return instance
841842

842843
def parse(self, s, curs, retry=False):
844+
# Override to protect against race conditions:
845+
# https://github.com/gratipay/postgres.py/issues/26
846+
843847
if s is None:
844848
return None
845849

0 commit comments

Comments
 (0)