Skip to content

Commit 98aebf1

Browse files
committed
Drop a bit of dead code
The `cache_key` argument to `ConnectionSettings` is unused.
1 parent 11101c6 commit 98aebf1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

asyncpg/protocol/codecs/base.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ cdef uint32_t pylong_as_oid(val) except? 0xFFFFFFFFl:
483483

484484

485485
cdef class DataCodecConfig:
486-
def __init__(self, cache_key):
486+
def __init__(self):
487487
# Codec instance cache for derived types:
488488
# composites, arrays, ranges, domains and their combinations.
489489
self._derived_type_codecs = {}

asyncpg/protocol/protocol.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ class Codec:
222222

223223
class DataCodecConfig:
224224
__pyx_vtable__: Any
225-
def __init__(self, cache_key: object) -> None: ...
225+
def __init__(self) -> None: ...
226226
def add_python_codec(
227227
self,
228228
typeoid: int,

asyncpg/protocol/settings.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ from asyncpg import exceptions
1111
@cython.final
1212
cdef class ConnectionSettings(pgproto.CodecContext):
1313

14-
def __cinit__(self, conn_key):
14+
def __cinit__(self):
1515
self._encoding = 'utf-8'
1616
self._is_utf8 = True
1717
self._settings = {}
1818
self._codec = codecs.lookup('utf-8')
19-
self._data_codecs = DataCodecConfig(conn_key)
19+
self._data_codecs = DataCodecConfig()
2020

2121
cdef add_setting(self, str name, str val):
2222
self._settings[name] = val

0 commit comments

Comments
 (0)