conf.py 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # -*- coding: utf-8 -*-
  2. from __future__ import absolute_import, unicode_literals
  3. from sphinx_celery import conf
  4. globals().update(conf.build_config(
  5. 'celery', __file__,
  6. project='Celery',
  7. version_dev='5.0',
  8. version_stable='4.0',
  9. canonical_url='http://docs.celeryproject.org',
  10. webdomain='celeryproject.org',
  11. github_project='celery/celery',
  12. author='Ask Solem & contributors',
  13. author_name='Ask Solem',
  14. copyright='2009-2016',
  15. publisher='Celery Project',
  16. html_logo='images/celery_512.png',
  17. html_favicon='images/favicon.ico',
  18. html_prepend_sidebars=['sidebardonations.html'],
  19. extra_extensions=[
  20. 'sphinx.ext.napoleon',
  21. 'celery.contrib.sphinx',
  22. 'celerydocs',
  23. ],
  24. extra_intersphinx_mapping={
  25. 'cyanide': ('https://cyanide.readthedocs.io/en/latest', None),
  26. },
  27. apicheck_ignore_modules=[
  28. 'celery.five',
  29. 'celery.__main__',
  30. 'celery.task',
  31. 'celery.contrib.testing',
  32. 'celery.contrib.testing.tasks',
  33. 'celery.task.base',
  34. 'celery.bin',
  35. 'celery.bin.celeryd_detach',
  36. 'celery.contrib',
  37. r'celery.fixups.*',
  38. 'celery.local',
  39. 'celery.app.base',
  40. 'celery.apps',
  41. 'celery.canvas',
  42. 'celery.concurrency.asynpool',
  43. 'celery.utils.encoding',
  44. r'celery.utils.static.*',
  45. ],
  46. ))
  47. settings = {}
  48. ignored_settings = {
  49. # Deprecated broker settings (replaced by broker_url)
  50. 'broker_host',
  51. 'broker_user',
  52. 'broker_password',
  53. 'broker_vhost',
  54. 'broker_port',
  55. 'broker_transport',
  56. # deprecated task settings.
  57. 'chord_propagates',
  58. # MongoDB settings replaced by URL config.,
  59. 'mongodb_backend_settings',
  60. # Database URL replaced by URL config (result_backend = db+...).
  61. 'database_url',
  62. # Redis settings replaced by URL config.
  63. 'redis_host',
  64. 'redis_port',
  65. 'redis_db',
  66. 'redis_password',
  67. # Old deprecated AMQP result backend.
  68. 'result_exchange',
  69. 'result_exchange_type',
  70. # Experimental
  71. 'worker_agent',
  72. # Deprecated worker settings.
  73. 'worker_pool_putlocks',
  74. }
  75. def configcheck_project_settings():
  76. from celery.app.defaults import NAMESPACES, flatten
  77. settings.update(dict(flatten(NAMESPACES)))
  78. return set(settings)
  79. def is_deprecated_setting(setting):
  80. try:
  81. return settings[setting].deprecate_by
  82. except KeyError:
  83. pass
  84. def configcheck_should_ignore(setting):
  85. return setting in ignored_settings or is_deprecated_setting(setting)