9 Commits

Author SHA1 Message Date
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
Masashi SHIBATA
c435341e66 Remove fallback for types.SimpleNamespace (#2049) 2019-05-28 16:05:51 +03:00
Berker Peksag
76eaa0805b Fix various warnings and errors reported by pylint 2018-01-11 09:59:31 +03:00
Juan Julián Merelo Guervós
6ba2ebe545 Make "failed to find application" more informative (#1648)
Co-Authored-By: Luis Liñán Villafranca <luislivilla@gmail.com>

Fixes #1647
2017-11-24 10:42:03 +03:00
Berker Peksag
b64c7fa305 Add # noqa to a false-positive for unused-import warning 2017-07-12 18:07:16 +03:00
Saeed Gharedaghi
ab444eed50 change __dict__ to vars function
Back gunicorn/argparse_compat.py gunicorn/six.py files changes

Back run_gunicorn.py file changes
2017-01-11 23:07:20 +03:00
Berker Peksag
882e00f6b5 Use types.SimpleNamespace where appropriate. 2015-07-03 07:40:32 +03:00
Sungho Ryu
53a4ea556f Added missing import for platform in tests/support.py for os x. 2014-11-24 14:58:31 +01:00
Berker Peksag
bf3ef8f389 Add selectors module to gunicorn codebase.
Closes #886.
2014-10-16 15:44:10 +03:00