Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning: integer argument expected, got float #4

Closed
jonozzz opened this issue Jun 20, 2010 · 3 comments
Closed

DeprecationWarning: integer argument expected, got float #4

jonozzz opened this issue Jun 20, 2010 · 3 comments

Comments

@jonozzz
Copy link

jonozzz commented Jun 20, 2010

django/core/cache/backends/memcached.py:54: DeprecationWarning: integer argument expected, got float
self._cache.set(smart_str(key), value, self._get_memcache_timeout(timeout))

backends / cache.py:
if isinstance(expires, timedelta):
expires = timedelta_seconds(conf.TASK_RESULT_EXPIRES)

timedelta_seconds() returns a float instead of int and that upsets django.

@ask
Copy link
Contributor

ask commented Jul 1, 2010

Expiry for cache keys must be int, not float. Closed by b405f57. Thanks to jonozzz

@jonozzz
Copy link
Author

jonozzz commented Oct 7, 2010

Wait a minute...why is this checked-into djcelery ? I wonder why I filed this issue against django-celery...hmm.

I'm still getting the warning, this time in celery module:

[2010-10-06 18:14:01,517: WARNING/PoolWorker-2] /usr/lib64/python2.6/site-packages/celery-2.0.3-py2.6.egg/celery/backends/cache.py:71: DeprecationWarning: integer argument expected, got float
return self.client.set(key, value, self.expires)

@ask
Copy link
Contributor

ask commented Oct 11, 2010

I fixed this in the celery cache backend as well. Thanks!

This issue was closed.
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

No branches or pull requests

2 participants