Commit graph

176 commits

Author SHA1 Message Date
dave-shawley
25e0e390f7 Merge pull request #16 from nvllsvm/master
Use ietfparse.headers.parse_accept
2017-06-08 13:22:46 -04:00
Andrew Rabert
d4caccde26 Use ietfparse.headers.parse_accept
Starting with ietfparse 1.3.0, parse_http_accept_header was marked as deprecated.
2017-06-08 13:18:21 -04:00
Dave Shawley
1d00459c2e Metadata bumps for 2.2.0. 2017-06-07 06:45:26 -04:00
Gavin M. Roy
64be643e3a Merge pull request #14 from sprockets/move-negotiation-into-settings
Add functions to install & retrieve ContentSettings from application
2016-04-29 10:58:56 -04:00
Dave Shawley
8bc2f685f6 More CSS refinement.
This commit fixes the weird wrapping that happens with long class and
function names.  I was originally going to address this in a PR against
sphinx before I figured out the specific CSS that cleans things up.
2016-04-17 09:01:08 -04:00
Dave Shawley
263d23a37d Cleanup documentation.
- Remove automatic hyphenation of table headings.
- Widen the document a little.
- Remove some of the padding around code snippets.
- Adjust the sidebar title again...
- Fix history links in the changelog.
2016-04-05 07:49:13 -04:00
Dave Shawley
18e134b6f2 Deprecate ContentSettings.from_application. 2016-04-05 07:47:41 -04:00
Dave Shawley
68fe438894 content: Add install and get_settings functions. 2016-04-05 07:46:57 -04:00
dave-shawley
e46ff55e0f Merge pull request #13 from sprockets/release-2.1.0
Release 2.1.0
2016-03-16 09:24:16 -04:00
Dave Shawley
3e9ad72d63 Metadata bumps for 2.1.0 2016-03-16 09:19:43 -04:00
Dave Shawley
242a0590e6 Prevent meta-class error in top-level imports.
Extended the `ImportError` handling hack to correctly handle the
case where we cannot import submodules AND someone is extending
one of the exported classes.  Previously ContentMixin and
ContentSettings were functions when ImportError was raised which
causes really confusing errors.

The correct solution here is to stop exporting stuff at the top-
level and require clients to import from modules but that is for
another day.
2016-03-16 09:19:04 -04:00
Gavin M. Roy
14f3533517 Merge pull request #12 from sprockets/add-vary
Set the Vary header.
2016-03-14 10:49:44 -04:00
Dave Shawley
a1cc214bbe ContentMixin: Set the Vary header.
This lets any transparent caches that our responses will vary based on
the Accept header.  Without this, caches will assume that a cached
response can be used even if the Accept header differs.
2016-03-13 09:34:32 -04:00
Gavin M. Roy
0c1c757b37 Merge pull request #11 from sprockets/remove-deprecation
Remove _mark_deprecated wrapper.
2016-02-29 14:39:09 -05:00
Dave Shawley
d571209e38 Remove _mark_deprecated wrapper. 2016-02-29 14:35:07 -05:00
dave-shawley
8a381c5fbb Merge pull request #10 from sprockets/release-2
Prepare for release 2.0.0
2016-02-24 14:53:21 -05:00
Dave Shawley
a9e24b7f5b docs/conf.py: Add codecoverage badge. 2016-02-24 14:47:53 -05:00
Dave Shawley
baf643e3ef Metadata bumps for 2.0.0. 2016-02-24 14:47:39 -05:00
Brian Korty
dbf6eccb05 Merge pull request #9 from sprockets/handle-invalid-bodies
Return 400 when body decode fails.
2016-02-24 09:49:01 -05:00
Edward F. Long, Jr
6808585694 Merge pull request #8 from sprockets/add-smart-content-handling
Add pluggable transcoders
2016-02-22 14:50:13 -05:00
Dave Shawley
206e43ee7d ContentMixin: Raise 400 when body decode fails. 2016-02-22 09:58:58 -05:00
Dave Shawley
ee28d54036 Make content-type parameter to add_transcoder optional. 2016-02-01 10:06:46 -05:00
Dave Shawley
36a916a557 add_transcoder: Change parameter order.
This is the first part of making the content type parameter optional
2016-02-01 09:07:56 -05:00
Dave Shawley
f920298c54 Clean up a few documents. 2016-01-31 12:31:35 -05:00
Dave Shawley
ed357d878f Strip charset parameter from text content types. 2016-01-31 12:14:20 -05:00
Dave Shawley
995c715405 Normalize registered content types.
MIME content type strings are normalized by lower-casing the content
type parameters and then sorting them.  Each parameter is preceded by a
space.
2016-01-31 12:11:11 -05:00
Dave Shawley
98e3719a8b MsgPackTranscoder: Add BinaryWrapper override. 2016-01-18 07:58:30 -05:00
Dave Shawley
3a65dea053 MsgPackTranscoder: Handle binary data values. 2016-01-18 07:58:11 -05:00
Dave Shawley
ba3d7cfc84 MsgPackTranscoder: Add support for UUID and datetimes. 2016-01-18 07:58:11 -05:00
Dave Shawley
7d2237745e Add s.m.mediatype.transcoders.MsgPackTranscoder. 2016-01-18 07:58:07 -05:00
Dave Shawley
8a44e527b1 Add explicit tests for handlers.add_*
Adding JSON and msgpack transcoders in the examples will obliviate
testing of the add_binary_content_type and add_text_content_type
functions.
2016-01-16 09:56:38 -05:00
Dave Shawley
3eecbad5c5 content.ContentSettings: Fix AttributeError in __setitem__.
Code coverage FTW!
2016-01-16 09:56:38 -05:00
Dave Shawley
d6493a70e2 tox.ini: Fix skip missing interpreters flag. 2016-01-16 09:56:38 -05:00
Dave Shawley
61713f9f15 JSONTranscoder: Add support for datetime, UUID, and binary types. 2016-01-16 09:56:38 -05:00
Dave Shawley
ee8f645a51 Add sprockets.mixins.mediatype.transcoders.JSONTranscoder. 2016-01-16 09:56:38 -05:00
Dave Shawley
d7f1bb1e4e Add content.add_transcoder. 2016-01-16 09:56:38 -05:00
Dave Shawley
e3294af26c docs: Update links from Python 2 to Python 3. 2016-01-16 09:56:38 -05:00
amberheilman
d215718d4e Merge pull request #7 from sprockets/repackage
Repackage into a package
2016-01-12 15:07:21 -05:00
Dave Shawley
478868d5b4 Remove unused docs/examples.rst. 2016-01-10 13:52:38 -05:00
Dave Shawley
b3126209e1 Happy New Year, the 2016 edition. 2016-01-10 13:52:31 -05:00
Dave Shawley
51dcb9d4f5 Add Python3.5 to test coverage. 2016-01-10 11:37:51 -05:00
Dave Shawley
74ce03a0d5 Update documentation & examples for new packaging. 2016-01-10 11:36:52 -05:00
Dave Shawley
f9cda82f64 Add deprecation warnings for top-level items. 2016-01-10 11:36:52 -05:00
Dave Shawley
ce54332cab Repackage sprockets.mixins.mediatype into a package.
Distributing a raw python module into a namespace package seems to be
somewhat unreliable though I haven't proven it yet...  In any case,
installing a package inside of a namespace package behaves itself.
2016-01-10 11:36:46 -05:00
Dave Shawley
ee26168e25 history.rst: Correct ReST syntax. 2015-11-02 14:25:42 -05:00
Dave Shawley
f47a9b2aba tests: Correct msgpack-related test.
This would fail if you inspected the response body :/
2015-11-02 14:25:36 -05:00
dave-shawley
d60ca0966a Merge pull request #4 from sprockets/add-default-content-type-to-resp
default to the set content type default in settings
2015-09-27 11:32:53 -04:00
Amber Heilman
1a60c4a0f3 bump to 1.0.4 2015-09-14 11:15:29 -04:00
Amber Heilman
212dcb7876 default to the set content type default in settings 2015-09-14 11:13:07 -04:00
dave-shawley
ebf8fe4f6f Merge pull request #3 from sprockets/fix-req-installation
Fix requirements
2015-09-10 11:39:04 -04:00