- changed status to resolved
Bad syntax on eager_order_by from rev 3730 in advance
Some changes were made in orm/strategies.py in rev. 3730, but they try to append a list of clauses as parameters to a list append() method.
In Python 2.5 append() can take ony one parameter, so the code doesn't work. Here is a very simple-minded patch (done to the current version) to fix the problem.
Index: orm/strategies.py
--- orm/strategies.py (revision: 3743) +++ orm/strategies.py (copia de trabajo) @@ -533,14 +533,14 @@ if self.secondaryjoin is not None: context.eager_joins = sql.outerjoin(towrap, clauses.secondary, clauses.primaryjoin).outerjoin(clauses.alias, clauses.secondaryjoin) if self.order_by is False and self.secondary.default_order_by() is not None: - context.eager_order_by.append(clauses.secondary.default_order_by()) + for c in clauses.secondary.default_order_by() else: context.eager_joins = towrap.outerjoin(clauses.alias, clauses.primaryjoin) if self.order_by is False and clauses.alias.default_order_by() is not None: - context.eager_order_by.append(clauses.alias.default_order_by()) + for c in clauses.alias.default_order_by()
if clauses.order_by:
- context.eager_order_by.append(*util.to_list(clauses.order_by))
- for c in util.to_list(clauses.order_by)
for value in self.select_mapper.iterate_properties: context.exec_with_path(self.select_mapper, value.key, value.setup, context, parentclauses=clauses, parentmapper=self.select_mapper)
Regards,
Comments (1)
-
repo owner - Log in to comment
eager_order_by was previously a ClauseList; we never did list.append(*items) intentionally.
7cd2c7d29934f1a6d215e7ea333687909866b00f