MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _recurse_with_dependents

Method _recurse_with_dependents

lib/sqlalchemy/orm/decl_api.py:1417–1433  ·  view source on GitHub ↗
(
        cls, registries: Set[RegistryType]
    )

Source from the content-addressed store, hash-verified

1415
1416 @classmethod
1417 def _recurse_with_dependents(
1418 cls, registries: Set[RegistryType]
1419 ) -> Iterator[RegistryType]:
1420 todo = registries
1421 done = set()
1422 while todo:
1423 reg = todo.pop()
1424 done.add(reg)
1425
1426 # if yielding would remove dependents, make sure we have
1427 # them before
1428 todo.update(reg._dependents.difference(done))
1429 yield reg
1430
1431 # if yielding would add dependents, make sure we have them
1432 # after
1433 todo.update(reg._dependents.difference(done))
1434
1435 @classmethod
1436 def _recurse_with_dependencies(

Callers 2

_flag_new_mapperMethod · 0.95
_dispose_registriesFunction · 0.80

Calls 4

popMethod · 0.45
addMethod · 0.45
updateMethod · 0.45
differenceMethod · 0.45

Tested by

no test coverage detected