Skip to content

Commit c1c4ef8

Browse files
Added support for using alternative event loop implementations like
uvloop (#276).
1 parent ec700ab commit c1c4ef8

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

doc/src/release_notes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ For deprecations, see :ref:`Deprecations <deprecations>`.
1010
oracledb 2.0.1 (TBD)
1111
--------------------
1212

13+
Thin Mode Changes
14+
+++++++++++++++++
15+
16+
#) Added support for using alternative event loop implementations like uvloop
17+
(`issue 276 <https://github.com/oracle/python-oracledb/issues/276>`__).
18+
1319
Common Changes
1420
++++++++++++++
1521

src/oracledb/impl/thin/protocol.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2020, 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2020, 2024, Oracle and/or its affiliates.
33
#
44
# This software is dual-licensed to you under the Universal Permissive License
55
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@@ -485,6 +485,7 @@ cdef class BaseAsyncProtocol(BaseProtocol):
485485
def __init__(self):
486486
BaseProtocol.__init__(self)
487487
self._request_lock = asyncio.Lock()
488+
self._transport._is_async = True
488489

489490
async def _close(self, AsyncThinConnImpl conn_impl):
490491
"""

src/oracledb/impl/thin/transport.pyx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2023, Oracle and/or its affiliates.
2+
# Copyright (c) 2023, 2024, Oracle and/or its affiliates.
33
#
44
# This software is dual-licensed to you under the Universal Permissive License
55
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@@ -284,7 +284,6 @@ cdef class Transport:
284284
Sets the transport from a socket.
285285
"""
286286
cdef object sock
287-
self._is_async = isinstance(transport, asyncio.Transport)
288287
if self._is_async:
289288
sock = transport.get_extra_info('socket')
290289
else:

src/oracledb/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -----------------------------------------------------------------------------
2-
# Copyright (c) 2021, 2023, Oracle and/or its affiliates.
2+
# Copyright (c) 2021, 2024, Oracle and/or its affiliates.
33
#
44
# This software is dual-licensed to you under the Universal Permissive License
55
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@@ -30,4 +30,4 @@
3030
# file doc/src/conf.py both reference this file directly.
3131
# -----------------------------------------------------------------------------
3232

33-
__version__ = "2.0.0"
33+
__version__ = "2.0.1"

0 commit comments

Comments
 (0)