OS X -> macOS

pull/3254/head
Ask Solem 6 years ago
parent 323b66f687
commit 5fec367b97
  1. 25
      CONTRIBUTING.rst
  2. 2
      MANIFEST.in
  3. 2
      celery/app/base.py
  4. 10
      celery/apps/worker.py
  5. 2
      celery/concurrency/asynpool.py
  6. 4
      celery/platforms.py
  7. 12
      celery/tests/bin/test_worker.py
  8. 7
      docs/contributing.rst
  9. 18
      docs/getting-started/brokers/rabbitmq.rst
  10. 4
      docs/history/changelog-1.0.rst
  11. 8
      docs/history/changelog-2.0.rst
  12. 2
      docs/history/changelog-3.1.rst
  13. 2
      docs/history/whatsnew-2.5.rst
  14. 2
      docs/sec/CELERYSA-0001.txt
  15. 10
      docs/tutorials/daemonizing.rst
  16. 4
      docs/userguide/workers.rst
  17. 2
      docs/whatsnew-3.1.rst
  18. 0
      extra/macOS/org.celeryq.beat.plist
  19. 0
      extra/macOS/org.celeryq.worker.plist

@ -198,7 +198,7 @@ spelling or other errors on the website/docs/code.
A) If the error is from a Python traceback, include it in the bug report.
B) We also need to know what platform you're running (Windows, OS X, Linux,
B) We also need to know what platform you're running (Windows, macOS, Linux,
etc.), the version of your Python interpreter, and the version of Celery,
and related packages that you were running when the bug occurred.
@ -209,8 +209,9 @@ spelling or other errors on the website/docs/code.
* Enable celery's ``breakpoint_signal`` and use it
to inspect the process's state. This will allow you to open a
``pdb`` session.
* Collect tracing data using `strace`_(Linux), ``dtruss`` (OSX),
and ``ktrace`` (BSD), `ltrace`_ and `lsof`_.
* Collect tracing data using `strace`_(Linux),
``dtruss`` (macOS), and ``ktrace`` (BSD),
`ltrace`_ and `lsof`_.
D) Include the output from the ``celery report`` command:
::
@ -349,17 +350,17 @@ An archived version is named ``X.Y-archived``.
Our currently archived branches are:
* 2.5-archived
* ``2.5-archived``
* 2.4-archived
* ``2.4-archived``
* 2.3-archived
* ``2.3-archived``
* 2.1-archived
* ``2.1-archived``
* 2.0-archived
* ``2.0-archived``
* 1.0-archived
* ``1.0-archived``
Feature branches
----------------
@ -737,7 +738,7 @@ is following the conventions.
from .five import zip_longest, items, range
from .utils import timeutils
* Wildcard imports must not be used (`from xxx import *`).
* Wild-card imports must not be used (`from xxx import *`).
* For distributions where Python 2.5 is the oldest support version
additional rules apply:
@ -789,13 +790,15 @@ that require third-party libraries must be added.
1) Add a new requirements file in `requirements/extras`
E.g. for the Cassandra backend this is
``requirements/extras/cassandra.txt``, and the file looks like this::
``requirements/extras/cassandra.txt``, and the file looks like this:
::
pycassa
These are pip requirement files so you can have version specifiers and
multiple packages are separated by newline. A more complex example could
be:
::
# pycassa 2.0 breaks Foo
pycassa>=1.0,<2.0

@ -11,7 +11,7 @@ recursive-include docs *
recursive-include extra/bash-completion *
recursive-include extra/centos *
recursive-include extra/generic-init.d *
recursive-include extra/osx *
recursive-include extra/macOS *
recursive-include extra/supervisord *
recursive-include extra/systemd *
recursive-include extra/zsh-completion *

@ -141,7 +141,7 @@ class Celery(object):
Pickler = AppPickler
SYSTEM = platforms.SYSTEM
IS_OSX, IS_WINDOWS = platforms.IS_OSX, platforms.IS_WINDOWS
IS_macOS, IS_WINDOWS = platforms.IS_macOS, platforms.IS_WINDOWS
#: Name of the `__main__` module. Required for standalone scripts.
#:

@ -223,16 +223,16 @@ class Worker(WorkController):
def install_platform_tweaks(self, worker):
"""Install platform specific tweaks and workarounds."""
if self.app.IS_OSX:
self.osx_proxy_detection_workaround()
if self.app.IS_macOS:
self.macOS_proxy_detection_workaround()
# Install signal handler so SIGHUP restarts the worker.
if not self._isatty:
# only install HUP handler if detached from terminal,
# so closing the terminal window doesn't restart the worker
# into the background.
if self.app.IS_OSX:
# OS X can't exec from a process using threads.
if self.app.IS_macOS:
# macOS can't exec from a process using threads.
# See https://github.com/celery/celery/issues#issue/152
install_HUP_not_supported_handler(worker)
else:
@ -243,7 +243,7 @@ class Worker(WorkController):
install_cry_handler()
install_rdb_handler()
def osx_proxy_detection_workaround(self):
def macOS_proxy_detection_workaround(self):
"""See https://github.com/celery/celery/issues#issue/161"""
os.environ.setdefault('celery_dummy_proxy', 'set_by_celeryd')

@ -745,7 +745,7 @@ class AsynPool(_pool.Pool):
# using `total_writes % ready_fds` is about 30% faster
# with many processes, and also leans more towards fairness
# in write stats when used with many processes
# [XXX On OS X, this may vary depending
# [XXX On macOS, this may vary depending
# on event loop implementation (i.e select vs epoll), so
# have to test further]
num_ready = len(ready_fds)

@ -42,7 +42,7 @@ grp = try_import('grp')
mputil = try_import('multiprocessing.util')
__all__ = ['EX_OK', 'EX_FAILURE', 'EX_UNAVAILABLE', 'EX_USAGE', 'SYSTEM',
'IS_OSX', 'IS_WINDOWS', 'pyimplementation', 'LockFailed',
'IS_macOS', 'IS_WINDOWS', 'pyimplementation', 'LockFailed',
'get_fdmax', 'Pidfile', 'create_pidlock',
'close_open_fds', 'DaemonContext', 'detached', 'parse_uid',
'parse_gid', 'setgroups', 'initgroups', 'setgid', 'setuid',
@ -58,7 +58,7 @@ EX_USAGE = getattr(os, 'EX_USAGE', 64)
EX_CANTCREAT = getattr(os, 'EX_CANTCREAT', 73)
SYSTEM = _platform.system()
IS_OSX = SYSTEM == 'Darwin'
IS_macOS = SYSTEM == 'Darwin'
IS_WINDOWS = SYSTEM == 'Windows'
DAEMON_WORKDIR = '/'

@ -320,15 +320,15 @@ class test_Worker(WorkerAppCase):
signals.setup_logging.disconnect(on_logging_setup)
@mock.stdouts
def test_platform_tweaks_osx(self, stdout, stderr):
def test_platform_tweaks_macOS(self, stdout, stderr):
class OSXWorker(Worker):
class macOSWorker(Worker):
proxy_workaround_installed = False
def osx_proxy_detection_workaround(self):
def macOS_proxy_detection_workaround(self):
self.proxy_workaround_installed = True
worker = OSXWorker(app=self.app, redirect_stdouts=False)
worker = macOSWorker(app=self.app, redirect_stdouts=False)
def install_HUP_nosupport(controller):
controller.hup_not_supported_installed = True
@ -339,7 +339,7 @@ class test_Worker(WorkerAppCase):
prev = cd.install_HUP_not_supported_handler
cd.install_HUP_not_supported_handler = install_HUP_nosupport
try:
worker.app.IS_OSX = True
worker.app.IS_macOS = True
controller = Controller()
worker.install_platform_tweaks(controller)
self.assertTrue(controller.hup_not_supported_installed)
@ -362,7 +362,7 @@ class test_Worker(WorkerAppCase):
cd.install_worker_restart_handler = install_worker_restart_handler
try:
worker = self.Worker(app=self.app)
worker.app.IS_OSX = False
worker.app.IS_macOS = False
worker.install_platform_tweaks(Controller())
self.assertTrue(restart_worker_handler_installed[0])
finally:

@ -198,7 +198,7 @@ spelling or other errors on the website/docs/code.
A) If the error is from a Python traceback, include it in the bug report.
B) We also need to know what platform you're running (Windows, OS X, Linux,
B) We also need to know what platform you're running (Windows, macOS, Linux,
etc.), the version of your Python interpreter, and the version of Celery,
and related packages that you were running when the bug occurred.
@ -209,8 +209,9 @@ spelling or other errors on the website/docs/code.
* Enable celery's :ref:`breakpoint signal <breakpoint_signal>` and use it
to inspect the process's state. This will allow you to open a
:mod:`pdb` session.
* Collect tracing data using `strace`_(Linux), :command:`dtruss` (OSX),
and :command:`ktrace` (BSD), `ltrace`_ and `lsof`_.
* Collect tracing data using `strace`_(Linux),
:command:`dtruss` (macOS), and :command:`ktrace` (BSD),
`ltrace`_ and `lsof`_.
D) Include the output from the :command:`celery report` command:

@ -27,8 +27,8 @@ see :ref:`conf-broker-settings`.
Installing the RabbitMQ Server
==============================
See `Installing RabbitMQ`_ over at RabbitMQ's website. For Mac OS X
see `Installing RabbitMQ on OS X`_.
See `Installing RabbitMQ`_ over at RabbitMQ's website. For macOS
see `Installing RabbitMQ on macOS`_.
.. _`Installing RabbitMQ`: http://www.rabbitmq.com/install.html
@ -70,13 +70,13 @@ See the RabbitMQ `Admin Guide`_ for more information about `access control`_.
.. _`access control`: http://www.rabbitmq.com/admin-guide.html#access-control
.. _rabbitmq-osx-installation:
.. _rabbitmq-macOS-installation:
Installing RabbitMQ on OS X
---------------------------
Installing RabbitMQ on macOS
----------------------------
The easiest way to install RabbitMQ on OS X is using `Homebrew`_ the new and
shiny package management system for OS X.
The easiest way to install RabbitMQ on macOS is using `Homebrew`_ the new and
shiny package management system for macOS.
First, install Homebrew using the one-line command provided by the `Homebrew
documentation`_:
@ -94,7 +94,7 @@ Finally, we can install RabbitMQ using :command:`brew`:
.. _`Homebrew`: https://github.com/mxcl/homebrew/
.. _`Homebrew documentation`: https://github.com/Homebrew/homebrew/wiki/Installation
.. _rabbitmq-osx-system-hostname:
.. _rabbitmq-macOS-system-hostname:
After you've installed RabbitMQ with :command:`brew` you need to add the following to
your path to be able to start and stop the broker: add it to the start-up file for your
@ -143,7 +143,7 @@ This is especially important if your DHCP server gives you a host name
starting with an IP address, (e.g. `23.10.112.31.comcast.net`), because
then RabbitMQ will try to use `rabbit@23`, which is an illegal host name.
.. _rabbitmq-osx-start-stop:
.. _rabbitmq-macOS-start-stop:
Starting/Stopping the RabbitMQ server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@ -646,7 +646,7 @@ Backward incompatible changes
`extra/debian/init.d/celeryd`
`extra/debian/init.d/celerybeat`
* Mac OS X :command:`launchd`
* macOS :command:`launchd`
`extra/mac/org.celeryq.celeryd.plist`
`extra/mac/org.celeryq.celerybeat.plist`
@ -967,7 +967,7 @@ Documentation
* Now emits a warning if the --detach argument is used.
--detach should not be used anymore, as it has several not easily fixed
bugs related to it. Instead, use something like start-stop-daemon,
:pypi:`supervisor` or :command:`launchd` (os x).
:pypi:`supervisor` or :command:`launchd` (macOS).
* Make sure logger class is process aware, even if running Python >= 2.6.

@ -86,11 +86,11 @@ Fixes
See issue #160.
* Worker: On OS X it is not possible to run `os.exec*` in a process
* Worker: On macOS it is not possible to run `os.exec*` in a process
that is threaded.
This breaks the SIGHUP restart handler,
and is now disabled on OS X, emitting a warning instead.
and is now disabled on macOS, emitting a warning instead.
See issue #152.
@ -99,8 +99,8 @@ Fixes
See issue #175.
* Using urllib2 in a periodic task on OS X crashed because
of the proxy auto detection used in OS X.
* Using urllib2 in a periodic task on macOS crashed because
of the proxy auto detection used in macOS.
This is now fixed by using a workaround.
See issue #143.

@ -1095,7 +1095,7 @@ News
- **Commands:** The output of the event dump utility
(:program:`celery events -d`) can now be piped into other commands.
- **Documentation:** The RabbitMQ installation instructions for OS X was
- **Documentation:** The RabbitMQ installation instructions for macOS was
updated to use modern Homebrew practices.
Contributed by Jon Chen.

@ -246,7 +246,7 @@ implementations:
$ pip install pyinotify
* ``kqueue`` (OS X/BSD)
* ``kqueue`` (macOS/BSD)
* ``stat``

@ -51,7 +51,7 @@ as the root user, using either:
CELERYD_USER or CELERYD_GROUP defined,
are affected.
Users using the Debian init-scripts, CentOS init-scripts, OS X launchctl
Users using the Debian init-scripts, CentOS init-scripts, macOS launchctl
scripts, Supervisor, or users not starting the programs as the root user
are *not* affected.

@ -504,17 +504,17 @@ or production environment (inadvertently) as root.
* `extra/supervisord/`_
.. _`extra/supervisord/`:
https://github.com/celery/celery/tree/3.1/extra/supervisord/
https://github.com/celery/celery/tree/master/extra/supervisord/
.. _daemon-launchd:
``launchd`` (OS X)
``launchd`` (macOS)
======================================================================
* `extra/osx`_
* `extra/macOS`_
.. _`extra/osx`:
https://github.com/celery/celery/tree/3.1/extra/osx/
.. _`extra/macOS`:
https://github.com/celery/celery/tree/master/extra/macOS/
.. _daemon-windows:

@ -117,7 +117,7 @@ is not recommended in production:
in the background as a daemon (it does not have a controlling
terminal).
:sig:`HUP` is disabled on OS X because of a limitation on
:sig:`HUP` is disabled on macOS because of a limitation on
that platform.
@ -772,7 +772,7 @@ implementations:
$ pip install pyinotify
* ``kqueue`` (OS X/BSD)
* ``kqueue`` (macOS/BSD)
* ``stat``

@ -758,7 +758,7 @@ In Other News
A monotonic clock is now used for timeouts and scheduling.
The monotonic clock function is built-in starting from Python 3.4,
but we also have fallback implementations for Linux and OS X.
but we also have fallback implementations for Linux and macOS.
- :program:`celery worker` now supports a new
:option:`--detach <celery worker --detach>` argument to start

Loading…
Cancel
Save