Skip to content

Commit

Permalink
[PR #5743/e78ea414 backport][3.8] Fix broken references in `docs/new_…
Browse files Browse the repository at this point in the history
…router.rst` (#5768)

(cherry picked from commit e78ea41)

Co-authored-by: Olexiy Pohorely <[email protected]>
  • Loading branch information
patchback[bot] and l1storez authored Jun 6, 2021
1 parent f00b481 commit d8c30c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/new_router.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ User still may use wildcard for accepting all HTTP methods (maybe we
will add something like ``resource.add_wildcard(handler)`` later).

Since **names** belongs to **resources** now ``app.router['name']``
returns a **resource** instance instead of :class:`aiohttp.web.Route`.
returns a **resource** instance instead of :class:`aiohttp.web.AbstractRoute`.

**resource** has ``.url()`` method, so
``app.router['name'].url(parts={'a': 'b'}, query={'arg': 'param'})``
Expand All @@ -65,8 +65,8 @@ The refactoring is 99% compatible with previous implementation.
99% means all example and the most of current code works without
modifications but we have subtle API backward incompatibles.

``app.router['name']`` returns a :class:`aiohttp.web.BaseResource`
instance instead of :class:`aiohttp.web.Route` but resource has the
``app.router['name']`` returns a :class:`aiohttp.web.AbstractResource`
instance instead of :class:`aiohttp.web.AbstractRoute` but resource has the
same ``resource.url(...)`` most useful method, so end user should feel no
difference.

Expand All @@ -81,4 +81,4 @@ shortcut for::
return route

``app.router.register_route(...)`` is still supported, it creates
:class:`aiohttp.web.ResourceAdapter` for every call (but it's deprecated now).
``aiohttp.web.ResourceAdapter`` for every call (but it's deprecated now).

0 comments on commit d8c30c2

Please sign in to comment.