Repository: oracle/dbt-oracle (language: python)

Issue:
[Feature] Remove dependency to Microsoft Visual C++ 14.0 
### Describe the Feature

Hello,
I work in enterprise environment without privileged access. I can install "oracledb" package without privileged account
`python -m pip install oracledb`

However, when installing dbt-oracle, it needs Microsoft Visual C++ 14.0 and thus it needs privileged access. 
`python -m pip install dbt-oracle`

Moreover, it says  `building 'cx_Oracle' extension` - does it mean that dbt-oracle is still referencing old package, not the new one oracledb

So I don't understand, why oracledb package is installing fine, but dbt-oracle fails, even though under the hood, it fails on the same python package.

### Describe alternatives you've considered

None

### Who will this benefit?

Everyone without privileged access on Windows 11.

### Anything else?

Adding versions:
`
(dbt-env) C:\Users\BG3828\mlu_repos_personal\dbt_demo>dbt --version
Core:
 installed: 1.7.11
`

`
(dbt-env) C:\Users\BG3828\mlu_repos_personal\dbt_demo>python --version
Python 3.11.5
`


Discussion / hints:
@scanbix 

Originally dbt-oracle was built using `cx_Oracle`. We support both `cx_Oracle` and `oracledb` for users to be able to migrate smoothly. By default, dbt-oracle uses `oracledb`. 

We plan to remove `cx_Oracle` from dependency requirement. 

if you have `oracledb` installed try installing dbt-oracle in the following manner:

```
python -m pip install dbt-core==1.7.11
python -m pip install --no-dependencies dbt-oracle
```

This should avoid `cx_Oracle`



Fix patch:
diff --git a/Makefile b/Makefile
index bd7cb70..c0629a0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 # Configuration variables
-VERSION=1.7.3
+VERSION=1.7.4
 PROJ_DIR?=$(shell pwd)
 VENV_DIR?=${PROJ_DIR}/.bldenv
 BUILD_DIR=${PROJ_DIR}/build
diff --git a/THIRD_PARTY_LICENSES.txt b/THIRD_PARTY_LICENSES.txt
index dd10ec0..82ec776 100644
--- a/THIRD_PARTY_LICENSES.txt
+++ b/THIRD_PARTY_LICENSES.txt
@@ -1,44 +1,6 @@
 Third Party Dependencies:
 =========================
 
-cx-Oracle
-===============
-LICENSE AGREEMENT FOR CX_ORACLE
-
-Copyright 2016, 2018, Oracle and/or its affiliates. All rights reserved.
-
-Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
-
-Portions Copyright 2001-2007, Computronix (Canada) Ltd., Edmonton, Alberta,
-Canada. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-   list of conditions, and the disclaimer that follows.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions, and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
-
-3. Neither the names of the copyright holders nor the names of any contributors
-   may be used to endorse or promote products derived from this software
-   without specific prior written permission.
-
-DISCLAIMER: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-*AS IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Computronix is a registered trademark of Computronix (Canada) Ltd.
-
 dataclasses
 ===============
 
diff --git a/dbt/adapters/oracle/__version__.py b/dbt/adapters/oracle/__version__.py
index a3b49f5..b94a73e 100644
--- a/dbt/adapters/oracle/__version__.py
+++ b/dbt/adapters/oracle/__version__.py
@@ -14,4 +14,4 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 """
-version = "1.7.10"
+version = "1.7.11"
diff --git a/dbt/adapters/oracle/connection_helper.py b/dbt/adapters/oracle/connection_helper.py
index f0ab427..758459a 100644
--- a/dbt/adapters/oracle/connection_helper.py
+++ b/dbt/adapters/oracle/connection_helper.py
@@ -104,16 +104,22 @@ class OracleDriverType(str, enum.Enum):
 if ORA_PYTHON_DRIVER_TYPE == OracleDriverType.CX_ORACLE:
     logger.info("Running in cx mode")
     description = (
-        f"cx_oracle is no longer maintained, use python-oracledb"
+        f"cx_oracle is no longer supported, use python-oracledb"
         f"\n\nTo switch to python-oracledb set the environment variable ORA_PYTHON_DRIVER_TYPE=thin "
         f"\n\nStarting with dbt-oracle version 1.7, default value of ORA_PYTHON_DRIVER_TYPE is thin"
+        f"\n\ncx_oracle is removed from dependencies list of dbt-oracle"
+        f"\n\nIf you need to use dbt-oracle in CX mode, you can install it using the command: pip install cx_Oracle"
         f"\n\nRead the guideline here: "
         f"https://docs.getdbt.com/reference/warehouse-setups/oracle-setup#configure-the-python-driver-mode"
         f"\n\nDocumentation for python-oracledb can be found here: "
         f"https://oracle.github.io/python-oracledb/"
     )
     logger.warning(warning_tag(red(description)))
-    import cx_Oracle as oracledb
+    try:
+        import cx_Oracle as oracledb
+    except ModuleNotFoundError:
+        logger.warning(yellow("Please install cx_Oracle using command: pip install cx_Oracle"))
+        raise
 elif ORA_PYTHON_DRIVER_TYPE == OracleDriverType.THICK:
     import oracledb
     logger.info("Running in thick mode")
diff --git a/requirements.txt b/requirements.txt
index cd6be84..a0ec6af 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,2 @@
 dbt-core~=1.7,<1.8
-cx_Oracle==8.3.0
-oracledb==2.1.0
+oracledb==2.1.2
diff --git a/setup.cfg b/setup.cfg
index ef80d22..5a8ef0c 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
 [metadata]
 name = dbt-oracle
-version = 1.7.3
+version = 1.7.4
 description = dbt (data build tool) adapter for Oracle Autonomous Database
 long_description = file: README.md
 long_description_content_type = text/markdown
@@ -34,8 +34,7 @@ packages = find_namespace:
 include_package_data = True
 install_requires =
     dbt-core~=1.7,<1.8
-    cx_Oracle==8.3.0
-    oracledb==2.1.0
+    oracledb==2.1.2
 test_suite=tests
 test_requires =
     dbt-tests-adapter~=1.7,<1.8
diff --git a/setup.py b/setup.py
index a061e7f..6dcfb80 100644
--- a/setup.py
+++ b/setup.py
@@ -41,8 +41,7 @@
 
 requirements = [
         "dbt-core~=1.7,<1.8",
-        "cx_Oracle==8.3.0",
-        "oracledb==2.1.0"
+        "oracledb==2.1.2"
 ]
 
 test_requirements = [
@@ -60,7 +59,7 @@
 
 url = 'https://github.com/oracle/dbt-oracle'
 
-VERSION = '1.7.3'
+VERSION = '1.7.4'
 setup(
     author="Oracle",
     python_requires='>=3.8',


Test patch:
diff --git a/.github/workflows/oracle-xe-adapter-tests.yml b/.github/workflows/oracle-xe-adapter-tests.yml
index d0bc693..ce1aef9 100644
--- a/.github/workflows/oracle-xe-adapter-tests.yml
+++ b/.github/workflows/oracle-xe-adapter-tests.yml
@@ -56,25 +56,6 @@ jobs:
         run: |
           create-pem-from-p12 --help
 
-      - name: Run adapter tests - ORA_PYTHON_DRIVER_TYPE => CX
-        run: |
-          pytest -v
-        env:
-          ORA_PYTHON_DRIVER_TYPE: CX
-          DBT_ORACLE_USER: DBT_TEST
-          DBT_ORACLE_HOST: localhost
-          DBT_ORACLE_PORT: 1521
-          DBT_ORACLE_SCHEMA: DBT_TEST
-          DBT_ORACLE_PASSWORD: ${{ secrets.DBT_ORACLE_PASSWORD }}
-          DBT_ORACLE_DATABASE: XEPDB1
-          DBT_ORACLE_SERVICE: XEPDB1
-          DBT_ORACLE_PROTOCOL: tcp
-          LD_LIBRARY_PATH: /opt/oracle/instantclient_21_6
-          TNS_ADMIN: /opt/tns_admin
-          DBT_TEST_USER_1: DBT_TEST_USER_1
-          DBT_TEST_USER_2: DBT_TEST_USER_2
-          DBT_TEST_USER_3: DBT_TEST_USER_3
-
       - name: Run adapter tests - ORA_PYTHON_DRIVER_TYPE => THICK
         run: |
           pytest -v