Commit graph

63 commits

Author SHA1 Message Date
Dave Shawley
46d0326954 2.1.1: Fix testing with on stop methods. 2020-02-19 10:14:08 -05:00
Dave Shawley
e81c4cefb4 Use loop-specific create_task in Application.stop.
Calling asyncio.create_task() requires a running event loop which we
cannot guarantee.  The event loop is not running when stop is called in
the testing.SprocketsHttpTestCase.
2020-02-19 06:37:58 -05:00
Dave Shawley
fd67c42a6a Release 2.1.0 2019-10-09 11:05:19 -04:00
Dave Shawley
e6ef43c050 Deprecate calling run without a logging config. 2019-09-03 07:29:20 -04:00
Dave Shawley
cd478d0a3d Add sprockets.http.testing 2019-09-02 08:09:34 -04:00
Dave Shawley
7991f99807 Make shutdown timings configurable. 2019-09-02 08:01:09 -04:00
Gavin M. Roy
33e4ceb704 Change pinning of Tornado to include Tornado 6 2019-03-05 14:17:31 -05:00
Andrew Rabert
d2c0d4a43d Release version 2.0.0 2018-11-27 17:33:28 -05:00
Andrew Rabert
a981861bf1 Use python 3 super 2018-11-26 19:24:30 -05:00
Andrew Rabert
11bc7079c0 Remove explicit object inheritance 2018-11-26 19:03:37 -05:00
Andrew Rabert
234fb6d479 Support only tornado>=5.0
- Drop support for all versions of tornado prior to 5.0. This negates
the need for version-aware conditionals that previous existed.
- Update tox to test Tornado 5.0 and the unpinned latest version.
2018-11-26 19:03:37 -05:00
Andrew Rabert
74aaf7bf01 Add support for Tornado >= 5 2018-11-26 19:03:21 -05:00
Dave Shawley
3321987dfc Runner: remove logging from signal handler.
It turns out that logging.Logger SHOULD NOT be used in signal handlers.
We are running into this elsewhere in the system so that is absolutely
no reason to risk it here.

ref: https://docs.python.org/3/library/logging.html#thread-safety
2018-03-15 07:34:09 -04:00
Gavin M. Roy
1868d40e63 Bump the version, license year 2018-01-29 11:27:56 -05:00
Dave Shawley
473f2f2de0 Install flake8 for development. 2018-01-29 07:18:58 -05:00
Dave Shawley
fb909088d9 Enable reuse_port option to HTTPServer.bind.
This makes solutions that restart the process (e.g., envconsul) work
properly.  Without port reuse, you will get a very unpleasant "port
already in use" when the service restarts.

This requires Tornado >= 4.4
2018-01-28 14:32:41 -05:00
Brian Korty
a3e7836acd Metadata bumps for 1.4.2. 2018-01-25 09:36:49 -05:00
Brian Korty
4109dd3885 Support max_body_size and max_buffer_size.
Allow max_body_size and max_buffer_size settings to be passed into the
underlying Tornado HTTPServer to override the default settings.
2018-01-24 20:07:12 -05:00
Dave Shawley
e7106c6c71 Metadata bumps for 1.4.1. 2018-01-03 13:44:32 -05:00
Dave Shawley
677e0ba6c0 Metadata bumps for 1.4.0 2016-11-03 07:53:04 -04:00
Dave Shawley
53f30b9476 Update user-land docs. 2016-11-03 07:52:53 -04:00
Dave Shawley
d7370ab5e6 Rename CallbackManager.run to start.
It was too easy to confuse this with Runner.run
2016-11-03 07:43:23 -04:00
Dave Shawley
531b796559 Add sprockets.http.app module.
This module separates out the application state management from the
mechanics of running the application.  The former is destined for a
sub-class of tornado.web.Application (as app.Application) and the
latter remains in sprockets.http.runner.
2016-11-01 22:01:27 -04:00
Gavin M. Roy
22a33b13ae Include correlation-id in the structured log data when logging. 2016-09-20 16:44:45 -04:00
Gavin M. Roy
a2c31f31eb Include environment and service in the structured log data 2016-09-19 10:02:46 -04:00
Gavin M. Roy
957ce4c4a5 Update for structured syslog output when non-debug 2016-09-16 15:45:23 -04:00
Gavin M. Roy
f1b9cdc195 Change non-debug logging to be structured for rsyslog parsing from docker 2016-09-16 15:22:31 -04:00
Gavin M. Roy
bb4c7e20a5 Import logging.config 2016-08-29 16:15:56 -04:00
Gavin M. Roy
03b3f9d0d5 Remove the hook on startup and sprockets.logging 2016-08-29 16:12:51 -04:00
Gavin M. Roy
ae85b3bc89 Ready 1.3.0 2016-08-29 15:10:14 -04:00
Gavin M. Roy
a056a05d78 Update the logging to remove JSON logging 2016-08-29 15:07:01 -04:00
Dave Shawley
140da0e79e - Fix sprockets namespace packaging. 2016-07-31 21:15:28 -04:00
Dave Shawley
160a3c70dd Appease flake8. 2016-06-13 23:23:46 -04:00
Dave Shawley
2f263b0997 Add `httprun` distutils command. 2016-06-13 23:23:17 -04:00
Gavin M. Roy
d17c668f83 Add async shutdown support an on_start callbacks 2016-03-10 17:10:31 -05:00
Kelly O'Brien
19951ec297 bump version 1.1.1 --> 1.1.2 2016-02-23 13:49:59 -05:00
Kelly O'Brien
ddafcc240b document headers feature 2016-02-23 13:33:55 -05:00
Kelly O'Brien
0f819f2313 Allow xheaders to be passed in the settings
This will tell Tornado to use headers like X-Real-IP to get the user’s IP address instead of attributing all traffic to the lbl’s IP address.
2016-02-23 11:39:52 -05:00
Dave Shawley
f3bfb0bd28 Delay grabbing the IOLoop until after fork. 2016-02-15 13:01:16 -05:00
Dave Shawley
4278f513bb Release 1.1.0 2016-02-11 14:45:09 -05:00
Dave Shawley
03e85b440c Call sys.exit() when a before_run callback raises an exception. 2016-01-28 07:53:01 -05:00
Dave Shawley
a1ba8874f6 Add support for `before_run` callbacks. 2016-01-27 18:24:02 -05:00
Dave Shawley
92ca0bf70e Add log_config parameter to sprockets.http.run. 2015-12-10 10:48:25 -05:00
Dave Shawley
2d043ff752 Move _get_logging_config into sprockets.http. 2015-12-10 10:44:52 -05:00
Dave Shawley
557989399c Move logging.config.dictConfig into http.run. 2015-12-10 10:41:59 -05:00
Gavin M. Roy
f028723e45 Use mediatype.ContentMixin if its also extended 2015-11-20 14:14:39 -05:00
Dave Shawley
12d2855bd7 Bumps for 1.0.0. 2015-11-20 08:26:27 -05:00
Dave Shawley
a7c8d95847 ErrorWriter: Add support for format_traceback. 2015-11-20 07:25:05 -05:00
Dave Shawley
cdb655be1e Add sprockets.http.mixins.ErrorWriter. 2015-11-19 17:29:07 -05:00
Dave Shawley
702c0a112f Add support for log_message kwarg. 2015-11-19 11:51:34 -05:00