Skip to content

Commit

Permalink
chore: 2.0.0b2 Release.
Browse files Browse the repository at this point in the history
- Provide default `ACCESS_LOG_FORMAT` for aiohttp apps
- Return `web.Application` from `setup_openapi` function
  • Loading branch information
playpauseandstop committed Dec 19, 2019
1 parent 0cfbd96 commit 837408a
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ version: 2
jobs:
lint:
docker: &py38
- image: playpauseandstop/docker-python:3.0.0b0-py38
- image: playpauseandstop/docker-python:3.0.0-py38
steps:
- checkout
- run: make install
- run: make lint-ci

test36:
docker:
- image: playpauseandstop/docker-python:3.0.0b0-py36
- image: playpauseandstop/docker-python:3.0.0-py36
steps:
- checkout
- run: mkdir -p test-results/pytest
Expand All @@ -26,7 +26,7 @@ jobs:

test37:
docker:
- image: playpauseandstop/docker-python:3.0.0b0-py37
- image: playpauseandstop/docker-python:3.0.0-py37
steps:
- checkout
- run: mkdir -p test-results/pytest
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
2.0.0 (In Development)
----------------------

2.0.0b2 (2019-12-19)
--------------------

- chore: `setup_openapi` function returns `web.Applicaiton` instead of None
- chore: Provide `ACCESS_LOG_FORMAT` for `aiohttp` applications

2.0.0b1 (2019-11-20)
--------------------

- fix: Fix type annotation for `add_resource_context` context manage
- fix: Fix type annotation for `add_resource_context` context manager

2.0.0b0 (2019-11-15)
--------------------
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ line_length = 79

[tool.poetry]
name = "rororo"
version = "2.0.0b1"
version = "2.0.0b2"
description = "OpenAPI 3 schema support for aiohttp.web applications."
authors = ["Igor Davydenko <[email protected]>"]
license = "BSD-3-Clause"
Expand Down
2 changes: 1 addition & 1 deletion rororo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@

__author__ = "Igor Davydenko"
__license__ = "BSD-3-Clause"
__version__ = "2.0.0b1"
__version__ = "2.0.0b2"
4 changes: 4 additions & 0 deletions rororo/aio.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
__all__ = ("add_resource_context", "is_xhr_request", "parse_aioredis_url")


#: Default access log format to use within aiohttp applications
ACCESS_LOG_FORMAT = '%a "%r" %s %b "%{Referer}i" "%{User-Agent}i" %Tf'


class AddResourceFunc(Protocol):
def __call__(
self,
Expand Down
4 changes: 3 additions & 1 deletion rororo/openapi/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def setup_openapi(
route_prefix: str = None,
is_validate_response: bool = False,
has_openapi_schema_handler: bool = True,
) -> None:
) -> web.Application:
"""Setup OpenAPI schema to use with aiohttp.web application.
Unlike `aiohttp-apispec <https://aiohttp-apispec.readthedocs.io/>`_ and
Expand Down Expand Up @@ -225,3 +225,5 @@ def read_schema(path: Path) -> DictStrAny:
add_prefix("/openapi.{schema_format}", route_prefix),
views.openapi_schema,
)

return app
2 changes: 1 addition & 1 deletion tests/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openapi": "3.0.2",
"info": {
"title": "rororo",
"version": "2.0.0b1",
"version": "2.0.0b2",
"contact": {
"name": "Igor Davydenko (developer)",
"url": "https://igordavydenko.com",
Expand Down
2 changes: 1 addition & 1 deletion tests/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: "3.0.2"

info:
title: "rororo"
version: "2.0.0b1"
version: "2.0.0b2"
contact:
name: "Igor Davydenko (developer)"
url: "https://igordavydenko.com"
Expand Down

0 comments on commit 837408a

Please sign in to comment.