Skip to content

Commit

Permalink
Fix #2072 #2067: Document connector_owner parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Jul 25, 2017
1 parent 8e76a4a commit 0d9abc9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions changes/2072.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Document `connector_owner` parameter.
16 changes: 11 additions & 5 deletions docs/client_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ The client session supports the context manager protocol for self closing.

.. class:: ClientSession(*, connector=None, loop=None, cookies=None, \
headers=None, skip_auto_headers=None, \
auth=None, json_serialize=func:`json.dumps`, \
auth=None, json_serialize=json.dumps, \
version=aiohttp.HttpVersion11, \
cookie_jar=None, read_timeout=None, \
conn_timeout=None, \
raise_for_status=False)
raise_for_status=False, \
connector_owner=True)

The class for creating client sessions and making requests.

Expand Down Expand Up @@ -127,10 +128,15 @@ The client session supports the context manager protocol for self closing.
:param float conn_timeout: timeout for connection establishing
(optional). Values ``0`` or ``None`` mean no timeout.

.. versionchanged:: 1.0
:param bool connector_owner:

``.cookies`` attribute was dropped. Use :attr:`cookie_jar`
instead.
Close connector instance on session closing.

Passing ``connector_owner=False`` to constructor allows to share
connection pool between sessions without sharing session state:
cookies etc.

.. versionadded:: 2.1

.. attribute:: closed

Expand Down

0 comments on commit 0d9abc9

Please sign in to comment.