Skip to content

Django 1.4 - minor compatibility issue #14

Merged
merged 3 commits into from Jun 7, 2012

9 participants

@tomscytale

No description provided.

@ojii
Owner
ojii commented Mar 5, 2012

Thanks for this pull request.

I'm not really a fan of try...except... where it isn't required, so maybe this should use getattr

@tomscytale

updated - please look again.

@ojii
Owner
ojii commented Mar 5, 2012

Alright. Now had a closer look. Does Django 1.4 just remove that attribute? It's not replaced with anything?

@tomscytale

and...
django_trunk/django$ grep -r parent_name_expr *
django_trunk/django$

@bigsassy

Any movement on this?

@ojii
Owner
ojii commented Mar 25, 2012

Not really sure this fix will actually work as it will result in a Variable.resolve or FilterExpression.resolve being called with None. Which will break. What needs to happen is there should be a check for the extend_node being dynamic or not.

@tomscytale
@tomscytale
@AdrianRibao

I used this patch in a project usign django 1.4 and everything works fine.

@ojii
Owner
ojii commented Mar 26, 2012

Thanks for verifying @AdrianRibao

@tomscytale in the old version, if parent_name_expr the context was set to None but never used. Now with this change in Django and your patch the None context will actually be used and I feared that this might cause issues.

@tomscytale

are you sure? as far as I can tell the context is used unless extend_node.partent_name_expr is True. And usually it is False. So in normal circumstances context is None, right?

@andialbrecht

FWIW this is the change that removed parent_name_expr: django/django@5cedcb4
And the corresponding Django ticket: https://code.djangoproject.com/ticket/17660

@ojii
Owner
ojii commented Mar 28, 2012

Thanks andi, I will still need to actually test this pull request before I can merge it, this will hopefully happen next week when I should have a little more time to work on this.

@tfmorris

Is it next week yet? :-)

The patch worked for me and the current code definitely will not work with Django 1.4.

@parruc
parruc commented Apr 30, 2012

The patch is working here. The old code does not work...
News on testing for merge?

@AdrianRibao

This patch works, it should be merged ASAP. It breaks 1.4 I've been using it for a long time in production enviroments.

@kenzic
kenzic commented May 11, 2012

I second what @AdrianRibao, @parruc, and @tfmorris said.

@bigsassy

Thirded.

@ojii
Owner
ojii commented May 11, 2012

Noted, will merge this/make sekizai 1.4 compatible post-djangocon europe

@ojii ojii merged commit 5018f46 into ojii:master Jun 7, 2012
@ojii
Owner
ojii commented Jun 7, 2012

just noticed that this patch actually breaks a test. will investigate

@ojii
Owner
ojii commented Jun 7, 2012

the issue is exactly what I described above, get_parent is called with None on a dynamic extends tag.

@emilian
emilian commented Oct 11, 2012

Is there a better patch to get this working with Django 1.4?

@ojii
Owner
ojii commented Oct 11, 2012

I merged the patch. sekizai master now supports up to the in-development 1.5 release of Django. (On Python versions up to 3.2).

I just gotta make a proper release for the new version.

@ghing ghing referenced this pull request in denverfoundation/storybase Jan 15, 2013
Closed

Upgrade to Django 1.4 #35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.