Skip to content

Conversation

schinckel
Copy link
Contributor

This is in preparation for #8119.

In order to make it possible to have different behaviour when an
expression is to be used only in a WHERE clause, we need to have
some tag on the expression.

I think maybe we need to make the resolve_expression() accept arbitrary
kwargs - it's either that or just add for_where=False.

This is in preparation for django#8119.

In order to make it possible to have different behaviour when an
expression is to be used _only_ in a WHERE clause, we need to have
some tag on the expression.

I think maybe we need to make the resolve_expression() accept arbitrary
kwargs - it's either that or just add for_where=False.
@schinckel
Copy link
Contributor Author

@timgraham You mentioned in the related PR about a deprecation - I can't see how to do a deprecation on an added field. Any suggestions?

@schinckel
Copy link
Contributor Author

Okay, I bit off more than I can chew tonight with this. I need to re-think how this can be fixed to allow existing code to work.

@timgraham
Copy link
Member

I think the deprecation for supporting resolve_expression() without for_where would be similar to 1bb6ecf.

@schinckel
Copy link
Contributor Author

Hmm. I've spent a bit of time looking at this, and I'm not sure that moving to *args, **kwargs for resolve_expression is going to be that easy.

I did note that in #7615 there is the addition of an argument to F.resolve_expression(): presumably that differs from this case because that argument is not passed up to Expression?

Copy link
Contributor

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you rebase this?

@schinckel
Copy link
Contributor Author

I've struggled to actually get this to work. I am not sure I have a passing test run (or am even close to it).

@auvipy
Copy link
Contributor

auvipy commented Mar 22, 2019

what difficulties you are facing?

@schinckel
Copy link
Contributor Author

I don't think this is the best approach. I'm closing this PR.

@schinckel schinckel closed this Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants