Commit aaecf992 authored by Brian May's avatar Brian May

Convert from git-dpm to patches unapplied format

parent f06dacee
from __future__ import absolute_import
import pickle
import sys
from kombu.utils.functional import lazy
......@@ -15,7 +14,7 @@ from celery.utils.functional import (
maybe_list,
)
from celery.tests.case import Case, SkipTest
from celery.tests.case import Case
class test_LRUCache(Case):
......@@ -69,8 +68,6 @@ class test_LRUCache(Case):
self.assertEqual(list(x.keys()), [98, 99])
def assertSafeIter(self, method, interval=0.01, size=10000):
if sys.version_info >= (3,5):
raise SkipTest('Fails on Py3.5')
from threading import Thread, Event
from time import sleep
x = LRUCache(size)
......
......@@ -416,7 +416,6 @@ class test_Consumer(AppCase):
self.assertIs(self.buffer.get_nowait(), task)
def test_receieve_message_eta_isoformat(self):
raise SkipTest('broken test, may fail at random')
l = _MyKombuConsumer(self.buffer.put, timer=self.timer, app=self.app)
l.blueprint.state = RUN
l.steps.pop()
......@@ -517,7 +516,6 @@ class test_Consumer(AppCase):
self.assertTrue(logger.critical.call_count)
def test_receive_message_eta(self):
raise SkipTest('broken test, may fail at random')
import sys
from functools import partial
if os.environ.get('C_DEBUG_TEST'):
......
......@@ -24,7 +24,7 @@ __all__ = ['LRUCache', 'is_list', 'maybe_list', 'memoize', 'mlazy', 'noop',
'first', 'firstmethod', 'chunks', 'padlist', 'mattrgetter', 'uniq',
'regen', 'dictfilter', 'lazy', 'maybe_evaluate']
IS_PY3 = sys.version_info[0] == 3
IS_PYPY = hasattr(sys, 'pypy_version_info')
KEYWORD_MARK = object()
......@@ -56,7 +56,7 @@ class LRUCache(UserDict):
def __getitem__(self, key):
with self.mutex:
value = self[key] = self.data.pop(key)
return value
return value
def update(self, *args, **kwargs):
with self.mutex:
......@@ -67,7 +67,9 @@ class LRUCache(UserDict):
for _ in range(len(data) - limit):
data.popitem(last=False)
def popitem(self, last=True):
def popitem(self, last=True, _needs_lock=IS_PYPY):
if not _needs_lock:
return self.data.popitem(last)
with self.mutex:
return self.data.popitem(last)
......@@ -81,8 +83,8 @@ class LRUCache(UserDict):
def __iter__(self):
return iter(self.data)
def _iterate_items(self):
with self.mutex:
def _iterate_items(self, _need_lock=IS_PYPY):
with self.mutex if _need_lock else DummyContext():
for k in self:
try:
yield (k, self.data[k])
......@@ -90,8 +92,8 @@ class LRUCache(UserDict):
pass
iteritems = _iterate_items
def _iterate_values(self):
with self.mutex:
def _iterate_values(self, _need_lock=IS_PYPY):
with self.mutex if _need_lock else DummyContext():
for k in self:
try:
yield self.data[k]
......@@ -102,8 +104,7 @@ class LRUCache(UserDict):
def _iterate_keys(self):
# userdict.keys in py3k calls __getitem__
with self.mutex:
return keys(self.data)
return keys(self.data)
iterkeys = _iterate_keys
def incr(self, key, delta=1):
......@@ -112,7 +113,7 @@ class LRUCache(UserDict):
# integer as long as it exists and we can cast it
newval = int(self.data.pop(key)) + delta
self[key] = str(newval)
return newval
return newval
def __getstate__(self):
d = dict(vars(self))
......
# see git-dpm(1) from git-dpm package
fe0a322f110f182dc98d703815d17663fa5ac893
fe0a322f110f182dc98d703815d17663fa5ac893
6753277798b7b79fec667e858b4cbf459c1c277c
6753277798b7b79fec667e858b4cbf459c1c277c
celery_3.1.23.orig.tar.gz
4c51da2190dee77e723b658a939809fd74f4da96
1310624
debianTag="debian/%e%v"
patchedTag="patched/%e%v"
upstreamTag="upstream/%e%u"
[DEFAULT]
debian-branch=debian/master
<p class="logo"><a href="{{ pathto(master_doc) }}">
<img class="logo" src="{{ pathto("_images/celery_128.png", 1) }}" alt="Logo"/>
<img class="logo" src="http://cloud.github.com/downloads/celery/celery/celery_128.png" alt="Logo"/>
</a></p>
<div id="donate">
<b>Donations welcome:</b>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHTwYJKoZIhvcNAQcEoIIHQDCCBzwCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAY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TEyMTAxOTEzMzBaMCMGCSqGSIb3DQEJBDEWBBTUno4gI/mmaVaGVpgB/CWwQd3DeDANBgkqhkiG9w0BAQEFAASBgFmZ1j1Ss/FNl/JRIOakhBJEdm2KGLH0d2ewwTYIgIkEKSdc5Rg2/2xFS/dglcs5Te3R2GzaqjGlNSKldsk/MgZP/BudpHAASQ09hrfDy5TaBlRRl1Yu0WzGBKcVm/WRh0v2TVV8vBHVGiJD+aY5epgRXXI/XUKD0bp8tVV1T7LS-----END PKCS7-----
">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</div>
<p class="logo"><a href="{{ pathto(master_doc) }}">
<img class="logo" src="{{ pathto("_images/celery_128.png", 1) }}" alt="Logo"/>
<img class="logo" src="http://cloud.github.com/downloads/celery/celery/celery_128.png" alt="Logo"/>
</a></p>
<div id="donate">
<b>Donations welcome:</b>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHTwYJKoZIhvcNAQcEoIIHQDCCBzwCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA2+c723xlntHKQYQR9yn9BEtUhDoUUlnOqhniqvNMWB4k2R0JpVkrNSu5JCbdjNOqDXKHoRfIWe3HXJJMPZBJKFMD5Izprb6xEZlTGaWnlrGXFfkdBaILQQgWYqV0DnuNm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/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</div>
......@@ -75,23 +75,13 @@ unused_docs = [
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
def check_object_path(key, url, path):
if os.path.isfile(path):
return {key: (url, path)}
return {}
intersphinx_mapping = {}
intersphinx_mapping.update(check_object_path('python',
'http://docs.python.org/',
'/usr/share/doc/python'
+ '.'.join([str(x) for x in sys.version_info[0:2]])
+ '/html/objects.inv'))
intersphinx_mapping.update(check_object_path('kombu',
'http://kombu.readthedocs.org/en/latest/',
'/usr/share/doc/python-kombu-doc/html/objects.inv'))
intersphinx_mapping.update(check_object_path('amqp',
'http://amqp.readthedocs.org/en/latest/',
'/usr/share/doc/python-amqp-doc/html/objects.inv'))
intersphinx_mapping = {
'python': ('http://docs.python.org/dev', None),
'kombu': ('http://kombu.readthedocs.org/en/latest/', None),
'djcelery': ('http://django-celery.readthedocs.org/en/latest', None),
'cyme': ('http://cyme.readthedocs.org/en/latest', None),
'amqp': ('http://amqp.readthedocs.org/en/latest', None),
}
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'colorful'
......
......@@ -15,15 +15,11 @@
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: celery periodic task scheduler
# Description: Controls the Celery periodic task scheduler.
### 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
VERSION=10.1
echo "celery init v${VERSION}."
......@@ -33,14 +29,9 @@ if [ $(id -u) -ne 0 ]; then
exit 1
fi
origin_is_runlevel_dir () {
set +e
dirname $0 | grep -q "/etc/rc.\.d"
echo $?
}
# Can be a runlevel symlink (e.g. S02celeryd)
if [ $(origin_is_runlevel_dir) -eq 0 ]; then
# May be a runlevel symlink (e.g. S02celeryd)
if [ -L "$0" ]; then
SCRIPT_FILE=$(readlink "$0")
else
SCRIPT_FILE="$0"
......@@ -94,7 +85,6 @@ _config_sanity() {
scripts=""
if test -f /etc/default/celeryd; then
scripts="/etc/default/celeryd"
_config_sanity /etc/default/celeryd
......@@ -116,13 +106,6 @@ DEFAULT_PID_FILE="/var/run/celery/beat.pid"
DEFAULT_LOG_FILE="/var/log/celery/beat.log"
DEFAULT_LOG_LEVEL="INFO"
DEFAULT_CELERYBEAT="$CELERY_BIN beat"
DEFAULT_ENABLED="false"
ENABLED=${ENABLED:-$DEFAULT_ENABLED}
if [ "$ENABLED" != "true" ]; then
echo "celerybeat daemon disabled - see $scripts."
exit 0
fi
CELERYBEAT=${CELERYBEAT:-$DEFAULT_CELERYBEAT}
CELERYBEAT_LOG_LEVEL=${CELERYBEAT_LOG_LEVEL:-${CELERYBEAT_LOGLEVEL:-$DEFAULT_LOG_LEVEL}}
......@@ -254,7 +237,7 @@ stop_beat () {
}
_chuid () {
su "$CELERYBEAT_USER" --shell=/bin/sh -c "$CELERYBEAT $*"
su "$CELERYBEAT_USER" -c "$CELERYBEAT $*"
}
start_beat () {
......
......@@ -16,7 +16,6 @@
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: celery task worker daemon
# Description: Controls a celery task worker daemon instance
### END INIT INFO
#
#
......@@ -29,9 +28,6 @@
#
# You can then configure this by manipulating /etc/default/little-worker.
#
. /lib/lsb/init-functions
VERSION=10.1
echo "celery init v${VERSION}."
if [ $(id -u) -ne 0 ]; then
......@@ -41,14 +37,9 @@ if [ $(id -u) -ne 0 ]; then
exit 1
fi
origin_is_runlevel_dir () {
set +e
dirname $0 | grep -q "/etc/rc.\.d"
echo $?
}
# Can be a runlevel symlink (e.g. S02celeryd)
if [ $(origin_is_runlevel_dir) -eq 0 ]; then
if [[ `dirname $0` == /etc/rc*.d ]]; then
SCRIPT_FILE=$(readlink "$0")
else
SCRIPT_FILE="$0"
......@@ -61,7 +52,6 @@ DEFAULT_LOG_FILE="/var/log/celery/%n.log"
DEFAULT_LOG_LEVEL="INFO"
DEFAULT_NODES="celery"
DEFAULT_CELERYD="-m celery worker --detach"
DEFAULT_ENABLED="false"
CELERY_DEFAULTS=${CELERY_DEFAULTS:-"/etc/default/${SCRIPT_NAME}"}
......@@ -114,12 +104,6 @@ if [ -f "$CELERY_DEFAULTS" ]; then
. "$CELERY_DEFAULTS"
fi
ENABLED=${ENABLED:-$DEFAULT_ENABLED}
if [ "$ENABLED" != "true" ]; then
echo "celery daemon disabled - see $CELERY_DEFAULTS"
exit 0
fi
# Sets --app argument for CELERY_BIN
CELERY_APP_ARG=""
if [ ! -z "$CELERY_APP" ]; then
......@@ -246,7 +230,7 @@ _get_pids() {
_chuid () {
su "$CELERYD_USER" --shell=/bin/sh -c "$CELERYD_MULTI $*"
su "$CELERYD_USER" -c "$CELERYD_MULTI $*"
}
......
......@@ -23,6 +23,38 @@ CELERY_COMPAT_PROGRAMS = int(os.environ.get('CELERY_COMPAT_PROGRAMS', 1))
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:
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'
entrypoints = {}
extra = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment