2747 Commits

Author SHA1 Message Date
benoitc
8b64aaedd5 changelog for the 20.0.3 2019-11-25 23:05:10 +01:00
benoitc
b4e52c181a make config doc more explicit
explicit what we mean by "not need to be importable".
2019-11-25 22:44:25 +01:00
benoitc
9a3e008eca put back configuration file without py extension and deprecate it
this change put back (and fix it) support of configuration files without
ython extension and warn about its usage.
2019-11-25 22:44:25 +01:00
benoitc
9538358511 config file extension should be a python extension
This change make it clear what is configuration file for Gunicorn.
Using a filename with an extension different than a python extension
was never supported. Also it gives us some room for a proper config file.
2019-11-25 22:44:25 +01:00
benoitc
9419d66096 refactor module
use appropriate naming for function, make _getsockname more generic and
doc more useful
2019-11-25 17:45:35 +01:00
benoitc
d38f6e47ea fix linting on python 3.8 2019-11-25 17:45:35 +01:00
benoitc
e69e802053 socketfromfd: fix cross platform usage
on osx and maybe some other systems, SO_PROTOCOL is not set, also
the socket family is not detected correctly.

This patch remove default values in socketfromfd and do the following:
* detect proper family using getsockname instead of getsocktopt
* if no type is given, default to SOCK_STREAM (we don't have any other type)
* if no protocol is given, default to 0 and let the system take care of it.
2019-11-25 17:45:35 +01:00
benoitc
404a712023 socketfromfd: remove python 2 compatibility 2019-11-25 17:45:35 +01:00
Randall Leeds
20774b8331 Remove support for bdist_rpm 2019-11-24 17:44:47 +01:00
benoitc
ceca7c849c bump website version 2019-11-23 11:42:32 +01:00
benoitc
911f7057ef bump to 20.0.2
fix changelog
2019-11-23 11:40:42 +01:00
benoitc
83bfe9e737 fix typo 2019-11-23 11:29:23 +01:00
benoitc
a4803a48a6 fix 19.10 version in doc 2019-11-23 11:25:44 +01:00
benoitc
333dc9bb4d fix doc title 2019-11-23 11:18:09 +01:00
benoitc
e3659e8adc document 20.0.1 change 2019-11-23 10:39:04 +01:00
benoitc
ef7d10853d add 19.9.10 changelog 2019-11-23 10:16:51 +01:00
benoitc
455767b96a remove useless import in app.base 2019-11-22 23:03:30 +01:00
benoitc
0752ccd5df remove Python 3.4 testing in travis 2019-11-22 23:03:30 +01:00
benoitc
ad4ff8cb3c modernize the way the config module is loaded
This change load the module  as suggested in the Python docs : https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly which add the `__file__` attribute back and others possibly missing.

This change remove the support of python 3.4
2019-11-22 23:03:30 +01:00
benoitc
441977f57c only support python >= 3.5
python 3.4 is unsupported and we should focus on offering stable
features than backporting some code to this version
2019-11-22 23:03:30 +01:00
ThePrez
4d3ec28046 fix IBM i 'missing libc' failure (#2195)
allow gunicorn on IBM i (and AIX) platform with Python 3.6 and earlier
2019-11-22 22:14:35 +01:00
Aaron Wilson
291483dd39 Add a __repr__ to config to include its value (#2076)
It's sometimes helpful to be able to trivially dump all the config values
for debugging purposes. This commit defines a repr for that.
2019-11-22 21:39:45 +01:00
benoitc
1aa9cf0529 fix faq
correct the versions when we changed logging to the console.
2019-11-22 21:12:03 +01:00
Randall Leeds
c25563fa95 Add Paste Deploy changes to Breaking Change list 2019-11-22 09:58:06 -08:00
benoitc
b01fe34e56 use hight protocol version of openssl by default 2019-11-22 15:34:07 +01:00
benoitc
f9ade3af34 unblock select loop during reload of a sync worker
When reloading the worker canbe in the select loop and it will wait until timeout before handling any change. So make sure to wake up the loop before going further.
2019-11-22 14:10:49 +01:00
benoitc
8a270c9329 wsgi.input_terminated is always true
As spotted by @tilgovi Gunicorn always ensure the reader terminate. So set wsgi.input_terminated to true to signal it to the application.
2019-11-21 18:13:55 +01:00
benoitc
0d8a022791 Revert "fix wsgi.input_terminated"
This reverts commit 265e58f9e82f64e003015fb25823f5a983be8c27.
2019-11-21 18:11:17 +01:00
Benoit Chesneau
e150ca4ff8
add "*.so.*" case to util.find_lib
The actual libc name in musl is: libc.musl-x86_64.so.1 this case should handle it.
2019-11-21 11:53:13 +01:00
benoitc
499dcd4021 add a simple example to test module path 2019-11-21 10:18:07 +01:00
Benoit Chesneau
56e4a6cd7f
Merge pull request #2187 from benoitc/fix-2160
fix gunicorn when used with musl libc
2019-11-21 09:52:09 +01:00
Benoit Chesneau
46b6556a68
Merge pull request #2188 from benoitc/fix-input_terminated
fix wsgi.input_terminated
2019-11-21 09:51:24 +01:00
benoitc
265e58f9e8 fix wsgi.input_terminated
Sometimes both TRANSFER-ENCODING=chunked and CONTENT_LENGTH are set. Since gunicorn prioritise (following the HTTP1.1 spec) chunked encoding we should make sure in this case to signal to th application that the input is terminated by the server.

Without the change gunicorn were always setting wsg.input_terminated to False when a CONTENT_LENGTH header was present ignoring that Gunicorn was afaik handling the termination.
2019-11-20 23:07:14 +01:00
Benoit Chesneau
8d854ba8cd
Merge pull request #2134 from talham7391/2133-delay-reload
Start the reloader after the wsgi app has been loaded.
2019-11-20 22:30:05 +01:00
benoitc
d55c7cb015 fix lib discovery
LD_LIBRARY_PATH is sometimes empty, this change fix it.
Also test suffix with the "." as it seems to be an issue
2019-11-20 21:41:05 +01:00
benoitc
b8860ef615 fix gunicorn when used with musl libc
find_library('c') doesn't work in Alpine Linux. This happen because musl has a simpler implementation of libc.

This patch fix it by extending ctypes.util.find_library to search the libs using LD_LIBRARY_PATH.

Patch is based on e3f67780aa

See also https://bugs.python.org/issue21622

fix #2160
2019-11-20 21:40:58 +01:00
Benoit Chesneau
c5be1bae5c
Merge pull request #2181 from Sytten/fix/http-desync
Fix/http desync
2019-11-20 21:28:18 +01:00
Emile Fugulin
be513237cc Add syttent to THANKS 2019-11-20 12:57:46 -05:00
Emile Fugulin
ddf5e66ac8 Remove strict check of Transfer-Encoding 2019-11-20 12:25:39 -05:00
Gaige B Paulsen
4264e09c6f fix fromfd on solaris
This patches the fromfd code in socketfromfd by grabbing the correct symbol under SmartOS (SunOS).

The patch is pretty straightforward, basically switching on the OS to determine what the symbol is likely to be. If need be, I could put a try block around the original libc.getsockopt and then fall back to looking for _so_getsockopt, if that's preferred in this codebase

fix #2184
2019-11-20 07:09:43 +01:00
David Lord
19cb68f4c3 load application from factory function (#2178)
* load application from factory function

Use `ast.parse` to validate that the string passed to the CLI is either
an attribute name or a function call. Use `ast.literal_eval` to parse
any positional and keyword arguments to the function. Call the function
to get the real application.

Co-authored-by: Connor Brinton <connor.brinton@gmail.com>

* test coverage for util.import_app

* document app factory pattern
2019-11-19 23:09:53 +01:00
Emile Fugulin
f74324bd75 Handle multiple transfer-encoding 2019-11-18 22:29:02 -05:00
Emile Fugulin
bd8670b4db Handle duplicate content-length 2019-11-18 21:16:12 -05:00
Emile Fugulin
b798412444 Remove default strip of header name 2019-11-18 19:44:01 -05:00
Jason Madden
94ab209117
Merge pull request #2172 from benoitc/issue1925
Capture os.sendfile before patching in gevent and eventlet workers.
2019-11-13 13:14:55 -06:00
Jason Madden
902d9c89ab
Capture os.sendfile before patching in gevent and eventlet workers.
Fixes #1925 and fixes #2170.
2019-11-13 07:08:26 -06:00
Benoit Chesneau
438371ee90 fix doc version 2019-11-09 10:53:44 +01:00
Benoit Chesneau
a05a447e76
Change maintainers (#2147)
changes maintainers to shows who is active on the project as of today.
2019-10-30 18:11:31 +01:00
Benoit Chesneau
c1f17a084e doc enhancements. 2019-10-30 17:52:01 +01:00
Benoit Chesneau
83e07e5cf3 Fixed linting error in changelog 2019-10-30 17:40:35 +01:00