From 82685e966d968c518fce87f87aa18dafd0967f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D1=80=D1=82=D1=8B=D0=BD=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 29 Aug 2024 10:22:57 +0000 Subject: [PATCH] Update JDBC & MongoDB packages to latest versions --- docs/changelog/0.12.0.rst | 8 ++++++++ .../db_connection/mongodb/types.rst | 4 ++-- .../db_connection/clickhouse/connection.py | 8 ++++---- .../db_connection/mongodb/connection.py | 14 ++++++------- .../db_connection/mssql/connection.py | 10 +++++----- .../db_connection/mysql/connection.py | 8 ++++---- .../db_connection/oracle/connection.py | 10 +++++----- .../db_connection/postgres/connection.py | 8 ++++---- onetl/file/format/xml.py | 2 +- .../test_clickhouse_unit.py | 6 +++--- .../test_mongodb_unit.py | 18 ++++++++--------- .../test_mssql_unit.py | 20 +++++++++---------- .../test_mysql_unit.py | 6 +++--- .../test_oracle_unit.py | 16 +++++++-------- .../test_postgres_unit.py | 8 ++++---- 15 files changed, 77 insertions(+), 69 deletions(-) diff --git a/docs/changelog/0.12.0.rst b/docs/changelog/0.12.0.rst index dc4f4b83..d0a87cc7 100644 --- a/docs/changelog/0.12.0.rst +++ b/docs/changelog/0.12.0.rst @@ -8,6 +8,14 @@ Breaking Changes * ``smb://host:port`` -> ``smb://host:port/share`` * ``s3://host:port`` -> ``s3://host:port/bucket`` (:github:pull:`304`) +- Update DB connectors/drivers to latest versions: + * Clickhouse ``0.6.0-patch5`` → ``0.6.4`` + * MongoDB ``10.3.0`` → ``10.4.0`` + * MSSQL ``12.6.2`` → ``12.8.1`` + * MySQL ``8.4.0`` → ``9.0.0`` + * Oracle ``23.4.0.24.05`` → ``23.5.0.24.07`` + * Postgres ``42.7.3`` → ``42.7.4`` + - Update ``Excel`` package from ``0.20.3`` to ``0.20.4``, to include Spark 3.5.1 support. (:github:pull:`306`) Features diff --git a/docs/connection/db_connection/mongodb/types.rst b/docs/connection/db_connection/mongodb/types.rst index 4b22b7cb..f701ac93 100644 --- a/docs/connection/db_connection/mongodb/types.rst +++ b/docs/connection/db_connection/mongodb/types.rst @@ -73,8 +73,8 @@ References Here you can find source code with type conversions: -* `MongoDB -> Spark `_ -* `Spark -> MongoDB `_ +* `MongoDB -> Spark `_ +* `Spark -> MongoDB `_ Supported types --------------- diff --git a/onetl/connection/db_connection/clickhouse/connection.py b/onetl/connection/db_connection/clickhouse/connection.py index 21b282b3..fad82942 100644 --- a/onetl/connection/db_connection/clickhouse/connection.py +++ b/onetl/connection/db_connection/clickhouse/connection.py @@ -37,7 +37,7 @@ class Config: class Clickhouse(JDBCConnection): """Clickhouse JDBC connection. |support_hooks| - Based on Maven package `com.clickhouse:clickhouse-jdbc:0.6.0-patch5 `_ + Based on Maven package `com.clickhouse:clickhouse-jdbc:0.6.4 `_ (`official Clickhouse JDBC driver `_). .. seealso:: @@ -139,7 +139,7 @@ def get_packages( Parameters ---------- package_version : str, optional - ClickHouse JDBC version client packages. Defaults to ``0.6.0-patch5``. + ClickHouse JDBC version client packages. Defaults to ``0.6.4``. .. versionadded:: 0.11.0 @@ -158,7 +158,7 @@ def get_packages( Clickhouse.get_packages(package_version="0.6.0", apache_http_client_version="5.3.1") """ - default_jdbc_version = "0.6.0-patch5" + default_jdbc_version = "0.6.4" default_http_version = "5.3.1" jdbc_version = Version(package_version or default_jdbc_version).min_digits(3) @@ -177,7 +177,7 @@ def get_packages( @classproperty def package(self) -> str: """Get a single string of package names to be downloaded by Spark for establishing a Clickhouse connection.""" - return "com.clickhouse:clickhouse-jdbc:0.6.0-patch5,com.clickhouse:clickhouse-http-client:0.6.0-patch5,org.apache.httpcomponents.client5:httpclient5:5.3.1" + return "com.clickhouse:clickhouse-jdbc:0.6.4,com.clickhouse:clickhouse-http-client:0.6.4,org.apache.httpcomponents.client5:httpclient5:5.3.1" @property def jdbc_url(self) -> str: diff --git a/onetl/connection/db_connection/mongodb/connection.py b/onetl/connection/db_connection/mongodb/connection.py index 4cc7e3ed..f406a232 100644 --- a/onetl/connection/db_connection/mongodb/connection.py +++ b/onetl/connection/db_connection/mongodb/connection.py @@ -50,7 +50,7 @@ class Config: class MongoDB(DBConnection): """MongoDB connection. |support_hooks| - Based on package `org.mongodb.spark:mongo-spark-connector:10.3.0 `_ + Based on package `org.mongodb.spark:mongo-spark-connector:10.4.0 `_ (`MongoDB connector for Spark `_) .. seealso:: @@ -153,7 +153,7 @@ def get_packages( Spark version in format ``major.minor``. Used only if ``scala_version=None``. package_version : str, optional - Specifies the version of the MongoDB Spark connector to use. Defaults to ``10.3.0``. + Specifies the version of the MongoDB Spark connector to use. Defaults to ``10.4.0``. .. versionadded:: 0.11.0 @@ -166,10 +166,10 @@ def get_packages( MongoDB.get_packages(scala_version="2.12") # specify custom connector version - MongoDB.get_packages(scala_version="2.12", package_version="10.3.0") + MongoDB.get_packages(scala_version="2.12", package_version="10.4.0") """ - default_package_version = "10.3.0" + default_package_version = "10.4.0" if scala_version: scala_ver = Version(scala_version).min_digits(2) @@ -196,7 +196,7 @@ def package_spark_3_2(cls) -> str: "use `MongoDB.get_packages(spark_version='3.2')` instead" ) warnings.warn(msg, UserWarning, stacklevel=3) - return "org.mongodb.spark:mongo-spark-connector_2.12:10.3.0" + return "org.mongodb.spark:mongo-spark-connector_2.12:10.4.0" @classproperty def package_spark_3_3(cls) -> str: @@ -206,7 +206,7 @@ def package_spark_3_3(cls) -> str: "use `MongoDB.get_packages(spark_version='3.3')` instead" ) warnings.warn(msg, UserWarning, stacklevel=3) - return "org.mongodb.spark:mongo-spark-connector_2.12:10.3.0" + return "org.mongodb.spark:mongo-spark-connector_2.12:10.4.0" @classproperty def package_spark_3_4(cls) -> str: @@ -216,7 +216,7 @@ def package_spark_3_4(cls) -> str: "use `MongoDB.get_packages(spark_version='3.4')` instead" ) warnings.warn(msg, UserWarning, stacklevel=3) - return "org.mongodb.spark:mongo-spark-connector_2.12:10.3.0" + return "org.mongodb.spark:mongo-spark-connector_2.12:10.4.0" @slot def pipeline( diff --git a/onetl/connection/db_connection/mssql/connection.py b/onetl/connection/db_connection/mssql/connection.py index 18a08e32..50235332 100644 --- a/onetl/connection/db_connection/mssql/connection.py +++ b/onetl/connection/db_connection/mssql/connection.py @@ -34,7 +34,7 @@ class Config: class MSSQL(JDBCConnection): """MSSQL JDBC connection. |support_hooks| - Based on Maven package `com.microsoft.sqlserver:mssql-jdbc:12.6.2.jre8 `_ + Based on Maven package `com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre8 `_ (`official MSSQL JDBC driver `_). @@ -205,7 +205,7 @@ def get_packages( java_version : str, optional Java major version, defaults to ``8``. Must be ``8`` or ``11``. package_version : str, optional - Specifies the version of the MSSQL JDBC driver to use. Defaults to ``12.6.2.``. + Specifies the version of the MSSQL JDBC driver to use. Defaults to ``12.8.1.``. Examples -------- @@ -216,10 +216,10 @@ def get_packages( MSSQL.get_packages() # specify Java and package versions - MSSQL.get_packages(java_version="8", package_version="12.6.2.jre11") + MSSQL.get_packages(java_version="8", package_version="12.8.1.jre11") """ default_java_version = "8" - default_package_version = "12.6.2" + default_package_version = "12.8.1" java_ver = Version(java_version or default_java_version) if java_ver.major < 8: @@ -241,7 +241,7 @@ def package(cls) -> str: """Get package name to be downloaded by Spark.""" msg = "`MSSQL.package` will be removed in 1.0.0, use `MSSQL.get_packages()` instead" warnings.warn(msg, UserWarning, stacklevel=3) - return "com.microsoft.sqlserver:mssql-jdbc:12.6.2.jre8" + return "com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre8" @property def jdbc_url(self) -> str: diff --git a/onetl/connection/db_connection/mysql/connection.py b/onetl/connection/db_connection/mysql/connection.py index 15ab2a62..2588d79a 100644 --- a/onetl/connection/db_connection/mysql/connection.py +++ b/onetl/connection/db_connection/mysql/connection.py @@ -36,7 +36,7 @@ class Config: class MySQL(JDBCConnection): """MySQL JDBC connection. |support_hooks| - Based on Maven package `com.mysql:mysql-connector-j:8.4.0 `_ + Based on Maven package `com.mysql:mysql-connector-j:9.0.0 `_ (`official MySQL JDBC driver `_). .. seealso:: @@ -132,7 +132,7 @@ def get_packages(cls, package_version: str | None = None) -> list[str]: Parameters ---------- package_version : str, optional - Specifies the version of the MySQL JDBC driver to use. Defaults to ``8.4.0``. + Specifies the version of the MySQL JDBC driver to use. Defaults to ``9.0.0``. .. versionadded:: 0.11.0 @@ -147,7 +147,7 @@ def get_packages(cls, package_version: str | None = None) -> list[str]: # specify a custom package version MySQL.get_packages(package_version="8.2.0") """ - default_version = "8.4.0" + default_version = "9.0.0" version = Version(package_version or default_version).min_digits(3) return [f"com.mysql:mysql-connector-j:{version}"] @@ -157,7 +157,7 @@ def package(cls) -> str: """Get package name to be downloaded by Spark.""" msg = "`MySQL.package` will be removed in 1.0.0, use `MySQL.get_packages()` instead" warnings.warn(msg, UserWarning, stacklevel=3) - return "com.mysql:mysql-connector-j:8.4.0" + return "com.mysql:mysql-connector-j:9.0.0" @property def jdbc_url(self) -> str: diff --git a/onetl/connection/db_connection/oracle/connection.py b/onetl/connection/db_connection/oracle/connection.py index 96ba9bd7..0d163d22 100644 --- a/onetl/connection/db_connection/oracle/connection.py +++ b/onetl/connection/db_connection/oracle/connection.py @@ -79,7 +79,7 @@ class Config: class Oracle(JDBCConnection): """Oracle JDBC connection. |support_hooks| - Based on Maven package `com.oracle.database.jdbc:ojdbc8:23.4.0.24.05 `_ + Based on Maven package `com.oracle.database.jdbc:ojdbc8:23.5.0.24.07 `_ (`official Oracle JDBC driver `_). .. seealso:: @@ -208,7 +208,7 @@ def get_packages( java_version : str, optional Java major version, defaults to "8". Must be "8" or "11". package_version : str, optional - Specifies the version of the Oracle JDBC driver to use. Defaults to "23.4.0.24.05". + Specifies the version of the Oracle JDBC driver to use. Defaults to "23.5.0.24.07". Examples -------- @@ -220,11 +220,11 @@ def get_packages( Oracle.get_packages() # specify Java and package versions - Oracle.get_packages(java_version="8", package_version="23.4.0.24.05") + Oracle.get_packages(java_version="8", package_version="23.5.0.24.07") """ default_java_version = "8" - default_package_version = "23.4.0.24.05" + default_package_version = "23.5.0.24.07" java_ver = Version(java_version or default_java_version) if java_ver.major < 8: @@ -240,7 +240,7 @@ def package(cls) -> str: """Get package name to be downloaded by Spark.""" msg = "`Oracle.package` will be removed in 1.0.0, use `Oracle.get_packages()` instead" warnings.warn(msg, UserWarning, stacklevel=3) - return "com.oracle.database.jdbc:ojdbc8:23.4.0.24.05" + return "com.oracle.database.jdbc:ojdbc8:23.5.0.24.07" @property def jdbc_url(self) -> str: diff --git a/onetl/connection/db_connection/postgres/connection.py b/onetl/connection/db_connection/postgres/connection.py index ac5e50d1..c8a272ba 100644 --- a/onetl/connection/db_connection/postgres/connection.py +++ b/onetl/connection/db_connection/postgres/connection.py @@ -44,7 +44,7 @@ class Config: class Postgres(JDBCConnection): """PostgreSQL JDBC connection. |support_hooks| - Based on Maven package `org.postgresql:postgresql:42.7.3 `_ + Based on Maven package `org.postgresql:postgresql:42.7.4 `_ (`official Postgres JDBC driver `_). .. seealso:: @@ -140,7 +140,7 @@ def get_packages(cls, package_version: str | None = None) -> list[str]: Parameters ---------- package_version : str, optional - Specifies the version of the PostgreSQL JDBC driver to use. Defaults to ``42.7.3``. + Specifies the version of the PostgreSQL JDBC driver to use. Defaults to ``42.7.4``. Examples -------- @@ -155,7 +155,7 @@ def get_packages(cls, package_version: str | None = None) -> list[str]: Postgres.get_packages(package_version="42.6.0") """ - default_version = "42.7.3" + default_version = "42.7.4" version = Version(package_version or default_version).min_digits(3) return [f"org.postgresql:postgresql:{version}"] @@ -165,7 +165,7 @@ def package(cls) -> str: """Get package name to be downloaded by Spark.""" msg = "`Postgres.package` will be removed in 1.0.0, use `Postgres.get_packages()` instead" warnings.warn(msg, UserWarning, stacklevel=3) - return "org.postgresql:postgresql:42.7.3" + return "org.postgresql:postgresql:42.7.4" @property def jdbc_url(self) -> str: diff --git a/onetl/file/format/xml.py b/onetl/file/format/xml.py index 7946f997..2e1ad003 100644 --- a/onetl/file/format/xml.py +++ b/onetl/file/format/xml.py @@ -200,7 +200,7 @@ def get_packages( # noqa: WPS231 raise ValueError(f"Package version must be above 0.13, got {version}") log.warning("Passed custom package version %r, it is not guaranteed to be supported", package_version) else: - version = Version("0.18.0").min_digits(3) + version = Version("0.18.0") spark_ver = Version(spark_version) scala_ver = Version(scala_version).min_digits(2) if scala_version else get_default_scala_version(spark_ver) diff --git a/tests/tests_unit/tests_db_connection_unit/test_clickhouse_unit.py b/tests/tests_unit/tests_db_connection_unit/test_clickhouse_unit.py index 287061d2..9bf7a068 100644 --- a/tests/tests_unit/tests_db_connection_unit/test_clickhouse_unit.py +++ b/tests/tests_unit/tests_db_connection_unit/test_clickhouse_unit.py @@ -11,7 +11,7 @@ def test_clickhouse_driver(): def test_clickhouse_package(): expected_packages = ( - "com.clickhouse:clickhouse-jdbc:0.6.0-patch5,com.clickhouse:clickhouse-http-client:0.6.0-patch5," + "com.clickhouse:clickhouse-jdbc:0.6.4,com.clickhouse:clickhouse-http-client:0.6.4," "org.apache.httpcomponents.client5:httpclient5:5.3.1" ) assert Clickhouse.package == expected_packages @@ -24,8 +24,8 @@ def test_clickhouse_package(): None, None, [ - "com.clickhouse:clickhouse-jdbc:0.6.0-patch5", - "com.clickhouse:clickhouse-http-client:0.6.0-patch5", + "com.clickhouse:clickhouse-jdbc:0.6.4", + "com.clickhouse:clickhouse-http-client:0.6.4", "org.apache.httpcomponents.client5:httpclient5:5.3.1", ], ), diff --git a/tests/tests_unit/tests_db_connection_unit/test_mongodb_unit.py b/tests/tests_unit/tests_db_connection_unit/test_mongodb_unit.py index 9142848e..4e67f93a 100644 --- a/tests/tests_unit/tests_db_connection_unit/test_mongodb_unit.py +++ b/tests/tests_unit/tests_db_connection_unit/test_mongodb_unit.py @@ -12,9 +12,9 @@ def test_mongodb_package(): warning_msg = re.escape("will be removed in 1.0.0, use `MongoDB.get_packages(spark_version=") with pytest.warns(UserWarning, match=warning_msg): - assert MongoDB.package_spark_3_2 == "org.mongodb.spark:mongo-spark-connector_2.12:10.3.0" - assert MongoDB.package_spark_3_3 == "org.mongodb.spark:mongo-spark-connector_2.12:10.3.0" - assert MongoDB.package_spark_3_4 == "org.mongodb.spark:mongo-spark-connector_2.12:10.3.0" + assert MongoDB.package_spark_3_2 == "org.mongodb.spark:mongo-spark-connector_2.12:10.4.0" + assert MongoDB.package_spark_3_3 == "org.mongodb.spark:mongo-spark-connector_2.12:10.4.0" + assert MongoDB.package_spark_3_4 == "org.mongodb.spark:mongo-spark-connector_2.12:10.4.0" def test_mongodb_get_packages_no_input(): @@ -50,16 +50,16 @@ def test_mongodb_get_packages_scala_version_not_supported(scala_version): @pytest.mark.parametrize( "spark_version, scala_version, package_version, package", [ - (None, "2.12", "10.3.0", "org.mongodb.spark:mongo-spark-connector_2.12:10.3.0"), - (None, "2.13", "10.3.0", "org.mongodb.spark:mongo-spark-connector_2.13:10.3.0"), - ("3.2", None, "10.3.0", "org.mongodb.spark:mongo-spark-connector_2.12:10.3.0"), - ("3.3", None, "10.3.0", "org.mongodb.spark:mongo-spark-connector_2.12:10.3.0"), - ("3.4", None, "10.3.0", "org.mongodb.spark:mongo-spark-connector_2.12:10.3.0"), + (None, "2.12", "10.4.0", "org.mongodb.spark:mongo-spark-connector_2.12:10.4.0"), + (None, "2.13", "10.4.0", "org.mongodb.spark:mongo-spark-connector_2.13:10.4.0"), + ("3.2", None, "10.4.0", "org.mongodb.spark:mongo-spark-connector_2.12:10.4.0"), + ("3.3", None, "10.4.0", "org.mongodb.spark:mongo-spark-connector_2.12:10.4.0"), + ("3.4", None, "10.4.0", "org.mongodb.spark:mongo-spark-connector_2.12:10.4.0"), ("3.2", "2.12", "10.1.1", "org.mongodb.spark:mongo-spark-connector_2.12:10.1.1"), ("3.4", "2.13", "10.1.1", "org.mongodb.spark:mongo-spark-connector_2.13:10.1.1"), ("3.2", "2.12", "10.2.1", "org.mongodb.spark:mongo-spark-connector_2.12:10.2.1"), ("3.2", "2.12", "10.2.0", "org.mongodb.spark:mongo-spark-connector_2.12:10.2.0"), - ("3.2.4", "2.12.1", "10.3.0", "org.mongodb.spark:mongo-spark-connector_2.12:10.3.0"), + ("3.2.4", "2.12.1", "10.4.0", "org.mongodb.spark:mongo-spark-connector_2.12:10.4.0"), ], ) def test_mongodb_get_packages(spark_version, scala_version, package_version, package): diff --git a/tests/tests_unit/tests_db_connection_unit/test_mssql_unit.py b/tests/tests_unit/tests_db_connection_unit/test_mssql_unit.py index d9f3cfda..aedd1990 100644 --- a/tests/tests_unit/tests_db_connection_unit/test_mssql_unit.py +++ b/tests/tests_unit/tests_db_connection_unit/test_mssql_unit.py @@ -14,23 +14,23 @@ def test_mssql_class_attributes(): def test_mssql_package(): warning_msg = re.escape("will be removed in 1.0.0, use `MSSQL.get_packages()` instead") with pytest.warns(UserWarning, match=warning_msg): - assert MSSQL.package == "com.microsoft.sqlserver:mssql-jdbc:12.6.2.jre8" + assert MSSQL.package == "com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre8" @pytest.mark.parametrize( "java_version, package_version, expected_packages", [ - (None, None, ["com.microsoft.sqlserver:mssql-jdbc:12.6.2.jre8"]), - ("8", None, ["com.microsoft.sqlserver:mssql-jdbc:12.6.2.jre8"]), - ("9", None, ["com.microsoft.sqlserver:mssql-jdbc:12.6.2.jre8"]), - ("11", None, ["com.microsoft.sqlserver:mssql-jdbc:12.6.2.jre11"]), - ("20", None, ["com.microsoft.sqlserver:mssql-jdbc:12.6.2.jre11"]), - ("8", "12.6.2.jre8", ["com.microsoft.sqlserver:mssql-jdbc:12.6.2.jre8"]), - ("11", "12.6.2.jre11", ["com.microsoft.sqlserver:mssql-jdbc:12.6.2.jre11"]), + (None, None, ["com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre8"]), + ("8", None, ["com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre8"]), + ("9", None, ["com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre8"]), + ("11", None, ["com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre11"]), + ("20", None, ["com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre11"]), + ("8", "12.8.1.jre8", ["com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre8"]), + ("11", "12.8.1.jre11", ["com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre11"]), ("11", "12.7.0.jre11-preview", ["com.microsoft.sqlserver:mssql-jdbc:12.7.0.jre11-preview"]), ("8", "12.7.0.jre8-preview", ["com.microsoft.sqlserver:mssql-jdbc:12.7.0.jre8-preview"]), - ("8", "12.6.2", ["com.microsoft.sqlserver:mssql-jdbc:12.6.2.jre8"]), - ("11", "12.6.2", ["com.microsoft.sqlserver:mssql-jdbc:12.6.2.jre11"]), + ("8", "12.8.1", ["com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre8"]), + ("11", "12.8.1", ["com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre11"]), ], ) def test_mssql_get_packages(java_version, package_version, expected_packages): diff --git a/tests/tests_unit/tests_db_connection_unit/test_mysql_unit.py b/tests/tests_unit/tests_db_connection_unit/test_mysql_unit.py index 0d57da48..54913c07 100644 --- a/tests/tests_unit/tests_db_connection_unit/test_mysql_unit.py +++ b/tests/tests_unit/tests_db_connection_unit/test_mysql_unit.py @@ -14,14 +14,14 @@ def test_mysql_class_attributes(): def test_mysql_package(): warning_msg = re.escape("will be removed in 1.0.0, use `MySQL.get_packages()` instead") with pytest.warns(UserWarning, match=warning_msg): - assert MySQL.package == "com.mysql:mysql-connector-j:8.4.0" + assert MySQL.package == "com.mysql:mysql-connector-j:9.0.0" @pytest.mark.parametrize( "package_version, expected_packages", [ - (None, ["com.mysql:mysql-connector-j:8.4.0"]), - ("8.4.0", ["com.mysql:mysql-connector-j:8.4.0"]), + (None, ["com.mysql:mysql-connector-j:9.0.0"]), + ("9.0.0", ["com.mysql:mysql-connector-j:9.0.0"]), ("8.1.0", ["com.mysql:mysql-connector-j:8.1.0"]), ("8.0.33", ["com.mysql:mysql-connector-j:8.0.33"]), ], diff --git a/tests/tests_unit/tests_db_connection_unit/test_oracle_unit.py b/tests/tests_unit/tests_db_connection_unit/test_oracle_unit.py index dd02b5c9..d0618c89 100644 --- a/tests/tests_unit/tests_db_connection_unit/test_oracle_unit.py +++ b/tests/tests_unit/tests_db_connection_unit/test_oracle_unit.py @@ -14,11 +14,11 @@ def test_oracle_class_attributes(): def test_oracle_package(): warning_msg = re.escape("will be removed in 1.0.0, use `Oracle.get_packages()` instead") with pytest.warns(UserWarning, match=warning_msg): - assert Oracle.package == "com.oracle.database.jdbc:ojdbc8:23.4.0.24.05" + assert Oracle.package == "com.oracle.database.jdbc:ojdbc8:23.5.0.24.07" def test_oracle_get_packages_no_input(): - assert Oracle.get_packages() == ["com.oracle.database.jdbc:ojdbc8:23.4.0.24.05"] + assert Oracle.get_packages() == ["com.oracle.database.jdbc:ojdbc8:23.5.0.24.07"] @pytest.mark.parametrize("java_version", ["7", "6"]) @@ -30,16 +30,16 @@ def test_oracle_get_packages_java_version_not_supported(java_version): @pytest.mark.parametrize( "java_version, package_version, expected_packages", [ - (None, None, ["com.oracle.database.jdbc:ojdbc8:23.4.0.24.05"]), - ("8", None, ["com.oracle.database.jdbc:ojdbc8:23.4.0.24.05"]), - ("8", "23.4.0.24.05", ["com.oracle.database.jdbc:ojdbc8:23.4.0.24.05"]), + (None, None, ["com.oracle.database.jdbc:ojdbc8:23.5.0.24.07"]), + ("8", None, ["com.oracle.database.jdbc:ojdbc8:23.5.0.24.07"]), + ("8", "23.5.0.24.07", ["com.oracle.database.jdbc:ojdbc8:23.5.0.24.07"]), ("8", "21.13.0.0", ["com.oracle.database.jdbc:ojdbc8:21.13.0.0"]), - ("9", None, ["com.oracle.database.jdbc:ojdbc8:23.4.0.24.05"]), + ("9", None, ["com.oracle.database.jdbc:ojdbc8:23.5.0.24.07"]), ("9", "21.13.0.0", ["com.oracle.database.jdbc:ojdbc8:21.13.0.0"]), - ("11", None, ["com.oracle.database.jdbc:ojdbc11:23.4.0.24.05"]), + ("11", None, ["com.oracle.database.jdbc:ojdbc11:23.5.0.24.07"]), ("11", "21.13.0.0", ["com.oracle.database.jdbc:ojdbc11:21.13.0.0"]), ("17", "21.13.0.0", ["com.oracle.database.jdbc:ojdbc11:21.13.0.0"]), - ("20", "23.4.0.24.05", ["com.oracle.database.jdbc:ojdbc11:23.4.0.24.05"]), + ("20", "23.5.0.24.07", ["com.oracle.database.jdbc:ojdbc11:23.5.0.24.07"]), ], ) def test_oracle_get_packages(java_version, package_version, expected_packages): diff --git a/tests/tests_unit/tests_db_connection_unit/test_postgres_unit.py b/tests/tests_unit/tests_db_connection_unit/test_postgres_unit.py index 2b0080bf..eae69579 100644 --- a/tests/tests_unit/tests_db_connection_unit/test_postgres_unit.py +++ b/tests/tests_unit/tests_db_connection_unit/test_postgres_unit.py @@ -14,15 +14,15 @@ def test_postgres_class_attributes(): def test_postgres_package(): warning_msg = re.escape("will be removed in 1.0.0, use `Postgres.get_packages()` instead") with pytest.warns(UserWarning, match=warning_msg): - assert Postgres.package == "org.postgresql:postgresql:42.7.3" + assert Postgres.package == "org.postgresql:postgresql:42.7.4" @pytest.mark.parametrize( "package_version, expected_packages", [ - (None, ["org.postgresql:postgresql:42.7.3"]), - ("42.7.3", ["org.postgresql:postgresql:42.7.3"]), - ("42.7.3-patch", ["org.postgresql:postgresql:42.7.3-patch"]), + (None, ["org.postgresql:postgresql:42.7.4"]), + ("42.7.4", ["org.postgresql:postgresql:42.7.4"]), + ("42.7.4-patch", ["org.postgresql:postgresql:42.7.4-patch"]), ("42.6.0", ["org.postgresql:postgresql:42.6.0"]), ], )