Improve markup of settings.rst

This commit is contained in:
Slava Shklyaev 2015-07-09 13:23:50 +03:00 committed by Berker Peksag
parent 725f5cdeb1
commit 0d86a9094d
3 changed files with 143 additions and 145 deletions

View File

@ -41,8 +41,8 @@ bind
The socket to bind.
A string of the form: 'HOST', 'HOST:PORT', 'unix:PATH'. An IP is a valid
HOST.
A string of the form: ``HOST``, ``HOST:PORT``, ``unix:PATH``. An IP is
a valid ``HOST``.
Multiple addresses can be bound. ex.::
@ -77,12 +77,12 @@ workers
The number of worker processes for handling requests.
A positive integer generally in the 2-4 x $(NUM_CORES) range. You'll
want to vary this a bit to find the best for your particular
A positive integer generally in the ``2-4 x $(NUM_CORES)`` range.
You'll want to vary this a bit to find the best for your particular
application's work load.
By default, the value of the WEB_CONCURRENCY environment variable. If
it is not defined, the default is 1.
By default, the value of the ``WEB_CONCURRENCY`` environment variable.
If it is not defined, the default is 1.
worker_class
~~~~~~~~~~~~
@ -92,11 +92,9 @@ worker_class
The type of workers to use.
The default class (sync) should handle most 'normal' types of
workloads. You'll want to read
http://docs.gunicorn.org/en/latest/design.html for information
on when you might want to choose one of the other worker
classes.
The default class (``sync``) should handle most "normal" types of
workloads. You'll want to read :doc:`design` for information on when
you might want to choose one of the other worker classes.
A string referring to one of the following bundled classes:
@ -105,11 +103,11 @@ A string referring to one of the following bundled classes:
* ``gevent`` - Requires gevent >= 0.13
* ``tornado`` - Requires tornado >= 0.2
Optionally, you can provide your own worker by giving gunicorn a
python path to a subclass of gunicorn.workers.base.Worker. This
alternative syntax will load the gevent class:
``gunicorn.workers.ggevent.GeventWorker``. Alternatively the syntax
can also load the gevent class with ``egg:gunicorn#gevent``
Optionally, you can provide your own worker by giving Gunicorn a
Python path to a subclass of ``gunicorn.workers.base.Worker``.
This alternative syntax will load the gevent class:
``gunicorn.workers.ggevent.GeventWorker``. Alternatively, the syntax
can also load the gevent class with ``egg:gunicorn#gevent``.
threads
~~~~~~~
@ -121,8 +119,8 @@ The number of worker threads for handling requests.
Run each worker with the specified number of threads.
A positive integer generally in the 2-4 x $(NUM_CORES) range. You'll
want to vary this a bit to find the best for your particular
A positive integer generally in the ``2-4 x $(NUM_CORES)`` range.
You'll want to vary this a bit to find the best for your particular
application's work load.
If it is not defined, the default is 1.
@ -158,7 +156,7 @@ max_requests_jitter
* ``--max-requests-jitter INT``
* ``0``
The maximum jitter to add to the max-requests setting.
The maximum jitter to add to the *max_requests* setting.
The jitter causes the restart per worker to be randomized by
``randint(0, max_requests_jitter)``. This is intended to stagger worker
@ -232,7 +230,7 @@ limit_request_fields
Limit the number of HTTP headers fields in a request.
This parameter is used to limit the number of headers in a request to
prevent DDOS attack. Used with the `limit_request_field_size` it allows
prevent DDOS attack. Used with the *limit_request_field_size* it allows
more safety. By default this value is 100 and can't be larger than
32768.
@ -374,8 +372,8 @@ user
Switch worker processes to run as this user.
A valid user id (as an integer) or the name of a user that can be
retrieved with a call to pwd.getpwnam(value) or None to not change
the worker process user.
retrieved with a call to ``pwd.getpwnam(value)`` or ``None`` to not
change the worker process user.
group
~~~~~
@ -386,8 +384,8 @@ group
Switch worker process to run as this group.
A valid group id (as an integer) or the name of a user that can be
retrieved with a call to pwd.getgrnam(value) or None to not change
the worker processes group.
retrieved with a call to ``pwd.getgrnam(value)`` or ``None`` to not
change the worker processes group.
umask
~~~~~
@ -399,9 +397,10 @@ A bit mask for the file mode on files written by Gunicorn.
Note that this affects unix socket permissions.
A valid value for the os.umask(mode) call or a string compatible with
int(value, 0) (0 means Python guesses the base, so values like "0",
"0xFF", "0022" are valid for decimal, hex, and octal representations)
A valid value for the ``os.umask(mode)`` call or a string compatible
with ``int(value, 0)`` (``0`` means Python guesses the base, so values
like ``0``, ``0xFF``, ``0022`` are valid for decimal, hex, and octal
representations)
tmp_upload_dir
~~~~~~~~~~~~~~
@ -422,8 +421,8 @@ secure_scheme_headers
* ``{'X-FORWARDED-PROTOCOL': 'ssl', 'X-FORWARDED-PROTO': 'https', 'X-FORWARDED-SSL': 'on'}``
A dictionary containing headers and values that the front-end proxy
uses to indicate HTTPS requests. These tell gunicorn to set
wsgi.url_scheme to "https", so your application can tell that the
uses to indicate HTTPS requests. These tell Gunicorn to set
``wsgi.url_scheme`` to ``https``, so your application can tell that the
request is secure.
The dictionary should map upper-case header names to exact string
@ -443,7 +442,7 @@ forwarded_allow_ips
Front-end's IPs from which allowed to handle set secure headers.
(comma separate).
Set to "*" to disable checking of Front-end IPs (useful for setups
Set to ``*`` to disable checking of Front-end IPs (useful for setups
where you don't know in advance the IP address of Front-end, but
you still trust the environment)
@ -458,7 +457,7 @@ accesslog
The Access log file to write to.
"-" means log to stderr.
``'-'`` means log to stderr.
access_log_format
~~~~~~~~~~~~~~~~~
@ -472,12 +471,12 @@ The access log format.
Identifier Description
========== ===========
h remote address
l '-'
u currently '-', may be user name in future releases
l ``'-'``
u currently ``'-'``, may be user name in future releases
t date of the request
r status line (e.g. ``GET / HTTP/1.1``)
s status
b response length or '-'
b response length or ``'-'``
f referer
a user agent
T request time in seconds
@ -496,10 +495,10 @@ errorlog
The Error log file to write to.
"-" means log to stderr.
``'-'`` means log to stderr.
.. versionchanged:: 19.2
Log to ``stderr`` by default.
Log to stderr by default.
loglevel
~~~~~~~~
@ -523,15 +522,15 @@ logger_class
* ``--logger-class STRING``
* ``gunicorn.glogging.Logger``
The logger you want to use to log events in gunicorn.
The logger you want to use to log events in Gunicorn.
The default class (``gunicorn.glogging.Logger``) handle most of
normal usages in logging. It provides error and access logging.
You can provide your own worker by giving gunicorn a
python path to a subclass like gunicorn.glogging.Logger.
You can provide your own worker by giving Gunicorn a
Python path to a subclass like ``gunicorn.glogging.Logger``.
Alternatively the syntax can also load the Logger class
with `egg:gunicorn#simple`
with ``egg:gunicorn#simple``.
logconfig
~~~~~~~~~
@ -553,11 +552,11 @@ Address to send syslog messages.
Address is a string of the form:
* 'unix://PATH#TYPE' : for unix domain socket. TYPE can be 'stream'
for the stream driver or 'dgram' for the dgram driver.
'stream' is the default.
* 'udp://HOST:PORT' : for UDP sockets
* 'tcp://HOST:PORT' : for TCP sockets
* ``unix://PATH#TYPE`` : for unix domain socket. ``TYPE`` can be ``stream``
for the stream driver or ``dgram`` for the dgram driver.
``stream`` is the default.
* ``udp://HOST:PORT`` : for UDP sockets
* ``tcp://HOST:PORT`` : for TCP sockets
syslog
~~~~~~
@ -573,10 +572,10 @@ syslog_prefix
* ``--log-syslog-prefix SYSLOG_PREFIX``
* ``None``
Makes gunicorn use the parameter as program-name in the syslog entries.
Makes Gunicorn use the parameter as program-name in the syslog entries.
All entries will be prefixed by gunicorn.<prefix>. By default the program
name is the name of the process.
All entries will be prefixed by ``gunicorn.<prefix>``. By default the
program name is the name of the process.
syslog_facility
~~~~~~~~~~~~~~~
@ -596,7 +595,7 @@ Enable stdio inheritance
Enable inheritance for stdio file descriptors in daemon mode.
Note: To disable the python stdout buffering, you can to set the user
Note: To disable the Python stdout buffering, you can to set the user
environment variable ``PYTHONUNBUFFERED`` .
statsd_host
@ -636,7 +635,7 @@ running more than one instance of Gunicorn you'll probably want to set a
name to tell them apart. This requires that you install the setproctitle
module.
It defaults to 'gunicorn'.
If not set, the *default_proc_name* setting will be used.
default_proc_name
~~~~~~~~~~~~~~~~~
@ -656,10 +655,10 @@ django_settings
The Python path to a Django settings module. (deprecated)
e.g. 'myproject.settings.main'. If this isn't provided, the
DJANGO_SETTINGS_MODULE environment variable will be used.
e.g. ``myproject.settings.main``. If this isn't provided, the
``DJANGO_SETTINGS_MODULE`` environment variable will be used.
**DEPRECATED**: use the --env argument instead.
**DEPRECATED**: use the ``--env`` argument instead.
Server Mechanics
----------------
@ -673,7 +672,7 @@ pythonpath
A comma-separated list of directories to add to the Python path.
e.g.
'/home/djangoprojects/myproject,/home/python/mylibrary'.
``'/home/djangoprojects/myproject,/home/python/mylibrary'``.
paste
~~~~~
@ -681,9 +680,9 @@ paste
* ``--paste STRING, --paster STRING``
* ``None``
Load a paste.deploy config file. The argument may contain a "#" symbol
followed by the name of an app section from the config file, e.g.
"production.ini#admin".
Load a PasteDeploy config file. The argument may contain a ``#``
symbol followed by the name of an app section from the config file,
e.g. ``production.ini#admin``.
At this time, using alternate server blocks is not supported. Use the
command line arguments to control server configuration instead.
@ -853,13 +852,13 @@ nworkers_changed
def nworkers_changed(server, new_value, old_value):
pass
Called just after num_workers has been changed.
Called just after *num_workers* has been changed.
The callable needs to accept an instance variable of the Arbiter and
two integers of number of workers after and before change.
If the number of workers is set for the first time, old_value would be
None.
If the number of workers is set for the first time, *old_value* would
be ``None``.
on_exit
~~~~~~~
@ -869,7 +868,7 @@ on_exit
def on_exit(server):
pass
Called just before exiting gunicorn.
Called just before exiting Gunicorn.
The callable needs to accept a single instance variable for the Arbiter.
@ -884,8 +883,8 @@ proxy_protocol
Enable detect PROXY protocol (PROXY mode).
Allow using Http and Proxy together. It may be useful for work with
stunnel as https frontend and gunicorn as http server.
Allow using HTTP and Proxy together. It may be useful for work with
stunnel as HTTPS frontend and Gunicorn as HTTP server.
PROXY protocol: http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt
@ -906,11 +905,11 @@ proxy_allow_ips
Front-end's IPs from which allowed accept proxy requests (comma separate).
Set to "*" to disable checking of Front-end IPs (useful for setups
Set to ``*`` to disable checking of Front-end IPs (useful for setups
where you don't know in advance the IP address of Front-end, but
you still trust the environment)
Ssl
SSL
---
keyfile

View File

@ -167,7 +167,7 @@ class Config(object):
def ssl_options(self):
opts = {}
for name, value in self.settings.items():
if value.section == 'Ssl':
if value.section == 'SSL':
opts[name] = value.get()
return opts
@ -497,8 +497,8 @@ class Bind(Setting):
desc = """\
The socket to bind.
A string of the form: 'HOST', 'HOST:PORT', 'unix:PATH'. An IP is a valid
HOST.
A string of the form: ``HOST``, ``HOST:PORT``, ``unix:PATH``. An IP is
a valid ``HOST``.
Multiple addresses can be bound. ex.::
@ -540,12 +540,12 @@ class Workers(Setting):
desc = """\
The number of worker processes for handling requests.
A positive integer generally in the 2-4 x $(NUM_CORES) range. You'll
want to vary this a bit to find the best for your particular
A positive integer generally in the ``2-4 x $(NUM_CORES)`` range.
You'll want to vary this a bit to find the best for your particular
application's work load.
By default, the value of the WEB_CONCURRENCY environment variable. If
it is not defined, the default is 1.
By default, the value of the ``WEB_CONCURRENCY`` environment variable.
If it is not defined, the default is 1.
"""
@ -559,11 +559,9 @@ class WorkerClass(Setting):
desc = """\
The type of workers to use.
The default class (sync) should handle most 'normal' types of
workloads. You'll want to read
http://docs.gunicorn.org/en/latest/design.html for information
on when you might want to choose one of the other worker
classes.
The default class (``sync``) should handle most "normal" types of
workloads. You'll want to read :doc:`design` for information on when
you might want to choose one of the other worker classes.
A string referring to one of the following bundled classes:
@ -572,11 +570,11 @@ class WorkerClass(Setting):
* ``gevent`` - Requires gevent >= 0.13
* ``tornado`` - Requires tornado >= 0.2
Optionally, you can provide your own worker by giving gunicorn a
python path to a subclass of gunicorn.workers.base.Worker. This
alternative syntax will load the gevent class:
``gunicorn.workers.ggevent.GeventWorker``. Alternatively the syntax
can also load the gevent class with ``egg:gunicorn#gevent``
Optionally, you can provide your own worker by giving Gunicorn a
Python path to a subclass of ``gunicorn.workers.base.Worker``.
This alternative syntax will load the gevent class:
``gunicorn.workers.ggevent.GeventWorker``. Alternatively, the syntax
can also load the gevent class with ``egg:gunicorn#gevent``.
"""
class WorkerThreads(Setting):
@ -592,8 +590,8 @@ class WorkerThreads(Setting):
Run each worker with the specified number of threads.
A positive integer generally in the 2-4 x $(NUM_CORES) range. You'll
want to vary this a bit to find the best for your particular
A positive integer generally in the ``2-4 x $(NUM_CORES)`` range.
You'll want to vary this a bit to find the best for your particular
application's work load.
If it is not defined, the default is 1.
@ -644,7 +642,7 @@ class MaxRequestsJitter(Setting):
type = int
default = 0
desc = """\
The maximum jitter to add to the max-requests setting.
The maximum jitter to add to the *max_requests* setting.
The jitter causes the restart per worker to be randomized by
``randint(0, max_requests_jitter)``. This is intended to stagger worker
@ -740,7 +738,7 @@ class LimitRequestFields(Setting):
Limit the number of HTTP headers fields in a request.
This parameter is used to limit the number of headers in a request to
prevent DDOS attack. Used with the `limit_request_field_size` it allows
prevent DDOS attack. Used with the *limit_request_field_size* it allows
more safety. By default this value is 100 and can't be larger than
32768.
"""
@ -921,8 +919,8 @@ class User(Setting):
Switch worker processes to run as this user.
A valid user id (as an integer) or the name of a user that can be
retrieved with a call to pwd.getpwnam(value) or None to not change
the worker process user.
retrieved with a call to ``pwd.getpwnam(value)`` or ``None`` to not
change the worker process user.
"""
@ -937,8 +935,8 @@ class Group(Setting):
Switch worker process to run as this group.
A valid group id (as an integer) or the name of a user that can be
retrieved with a call to pwd.getgrnam(value) or None to not change
the worker processes group.
retrieved with a call to ``pwd.getgrnam(value)`` or ``None`` to not
change the worker processes group.
"""
@ -955,9 +953,10 @@ class Umask(Setting):
Note that this affects unix socket permissions.
A valid value for the os.umask(mode) call or a string compatible with
int(value, 0) (0 means Python guesses the base, so values like "0",
"0xFF", "0022" are valid for decimal, hex, and octal representations)
A valid value for the ``os.umask(mode)`` call or a string compatible
with ``int(value, 0)`` (``0`` means Python guesses the base, so values
like ``0``, ``0xFF``, ``0022`` are valid for decimal, hex, and octal
representations)
"""
@ -990,8 +989,8 @@ class SecureSchemeHeader(Setting):
desc = """\
A dictionary containing headers and values that the front-end proxy
uses to indicate HTTPS requests. These tell gunicorn to set
wsgi.url_scheme to "https", so your application can tell that the
uses to indicate HTTPS requests. These tell Gunicorn to set
``wsgi.url_scheme`` to ``https``, so your application can tell that the
request is secure.
The dictionary should map upper-case header names to exact string
@ -1015,7 +1014,7 @@ class ForwardedAllowIPS(Setting):
Front-end's IPs from which allowed to handle set secure headers.
(comma separate).
Set to "*" to disable checking of Front-end IPs (useful for setups
Set to ``*`` to disable checking of Front-end IPs (useful for setups
where you don't know in advance the IP address of Front-end, but
you still trust the environment)
"""
@ -1031,7 +1030,7 @@ class AccessLog(Setting):
desc = """\
The Access log file to write to.
"-" means log to stderr.
``'-'`` means log to stderr.
"""
@ -1049,12 +1048,12 @@ class AccessLogFormat(Setting):
Identifier Description
========== ===========
h remote address
l '-'
u currently '-', may be user name in future releases
l ``'-'``
u currently ``'-'``, may be user name in future releases
t date of the request
r status line (e.g. ``GET / HTTP/1.1``)
s status
b response length or '-'
b response length or ``'-'``
f referer
a user agent
T request time in seconds
@ -1077,10 +1076,10 @@ class ErrorLog(Setting):
desc = """\
The Error log file to write to.
"-" means log to stderr.
``'-'`` means log to stderr.
.. versionchanged:: 19.2
Log to ``stderr`` by default.
Log to stderr by default.
"""
@ -1113,15 +1112,15 @@ class LoggerClass(Setting):
validator = validate_class
default = "gunicorn.glogging.Logger"
desc = """\
The logger you want to use to log events in gunicorn.
The logger you want to use to log events in Gunicorn.
The default class (``gunicorn.glogging.Logger``) handle most of
normal usages in logging. It provides error and access logging.
You can provide your own worker by giving gunicorn a
python path to a subclass like gunicorn.glogging.Logger.
You can provide your own worker by giving Gunicorn a
Python path to a subclass like ``gunicorn.glogging.Logger``.
Alternatively the syntax can also load the Logger class
with `egg:gunicorn#simple`
with ``egg:gunicorn#simple``.
"""
@ -1160,11 +1159,11 @@ class SyslogTo(Setting):
Address is a string of the form:
* 'unix://PATH#TYPE' : for unix domain socket. TYPE can be 'stream'
for the stream driver or 'dgram' for the dgram driver.
'stream' is the default.
* 'udp://HOST:PORT' : for UDP sockets
* 'tcp://HOST:PORT' : for TCP sockets
* ``unix://PATH#TYPE`` : for unix domain socket. ``TYPE`` can be ``stream``
for the stream driver or ``dgram`` for the dgram driver.
``stream`` is the default.
* ``udp://HOST:PORT`` : for UDP sockets
* ``tcp://HOST:PORT`` : for TCP sockets
"""
@ -1189,10 +1188,10 @@ class SyslogPrefix(Setting):
validator = validate_string
default = None
desc = """\
Makes gunicorn use the parameter as program-name in the syslog entries.
Makes Gunicorn use the parameter as program-name in the syslog entries.
All entries will be prefixed by gunicorn.<prefix>. By default the program
name is the name of the process.
All entries will be prefixed by ``gunicorn.<prefix>``. By default the
program name is the name of the process.
"""
@ -1220,7 +1219,7 @@ class EnableStdioInheritance(Setting):
Enable inheritance for stdio file descriptors in daemon mode.
Note: To disable the python stdout buffering, you can to set the user
Note: To disable the Python stdout buffering, you can to set the user
environment variable ``PYTHONUNBUFFERED`` .
"""
@ -1269,7 +1268,7 @@ class Procname(Setting):
name to tell them apart. This requires that you install the setproctitle
module.
It defaults to 'gunicorn'.
If not set, the *default_proc_name* setting will be used.
"""
@ -1293,10 +1292,10 @@ class DjangoSettings(Setting):
desc = """\
The Python path to a Django settings module. (deprecated)
e.g. 'myproject.settings.main'. If this isn't provided, the
DJANGO_SETTINGS_MODULE environment variable will be used.
e.g. ``myproject.settings.main``. If this isn't provided, the
``DJANGO_SETTINGS_MODULE`` environment variable will be used.
**DEPRECATED**: use the --env argument instead.
**DEPRECATED**: use the ``--env`` argument instead.
"""
@ -1311,7 +1310,7 @@ class PythonPath(Setting):
A comma-separated list of directories to add to the Python path.
e.g.
'/home/djangoprojects/myproject,/home/python/mylibrary'.
``'/home/djangoprojects/myproject,/home/python/mylibrary'``.
"""
@ -1323,9 +1322,9 @@ class Paste(Setting):
validator = validate_string
default = None
desc = """\
Load a paste.deploy config file. The argument may contain a "#" symbol
followed by the name of an app section from the config file, e.g.
"production.ini#admin".
Load a PasteDeploy config file. The argument may contain a ``#``
symbol followed by the name of an app section from the config file,
e.g. ``production.ini#admin``.
At this time, using alternate server blocks is not supported. Use the
command line arguments to control server configuration instead.
@ -1546,13 +1545,13 @@ class NumWorkersChanged(Setting):
pass
default = staticmethod(nworkers_changed)
desc = """\
Called just after num_workers has been changed.
Called just after *num_workers* has been changed.
The callable needs to accept an instance variable of the Arbiter and
two integers of number of workers after and before change.
If the number of workers is set for the first time, old_value would be
None.
If the number of workers is set for the first time, *old_value* would
be ``None``.
"""
class OnExit(Setting):
@ -1565,7 +1564,7 @@ class OnExit(Setting):
default = staticmethod(on_exit)
desc = """\
Called just before exiting gunicorn.
Called just before exiting Gunicorn.
The callable needs to accept a single instance variable for the Arbiter.
"""
@ -1581,8 +1580,8 @@ class ProxyProtocol(Setting):
desc = """\
Enable detect PROXY protocol (PROXY mode).
Allow using Http and Proxy together. It may be useful for work with
stunnel as https frontend and gunicorn as http server.
Allow using HTTP and Proxy together. It may be useful for work with
stunnel as HTTPS frontend and Gunicorn as HTTP server.
PROXY protocol: http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt
@ -1606,7 +1605,7 @@ class ProxyAllowFrom(Setting):
desc = """\
Front-end's IPs from which allowed accept proxy requests (comma separate).
Set to "*" to disable checking of Front-end IPs (useful for setups
Set to ``*`` to disable checking of Front-end IPs (useful for setups
where you don't know in advance the IP address of Front-end, but
you still trust the environment)
"""
@ -1614,7 +1613,7 @@ class ProxyAllowFrom(Setting):
class KeyFile(Setting):
name = "keyfile"
section = "Ssl"
section = "SSL"
cli = ["--keyfile"]
meta = "FILE"
validator = validate_string
@ -1626,7 +1625,7 @@ class KeyFile(Setting):
class CertFile(Setting):
name = "certfile"
section = "Ssl"
section = "SSL"
cli = ["--certfile"]
meta = "FILE"
validator = validate_string
@ -1637,7 +1636,7 @@ class CertFile(Setting):
class SSLVersion(Setting):
name = "ssl_version"
section = "Ssl"
section = "SSL"
cli = ["--ssl-version"]
validator = validate_pos_int
default = ssl.PROTOCOL_TLSv1
@ -1647,7 +1646,7 @@ class SSLVersion(Setting):
class CertReqs(Setting):
name = "cert_reqs"
section = "Ssl"
section = "SSL"
cli = ["--cert-reqs"]
validator = validate_pos_int
default = ssl.CERT_NONE
@ -1657,7 +1656,7 @@ class CertReqs(Setting):
class CACerts(Setting):
name = "ca_certs"
section = "Ssl"
section = "SSL"
cli = ["--ca-certs"]
meta = "FILE"
validator = validate_string
@ -1668,7 +1667,7 @@ class CACerts(Setting):
class SuppressRaggedEOFs(Setting):
name = "suppress_ragged_eofs"
section = "Ssl"
section = "SSL"
cli = ["--suppress-ragged-eofs"]
action = "store_true"
default = True
@ -1679,7 +1678,7 @@ class SuppressRaggedEOFs(Setting):
class DoHandshakeOnConnect(Setting):
name = "do_handshake_on_connect"
section = "Ssl"
section = "SSL"
cli = ["--do-handshake-on-connect"]
validator = validate_bool
action = "store_true"
@ -1691,7 +1690,7 @@ class DoHandshakeOnConnect(Setting):
if sys.version_info >= (2, 7):
class Ciphers(Setting):
name = "ciphers"
section = "Ssl"
section = "SSL"
cli = ["--ciphers"]
validator = validate_string
default = 'TLSv1'

View File

@ -20,7 +20,7 @@ ssl = pytest.importorskip('ssl')
def test_keyfile():
assert issubclass(KeyFile, Setting)
assert KeyFile.name == 'keyfile'
assert KeyFile.section == 'Ssl'
assert KeyFile.section == 'SSL'
assert KeyFile.cli == ['--keyfile']
assert KeyFile.meta == 'FILE'
assert KeyFile.default is None
@ -29,7 +29,7 @@ def test_keyfile():
def test_certfile():
assert issubclass(CertFile, Setting)
assert CertFile.name == 'certfile'
assert CertFile.section == 'Ssl'
assert CertFile.section == 'SSL'
assert CertFile.cli == ['--certfile']
assert CertFile.default is None
@ -37,7 +37,7 @@ def test_certfile():
def test_ssl_version():
assert issubclass(SSLVersion, Setting)
assert SSLVersion.name == 'ssl_version'
assert SSLVersion.section == 'Ssl'
assert SSLVersion.section == 'SSL'
assert SSLVersion.cli == ['--ssl-version']
assert SSLVersion.default == ssl.PROTOCOL_TLSv1
@ -45,7 +45,7 @@ def test_ssl_version():
def test_cacerts():
assert issubclass(CACerts, Setting)
assert CACerts.name == 'ca_certs'
assert CACerts.section == 'Ssl'
assert CACerts.section == 'SSL'
assert CACerts.cli == ['--ca-certs']
assert CACerts.meta == 'FILE'
assert CACerts.default is None
@ -54,7 +54,7 @@ def test_cacerts():
def test_suppress_ragged_eofs():
assert issubclass(SuppressRaggedEOFs, Setting)
assert SuppressRaggedEOFs.name == 'suppress_ragged_eofs'
assert SuppressRaggedEOFs.section == 'Ssl'
assert SuppressRaggedEOFs.section == 'SSL'
assert SuppressRaggedEOFs.cli == ['--suppress-ragged-eofs']
assert SuppressRaggedEOFs.action == 'store_true'
assert SuppressRaggedEOFs.default is True
@ -63,7 +63,7 @@ def test_suppress_ragged_eofs():
def test_do_handshake_on_connect():
assert issubclass(DoHandshakeOnConnect, Setting)
assert DoHandshakeOnConnect.name == 'do_handshake_on_connect'
assert DoHandshakeOnConnect.section == 'Ssl'
assert DoHandshakeOnConnect.section == 'SSL'
assert DoHandshakeOnConnect.cli == ['--do-handshake-on-connect']
assert DoHandshakeOnConnect.action == 'store_true'
assert DoHandshakeOnConnect.default is False
@ -76,6 +76,6 @@ def test_ciphers():
assert issubclass(Ciphers, Setting)
assert Ciphers.name == 'ciphers'
assert Ciphers.section == 'Ssl'
assert Ciphers.section == 'SSL'
assert Ciphers.cli == ['--ciphers']
assert Ciphers.default == 'TLSv1'