-
Notifications
You must be signed in to change notification settings - Fork 207
Conversation
Tests mainly pass with Python 3.4 and 2.7 (Django 1.7 every time). The only failure is in this function. The traceback is
Is this test really important ? |
Bump. If you don't want to have this, I can use my own fork. |
@Luthaf thanks! @lilspikey are there plans to merge this? |
Bump. Can you please merge it, or state clearly that you do not whant it ? I just ran into this bug while trying to deploy a server. |
Sorry, been bad timing with this. I became a Dad again on the 1st of I would like to see this merged, but I've not got a lot of time right now. RE: the failing test. I think this is down to difference between str Re: removing autocommit - which version of Django deprecated that? I've Hopefully we can work together to get this sorted. cheers, John On 10 March 2015 at 21:35, Luthaf notifications@github.com wrote:
|
Congratulations ! I'll have a look about the failing test. autocommit was deprecated in django 1.6 I think, and is now the default. See https://docs.djangoproject.com/en/1.7/topics/db/transactions/. I can add a small wrapper around this to check for Django version. |
Ok, test is fixed, and wrapper for Django compatibility is made ! Your turn now =) |
Ok, just started looking at this. Failing on the first hurdle with tests though. I'm running this against Django 1.4.3 (just happens to be a version I have in a virtual env).
if hasattr(transaction, 'autocommit'): compatibility_autocommit = transaction.autocommit else: # Autocommit is deprecated and the default def compatibility_autocommit(function): def wrapper(*args, **kwargs): return function(*args, **kwargs) return wrapper
Might be some other issues, but that's what I've got so far. Figured I had a spare half out, so I'd have a quick look. cheers, John |
Are you sure you still need compatibility for this version of Django ? The 1.6 version has been deprecated by the Django team recently.
It will exist in all the cases, as it is only deprecated for now. All the other comments are now fixed ! |
Django 1.4 is a long term release (support for three years), so it's still On 30 April 2015 at 22:40, Luthaf notifications@github.com wrote:
|
Ok, I didn't knew that. Tell me if you have more comments on this PR ! |
Ok, so that seems to all pass tests ok for Django 1.4 now. I'd suggest changing the unlock method (to make it a bit more legible from):
To this:
Basically replace the call to get_queryset() with all(), so you can avoid having a version check in the middle there (which makes things look messy). |
Hey @lilspikey & @Luthaf, is that last change all that's needed to get this merged in? If neither of you have time I can quickly make that change. |
If you want to do it, I'll merge any PR to my fork (which will update this one). I effectively don't have time for this. |
I've since found this fork that works on Django 1.7 & Python 3: https://github.com/arteria/django-background-tasks |
Closing this as their is no chance to get it merged, and I am not using this code anymore. For anyone interested in it, please see the fork linked by @simonv3. |
This fix compatibility mode for Django1.7 and Python 3.