I ended up not using urllib.parse functions since they do not implement
the specification. The only difference is that the specification
requires that "~" is encoded.
NB - this commit is incomplete since it does not handle calling the
transcoder on simple objects. mypy will quite correctly fail.
If there is no transcoder for the default content type, sending a
response would fail with a "500 Internal Server Error" due to an
*unhandled* KeyError. This commit catches the KeyError and produces
an explicit "500 Internal Server Error" with an appropriate error
message being logged.
If there is no default content type and nothing matches in the Accept
header, previous versions would fail with an Internal Server Error
because of an unhandled exception. Instead we should be returning
a "406 Not Acceptable".
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.
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.
- 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.
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.