chisel 1.5.0__tar.gz → 1.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chisel
3
- Version: 1.5.0
3
+ Version: 1.6.0
4
4
  Summary: Lightweight WSGI application framework, schema-validated JSON APIs, and API documentation
5
5
  Home-page: https://github.com/craigahobbs/chisel
6
6
  Author: Craig A. Hobbs
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = chisel
3
- version = 1.5.0
3
+ version = 1.6.0
4
4
  url = https://github.com/craigahobbs/chisel
5
5
  author = Craig A. Hobbs
6
6
  author_email = craigahobbs@gmail.com
@@ -337,7 +337,7 @@ class Action(Request):
337
337
  raise _ActionErrorInternal(HTTPStatus.INTERNAL_SERVER_ERROR, 'UnexpectedError')
338
338
 
339
339
  # Validate the response
340
- if validate_output and ctx.app.validate_output:
340
+ if not self.wsgi_response and validate_output and ctx.app.validate_output:
341
341
  try:
342
342
  validate_type(output_types, output_type, response)
343
343
  except ValidationError as exc:
@@ -6,7 +6,6 @@ Chisel documentation application
6
6
  """
7
7
 
8
8
  import importlib.resources
9
- import os
10
9
  from pathlib import PurePosixPath
11
10
  import tarfile
12
11
 
@@ -67,19 +66,11 @@ def create_doc_requests(requests=None, root_path='/doc', api=True, app=True, mar
67
66
  yield StaticRequest(
68
67
  member.name,
69
68
  tar.extractfile(member).read(),
70
- content_type=_CONTENT_TYPES.get(os.path.splitext(member.name)[1], 'text/plain; charset=utf-8'),
71
69
  urls=(('GET', str(parent_posix.joinpath(member.name))),),
72
70
  doc_group='MarkdownUp Statics'
73
71
  )
74
72
 
75
73
 
76
- _CONTENT_TYPES = {
77
- '.css': 'text/css; charset=utf-8',
78
- '.js': 'text/javascript; charset=utf-8',
79
- '.html': 'text/html; charset=utf-8'
80
- }
81
-
82
-
83
74
  class DocIndex(Action):
84
75
  """
85
76
  The documentation index API. This API provides all the information the documentation application needs to render the
@@ -128,7 +128,7 @@ class RedirectRequest(Request):
128
128
  if name is None:
129
129
  name = re.sub(r'([^\w]|_)+', '_', f'redirect_{redirect_url}').rstrip('_')
130
130
  if doc is None:
131
- doc = f'Redirect to {redirect_url}'
131
+ doc = (f'Redirect to {redirect_url}',)
132
132
  super().__init__(name=name, urls=urls, doc=doc, doc_group=doc_group)
133
133
  status = HTTPStatus.MOVED_PERMANENTLY if permanent else HTTPStatus.FOUND
134
134
  self.status = f'{status.value} {status.phrase}'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chisel
3
- Version: 1.5.0
3
+ Version: 1.6.0
4
4
  Summary: Lightweight WSGI application framework, schema-validated JSON APIs, and API documentation
5
5
  Home-page: https://github.com/craigahobbs/chisel
6
6
  Author: Craig A. Hobbs
File without changes
File without changes
File without changes
File without changes
File without changes