Skip to content

Commit

Permalink
OS X -> macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Jun 14, 2016
1 parent 323b66f commit 5fec367
Show file tree
Hide file tree
Showing 19 changed files with 60 additions and 56 deletions.
25 changes: 14 additions & 11 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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:
::
Expand Down Expand Up @@ -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
----------------
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down
2 changes: 1 addition & 1 deletion celery/app/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#:
Expand Down
10 changes: 5 additions & 5 deletions celery/apps/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,16 @@ def startup_info(self):

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:
Expand All @@ -243,7 +243,7 @@ def install_platform_tweaks(self, worker):
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')

Expand Down
2 changes: 1 addition & 1 deletion celery/concurrency/asynpool.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ def schedule_writes(ready_fds, total_write_count=[0]):
# 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)
Expand Down
4 changes: 2 additions & 2 deletions celery/platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
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',
Expand All @@ -58,7 +58,7 @@
EX_CANTCREAT = getattr(os, 'EX_CANTCREAT', 73)

SYSTEM = _platform.system()
IS_OSX = SYSTEM == 'Darwin'
IS_macOS = SYSTEM == 'Darwin'
IS_WINDOWS = SYSTEM == 'Windows'

DAEMON_WORKDIR = '/'
Expand Down
12 changes: 6 additions & 6 deletions celery/tests/bin/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,15 +320,15 @@ def on_logging_setup(**kwargs):
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
Expand All @@ -339,7 +339,7 @@ class Controller(object):
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)
Expand All @@ -362,7 +362,7 @@ class Controller(object):
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:
Expand Down
7 changes: 4 additions & 3 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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:

Expand Down
18 changes: 9 additions & 9 deletions docs/getting-started/brokers/rabbitmq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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`_:
Expand All @@ -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
Expand Down Expand Up @@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions docs/history/changelog-1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions docs/history/changelog-2.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/history/changelog-3.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/history/whatsnew-2.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ implementations:
$ pip install pyinotify
* ``kqueue`` (OS X/BSD)
* ``kqueue`` (macOS/BSD)

* ``stat``

Expand Down
2 changes: 1 addition & 1 deletion docs/sec/CELERYSA-0001.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
10 changes: 5 additions & 5 deletions docs/tutorials/daemonizing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions docs/userguide/workers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand Down Expand Up @@ -772,7 +772,7 @@ implementations:
$ pip install pyinotify
* ``kqueue`` (OS X/BSD)
* ``kqueue`` (macOS/BSD)

* ``stat``

Expand Down
2 changes: 1 addition & 1 deletion docs/whatsnew-3.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 5fec367

Please sign in to comment.