Skip to content

Commit ae88e14

Browse files
authored
Merge pull request #3 from operator/simpler-dependencies
using a normal import to load strategy_options
2 parents aafe2b4 + 415082e commit ae88e14

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/sqlalchemy_bulk_lazy_loader.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from sqlalchemy import util, inspect, Column
2-
from sqlalchemy.orm import properties, attributes, interfaces
2+
from sqlalchemy.orm import properties, attributes, interfaces, strategy_options
33
from sqlalchemy.orm.strategies import LazyLoader
44
from sqlalchemy.sql.elements import BinaryExpression, BindParameter, BooleanClauseList
55
from sqlalchemy.sql import operators
@@ -138,8 +138,7 @@ def _validate_relation(self):
138138
if value is not None or ident is None:
139139
self._unsupported_relation()
140140

141-
@util.dependencies("sqlalchemy.orm.strategy_options")
142-
def _emit_lazyload(self, strategy_options, session, state, ident_key, passive):
141+
def _emit_lazyload(self, session, state, ident_key, passive):
143142
"""
144143
This is the main method from LazyLoader we need to overwrite. Unfortunately I don't think there's
145144
a clean way to add bulk functionality without partially copy/pasting from LazyLoader#_emit_lazyload

0 commit comments

Comments
 (0)