Correction on default value for config file (#2408)

Running gunicorn project.app while having a file called gunicorn.conf.py
in the current directory will read configuration from that file and actually fail
if the file raises an exception.
This commit is contained in:
Gastón Avila 2020-08-22 14:13:02 -03:00 committed by GitHub
parent 5001de6070
commit b80a329354
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -29,7 +29,7 @@ config
~~~~~~
* ``-c CONFIG, --config CONFIG``
* ``None``
* ``./gunicorn.conf.py``
The Gunicorn config file.
@ -38,6 +38,9 @@ A string of the form ``PATH``, ``file:PATH``, or ``python:MODULE_NAME``.
Only has an effect when specified on the command line or as part of an
application specific configuration.
By default, a file named ``gunicorn.conf.py`` will be read from the same
directory where gunicorn is being run.
.. versionchanged:: 19.4
Loading the config from a Python module requires the ``python:``
prefix.

View File

@ -546,7 +546,7 @@ class ConfigFile(Setting):
cli = ["-c", "--config"]
meta = "CONFIG"
validator = validate_string
default = None
default = "./gunicorn.conf.py"
desc = """\
The Gunicorn config file.
@ -555,6 +555,9 @@ class ConfigFile(Setting):
Only has an effect when specified on the command line or as part of an
application specific configuration.
By default, a file named ``gunicorn.conf.py`` will be read from the same
directory where gunicorn is being run.
.. versionchanged:: 19.4
Loading the config from a Python module requires the ``python:``
prefix.