Skip to content

Commit

Permalink
Fix broken references in docs/new_router.rst (#5743)
Browse files Browse the repository at this point in the history
(cherry picked from commit e78ea41)
  • Loading branch information
l1storez authored and Patchback committed Jun 6, 2021
1 parent f00b481 commit 43ff09b
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 43ff09b

Please sign in to comment.