Ask Solem 12 tahun lalu
induk
melakukan
e78c768835
3 mengubah file dengan 9 tambahan dan 3 penghapusan
  1. 1 0
      celery/beat.py
  2. 1 0
      celery/contrib/rdb.py
  3. 7 3
      celery/platforms.py

+ 1 - 0
celery/beat.py

@@ -7,6 +7,7 @@
 
 """
 from __future__ import absolute_import
+from __future__ import with_statement
 
 import errno
 import os

+ 1 - 0
celery/contrib/rdb.py

@@ -35,6 +35,7 @@ Inspired by http://snippets.dzone.com/posts/show/7248
 
 """
 from __future__ import absolute_import
+from __future__ import with_statement
 
 import errno
 import os

+ 7 - 3
celery/platforms.py

@@ -626,9 +626,13 @@ else:
             '%s:%s' % (progname, current_process().name), info=info)
 
 
-def shellsplit(s, posix=True):
-    """Compat. version of :func:`shutil.shellsplit` that supports
-    the ``posix`` option which was first added in Python 2.6."""
+def shellsplit(s):
+    """Compat. version of :func:`shlex.split` that supports
+    the ``posix`` option which was first added in Python 2.6.
+
+    Posix behavior will be disabled if running under Windows.
+
+    """
     lexer = shlex.shlex(s, posix=not IS_WINDOWS)
     lexer.whitespace_split = True
     lexer.commenters = ''