Skip to content

Commit

Permalink
Distribution cleanup and prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Nov 9, 2013
1 parent 828216b commit f8dace1
Show file tree
Hide file tree
Showing 33 changed files with 32 additions and 513 deletions.
8 changes: 7 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ include setup.cfg
include setup.py
recursive-include celery *.py
recursive-include docs *
recursive-include extra *
recursive-include extra/bash-completion *
recursive-include extra/centos *
recursive-include extra/generic-init.d *
recursive-include extra/osx *
recursive-include extra/supervisord *
recursive-include extra/systemd *
recursive-include extra/zsh-completion *
recursive-include examples *
recursive-include requirements *.txt
prune *.pyc
Expand Down
8 changes: 0 additions & 8 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
Please see our Issue Tracker at GitHub:
http://github.com/celery/celery/issues

Celerymon
=========

Create a UI for celerymon using js, with statistics and so on.
Needs a graphing library, maybe highcharts
(http://www.highcharts.com/: awesome but weird license) or InfoVis
(http://thejit.org/; BSD licensed).
58 changes: 0 additions & 58 deletions celery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,61 +143,3 @@ def maybe_patch_concurrency(argv=sys.argv,
maybe_patch_concurrency=maybe_patch_concurrency,
_find_option_with_arg=_find_option_with_arg,
)


if sys.version_info[0:2] == (3, 2):
# There is a problem in Python3's import system where it
# returns the raw module object instead of the one
# kept in ``sys.modules``.

# This breaks our dynamically generated modules because we insert
# them into sys.modules, and expect the import statement to return
# that.

# I'm not entirely sure of why, or when it happens, but this import hook
# fixes the problem. The bug can be reproduced by disabling the hook
# and doing the following:
#
# >>> import celery
# >>> from celery.task import sets
# >>> from celery import task
# >>> type(celery.task)
# <class 'celery.task'>
# >>> import sys
# >>> import celery
# >>> sys.modules.pop('celery.task')
# <module 'celery.task' from 'celery/task/__init__.py'>
# >>> from celery.task import sets
# Traceback (most recent call last):
# File "<stdin>", line 1, in <module>
# ImportError: cannot import name sets
# >>> type(celery.task)
# <class 'module'> # <-- where did this come from?!?

# Note that popping the module from sys.modules is just a way to force
# this to happen and I'm sure it happens in other cases too.

# [ask]

import imp

class FixBrokenImportHook(object):
generated_modules = ('celery', 'celery.task')

def load_module(self, name, *args):
try:
return sys.modules[name]
except KeyError:
modname, path = name, None
if '.' in name:
modname, path = name.split('.')[-1], __path__
module_info = imp.find_module(modname, path)
imp.load_module(name, *module_info)
return sys.modules[name]

def find_module(self, name, path):
if name in self.generated_modules:
return self
return None

sys.meta_path.insert(0, FixBrokenImportHook())
2 changes: 1 addition & 1 deletion celery/datastructures.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class GraphFormatter(object):
'shape': 'box',
'arrowhead': 'vee',
'style': 'filled',
'fontname': 'Helvetica Neue',
'fontname': 'HelveticaNeue',
}
edge_scheme = {
'color': 'darkseagreen4',
Expand Down
6 changes: 1 addition & 5 deletions celery/tests/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
__all__ = [
'Case', 'AppCase', 'Mock', 'patch', 'call', 'skip_unless_module',
'wrap_logger', 'with_environ', 'sleepdeprived',
'skip_if_environ', 'skip_if_quick', 'todo', 'skip', 'skip_if',
'skip_if_environ', 'todo', 'skip', 'skip_if',
'skip_unless', 'mask_modules', 'override_stdouts', 'mock_module',
'replace_module_value', 'sys_platform', 'reset_modules',
'patch_modules', 'mock_context', 'mock_open', 'patch_many',
Expand Down Expand Up @@ -452,10 +452,6 @@ def _skips_if_environ(*args, **kwargs):
return _wrap_test


def skip_if_quick(fun):
return skip_if_environ('QUICKTEST')(fun)


def _skip_test(reason, sign):

def _wrap_test(fun):
Expand Down
3 changes: 1 addition & 2 deletions celery/tests/tasks/test_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from celery.utils import uuid
from celery.utils.serialization import pickle

from celery.tests.case import AppCase, depends_on_current_app, skip_if_quick
from celery.tests.case import AppCase, depends_on_current_app


def mock_task(name, state, result):
Expand Down Expand Up @@ -650,7 +650,6 @@ def x_join(self):
with self.assertRaises(TimeoutError):
self.ts.join(timeout=0.001)

@skip_if_quick
def x_join_longer(self):
with self.assertRaises(TimeoutError):
self.ts.join(timeout=1)
Expand Down
3 changes: 1 addition & 2 deletions celery/tests/utils/test_timer2.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import celery.utils.timer2 as timer2

from celery.tests.case import Case, Mock, patch, skip_if_quick
from celery.tests.case import Case, Mock, patch
from kombu.tests.case import redirect_stdouts


Expand Down Expand Up @@ -68,7 +68,6 @@ def on_error(exc_info):

class test_Timer(Case):

@skip_if_quick
def test_enter_after(self):
t = timer2.Timer()
try:
Expand Down
2 changes: 1 addition & 1 deletion docs/.templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% block body %}
<div class="deck">

{% if version == "3.1" or version == "4.0" %}
{% if version == "3.2" or version == "4.0" %}
<p class="developmentversion">
This document is for Celery's development version, which can be
significantly different from previous releases. Get old docs here:
Expand Down
Binary file removed docs/images/Celery-Overview-v4.jpg
Binary file not shown.
Binary file removed docs/images/icon-paypal.png
Binary file not shown.
Binary file modified docs/images/worker_graph_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion docs/internals/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
celery.concurrency.gevent
celery.concurrency.base
celery.concurrency.threads
celery.beat
celery.backends
celery.backends.base
celery.backends.rpc
Expand Down
File renamed without changes.
10 changes: 0 additions & 10 deletions docs/reference/celery.task.base.rst

This file was deleted.

18 changes: 0 additions & 18 deletions docs/reference/celery.task.rst

This file was deleted.

3 changes: 1 addition & 2 deletions docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
celery.app.log
celery.app.utils
celery.bootsteps
celery.task
celery.task.base
celery.result
celery.task.http
celery.schedules
Expand All @@ -43,6 +41,7 @@
celery.contrib.methods
celery.events
celery.events.state
celery.beat
celery.apps.worker
celery.apps.beat
celery.worker
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/daemonizing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,10 @@ you should :ref:`report it <reporting-bugs>`).
launchd (OS X)
==============

* `extra/mac/`_
* `extra/osx`_

.. _`extra/mac/`:
http://github.com/celery/celery/tree/3.1/extra/mac/
.. _`extra/osx`:
http://github.com/celery/celery/tree/3.1/extra/osx/


.. _daemon-windows:
Expand Down
6 changes: 6 additions & 0 deletions docs/whatsnew-3.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,12 @@ You install extras by specifying them inside brackets:
The above will install the dependencies for Redis and MongoDB. You can list
as many extras as you want.


.. warning::

You can't use the ``celery-with-*`` packages anymore, as these will not be
updated to use Celery 3.1.

+-------------+-------------------------+---------------------------+
| Extension | Requirement entry | Type |
+=============+=========================+===========================+
Expand Down
53 changes: 0 additions & 53 deletions docs/xreftest.rst

This file was deleted.

2 changes: 0 additions & 2 deletions extra/debian/README.rst

This file was deleted.

72 changes: 0 additions & 72 deletions extra/logtools/find-unprocessed-tasks-debug.sh

This file was deleted.

Loading

0 comments on commit f8dace1

Please sign in to comment.