@@ -800,7 +800,7 @@ async def copy_from_table(self, table_name, *, output,
800800 ... output='file.csv', format='csv')
801801 ... print(result)
802802 ...
803- >>> asyncio.get_event_loop().run_until_complete (run())
803+ >>> asyncio.run (run())
804804 'COPY 100'
805805
806806 .. _`COPY statement documentation`:
@@ -869,7 +869,7 @@ async def copy_from_query(self, query, *args, output,
869869 ... output='file.csv', format='csv')
870870 ... print(result)
871871 ...
872- >>> asyncio.get_event_loop().run_until_complete (run())
872+ >>> asyncio.run (run())
873873 'COPY 10'
874874
875875 .. _`COPY statement documentation`:
@@ -945,7 +945,7 @@ async def copy_to_table(self, table_name, *, source,
945945 ... 'mytable', source='datafile.tbl')
946946 ... print(result)
947947 ...
948- >>> asyncio.get_event_loop().run_until_complete (run())
948+ >>> asyncio.run (run())
949949 'COPY 140000'
950950
951951 .. _`COPY statement documentation`:
@@ -1027,7 +1027,7 @@ async def copy_records_to_table(self, table_name, *, records,
10271027 ... (2, 'ham', 'spam')])
10281028 ... print(result)
10291029 ...
1030- >>> asyncio.get_event_loop().run_until_complete (run())
1030+ >>> asyncio.run (run())
10311031 'COPY 2'
10321032
10331033 Asynchronous record iterables are also supported:
@@ -1045,7 +1045,7 @@ async def copy_records_to_table(self, table_name, *, records,
10451045 ... 'mytable', records=record_gen(100))
10461046 ... print(result)
10471047 ...
1048- >>> asyncio.get_event_loop().run_until_complete (run())
1048+ >>> asyncio.run (run())
10491049 'COPY 100'
10501050
10511051 .. versionadded:: 0.11.0
@@ -1305,7 +1305,7 @@ async def set_type_codec(self, typename, *,
13051305 ... print(result)
13061306 ... print(datetime.datetime(2002, 1, 1) + result)
13071307 ...
1308- >>> asyncio.get_event_loop().run_until_complete (run())
1308+ >>> asyncio.run (run())
13091309 relativedelta(years=+2, months=+3, days=+1)
13101310 2004-04-02 00:00:00
13111311
@@ -1772,7 +1772,7 @@ async def reload_schema_state(self):
17721772 ... await con.execute('LOCK TABLE tbl')
17731773 ... await change_type(con)
17741774 ...
1775- >>> asyncio.get_event_loop().run_until_complete (run())
1775+ >>> asyncio.run (run())
17761776
17771777 .. versionadded:: 0.14.0
17781778 """
@@ -2258,7 +2258,7 @@ async def connect(dsn=None, *,
22582258 ... types = await con.fetch('SELECT * FROM pg_type')
22592259 ... print(types)
22602260 ...
2261- >>> asyncio.get_event_loop().run_until_complete (run())
2261+ >>> asyncio.run (run())
22622262 [<Record typname='bool' typnamespace=11 ...
22632263
22642264 .. versionadded:: 0.10.0
0 commit comments