1566 Commits

Author SHA1 Message Date
dblack
96dde54af1 optional datadog tags for statsd metrics 2019-04-27 18:49:47 -07:00
Brett Randall
879651bb6f Header values are encoded using latin-1, not ascii.
This commit reverts one aspect changed by 5f4ebd2eb2b08783a5fbefe79d09fcb3fc1fbc73 (#1151);
header-values are again encoded as latin-1 and not ascii. Test is restored but uses
a latin-1-mappable test-character, not a general utf8 character.

Fixed #1778.

Signed-off-by: Brett Randall <javabrett@gmail.com>
2019-04-18 04:23:19 +03:00
Randall Leeds
cc8e67ea83 Fix new pylint errors 2019-03-16 16:11:23 -07:00
Hasan Ramezani
2b07f2be28 Rewrite parse_address util and add one test 2019-03-16 15:07:53 -07:00
Marat
a8963ef1a5 Remove redundant super() arguments 2019-03-16 15:00:07 -07:00
Andrew Widdersheim
a2a8bc1ae6 Move ThreadPoolExecutor() creation into own method
Move ThreadPoolExecutor() creation into it's own method so it is easier
to override when subclassing.
2019-02-21 09:28:47 -08:00
Andrew Widdersheim
5680320e5c Simplify futures import
Commits e974f305 and 78208c8c removed support for Python 2 and Python
<3.4 respectively so the conditional logic for importing
`concurrent.futures` is no longer necessary as it has been part of the
standard library since Python 3.2.
2019-02-20 05:57:49 +03:00
Benoit Chesneau
7ed20f6833 corretly set max_requests
fix #1978
2019-02-07 17:04:15 +01:00
Benoit Chesneau
194f47f92b
Merge pull request #1957 from benoitc/simplify-paste-integrations
Simplify Paste Deployment integration
2019-02-06 09:17:28 +01:00
Randall Leeds
9f87c88819 Bump minimum Eventlet and Gevent versions (#1962)
Update the Eventlet and Gevent worker classes to check for versions of
Eventlet and Gevent that are stable under Python 3 and remove outdated
compatibility code.
2019-01-25 08:24:14 +01:00
Benoit Chesneau
97a45805f8
remove gaiohttp worker (#1971)
* remove gaiohttp worker

worker is deprecated and won't work on latest version.
2019-01-24 23:05:28 +01:00
Daniel Pope
2ea5fbdc86 Use Python's default SSL cipher list by default (#1970) 2019-01-24 22:41:04 +01:00
Randall Leeds
61e136b922 Simplify Paste Deployment integration
Remove the `gunicorn_paster` command. With the `--paste` option to the
`gunicorn` command, Gunicorn will no longer read the server section of
the configuration. Instead, server configuration must be done with
Gunicorn configuration files, command line switches, and environment
variables.

The use of Gunicorn as a Paste Deployment server factory is no longer
deprecated. It allows specifying `host` and `port`, as well as `bind`,
but is otherwise more strict with options than in the past. Rather than
ignoring unknown options it will raise an error.

Close #1189
2019-01-22 03:58:03 -08:00
fangfei
6da84c614d Fix root logging
root and logger are same level. https://docs.python.org/2/library/logging.config.html#dictionary-schema-details
2019-01-21 22:51:55 -08:00
Brett Randall
c85bfba8b2 Fixed typo in ssl_version doc, TLSv2 -> TLSv1_2 (TLS 1.2). (#1959)
* Fixed typo in ssl_version doc, TLSv2 -> TLSv1_2 (TLS 1.2).

Signed-off-by: Brett Randall <javabrett@gmail.com>

* revert chdir change
2019-01-22 00:03:38 +01:00
Дамјан Георгиевски
9184ae8898 add systemd sd_notify support (#1897)
* add systemd sd_notify support

roughly based on sd_notify() from systemd and https://github.com/bb4242/sdnotify

only implements `READY=1` and `STATUS=Gunicorn arbiter booted` of the
protocol in the arbiter. in the future, reloads can be notified, and
possibly also other statuses.

see https://www.freedesktop.org/software/systemd/man/sd_notify.html for
more info

sd_notify() is a noop when not run in a systemd service (i.e
NOTIFY_SOCKET environment variable is not set)
2019-01-11 04:41:09 +01:00
Pengpeng Zuo
ad1afe7b79 Fix typo in gthread.py 2018-12-23 12:11:36 +03:00
Niklas B
33025cf610 tornado 5 support (#1918)
tornado 5 support by keeping track of the periodic callbacks
2018-12-09 10:23:56 +01:00
Florian Apolloner
ee7af1247b Added support to --bind to open file descriptors (#1809)
Fixes #1107
2018-11-16 20:21:13 +03:00
Berker Peksag
c66957bbe9 Add support for named constants in the --ssl-version flag
Fixes #1114

Co-Authored-By: Brett Randall <javabrett@gmail.com>
Signed-off-by: Brett Randall <javabrett@gmail.com>
2018-10-31 14:43:40 +03:00
Ron DuPlain
e5c11e8f8a Clarify log format usage of header & environment (#1907) 2018-10-28 23:38:51 +03:00
Konstantin vz'One Enchant
927fb2ba02 Prevent removal unix socket for reuse_port (#1887)
If you have two (or more) instances of gunicorn that use `reuse-port`
and bind to single unix socket all work until one of gunicorn will
stopped. Because the first stopped removes unix socket file and other
instances can't longer process requests.
2018-10-02 13:25:35 +02:00
Ryan Lopopolo
eae3ef05f3 Fix ResourceWarning when reading a Python config module (#1889)
The raw open call in execfile_() did not close the file handle.
2018-10-02 09:53:26 +03:00
Konstantin Enchant
df8290d153
Revert "Prevent removal unix socket for reuse_port"
This reverts commit af7f158d224c9925e3315ee216c07adc09c64b61.
2018-10-01 14:29:25 +03:00
Konstantin vz'One Enchant
af7f158d22
Prevent removal unix socket for reuse_port
If you have two (or more) instances of gunicorn that use `reuse-port` and bind to single unix socket all work until one of gunicorn will stopped. Because the first stopped removes unix socket file and other instances can't longer process requests.
2018-10-01 12:52:03 +03:00
刘金俭
59bf81cb58 Remove unnecessary call to dict keys method 2018-09-24 10:31:28 -07:00
Randall Leeds
e179dc2575 Support str and bytes for UNIX socket addresses (#1882)
Some systems report UNIX socket addresses as bytes while others will
report it as a unicode string type. This patch improves socket type
detection code to support both.

Fix #1861
2018-09-24 08:57:53 +02:00
Pritam Baral
30554fdb4f InotifyReloader: Handle module.__file__ is None
0f527a01f4 added a fix for the case when some modules have the `__file__` attr set to `None`, for the polling reloader. Unfortunately, it missed making the same fix for the inotify reloader.

This change copies that fix into InotifyReloader
2018-09-17 11:24:17 -07:00
Benoit Chesneau
91974f0f44 Merge branch 'pr-1724' 2018-09-04 12:19:30 +02:00
Michael Bishop
ec3c1dbd94 Fix typo in --max-requests documentation (#1845) 2018-08-01 21:47:57 +03:00
Hugo
e974f30517 Drop support for Python 2
Co-Authored-By: Dustin Ingram <di@users.noreply.github.com>
Co-Authored-By: Berker Peksag <berker.peksag@gmail.com>
2018-08-01 15:31:17 +03:00
Hugo
78208c8c32 Drop support for EOL Python 3.2 and 3.3 (#1839) 2018-07-29 14:07:36 +03:00
7
cdd147841a Clear tornado ioloop before os.fork (#1831) 2018-07-21 13:38:04 -07:00
7
7d0787cd1a Fix linting for Pylint 2.0 (#1833)
Closes #1832
2018-07-18 19:33:09 +03:00
Randall Leeds
29f0394cdd Release version 19.9.0 2018-07-03 13:09:09 -07:00
Randall Leeds
bd833e0009
Merge pull request #1796 from diegoholiveira/1795-rename-async-module
1795 rename async module
2018-06-17 13:22:31 -07:00
Justin Turner Arthur
d21310351f Optimize by precompiling regex and using tuple for iterable copies. 2018-06-17 09:51:48 +03:00
Diego Oliveira
557b91964c Merge branch 'master' into 1795-rename-async-module 2018-06-12 18:16:31 -03:00
Berker Peksag
21f0adc346
Fix AttributeError when --reload was not passed (#1806)
Fixes #1805
2018-06-11 22:04:08 +03:00
Diego Oliveira
d338fe16f8 Fix comment about python version 2018-06-09 10:36:46 -03:00
Diego Oliveira
5a82e7c068 Change _async to base_async 2018-05-26 17:11:33 -03:00
Diego Oliveira
43e31c366b Fix gaiohttp worker 2018-05-26 10:42:15 -03:00
Diego Oliveira
0a88d19ddf Move the module async to _async 2018-05-26 10:22:42 -03:00
Fotis Gimian
5ee2ede35c Ensured that default logging streams are prefixed with ext:// so they work correctly 2018-05-24 14:58:27 +10:00
Yun Xu
0af5641117 fixing zero bytes case in atoms access log 2018-05-18 13:15:03 -07:00
Berker Peksag
473ac62a2b Revert "Add test and update documentation"
This reverts commit eab1256052d7446359fb6f65279f9bebd18fafd4.
2018-05-06 18:10:53 +03:00
Berker Peksag
9320811f32 Fix markup in --log-syslog docs 2018-05-06 18:09:33 +03:00
Berker Peksag
eab1256052 Add test and update documentation 2018-05-06 18:05:54 +03:00
Rudolph Froger
d48b600239 Fix AttributeError when --log-syslog is passed (#1773)
Config option `disable_access_log_redirection` does not exist.
This was introduced in 7dc9003dff149e29c0af4d409060d34f9a7775fa.

Fixes #1768
2018-05-06 18:04:40 +03:00
Christian Kreuzberger
f2b8b687e2 Fix for #1755: Decode remote addr if it is a byte 2018-05-02 11:52:34 +02:00