Skip to content

Commit

Permalink
Merge pull request #140 from oracle/dev/v1.7.4
Browse files Browse the repository at this point in the history
v1.7.4 changes
  • Loading branch information
aosingh authored Apr 19, 2024
2 parents b616c26 + ae18d7e commit c6f7e3a
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 69 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/oracle-xe-adapter-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
38 changes: 0 additions & 38 deletions THIRD_PARTY_LICENSES.txt
Original file line number Diff line number Diff line change
@@ -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
===============

Expand Down
2 changes: 1 addition & 1 deletion dbt/adapters/oracle/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
10 changes: 8 additions & 2 deletions dbt/adapters/oracle/connection_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
dbt-core~=1.7,<1.8
cx_Oracle==8.3.0
oracledb==2.1.0
oracledb==2.1.2
5 changes: 2 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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',
Expand Down

0 comments on commit c6f7e3a

Please sign in to comment.