Browse Source

Merge branch 'master' of github.com:celery/celery

Conflicts:
	celery/tests/worker/test_hub.py
Ask Solem 11 years ago
parent
commit
c991bf0dc0
4 changed files with 41 additions and 18 deletions
  1. 28 10
      .travis.yml
  2. 5 0
      Changelog
  3. 6 6
      celery/tests/utils/test_functional.py
  4. 2 2
      celery/tests/utils/test_local.py

+ 28 - 10
.travis.yml

@@ -1,24 +1,42 @@
 language: python
-python:
-  - 2.6
-  - 2.7
-  - 3.3
-  - pypy
+python: 2.7
+env:
+  global:
+    PYTHONUNBUFFERED=yes
+  matrix:
+    - TOXENV=2.6 
+    - TOXENV=2.7 
+    - TOXENV=3.3 
+    - TOXENV=3.4 
+    - TOXENV=pypy
 before_install:
   - |
-    deactivate
-    if python --version |& grep PyPy; then
+    if [[ $TOXENV = pypy ]]; then
+      deactivate
       sudo apt-add-repository --yes ppa:pypy/ppa
       sudo apt-get update
       sudo apt-get install pypy
       source ~/virtualenv/pypy/bin/activate
     fi
+    if [[ $TOXENV = 3.4 ]]; then
+      sudo apt-get update
+      sudo apt-get install python3.4-dev
+      source ~/virtualenv/python3.4
+      virtualenv ~/virtualenv/python3.4 --python=$(which python3.4)
+      source ~/virtualenv/python3.4/bin/activate
+    fi
     python --version
     uname -a
     lsb_release -a
-    sudo pip install tox
-script: tox -v -e $TRAVIS_PYTHON_VERSION -- -v
+install:
+  - pip install tox
+script:
+  - tox -v -- -v
 after_success:
   - .tox/$TRAVIS_PYTHON_VERSION/bin/coveralls
 notifications:
-  irc: "chat.freenode.net#celery"
+  irc:
+    channels:
+      - "chat.freenode.net#celery"
+    on_success: always
+    on_failure: always

+ 5 - 0
Changelog

@@ -102,6 +102,11 @@ new in Celery 3.1.
 - **Task**: ``Task.apply`` now properly sets ``request.headers``
   (Issue #1874).
 
+- **Worker**: Fixed ``UnicodeEncodeError`` occuring when worker is started
+  by `supervisord`.
+
+    Fix contributed by Codeb Fan.
+
 - **Beat**: No longer attempts to upgrade a newly created database file
   (Issue #1923).
 

+ 6 - 6
celery/tests/utils/test_functional.py

@@ -72,21 +72,21 @@ class test_LRUCache(Case):
 
             def __init__(self, cache):
                 self.cache = cache
-                self._is_shutdown = Event()
-                self._is_stopped = Event()
+                self.__is_shutdown = Event()
+                self.__is_stopped = Event()
                 Thread.__init__(self)
 
             def run(self):
-                while not self._is_shutdown.isSet():
+                while not self.__is_shutdown.isSet():
                     try:
                         self.cache.data.popitem(last=False)
                     except KeyError:
                         break
-                self._is_stopped.set()
+                self.__is_stopped.set()
 
             def stop(self):
-                self._is_shutdown.set()
-                self._is_stopped.wait()
+                self.__is_shutdown.set()
+                self.__is_stopped.wait()
                 self.join(THREAD_TIMEOUT_MAX)
 
         burglar = Burglar(x)

+ 2 - 2
celery/tests/utils/test_local.py

@@ -170,10 +170,10 @@ class test_Proxy(Case):
         class O(object):
 
             def __complex__(self):
-                return 10.333
+                return complex(10.333)
 
         o = Proxy(O)
-        self.assertEqual(o.__complex__(), 10.333)
+        self.assertEqual(o.__complex__(), complex(10.333))
 
     def test_index(self):