[Python-modules-commits] r26783 - in packages/celery/trunk/debian/patches (4 files)

fladi-guest at users.alioth.debian.org fladi-guest at users.alioth.debian.org
Mon Dec 16 13:38:20 UTC 2013


    Date: Monday, December 16, 2013 @ 13:38:19
  Author: fladi-guest
Revision: 26783

Refresh patches for 3.1.6.

Modified:
  packages/celery/trunk/debian/patches/disable_unstable_tests.patch
  packages/celery/trunk/debian/patches/drop_downgrade.patch
  packages/celery/trunk/debian/patches/fix_dependencies.patch
  packages/celery/trunk/debian/patches/lsb-init.patch

Modified: packages/celery/trunk/debian/patches/disable_unstable_tests.patch
===================================================================
--- packages/celery/trunk/debian/patches/disable_unstable_tests.patch	2013-12-16 13:36:24 UTC (rev 26782)
+++ packages/celery/trunk/debian/patches/disable_unstable_tests.patch	2013-12-16 13:38:19 UTC (rev 26783)
@@ -8,11 +8,19 @@
 
 --- a/celery/tests/worker/test_worker.py
 +++ b/celery/tests/worker/test_worker.py
-@@ -465,6 +465,7 @@
-         self.assertIs(self.ready_queue.get_nowait(), task)
+@@ -414,6 +414,7 @@
+         self.assertIs(self.buffer.get_nowait(), task)
  
      def test_receieve_message_eta_isoformat(self):
 +        raise SkipTest('broken test, may fail at random')
-         if sys.version_info < (2, 6):
-             raise SkipTest('test broken on Python 2.5')
-         l = MyKombuConsumer(self.ready_queue, timer=self.timer)
+         l = _MyKombuConsumer(self.buffer.put, timer=self.timer, app=self.app)
+         l.blueprint.state = RUN
+         l.steps.pop()
+@@ -514,6 +515,7 @@
+         self.assertTrue(logger.critical.call_count)
+ 
+     def test_receive_message_eta(self):
++        raise SkipTest('broken test, may fail at random')
+         l = _MyKombuConsumer(self.buffer.put, timer=self.timer, app=self.app)
+         l.steps.pop()
+         l.event_dispatcher = mock_event_dispatcher()

Modified: packages/celery/trunk/debian/patches/drop_downgrade.patch
===================================================================
--- packages/celery/trunk/debian/patches/drop_downgrade.patch	2013-12-16 13:36:24 UTC (rev 26782)
+++ packages/celery/trunk/debian/patches/drop_downgrade.patch	2013-12-16 13:38:19 UTC (rev 26783)
@@ -7,34 +7,40 @@
 
 --- a/setup.py
 +++ b/setup.py
-@@ -20,32 +20,6 @@
- if sys.version_info < (2, 5):
-     raise Exception('Celery requires Python 2.5 or higher.')
+@@ -22,38 +22,6 @@
+ if sys.version_info < (2, 6):
+     raise Exception('Celery 3.1 requires Python 2.6 or higher.')
  
+-downgrade_packages = [
+-    'celery.app.task',
+-]
+-orig_path = sys.path[:]
+-for path in (os.path.curdir, os.getcwd()):
+-    if path in sys.path:
+-        sys.path.remove(path)
 -try:
--    orig_path = sys.path[:]
--    for path in (os.path.curdir, os.getcwd()):
--        if path in sys.path:
--            sys.path.remove(path)
--    try:
--        import celery.app
--        import imp
--        import shutil
--        _, task_path, _ = imp.find_module('task', celery.app.__path__)
--        if task_path.endswith('/task'):
--            print('- force upgrading previous installation')
--            print('  - removing %r package...' % task_path)
--            try:
--                shutil.rmtree(os.path.abspath(task_path))
--            except Exception:
--                sys.stderr.write('Could not remove %r: %r\n' % (
--                    task_path, sys.exc_info[1]))
--    except ImportError:
--        print('Upgrade: no old version found.')
--    finally:
--        sys.path[:] = orig_path
+-    import imp
+-    import shutil
+-    for pkg in downgrade_packages:
+-        try:
+-            parent, module = pkg.rsplit('.', 1)
+-            print('- Trying to upgrade %r in %r' % (module, parent))
+-            parent_mod = __import__(parent, None, None, [parent])
+-            _, mod_path, _ = imp.find_module(module, parent_mod.__path__)
+-            if mod_path.endswith('/' + module):
+-                print('- force upgrading previous installation')
+-                print('  - removing {0!r} package...'.format(mod_path))
+-                try:
+-                    shutil.rmtree(os.path.abspath(mod_path))
+-                except Exception:
+-                    sys.stderr.write('Could not remove {0!r}: {1!r}\n'.format(
+-                        mod_path, sys.exc_info[1]))
+-        except ImportError:
+-            print('- upgrade %s: no old version found.' % module)
 -except:
 -    pass
+-finally:
+-    sys.path[:] = orig_path
 -
 -
  NAME = 'celery'

Modified: packages/celery/trunk/debian/patches/fix_dependencies.patch
===================================================================
--- packages/celery/trunk/debian/patches/fix_dependencies.patch	2013-12-16 13:36:24 UTC (rev 26782)
+++ packages/celery/trunk/debian/patches/fix_dependencies.patch	2013-12-16 13:38:19 UTC (rev 26783)
@@ -13,14 +13,14 @@
 -cover3-branch = 1
 -cover3-html = 1
 -cover3-package = celery
--cover3-exclude = celery.utils.debug,celery.tests.*
+-cover3-exclude = celery.utils.debug,celery.tests.*,celery.bin.graph
  
  [build_sphinx]
  source-dir = docs/
 --- a/requirements/test.txt
 +++ b/requirements/test.txt
 @@ -1,4 +1,3 @@
- unittest2>=0.4.0
+ unittest2>=0.5.1
  nose
 -nose-cover3
- mock
+ mock>=1.0.1

Modified: packages/celery/trunk/debian/patches/lsb-init.patch
===================================================================
--- packages/celery/trunk/debian/patches/lsb-init.patch	2013-12-16 13:36:24 UTC (rev 26782)
+++ packages/celery/trunk/debian/patches/lsb-init.patch	2013-12-16 13:38:19 UTC (rev 26783)
@@ -6,123 +6,9 @@
 Last-Update: 2013-09-03
 Forwarded: no
 
---- a/extra/generic-init.d/celeryd
-+++ b/extra/generic-init.d/celeryd
-@@ -16,8 +16,11 @@
- # Default-Start:     2 3 4 5
- # Default-Stop:      0 1 6
- # Short-Description: celery task worker daemon
-+# Description:       Starts the Celery worker daemon for a single project.
- ### END INIT INFO
- 
-+. /lib/lsb/init-functions
-+
- # some commands work asyncronously, so we'll wait this many seconds
- SLEEP_SECONDS=5
- 
-@@ -26,10 +29,16 @@
- DEFAULT_LOG_LEVEL="INFO"
- DEFAULT_NODES="celery"
- DEFAULT_CELERYD="-m celery.bin.celeryd_detach"
-+ENABLED="false"
- 
- CELERY_DEFAULTS=${CELERY_DEFAULTS:-"/etc/default/celeryd"}
- 
--test -f "$CELERY_DEFAULTS" && . "$CELERY_DEFAULTS"
-+[ -r "$CELERY_DEFAULTS" ] && . "$CELERY_DEFAULTS"
-+
-+if [ "$ENABLED" != "true" ]; then
-+    echo "celery daemon disabled - see $CELERY_DEFAULTS"
-+    exit 0
-+fi
- 
- # Set CELERY_CREATE_DIRS to always create log/pid dirs.
- CELERY_CREATE_DIRS=${CELERY_CREATE_DIRS:-0}
---- a/extra/generic-init.d/celeryevcam
-+++ b/extra/generic-init.d/celeryevcam
-@@ -1,6 +1,6 @@
- #!/bin/bash
- # ============================================
--#  celeryd - Starts the Celery worker daemon.
-+#  celeryevcam - Starts the Celery event snapshot daemon.
- # ============================================
- #
- # :Usage: /etc/init.d/celeryd {start|stop|force-reload|restart|try-restart|status}
-@@ -78,29 +78,33 @@
- #       Full path to the virtualenv environment to activate. Default is none.
- 
- ### BEGIN INIT INFO
--# Provides:          celeryev
-+# Provides:          celeryevcam
- # Required-Start:    $network $local_fs $remote_fs
- # Required-Stop:     $network $local_fs $remote_fs
- # Default-Start:     2 3 4 5
- # Default-Stop:      0 1 6
- # Short-Description: celery event snapshots
-+# Description:       Starts the Celery event snapshots daemon for a single project.
- ### END INIT INFO
- 
- # Cannot use set -e/bash -e since the kill -0 command will abort
- # abnormally in the absence of a valid process ID.
- #set -e
- 
-+. /lib/lsb/init-functions
-+
- DEFAULT_PID_FILE="/var/run/celeryev.pid"
- DEFAULT_LOG_FILE="/var/log/celeryev.log"
- DEFAULT_LOG_LEVEL="INFO"
- DEFAULT_CELERYEV="/usr/bin/celeryev"
-+ENABLED="false"
- 
--if test -f /etc/default/celeryd; then
--    . /etc/default/celeryd
--fi
-+[ -r /etc/default/celeryd ] && . /etc/default/celeryd
-+[ -r /etc/default/celeryev ] && . /etc/default/celeryev
- 
--if test -f /etc/default/celeryev; then
--    . /etc/default/celeryev
-+if [ "$ENABLED" != "true" ]; then
-+    echo "celeryevcam daemon disabled - see /etc/default/celeryd."
-+    exit 0
- fi
- 
- CELERYEV=${CELERYEV:-$DEFAULT_CELERYEV}
-@@ -197,7 +201,16 @@
-               --pidfile="$CELERYEV_PID_FILE"
- }
- 
--
-+status () {
-+    pid=$(cat "$CELERYEV_PID_FILE")
-+    kill -0 $pid 1>/dev/null 2>&1
-+    if [ $? -eq 0 ]; then
-+        echo "celeryevcam running"
-+    else
-+        echo "celeryevcam not running"
-+        exit 1
-+    fi
-+}
- 
- case "$1" in
-   start)
-@@ -216,9 +229,12 @@
-     check_dev_null
-     start_evcam
-     ;;
-+  status)
-+    status
-+    ;;
- 
-   *)
--    echo "Usage: /etc/init.d/celeryev {start|stop|restart}"
-+    echo "Usage: /etc/init.d/celeryev {start|stop|restart|status}"
-     exit 1
- esac
- 
 --- a/extra/generic-init.d/celerybeat
 +++ b/extra/generic-init.d/celerybeat
-@@ -15,25 +15,29 @@
+@@ -15,24 +15,28 @@
  # Default-Start:     2 3 4 5
  # Default-Stop:      0 1 6
  # Short-Description: celery periodic task scheduler
@@ -135,29 +21,37 @@
  
 +. /lib/lsb/init-functions
 +
- DEFAULT_PID_FILE="/var/run/celery/beat.pid"
- DEFAULT_LOG_FILE="/var/log/celery/beat.log"
- DEFAULT_LOG_LEVEL="INFO"
- DEFAULT_CELERYBEAT="celerybeat"
-+ENABLED="false"
+ # Setting `SCRIPT_NAME` here allows you to symlink/source this init script,
+ # making it easy to run multiple processes on the system.
+ SCRIPT_NAME="$(basename $0)"
  
  # /etc/init.d/celerybeat: start and stop the celery periodic task scheduler daemon.
  
 -if test -f /etc/default/celeryd; then
 -    . /etc/default/celeryd
 -fi
+-
+-if test -f /etc/default/${SCRIPT_NAME}; then
+-    . /etc/default/${SCRIPT_NAME}
 +[ -r /etc/default/celeryd ] && . /etc/default/celeryd
 +[ -r /etc/default/celerybeat ] && . /etc/default/celerybeat
- 
--if test -f /etc/default/celerybeat; then
--    . /etc/default/celerybeat
++[ -r /etc/default/${SCRIPT_NAME} ] && . /etc/default/${SCRIPT_NAME}
++
 +if [ "$ENABLED" != "true" ]; then
 +    echo "celerybeat daemon disabled - see /etc/default/celeryd."
 +    exit 0
  fi
  
+ CELERY_BIN=${CELERY_BIN:-"celery"}
+@@ -40,6 +44,7 @@
+ DEFAULT_LOG_FILE="/var/log/celery/${SCRIPT_NAME}.log"
+ DEFAULT_LOG_LEVEL="INFO"
+ DEFAULT_CELERYBEAT="$CELERY_BIN beat"
++ENABLED="false"
+ 
  CELERYBEAT=${CELERYBEAT:-$DEFAULT_CELERYBEAT}
-@@ -172,7 +176,16 @@
+ CELERYBEAT_LOG_LEVEL=${CELERYBEAT_LOG_LEVEL:-${CELERYBEAT_LOGLEVEL:-$DEFAULT_LOG_LEVEL}}
+@@ -180,7 +185,16 @@
                  --pidfile="$CELERYBEAT_PID_FILE"
  }
  
@@ -175,7 +69,7 @@
  
  case "$1" in
      start)
-@@ -202,8 +215,11 @@
+@@ -210,8 +224,11 @@
          check_dev_null
          check_paths
      ;;
@@ -183,8 +77,8 @@
 +        status
 +        ;;
      *)
--        echo "Usage: /etc/init.d/celerybeat {start|stop|restart|create-paths}"
-+        echo "Usage: /etc/init.d/celerybeat {start|stop|restart|create-paths|status}"
+-        echo "Usage: /etc/init.d/${SCRIPT_NAME} {start|stop|restart|create-paths}"
++        echo "Usage: /etc/init.d/${SCRIPT_NAME} {start|stop|restart|create-paths|status}"
          exit 64  # EX_USAGE
      ;;
  esac




More information about the Python-modules-commits mailing list