You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/08 05:51:26 UTC

[GitHub] [airflow] dungdm93 commented on a diff in pull request #24312: switching from `cx-Oracle` to `oracledb`

dungdm93 commented on code in PR #24312:
URL: https://github.com/apache/airflow/pull/24312#discussion_r891944593


##########
airflow/providers/oracle/hooks/oracle.py:
##########
@@ -119,51 +117,40 @@ def get_conn(self) -> 'OracleHook':
                     dsn += "/" + conn.schema
             conn_config['dsn'] = dsn
 
-        if 'encoding' in conn.extra_dejson:
-            conn_config['encoding'] = conn.extra_dejson.get('encoding')
-            # if `encoding` is specific but `nencoding` is not
-            # `nencoding` should use same values as `encoding` to set encoding, inspired by
-            # https://github.com/oracle/python-cx_Oracle/issues/157#issuecomment-371877993
-            if 'nencoding' not in conn.extra_dejson:
-                conn_config['nencoding'] = conn.extra_dejson.get('encoding')
-        if 'nencoding' in conn.extra_dejson:
-            conn_config['nencoding'] = conn.extra_dejson.get('nencoding')
-        if 'threaded' in conn.extra_dejson:
-            conn_config['threaded'] = conn.extra_dejson.get('threaded')

Review Comment:
   Because those are deprecated and has no effect:
   https://github.com/oracle/python-oracledb/blob/2068d83baba2c18164285e63b9a16e16e5f9b219/src/oracledb/connection.py#L1047-L1050
   
   For `encoding` and `nencoding`, this is always the value "UTF-8".
   https://github.com/oracle/python-oracledb/blob/2068d83baba2c18164285e63b9a16e16e5f9b219/src/oracledb/connection.py#L393



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org