Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ccc7baf

Browse filesBrowse files
authored
Small fix for documentation on using SSL in Connection (#995)
The sample code shows asyncio.run(run()), but the function to be run is named "main()". So this sample does not run.
1 parent 313b2b2 commit ccc7baf
Copy full SHA for ccc7baf

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎asyncpg/connection.py‎

Copy file name to clipboardExpand all lines: asyncpg/connection.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,7 +2041,7 @@ async def connect(dsn=None, *,
20412041
... )
20422042
... con = await asyncpg.connect(user='postgres', ssl=sslctx)
20432043
... await con.close()
2044-
>>> asyncio.run(run())
2044+
>>> asyncio.run(main())
20452045
20462046
Example of programmatic SSL context configuration that is equivalent
20472047
to ``sslmode=require`` (no server certificate or host verification):
@@ -2058,7 +2058,7 @@ async def connect(dsn=None, *,
20582058
... sslctx.verify_mode = ssl.CERT_NONE
20592059
... con = await asyncpg.connect(user='postgres', ssl=sslctx)
20602060
... await con.close()
2061-
>>> asyncio.run(run())
2061+
>>> asyncio.run(main())
20622062
20632063
:param bool direct_tls:
20642064
Pass ``True`` to skip PostgreSQL STARTTLS mode and perform a direct

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.