Skip to content

Commit

Permalink
feat: django 3.1.7 compatibility (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Srynetix authored Mar 13, 2021
1 parent 6d57ddf commit 486a529
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
4 changes: 1 addition & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
Looking for sponsor for working on django 1.11 to 2.2 support https://github.com/celery/django-celery/issues/568

===============================================
django-celery - Celery Integration for Django
===============================================

.. image:: https://user-images.githubusercontent.com/26336/59113881-917c5180-890b-11e9-9863-f5a98d0e235e.png

:Version: 3.3.1
:Version: 4.1.0sc
:Web: http://celeryproject.org/
:Download: http://pypi.python.org/pypi/django-celery/
:Source: http://github.com/celery/django-celery/
Expand Down
2 changes: 1 addition & 1 deletion djcelery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os
import sys

VERSION = (4, 0, 0, 'sc')
VERSION = (4, 1, 0, 'sc')
__version__ = '.'.join(map(str, VERSION[0:3])) + ''.join(VERSION[3:])
__author__ = 'Ask Solem'
__contact__ = '[email protected]'
Expand Down
6 changes: 1 addition & 5 deletions djcelery/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,8 @@ def commit_on_success(*args, **kwargs):
@contextmanager
def commit_on_success(using=None): # noqa
connection = transaction.get_connection(using)
if connection.features.autocommits_when_autocommit_is_off:
# ignore stupid warnings and errors
with transaction.atomic(using):
yield
else:
with transaction.atomic(using):
yield

def commit_unless_managed(*args, **kwargs): # noqa
pass
Expand Down
2 changes: 1 addition & 1 deletion djcelery/picklefield.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def to_python(self, value):
raise
return value

def from_db_value(self, value, expression, connection, context):
def from_db_value(self, value, expression, connection, context = None):
return self.to_python(value)

def get_db_prep_value(self, value, **kwargs):
Expand Down

0 comments on commit 486a529

Please sign in to comment.