Dave Shawley
e9e5f25925
Move metadata from setup.py into setup.cfg.
2021-09-16 09:49:42 -04:00
Dave Shawley
f6f84bdd2c
3.0.4: Reject invalid Content-Type headers.
2020-11-02 09:21:08 -05:00
Dave Shawley
21c6cb73fe
Invalid content-type --> 400 Bad Request.
...
ietfparse raises a `ValueError` from `parse_content_type` which was
uncaught and resulted in an internal server error.
2020-10-29 13:50:33 -04:00
Dave Shawley
5755792959
3.0.3: Preparing for Python 3.9.
2020-09-14 08:10:20 -04:00
Andrew Rabert
f7683262f8
Use non-deprecated collections.abc
...
See https://docs.python.org/3.9/whatsnew/3.9.html#you-should-check-for-deprecationwarning-in-your-code
2020-07-14 10:04:30 -04:00
Dave Shawley
3dadd00c64
Metadata bumps for 3.0.2.
2020-05-04 16:55:22 -04:00
amberheilman
0b54131f65
Change log level on decode failure log
...
Don't print tracebacks when failing to decode the body.
2020-05-04 16:46:51 -04:00
Gavin M. Roy
03aeb58f8d
Ignore flake8 errors since it has to pass now
2019-03-05 09:41:19 -05:00
Gavin M. Roy
7da331464b
Support Tornado 6, remove setuptools_scm
2019-03-05 09:32:00 -05:00
Andrew Rabert
1a300dea34
Rename to match package name
2018-12-04 23:24:06 -05:00
Andrew Rabert
4a52d18f41
Remove deprecated method
2018-12-04 23:08:31 -05:00
Andrew Rabert
c54501a7f4
Remove redundant web.url
2018-12-04 23:08:05 -05:00
Andrew Rabert
5c7cebc6b7
Address flake8 concerns
2018-11-30 13:09:03 -05:00
Andrew Rabert
30c87225c0
Support ietfparse 1.5.1
...
ietfparse 1.5.1 broke sprockets.mixins.media_type as it introduced the
splitting of content suffix from content subtype. This commit fixes
that.
2018-11-30 11:58:43 -05:00
Andrew Rabert
2fe2480dbf
Fix docs
2018-11-28 18:22:39 -05:00
Andrew Rabert
00b87a43cf
Use setuptools_scm
...
This allows us to remove the ImportError hack from __init__.py.
It also simplifies how the package is versioned - deriving it solely
from the repository tag.
Both version_info and __version__ have been removed with this change.
Given how these are a unofficial-standard at best, I've found it safer to
always use pkg_resources to determine the version when I need to.
2018-11-28 13:15:54 -05:00
Andrew Rabert
a28633aef5
Address flake8 complaints
2018-11-28 11:50:43 -05:00
Andrew Rabert
fd3f8b3008
Python 3 updates
...
- Simplify super()
- Remove object inheritance
- Simplify package namespacing
- Remove BinaryWrapper
- Remove python 2 code paths
2018-11-28 11:50:40 -05:00
Andrew Rabert
b2e980d04d
Update docs
...
- Update and isoldate doc dependencies
- Simplify sphinx config
- Treat warnings as errors
- Remove redundant self.finish() from examples
2018-11-28 11:28:18 -05:00
Andrew Rabert
4f187f80c1
Release version 2.2.2
2018-08-07 15:52:59 -04:00
Dave Shawley
5b74e20542
Metadata updates for 2.2.1.
2018-04-12 07:13:42 -04:00
Andrew Rabert
c15f6d8eec
Merge pull request #15 from dave-shawley/release/2.2.0
...
Metadata bumps for 2.2.0.
2018-01-24 15:46:52 -05: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
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
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
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
Dave Shawley
d571209e38
Remove _mark_deprecated wrapper.
2016-02-29 14:35:07 -05:00
Dave Shawley
baf643e3ef
Metadata bumps for 2.0.0.
2016-02-24 14:47:39 -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
3eecbad5c5
content.ContentSettings: Fix AttributeError in __setitem__.
...
Code coverage FTW!
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
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
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
Amber Heilman
6353f4f47f
bump to 1.0.3
2015-09-10 11:33:39 -04:00