Open ancc opened 3 weeks ago
Thanks for reporting the issue. I was able to replicate and correct it. I have initated a build from which you can download pre-built wheels once it completes. You can also build from source if you prefer.
Note the wheels are from the in-flight development code line - they haven't been through a full regression cycle.
Tested, works!
2.4.1
Give your database version. 19.11.0.0.0
Also run Python and show the output of:
platform.platform: Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.28 sys.maxsize > 2**32: True platform.python_version: 3.9.5
And:
oracledb.version: 2.4.1
Is it an error or a hang or a crash? error
What error(s) or behavior you are seeing? Creating custom Connection class is not used by connectionpool when specifying externalauth=False Tried also creating custom ConnectionPool and passing in connectiontype still not using custom Connection class.
Does your application call init_oracle_client()?
yes
This tells us whether you are using the python-oracledb Thin or Thick mode.
thick
class Connection(oracledb.Connection): def myfunc(self): print('myfunc')
trying also with custom ConnectionPool
class ConnectionPool(oracledb.ConnectionPool): def init(self, *args, *kwargs): kw = kwargs.copy() kw['connectiontype'] = Connection super().init(args, **kw)
pool = oracledb.create_pool(dsn='test', homogeneous=False, externalauth=False, connectiontype=Connection, pool_class=ConnectionPool) con = pool.acquire(user='dev', password='dev') con.myfunc()
Traceback (most recent call last): File "/tmp/pool-test.py", line 18, in
con.myfunc()
AttributeError: 'Connection' object has no attribute 'myfunc'