From afa5ba66c0a9ee84f9bd9268e5079f9a916e3333 Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:38:39 -0600 Subject: [PATCH 01/17] Bump version in preparation for new changes. --- doc/src/release_notes.rst | 13 +++++++++++++ src/oracledb/version.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/src/release_notes.rst b/doc/src/release_notes.rst index 64e5504..6df9e97 100644 --- a/doc/src/release_notes.rst +++ b/doc/src/release_notes.rst @@ -11,6 +11,19 @@ Release changes are listed as affecting Thin Mode (the default runtime behavior of python-oracledb), as affecting the optional :ref:`Thick Mode `, or as being 'Common' for changes that impact both modes. +oracledb `3.3.0 `__ (TBD) +-------------------------------------------------------------------------------------------------- + +Thin Mode Changes ++++++++++++++++++ + +Thick Mode Changes +++++++++++++++++++ + +Common Changes +++++++++++++++ + + oracledb `3.2.0 `__ (June 2025) -------------------------------------------------------------------------------------------------- diff --git a/src/oracledb/version.py b/src/oracledb/version.py index 5a4521a..9a33e6a 100644 --- a/src/oracledb/version.py +++ b/src/oracledb/version.py @@ -30,4 +30,4 @@ # file doc/src/conf.py both reference this file directly. # ----------------------------------------------------------------------------- -__version__ = "3.2.0" +__version__ = "3.3.0b1" From 916ca5dcb0babba4718fde8c712dbf16213ed95a Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:39:26 -0600 Subject: [PATCH 02/17] Improve thin mode error message for connection pool tagging. --- doc/src/release_notes.rst | 5 +++++ src/oracledb/impl/thin/pool.pyx | 4 ++-- tests/test_7300_unsupported_features_thin.py | 6 ++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/src/release_notes.rst b/doc/src/release_notes.rst index 6df9e97..e2fa0dc 100644 --- a/doc/src/release_notes.rst +++ b/doc/src/release_notes.rst @@ -17,6 +17,11 @@ oracledb `3.3.0 Date: Fri, 11 Jul 2025 11:40:01 -0600 Subject: [PATCH 03/17] Simplify code. --- src/oracledb/impl/thin/messages/base.pyx | 46 +++++++++++++----------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/src/oracledb/impl/thin/messages/base.pyx b/src/oracledb/impl/thin/messages/base.pyx index 4bb98aa..581c74e 100644 --- a/src/oracledb/impl/thin/messages/base.pyx +++ b/src/oracledb/impl/thin/messages/base.pyx @@ -216,6 +216,28 @@ cdef class Message: if not buf._caps.supports_end_of_response: self.end_of_response = True + cdef int _process_keyword_value_pairs(self, ReadBuffer buf, + uint16_t num_pairs) except -1: + """ + Processes the keyword/value pairs returned by the server. + """ + cdef: + uint16_t i, num_bytes, keyword_num + bytes text_value, binary_value + for i in range(num_pairs): + text_value = binary_value = None + buf.read_ub2(&num_bytes) # text value + if num_bytes > 0: + text_value = buf.read_bytes() + buf.read_ub2(&num_bytes) # binary value + if num_bytes > 0: + binary_value = buf.read_bytes() + buf.read_ub2(&keyword_num) # keyword num + if keyword_num == TNS_KEYWORD_NUM_CURRENT_SCHEMA: + self.conn_impl._current_schema = text_value.decode() + elif keyword_num == TNS_KEYWORD_NUM_EDITION: + self.conn_impl._edition = text_value.decode() + cdef int _process_message(self, ReadBuffer buf, uint8_t message_type) except -1: cdef uint64_t token_num @@ -342,14 +364,7 @@ cdef class Message: buf.skip_ub1() # skip length of DTYs buf.read_ub2(&num_elements) buf.skip_ub1() # skip length - for i in range(num_elements): - buf.read_ub2(&temp16) - if temp16 > 0: # skip key - buf.skip_raw_bytes_chunked() - buf.read_ub2(&temp16) - if temp16 > 0: # skip value - buf.skip_raw_bytes_chunked() - buf.skip_ub2() # skip flags + self._process_keyword_value_pairs(buf, num_elements) buf.skip_ub4() # skip overall flags elif opcode == TNS_SERVER_PIGGYBACK_EXT_SYNC: buf.skip_ub2() # skip number of DTYs @@ -1172,7 +1187,7 @@ cdef class MessageWithData(Message): cdef int _process_return_parameters(self, ReadBuffer buf) except -1: cdef: - uint16_t keyword_num, num_params, num_bytes + uint16_t num_params, num_bytes uint32_t num_rows, i uint64_t rowcount bytes key_value @@ -1184,18 +1199,7 @@ cdef class MessageWithData(Message): if num_bytes > 0: buf.skip_raw_bytes(num_bytes) buf.read_ub2(&num_params) # num key/value pairs - for i in range(num_params): - buf.read_ub2(&num_bytes) # key - if num_bytes > 0: - key_value = buf.read_bytes() - buf.read_ub2(&num_bytes) # value - if num_bytes > 0: - buf.skip_raw_bytes_chunked() - buf.read_ub2(&keyword_num) # keyword num - if keyword_num == TNS_KEYWORD_NUM_CURRENT_SCHEMA: - self.conn_impl._current_schema = key_value.decode() - elif keyword_num == TNS_KEYWORD_NUM_EDITION: - self.conn_impl._edition = key_value.decode() + self._process_keyword_value_pairs(buf, num_params) buf.read_ub2(&num_bytes) # registration if num_bytes > 0: buf.skip_raw_bytes(num_bytes) From ab59c5f48714bc7fb6fc1b49087ae0d2af2be708 Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:41:48 -0600 Subject: [PATCH 04/17] Test improvements. --- tests/test_1000_module.py | 5 +- tests/test_1100_connection.py | 81 +++++------------ tests/test_1600_dml_returning.py | 2 +- tests/test_1700_error.py | 2 +- tests/test_2200_number_var.py | 5 +- tests/test_2300_object_var.py | 9 +- tests/test_2400_pool.py | 86 +++++-------------- tests/test_2500_string_var.py | 5 +- tests/test_3000_subscription.py | 4 +- tests/test_3100_boolean_var.py | 14 +-- tests/test_3500_json.py | 4 +- tests/test_3700_var.py | 8 +- tests/test_3800_typehandler.py | 3 +- tests/test_4300_cursor_other.py | 23 +++-- tests/test_5300_connection_async.py | 22 ++--- tests/test_5400_cursor_execute_async.py | 7 +- tests/test_5500_pool_async.py | 17 ++-- tests/test_5600_dbobject_async.py | 5 +- tests/test_5700_lob_var_async.py | 13 +-- tests/test_5800_cursor_var_async.py | 8 +- tests/test_5900_dml_returning_async.py | 5 +- tests/test_6000_typehandler_async.py | 7 +- tests/test_6100_cursor_executemany_async.py | 7 +- tests/test_6200_cursor_callproc_async.py | 6 +- tests/test_6300_cursor_other_async.py | 20 ++--- tests/test_6400_vector_var.py | 3 +- tests/test_6600_defaults.py | 8 +- tests/test_6700_json_23.py | 4 +- tests/test_6800_error_async.py | 7 +- tests/test_6900_oson.py | 5 +- ..._7000_connection_async_shortcut_methods.py | 8 +- tests/test_7300_unsupported_features_thin.py | 4 +- tests/test_7400_tpc_async.py | 8 +- tests/test_7500_binary_vector.py | 4 +- tests/test_7600_pipelining_async.py | 7 +- tests/test_7700_sparse_vector.py | 4 +- tests/test_7900_aq_raw_async.py | 6 +- tests/test_8000_dataframe.py | 74 +++------------- tests/test_8100_dataframe_async.py | 21 +---- tests/test_8200_aq_bulk_async.py | 78 +++-------------- tests/test_8400_aq_dbobject_async.py | 5 +- tests/test_8500_aq_json_async.py | 4 +- tests/test_8600_cursor_scrollable_async.py | 6 +- tests/test_env.py | 78 +++++++++++++++++ 44 files changed, 235 insertions(+), 467 deletions(-) diff --git a/tests/test_1000_module.py b/tests/test_1000_module.py index 617234a..7ab5547 100644 --- a/tests/test_1000_module.py +++ b/tests/test_1000_module.py @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# Copyright (c) 2020, 2024, Oracle and/or its affiliates. +# Copyright (c) 2020, 2025, Oracle and/or its affiliates. # # This software is dual-licensed to you under the Universal Permissive License # (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License @@ -27,7 +27,6 @@ """ import datetime -import unittest import oracledb import test_env @@ -169,7 +168,7 @@ def test_1006(self): ) self.assertIs(oracledb.version, oracledb.__version__) - @unittest.skipUnless(test_env.get_is_thin(), "not relevant for thick mode") + @test_env.skip_unless_thin_mode() def test_1007(self): "1007 - test clientversion() fails without init_oracle_client()" with self.assertRaisesFullCode("DPY-2021"): diff --git a/tests/test_1100_connection.py b/tests/test_1100_connection.py index bbca631..acf13bb 100644 --- a/tests/test_1100_connection.py +++ b/tests/test_1100_connection.py @@ -30,7 +30,6 @@ import string import threading import time -import unittest import oracledb import test_env @@ -84,7 +83,7 @@ def test_1100(self): ) self.assertEqual(conn.thin, test_env.get_is_thin()) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() def test_1101(self): "1101 - test use of application context" namespace = "CLIENTCONTEXT" @@ -175,7 +174,7 @@ def test_1106(self): password=test_env.get_main_password() + "X" ) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() def test_1107(self): "1107 - test changing password" conn = test_env.get_connection() @@ -189,7 +188,7 @@ def test_1107(self): conn = test_env.get_connection(password=new_password) conn.changepassword(new_password, test_env.get_main_password()) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() def test_1108(self): "1108 - test changing password to an invalid value" conn = test_env.get_connection() @@ -201,7 +200,7 @@ def test_1108(self): with self.assertRaisesFullCode("ORA-01017", "ORA-00988", "ORA-28008"): conn.changepassword("incorrect old password", new_password) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() def test_1109(self): "1109 - test connecting with password containing / and @ symbols" conn = test_env.get_connection() @@ -227,7 +226,7 @@ def test_1110(self): with self.assertRaisesFullCode("DPY-1001"): conn.rollback() - @unittest.skipIf(test_env.get_is_thin(), "not relevant for thin mode") + @test_env.skip_unless_thick_mode() def test_1111(self): "1111 - test creating a connection using a handle" conn = test_env.get_connection() @@ -370,10 +369,7 @@ def test_1120(self): self.conn.ping() self.assertRoundTrips(1) - @unittest.skipIf( - test_env.get_is_thin(), - "thin mode doesn't support two-phase commit yet", - ) + @test_env.skip_unless_thick_mode() def test_1121(self): "1121 - test begin, prepare, cancel transaction" conn = test_env.get_connection() @@ -395,10 +391,7 @@ def test_1121(self): (count,) = cursor.fetchone() self.assertEqual(count, 0) - @unittest.skipIf( - test_env.get_is_thin(), - "thin mode doesn't support two-phase commit yet", - ) + @test_env.skip_unless_thick_mode() def test_1122(self): "1122 - test multiple transactions on the same connection" conn = test_env.get_connection() @@ -438,10 +431,7 @@ def test_1122(self): cursor.execute("select IntCol, StringCol1 from TestTempTable") self.assertEqual(cursor.fetchall(), expected_rows) - @unittest.skipIf( - test_env.get_is_thin(), - "thin mode doesn't support two-phase commit yet", - ) + @test_env.skip_unless_thick_mode() def test_1123(self): "1123 - test multiple global transactions on the same connection" conn = test_env.get_connection() @@ -499,10 +489,7 @@ def test_1123(self): cursor.execute("select IntCol, StringCol1 from TestTempTable") self.assertEqual(cursor.fetchall(), expected_rows) - @unittest.skipIf( - test_env.get_is_thin(), - "thin mode doesn't support two-phase commit yet", - ) + @test_env.skip_unless_thick_mode() def test_1124(self): "1124 - test creating global txn after a local txn" conn = test_env.get_connection() @@ -562,7 +549,7 @@ def perform_cancel(): (user,) = cursor.fetchone() self.assertEqual(user, test_env.get_main_user().upper()) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() def test_1127(self): "1127 - test changing password during connect" conn = test_env.get_connection() @@ -625,7 +612,7 @@ def test_1130(self): cursor.callproc("dbms_output.get_line", (string_var, number_var)) self.assertEqual(string_var.getvalue(), test_string) - @unittest.skipUnless(test_env.has_client_version(18), "unsupported client") + @test_env.skip_unless_call_timeout_supported() def test_1131(self): "1131 - test connection call_timeout" conn = test_env.get_connection() @@ -694,18 +681,15 @@ def test_1135(self): (instance_name,) = cursor.fetchone() self.assertEqual(conn.instance_name.upper(), instance_name) - @unittest.skipUnless( - test_env.has_client_version(18), "not supported on this client" - ) + @test_env.skip_unless_call_timeout_supported() def test_1136(self): "1136 - test deprecated attributes" conn = test_env.get_connection() conn.callTimeout = 500 self.assertEqual(conn.callTimeout, 500) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") - @unittest.skipUnless(test_env.has_server_version(23), "unsupported server") - @unittest.skipUnless(test_env.has_client_version(23), "unsupported client") + @test_env.skip_if_drcp() + @test_env.skip_unless_long_passwords_supported() def test_1137(self): "1137 - test maximum allowed length for password" conn = test_env.get_connection() @@ -784,9 +768,7 @@ def test_1143(self): self.assertEqual(conn.username, test_env.get_main_user()) self.assertEqual(conn.proxy_user, proxy_user) - @unittest.skipIf( - not test_env.get_is_thin(), "thick mode doesn't support SDU yet" - ) + @test_env.skip_unless_thin_mode() def test_1144(self): "1144 - test connection.sdu" conn = test_env.get_connection() @@ -799,10 +781,7 @@ def test_1145(self): with self.assertRaisesFullCode("DPY-2023"): test_env.get_connection(conn_class=oracledb.ConnectionPool) - @unittest.skipUnless( - test_env.get_is_thin(), - "thick mode doesn't support program yet", - ) + @test_env.skip_unless_thin_mode() def test_1146(self): "1146 - test passing program when creating a connection" sql = ( @@ -811,10 +790,7 @@ def test_1146(self): ) self.__verify_connect_arg("program", "newprogram", sql) - @unittest.skipUnless( - test_env.get_is_thin(), - "thick mode doesn't support machine yet", - ) + @test_env.skip_unless_thin_mode() def test_1147(self): "1147 - test passing machine when creating a connection" sql = ( @@ -823,10 +799,7 @@ def test_1147(self): ) self.__verify_connect_arg("machine", "newmachine", sql) - @unittest.skipUnless( - test_env.get_is_thin(), - "thick mode doesn't support terminal yet", - ) + @test_env.skip_unless_thin_mode() def test_1148(self): "1148 - test passing terminal when creating a connection" sql = ( @@ -835,10 +808,7 @@ def test_1148(self): ) self.__verify_connect_arg("terminal", "newterminal", sql) - @unittest.skipUnless( - test_env.get_is_thin(), - "thick mode doesn't support osuser yet", - ) + @test_env.skip_unless_thin_mode() def test_1149(self): "1149 - test passing osuser when creating a connection" sql = ( @@ -855,9 +825,7 @@ def test_1150(self): ) self.__verify_connect_arg("driver_name", "newdriver", sql) - @unittest.skipUnless( - test_env.get_is_thin(), "thick mode doesn't support session_id yet" - ) + @test_env.skip_unless_thin_mode() def test_1151(self): "1151 - test getting session id" conn = test_env.get_connection() @@ -866,9 +834,7 @@ def test_1151(self): (fetched_value,) = cursor.fetchone() self.assertEqual(conn.session_id, fetched_value) - @unittest.skipUnless( - test_env.get_is_thin(), "thick mode doesn't support serial_num yet" - ) + @test_env.skip_unless_thin_mode() def test_1152(self): "1152 - test getting session serial number" conn = test_env.get_connection() @@ -879,10 +845,7 @@ def test_1152(self): (fetched_value,) = cursor.fetchone() self.assertEqual(conn.serial_num, fetched_value) - @unittest.skipUnless( - test_env.get_is_thin(), - "thick mode doesn't support registered protocols", - ) + @test_env.skip_unless_thin_mode() def test_1153(self): "1153 - test passed params in hook with standalone connection" sdu = 4096 diff --git a/tests/test_1600_dml_returning.py b/tests/test_1600_dml_returning.py index fd7787a..f9bd20c 100644 --- a/tests/test_1600_dml_returning.py +++ b/tests/test_1600_dml_returning.py @@ -526,7 +526,7 @@ def test_1622(self): self.cursor.execute(sql, in_val=25, out_val=out_val) self.assertEqual(out_val.getvalue(), [25]) - @unittest.skipUnless(test_env.get_is_thin(), "cannot be checked") + @test_env.skip_unless_thin_mode() def test_1623(self): "1623 - execute DML returning with duplicated binds" self.cursor.execute("truncate table TestTempTable") diff --git a/tests/test_1700_error.py b/tests/test_1700_error.py index 201ca33..4791aa7 100644 --- a/tests/test_1700_error.py +++ b/tests/test_1700_error.py @@ -197,7 +197,7 @@ def test_1708(self): self.assertEqual(error_obj.full_code, f"ORA-{code}") self.assertTrue("Help:" not in error_obj.message) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() def test_1709(self): "1709 - error from killed connection is deemed recoverable" admin_conn = test_env.get_admin_connection() diff --git a/tests/test_2200_number_var.py b/tests/test_2200_number_var.py index f98af3f..0c0438c 100644 --- a/tests/test_2200_number_var.py +++ b/tests/test_2200_number_var.py @@ -27,7 +27,6 @@ """ import decimal -import unittest import oracledb import test_env @@ -74,9 +73,7 @@ def setUp(self): self.raw_data.append(data_tuple) self.data_by_key[i] = data_tuple - @unittest.skipUnless( - test_env.has_client_version(12, 1), "not supported on this client" - ) + @test_env.skip_unless_plsql_boolean_supported() def test_2200(self): "2200 - test binding in a boolean" result = self.cursor.callfunc( diff --git a/tests/test_2300_object_var.py b/tests/test_2300_object_var.py index 87d8ce3..919fe3b 100644 --- a/tests/test_2300_object_var.py +++ b/tests/test_2300_object_var.py @@ -28,7 +28,6 @@ import datetime import decimal -import unittest import oracledb import test_env @@ -662,13 +661,13 @@ def test_2327(self): ) self.assertEqual(result, 7146445847327) - @unittest.skipIf(test_env.get_is_thin(), "thin mode supports xmltype") + @test_env.skip_unless_thick_mode() def test_2328(self): "2328 - test object with unknown type in one of its attributes" typ = self.conn.gettype("UDT_OBJECTWITHXMLTYPE") self.assertEqual(typ.attributes[1].type, oracledb.DB_TYPE_UNKNOWN) - @unittest.skipIf(test_env.get_is_thin(), "thin mode supports xmltype") + @test_env.skip_unless_thick_mode() def test_2329(self): "2329 - test object with unknown type as the element type" typ = self.conn.gettype("UDT_XMLTYPEARRAY") @@ -813,9 +812,7 @@ def test_2338(self): result = [i for i in obj] self.assertEqual(result, [5, 10, 15]) - @unittest.skipUnless( - test_env.get_is_thin(), "thick mode does not support xmltype" - ) + @test_env.skip_unless_thin_mode() def test_2339(self): "2339 - test fetching an object containing an XmlType instance" num_val = 2339 diff --git a/tests/test_2400_pool.py b/tests/test_2400_pool.py index aab8e5f..2496fd9 100644 --- a/tests/test_2400_pool.py +++ b/tests/test_2400_pool.py @@ -196,9 +196,7 @@ def test_2400(self): self.assertEqual(pool.timeout, 0) self.assertEqual(pool.username, test_env.get_main_user()) - @unittest.skipIf( - test_env.get_is_thin(), "thin mode doesn't support proxy users yet" - ) + @test_env.skip_unless_thick_mode() def test_2401(self): "2401 - test that proxy authentication is possible" pool = test_env.get_pool( @@ -299,7 +297,7 @@ def test_2405(self): for thread in threads: thread.join() - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() def test_2406(self): "2406 - test session pool with various types of purity" pool = test_env.get_pool( @@ -335,10 +333,8 @@ def test_2406(self): cursor.close() pool.release(conn) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") - @unittest.skipIf( - test_env.get_is_thin(), "thin mode doesn't support proxy users yet" - ) + @test_env.skip_if_drcp() + @test_env.skip_unless_thick_mode() def test_2407(self): "2407 - test heterogeneous pool with user and password specified" pool = test_env.get_pool( @@ -371,10 +367,8 @@ def test_2407(self): ) conn.close() - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") - @unittest.skipIf( - test_env.get_is_thin(), "thin mode doesn't support proxy users yet" - ) + @test_env.skip_if_drcp() + @test_env.skip_unless_thick_mode() def test_2408(self): "2408 - test heterogeneous pool without user and password specified" pool = test_env.get_pool( @@ -402,9 +396,7 @@ def test_2408(self): conn, test_env.get_proxy_user(), test_env.get_main_user() ) - @unittest.skipIf( - test_env.get_is_thin(), "thin mode doesn't support proxy users yet" - ) + @test_env.skip_unless_thick_mode() def test_2409(self): "2409 - test heterogeneous pool with wrong password specified" pool = test_env.get_pool( @@ -419,9 +411,7 @@ def test_2409(self): test_env.get_proxy_user(), "this is the wrong password" ) - @unittest.skipIf( - test_env.get_is_thin(), "thin mode doesn't support tagging yet" - ) + @test_env.skip_unless_thick_mode() def test_2410(self): "2410 - test tagging a session" pool = test_env.get_pool( @@ -447,10 +437,7 @@ def test_2410(self): self.assertEqual(conn.tag, tag_utc) conn.close() - @unittest.skipIf( - test_env.get_is_thin(), - "thin mode doesn't support session callbacks yet", - ) + @test_env.skip_unless_thick_mode() def test_2411(self): "2411 - test PL/SQL session callbacks" if not test_env.has_client_version(12, 2): @@ -500,9 +487,7 @@ def test_2411(self): self.assertEqual(results, expected_results) conn.close() - @unittest.skipIf( - test_env.get_is_thin(), "thin mode doesn't support tagging yet" - ) + @test_env.skip_unless_thick_mode() def test_2412(self): "2412 - testTagging with Invalid key" pool = test_env.get_pool(getmode=oracledb.POOL_GETMODE_NOWAIT) @@ -544,10 +529,7 @@ def test_2414(self): self.assertEqual(pool.opened, 2, "opened (2)") pool.release(conn3) - @unittest.skipIf( - test_env.get_is_thin(), - "thin mode doesn't support all the pool params yet", - ) + @test_env.skip_unless_thick_mode() def test_2415(self): "2415 - test the reconfigure values are changed and rest unchanged" self.__perform_reconfigure_test("min", 5) @@ -568,9 +550,7 @@ def test_2415(self): if test_env.has_client_version(19, 11): self.__perform_reconfigure_test("soda_metadata_cache", True) - @unittest.skipIf( - test_env.get_is_thin(), "thin mode doesn't support tagging yet" - ) + @test_env.skip_unless_thick_mode() def test_2417(self): "2417 - test that session callbacks are being called correctly" pool = test_env.get_pool( @@ -693,7 +673,7 @@ def session_callback(cls, conn, requested_tag): pass self.assertEqual(Counter.num_calls, 2) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() def test_2424(self): "2424 - drop the pooled connection on receiving dead connection error" admin_conn = test_env.get_admin_connection() @@ -753,7 +733,7 @@ def test_2427(self): pool.acquire(), test_env.get_proxy_user(), test_env.get_main_user() ) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() def test_2428(self): "2428 - test acquiring conn from pool in LIFO order" pool = test_env.get_pool( @@ -844,12 +824,7 @@ def test_2437(self): with self.assertRaisesFullCode("DPY-2023"): test_env.get_pool(connectiontype=int) - @unittest.skipUnless( - test_env.has_server_version(12, 2), "not supported on this server" - ) - @unittest.skipUnless( - test_env.has_client_version(19), "not supported on this client" - ) + @test_env.skip_unless_pool_timed_wait_supported() def test_2438(self): "2438 - ensure that timed wait times out with appropriate exception" pool = test_env.get_pool( @@ -858,9 +833,7 @@ def test_2438(self): with self.assertRaisesFullCode("DPY-4005"): pool.acquire() - @unittest.skipUnless( - test_env.has_client_version(18), "not supported on this client" - ) + @test_env.skip_unless_call_timeout_supported() def test_2439(self): "2439 - ensure call timeout is reset on connections returned by pool" pool = test_env.get_pool(ping_timeout=1000, ping_interval=0) @@ -888,10 +861,7 @@ def test_2441(self): self.assertEqual(pool.busy, num_conns) self.assertEqual(len(active_sessions), num_conns) - @unittest.skipUnless( - test_env.get_is_thin(), - "thick mode doesn't support program yet", - ) + @test_env.skip_unless_thin_mode() def test_2442(self): "2442 - test passing program when creating a pool" sql = ( @@ -900,10 +870,7 @@ def test_2442(self): ) self.__verify_create_arg("program", "newprogram", sql) - @unittest.skipUnless( - test_env.get_is_thin(), - "thick mode doesn't support machine yet", - ) + @test_env.skip_unless_thin_mode() def test_2443(self): "2443 - test passing machine when creating a pool" sql = ( @@ -912,10 +879,7 @@ def test_2443(self): ) self.__verify_create_arg("machine", "newmachine", sql) - @unittest.skipUnless( - test_env.get_is_thin(), - "thick mode doesn't support terminal yet", - ) + @test_env.skip_unless_thin_mode() def test_2444(self): "2444 - test passing terminal when creating a pool" sql = ( @@ -924,10 +888,7 @@ def test_2444(self): ) self.__verify_create_arg("terminal", "newterminal", sql) - @unittest.skipUnless( - test_env.get_is_thin(), - "thick mode doesn't support osuser yet", - ) + @test_env.skip_unless_thin_mode() def test_2445(self): "2445 - test passing osuser when creating a pool" sql = ( @@ -944,10 +905,7 @@ def test_2446(self): ) self.__verify_create_arg("driver_name", "newdriver", sql) - @unittest.skipUnless( - test_env.get_is_thin(), - "thick mode doesn't support registered protocols", - ) + @test_env.skip_unless_thin_mode() def test_2447(self): "2447 - test register_parameter with pooled connection" sdu = 4096 @@ -1066,7 +1024,7 @@ def test_2456(self): with self.assertRaisesFullCode("DPY-2064"): test_env.get_pool(min=3, max=2) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() def test_2457(self): "2457 - ping pooled connection on receiving dead connection error" admin_conn = test_env.get_admin_connection() diff --git a/tests/test_2500_string_var.py b/tests/test_2500_string_var.py index c9b363a..3dff96c 100644 --- a/tests/test_2500_string_var.py +++ b/tests/test_2500_string_var.py @@ -536,10 +536,7 @@ def test_2533(self): cursor.execute("select IntCol, StringCol1 from TestTempTable") self.assertEqual(cursor.fetchone(), (1, string_val)) - @unittest.skipIf( - not test_env.get_is_thin(), - "thick mode doesn't support fetching XMLType > VARCHAR2", - ) + @test_env.skip_unless_thin_mode() def test_2534(self): "2534 - test inserting and fetching XMLType (32K) as a string" self.cursor.execute("truncate table TestTempXML") diff --git a/tests/test_3000_subscription.py b/tests/test_3000_subscription.py index 88c275c..d34b89c 100644 --- a/tests/test_3000_subscription.py +++ b/tests/test_3000_subscription.py @@ -78,9 +78,7 @@ def _process_message(self, message): self.rowids.append(row.rowid) -@unittest.skipIf( - test_env.get_is_thin(), "thin mode doesn't support subscriptions" -) +@test_env.skip_unless_thick_mode() class TestCase(test_env.BaseTestCase): @unittest.skipUnless( test_env.has_client_version(23), "crashes in older clients" diff --git a/tests/test_3100_boolean_var.py b/tests/test_3100_boolean_var.py index 41bb8a8..c9ee099 100644 --- a/tests/test_3100_boolean_var.py +++ b/tests/test_3100_boolean_var.py @@ -26,14 +26,11 @@ 3100 - Module for testing boolean variables """ -import unittest - import oracledb import test_env -@unittest.skipUnless(test_env.has_client_version(12, 1), "unsupported client") -@unittest.skipUnless(test_env.has_server_version(12, 1), "unsupported server") +@test_env.skip_unless_plsql_boolean_supported() class TestCase(test_env.BaseTestCase): def __test_bind_value_as_boolean(self, value): expected_result = str(bool(value)).upper() @@ -102,8 +99,7 @@ def test_3108(self): ) self.assertIsNone(result) - @unittest.skipUnless(test_env.has_client_version(23), "unsupported client") - @unittest.skipUnless(test_env.has_server_version(23), "unsupported server") + @test_env.skip_unless_native_boolean_supported() def test_3109(self): "3109 - test binding and fetching boolean with 23ai" for value in (True, False): @@ -113,8 +109,7 @@ def test_3109(self): self.assertIsInstance(fetched_value, bool) self.assertEqual(fetched_value, not value) - @unittest.skipUnless(test_env.has_client_version(23), "unsupported client") - @unittest.skipUnless(test_env.has_server_version(23), "unsupported server") + @test_env.skip_unless_native_boolean_supported() def test_3110(self): "3110 - test binding and fetching string literals that represent True" self.cursor.execute("truncate table TestBooleans") @@ -129,8 +124,7 @@ def test_3110(self): expected_values = [(True, True) for _ in true_values] self.assertEqual(self.cursor.fetchall(), expected_values) - @unittest.skipUnless(test_env.has_client_version(23), "unsupported client") - @unittest.skipUnless(test_env.has_server_version(23), "unsupported server") + @test_env.skip_unless_native_boolean_supported() def test_3111(self): "3111 - test binding and fetching string literals that represent False" self.cursor.execute("truncate table TestBooleans") diff --git a/tests/test_3500_json.py b/tests/test_3500_json.py index b706ab1..c5a6a11 100644 --- a/tests/test_3500_json.py +++ b/tests/test_3500_json.py @@ -28,14 +28,12 @@ import datetime import decimal -import unittest import oracledb import test_env -@unittest.skipUnless(test_env.has_client_version(21), "unsupported client") -@unittest.skipUnless(test_env.has_server_version(21), "unsupported server") +@test_env.skip_unless_native_json_supported() class TestCase(test_env.BaseTestCase): json_data = [ True, diff --git a/tests/test_3700_var.py b/tests/test_3700_var.py index f5fa17a..9173769 100644 --- a/tests/test_3700_var.py +++ b/tests/test_3700_var.py @@ -28,7 +28,6 @@ import datetime import decimal -import unittest import oracledb import test_env @@ -361,8 +360,7 @@ def test_3721(self): wrong_obj_type = self.conn.gettype("UDT_OBJECTARRAY") self._test_negative_set_and_get(wrong_obj_type, obj) - @unittest.skipUnless(test_env.has_client_version(21), "unsupported client") - @unittest.skipUnless(test_env.has_server_version(21), "unsupported server") + @test_env.skip_unless_native_json_supported() def test_3722(self): "3722 - setting values on variables of type DB_TYPE_JSON" json_data = [ @@ -425,9 +423,7 @@ def test_3724(self): [(None, None, None, None, None, None, None)], ) - @unittest.skipIf( - not test_env.get_is_thin(), "thick mode doesn't support DB_TYPE_UROWID" - ) + @test_env.skip_unless_thin_mode() def test_3725(self): "3725 - setting values on variables of type DB_TYPE_UROWID" self._test_negative_set_and_get(oracledb.DB_TYPE_UROWID, 12345) diff --git a/tests/test_3800_typehandler.py b/tests/test_3800_typehandler.py index 032b6e7..d6faf52 100644 --- a/tests/test_3800_typehandler.py +++ b/tests/test_3800_typehandler.py @@ -28,7 +28,6 @@ import datetime import json -import unittest import oracledb import test_env @@ -217,7 +216,7 @@ def output_type_handler(cursor, metadata): expected_data = [(1, "CONVERTED"), (2, None), (3, "CONVERTED")] self.assertEqual(self.cursor.fetchall(), expected_data) - @unittest.skipUnless(test_env.has_server_version(21), "unsupported server") + @test_env.skip_unless_native_json_supported() def test_3806(self): "3806 - output type handler for fetching 21c JSON" diff --git a/tests/test_4300_cursor_other.py b/tests/test_4300_cursor_other.py index 6f1f1a9..71a9faa 100644 --- a/tests/test_4300_cursor_other.py +++ b/tests/test_4300_cursor_other.py @@ -27,7 +27,6 @@ """ import decimal -import unittest import oracledb import test_env @@ -648,7 +647,7 @@ def test_4346(self): self.assertIsNone(self.cursor.bindvars.get("a")) self.assertIsInstance(self.cursor.bindvars["b"], oracledb.Var) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() def test_4347(self): "4547 - kill connection with open cursor" admin_conn = test_env.get_admin_connection() @@ -663,7 +662,7 @@ def test_4347(self): cursor.execute("select user from dual") self.assertFalse(conn.is_healthy()) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() def test_4348(self): "4348 - kill connection in cursor context manager" admin_conn = test_env.get_admin_connection() @@ -879,12 +878,7 @@ def test_4359(self): fetched_data = [(n, c.read()) for n, c in self.cursor] self.assertEqual(fetched_data, data) - @unittest.skipUnless( - test_env.has_server_version(12, 2), "unsupported database" - ) - @unittest.skipUnless( - test_env.has_client_version(12, 2), "unsupported database" - ) + @test_env.skip_unless_json_supported() def test_4360(self): "4360 - fetch JSON columns as Python objects" expected_data = [ @@ -894,10 +888,7 @@ def test_4360(self): self.cursor.execute("select * from TestJsonCols order by IntCol") self.assertEqual(self.cursor.fetchall(), expected_data) - @unittest.skipUnless( - test_env.has_server_version(23), "unsupported database" - ) - @unittest.skipUnless(test_env.has_client_version(23), "unsupported client") + @test_env.skip_unless_domains_supported() def test_4361(self): "4361 - fetch table with domain and annotations" self.cursor.execute("select * from TableWithDomainAndAnnotations") @@ -1000,6 +991,12 @@ def test_4368(self): (fetched_value,) = self.cursor.fetchone() self.assertEqual(fetched_value, value) + def test_4369(self): + "4369 - access cursor.rowcount after closing connection" + with test_env.get_connection() as conn: + cursor = conn.cursor() + self.assertEqual(cursor.rowcount, -1) + if __name__ == "__main__": test_env.run_test_cases() diff --git a/tests/test_5300_connection_async.py b/tests/test_5300_connection_async.py index 19c6935..c870340 100644 --- a/tests/test_5300_connection_async.py +++ b/tests/test_5300_connection_async.py @@ -29,15 +29,12 @@ import asyncio import random import string -import unittest import oracledb import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): requires_connection = False @@ -162,7 +159,7 @@ async def test_5306(self): password=test_env.get_main_password() + "X", ) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() async def test_5307(self): "5307 - test changing password" async with test_env.get_connection_async() as conn: @@ -182,7 +179,7 @@ async def test_5307(self): new_password, test_env.get_main_password() ) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() async def test_5308(self): "5308 - test changing password to an invalid value" async with test_env.get_connection_async() as conn: @@ -202,7 +199,7 @@ async def test_5308(self): "incorrect old password", new_password ) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() async def test_5309(self): "5309 - test connecting with password containing / and @ symbols" async with test_env.get_connection_async() as conn: @@ -341,10 +338,7 @@ async def test_5325(self): coroutines = [self.__verify_fetched_data(conn) for i in range(3)] await asyncio.gather(*coroutines) - @unittest.skipIf( - test_env.get_is_implicit_pooling(), - "sessions can change with implicit pooling", - ) + @test_env.skip_if_implicit_pooling() async def test_5326(self): "5326 - test connection cancel" async with test_env.get_connection_async() as conn: @@ -366,7 +360,7 @@ async def perform_work(): (user,) = await cursor.fetchone() self.assertEqual(user, test_env.get_main_user().upper()) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() async def test_5327(self): "5327 - test changing password during connect" async with test_env.get_connection_async() as conn: @@ -511,8 +505,8 @@ async def test_5335(self): (instance_name,) = await cursor.fetchone() self.assertEqual(conn.instance_name.upper(), instance_name) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") - @unittest.skipUnless(test_env.has_server_version(23), "unsupported server") + @test_env.skip_if_drcp() + @test_env.skip_unless_long_passwords_supported() async def test_5337(self): "5337 - test maximum allowed length for password" async with test_env.get_connection_async() as conn: diff --git a/tests/test_5400_cursor_execute_async.py b/tests/test_5400_cursor_execute_async.py index 3026af7..556ed5b 100644 --- a/tests/test_5400_cursor_execute_async.py +++ b/tests/test_5400_cursor_execute_async.py @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# Copyright (c) 2023, 2024, Oracle and/or its affiliates. +# Copyright (c) 2023, 2025, Oracle and/or its affiliates. # # This software is dual-licensed to you under the Universal Permissive License # (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License @@ -27,15 +27,12 @@ """ import collections -import unittest import oracledb import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): async def test_5400(self): "5400 - test executing a statement without any arguments" diff --git a/tests/test_5500_pool_async.py b/tests/test_5500_pool_async.py index 520c5ed..4e8aa82 100644 --- a/tests/test_5500_pool_async.py +++ b/tests/test_5500_pool_async.py @@ -27,15 +27,12 @@ """ import asyncio -import unittest import oracledb import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): require_connection = False @@ -162,7 +159,7 @@ async def test_5504(self): finally: await pool.close(force=True) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() async def test_5505(self): "5505 - test session pool with various types of purity" pool = test_env.get_pool_async(min=1, max=8, increment=1) @@ -305,7 +302,7 @@ async def session_callback(cls, conn, requested_tag): finally: await pool.close(force=True) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() async def test_5514(self): "5514 - drop the pooled connection on receiving dead connection error" admin_conn = await test_env.get_admin_connection_async() @@ -379,7 +376,7 @@ async def test_5517(self): finally: await pool.close(force=True) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() async def test_5518(self): "5518 - test acquiring conn from pool in LIFO order" pool = test_env.get_pool_async(min=5, max=10, increment=1) @@ -494,9 +491,7 @@ async def test_5527(self): with self.assertRaisesFullCode("DPY-2023"): test_env.get_pool_async(connectiontype=int) - @unittest.skipUnless( - test_env.has_server_version(12, 2), "not supported on this server" - ) + @test_env.skip_unless_pool_timed_wait_supported() async def test_5528(self): "5528 - ensure that timed wait times out with appropriate exception" pool = test_env.get_pool_async( @@ -634,7 +629,7 @@ async def test_5542(self): with self.assertRaisesFullCode("DPY-2064"): test_env.get_pool_async(min=3, max=2) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() async def test_5543(self): "5543 - ping pooled connection on receiving dead connection error" admin_conn = await test_env.get_admin_connection_async() diff --git a/tests/test_5600_dbobject_async.py b/tests/test_5600_dbobject_async.py index b376f72..0a4edca 100644 --- a/tests/test_5600_dbobject_async.py +++ b/tests/test_5600_dbobject_async.py @@ -28,15 +28,12 @@ import datetime import decimal -import unittest import oracledb import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): maxDiff = None diff --git a/tests/test_5700_lob_var_async.py b/tests/test_5700_lob_var_async.py index b09b6be..6757d72 100644 --- a/tests/test_5700_lob_var_async.py +++ b/tests/test_5700_lob_var_async.py @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# Copyright (c) 2023, 2024, Oracle and/or its affiliates. +# Copyright (c) 2023, 2025, Oracle and/or its affiliates. # # This software is dual-licensed to you under the Universal Permissive License # (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License @@ -26,15 +26,11 @@ 5700 - Module for testing LOB (CLOB and BLOB) variables with asyncio """ -import unittest - import oracledb import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): async def __get_temp_lobs(self, sid): cursor = self.conn.cursor() @@ -363,10 +359,7 @@ async def test_5714(self): "5714 - test operations on NCLOBs" await self.__test_lob_operations("NCLOB") - @unittest.skipIf( - test_env.get_is_implicit_pooling(), - "sessions can change with implicit pooling", - ) + @test_env.skip_if_implicit_pooling() async def test_5715(self): "5715 - test temporary LOBs" await self.cursor.execute( diff --git a/tests/test_5800_cursor_var_async.py b/tests/test_5800_cursor_var_async.py index 79bbfe6..4047b07 100644 --- a/tests/test_5800_cursor_var_async.py +++ b/tests/test_5800_cursor_var_async.py @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# Copyright (c) 2023, 2024, Oracle and/or its affiliates. +# Copyright (c) 2023, 2025, Oracle and/or its affiliates. # # This software is dual-licensed to you under the Universal Permissive License # (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License @@ -26,15 +26,11 @@ 5800 - Module for testing cursor variables with asyncio """ -import unittest - import oracledb import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): async def test_5800(self): "5800 - test binding in a cursor" diff --git a/tests/test_5900_dml_returning_async.py b/tests/test_5900_dml_returning_async.py index 6603b5c..96e171c 100644 --- a/tests/test_5900_dml_returning_async.py +++ b/tests/test_5900_dml_returning_async.py @@ -27,15 +27,12 @@ """ import datetime -import unittest import oracledb import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): async def test_5900(self): "5900 - test insert (single row) with DML returning" diff --git a/tests/test_6000_typehandler_async.py b/tests/test_6000_typehandler_async.py index 9a423d2..b13ba87 100644 --- a/tests/test_6000_typehandler_async.py +++ b/tests/test_6000_typehandler_async.py @@ -28,7 +28,6 @@ import datetime import json -import unittest import oracledb import test_env @@ -61,9 +60,7 @@ def from_json(cls, value): return cls(**result) -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): def building_in_converter(self, value): return value.to_json() @@ -232,7 +229,7 @@ def output_type_handler(cursor, metadata): expected_data = [(1, "CONVERTED"), (2, None), (3, "CONVERTED")] self.assertEqual(await self.cursor.fetchall(), expected_data) - @unittest.skipUnless(test_env.has_server_version(21), "unsupported server") + @test_env.skip_unless_native_json_supported() async def test_6006(self): "6006 - output type handler for fetching 21c JSON" diff --git a/tests/test_6100_cursor_executemany_async.py b/tests/test_6100_cursor_executemany_async.py index 8b4d35f..1fbea09 100644 --- a/tests/test_6100_cursor_executemany_async.py +++ b/tests/test_6100_cursor_executemany_async.py @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# Copyright (c) 2023, 2024, Oracle and/or its affiliates. +# Copyright (c) 2023, 2025, Oracle and/or its affiliates. # # This software is dual-licensed to you under the Universal Permissive License # (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License @@ -27,15 +27,12 @@ """ import decimal -import unittest import oracledb import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): async def test_6100(self): "6100 - test executing a statement multiple times (named args)" diff --git a/tests/test_6200_cursor_callproc_async.py b/tests/test_6200_cursor_callproc_async.py index 025f388..f539a45 100644 --- a/tests/test_6200_cursor_callproc_async.py +++ b/tests/test_6200_cursor_callproc_async.py @@ -27,15 +27,11 @@ functions (callproc() and callfunc()) with asyncio """ -import unittest - import oracledb import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): async def test_6200(self): "6200 - test executing a stored procedure" diff --git a/tests/test_6300_cursor_other_async.py b/tests/test_6300_cursor_other_async.py index 6493714..d2667f2 100644 --- a/tests/test_6300_cursor_other_async.py +++ b/tests/test_6300_cursor_other_async.py @@ -26,15 +26,11 @@ 6300 - Module for testing other cursor methods and attributes with asyncio. """ -import unittest - import oracledb import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): async def test_6300(self): "6300 - test preparing a statement and executing it multiple times" @@ -573,7 +569,7 @@ def type_handler(cursor, metadata): expected_data = [("A", 2, 3)] * 3 self.assertEqual(await self.cursor.fetchall(), expected_data) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() async def test_6335(self): "6335 - kill connection with open cursor" admin_conn = await test_env.get_admin_connection_async() @@ -588,7 +584,7 @@ async def test_6335(self): await cursor.execute("select user from dual") self.assertFalse(conn.is_healthy()) - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() async def test_6336(self): "6336 - kill connection in cursor context manager" admin_conn = await test_env.get_admin_connection_async() @@ -803,9 +799,7 @@ async def test_6346(self): fetched_data = [(n, await c.read()) async for n, c in self.cursor] self.assertEqual(fetched_data, data) - @unittest.skipUnless( - test_env.has_server_version(23), "unsupported database" - ) + @test_env.skip_unless_domains_supported() async def test_6347(self): "6347 - fetch table with domain and annotations" await self.cursor.execute( @@ -913,6 +907,12 @@ async def test_6352(self): nested_rows, [("Nested String for Top Level String 2",)] ) + async def test_6353(self): + "6353 - access cursor.rowcount after closing connection" + async with test_env.get_connection_async() as conn: + cursor = conn.cursor() + self.assertEqual(cursor.rowcount, -1) + if __name__ == "__main__": test_env.run_test_cases() diff --git a/tests/test_6400_vector_var.py b/tests/test_6400_vector_var.py index 4bdbc1b..f1e0bcc 100644 --- a/tests/test_6400_vector_var.py +++ b/tests/test_6400_vector_var.py @@ -33,8 +33,7 @@ import test_env -@unittest.skipUnless(test_env.has_client_version(23, 4), "unsupported client") -@unittest.skipUnless(test_env.has_server_version(23, 4), "unsupported server") +@test_env.skip_unless_vectors_supported() class TestCase(test_env.BaseTestCase): def __test_insert_and_fetch(self, value, column_name, expected_typecode): """ diff --git a/tests/test_6600_defaults.py b/tests/test_6600_defaults.py index 2a408a3..e9078a1 100644 --- a/tests/test_6600_defaults.py +++ b/tests/test_6600_defaults.py @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# Copyright (c) 2023, 2024, Oracle and/or its affiliates. +# Copyright (c) 2023, 2025, Oracle and/or its affiliates. # # This software is dual-licensed to you under the Universal Permissive License # (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License @@ -32,7 +32,6 @@ import oracledb import test_env -import unittest class TestCase(test_env.BaseTestCase): @@ -198,10 +197,7 @@ def test_6614(self): "6614 - test setting defaults.osuser attribute" self.__verify_network_name_attr("osuser") - @unittest.skipUnless( - test_env.get_is_thin(), - "thick mode doesn't support program yet", - ) + @test_env.skip_unless_thin_mode() def test_6615(self): "6615 - test program with two pools" default_value = "defaultprogram" diff --git a/tests/test_6700_json_23.py b/tests/test_6700_json_23.py index 58614a5..ef3365d 100644 --- a/tests/test_6700_json_23.py +++ b/tests/test_6700_json_23.py @@ -27,14 +27,12 @@ """ import json -import unittest import oracledb import test_env -@unittest.skipUnless(test_env.has_client_version(23), "unsupported client") -@unittest.skipUnless(test_env.has_server_version(23), "unsupported server") +@test_env.skip_unless_native_json_extensions_supported() class TestCase(test_env.BaseTestCase): def __test_fetch_json(self, value, table_name="TestJson"): """ diff --git a/tests/test_6800_error_async.py b/tests/test_6800_error_async.py index dda09e9..79a765c 100644 --- a/tests/test_6800_error_async.py +++ b/tests/test_6800_error_async.py @@ -27,15 +27,12 @@ """ import pickle -import unittest import oracledb import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): async def test_6800(self): "6800 - test parse error returns offset correctly" @@ -207,7 +204,7 @@ async def test_6808(self): self.assertEqual(result.warning.full_code, "DPY-7000") await self.cursor.execute(f"drop procedure {proc_name}") - @unittest.skipIf(test_env.get_is_drcp(), "not supported with DRCP") + @test_env.skip_if_drcp() async def test_6809(self): "6809 - error from killed connection is deemed recoverable" admin_conn = await test_env.get_admin_connection_async() diff --git a/tests/test_6900_oson.py b/tests/test_6900_oson.py index 4120af9..767e319 100644 --- a/tests/test_6900_oson.py +++ b/tests/test_6900_oson.py @@ -26,14 +26,11 @@ 6900 - Module for testing OSON encoding and decoding. """ -import unittest - import oracledb import test_env -@unittest.skipUnless(test_env.has_client_version(21), "unsupported client") -@unittest.skipUnless(test_env.has_server_version(21), "unsupported server") +@test_env.skip_unless_native_json_supported() class TestCase(test_env.BaseTestCase): def test_6900(self): "6900 - test OSON metadata" diff --git a/tests/test_7000_connection_async_shortcut_methods.py b/tests/test_7000_connection_async_shortcut_methods.py index 1e87e22..b8c7ce3 100644 --- a/tests/test_7000_connection_async_shortcut_methods.py +++ b/tests/test_7000_connection_async_shortcut_methods.py @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# Copyright (c) 2024, Oracle and/or its affiliates. +# Copyright (c) 2024, 2025, Oracle and/or its affiliates. # # This software is dual-licensed to you under the Universal Permissive License # (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License @@ -26,15 +26,11 @@ 7000 - Module for testing async connections shortcut methods """ -import unittest - import oracledb import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): async def test_7000(self): "7000 - test execute() and fetchall()" diff --git a/tests/test_7300_unsupported_features_thin.py b/tests/test_7300_unsupported_features_thin.py index d421362..d7c4b6b 100644 --- a/tests/test_7300_unsupported_features_thin.py +++ b/tests/test_7300_unsupported_features_thin.py @@ -26,13 +26,11 @@ 7300 - Module for testing unsupported features in Thin mode """ -import unittest - import oracledb import test_env -@unittest.skipUnless(test_env.get_is_thin(), "only relevant in thin mode") +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseTestCase): def test_7300(self): diff --git a/tests/test_7400_tpc_async.py b/tests/test_7400_tpc_async.py index 0cd707c..d2b50c7 100644 --- a/tests/test_7400_tpc_async.py +++ b/tests/test_7400_tpc_async.py @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# Copyright (c) 2024, Oracle and/or its affiliates. +# Copyright (c) 2024, 2025, Oracle and/or its affiliates. # # This software is dual-licensed to you under the Universal Permissive License # (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License @@ -26,15 +26,11 @@ 7400 - Module for testing TPC (two-phase commit) transactions with asyncio. """ -import unittest - import oracledb import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): async def test_7400(self): "7400 - test begin, prepare, roll back global transaction" diff --git a/tests/test_7500_binary_vector.py b/tests/test_7500_binary_vector.py index 9be1a80..625a093 100644 --- a/tests/test_7500_binary_vector.py +++ b/tests/test_7500_binary_vector.py @@ -28,14 +28,12 @@ """ import array -import unittest import oracledb import test_env -@unittest.skipUnless(test_env.has_client_version(23, 5), "unsupported client") -@unittest.skipUnless(test_env.has_server_version(23, 5), "unsupported server") +@test_env.skip_unless_binary_vectors_supported() class TestCase(test_env.BaseTestCase): def test_7500(self): diff --git a/tests/test_7600_pipelining_async.py b/tests/test_7600_pipelining_async.py index 9d77686..ddddffc 100644 --- a/tests/test_7600_pipelining_async.py +++ b/tests/test_7600_pipelining_async.py @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# Copyright (c) 2024, Oracle and/or its affiliates. +# Copyright (c) 2024, 2025, Oracle and/or its affiliates. # # This software is dual-licensed to you under the Universal Permissive License # (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License @@ -26,7 +26,6 @@ 7600 - Module for testing async pipelining. """ -import unittest import datetime import decimal @@ -34,9 +33,7 @@ import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): async def test_7600(self): diff --git a/tests/test_7700_sparse_vector.py b/tests/test_7700_sparse_vector.py index bc52d3d..5b706d8 100644 --- a/tests/test_7700_sparse_vector.py +++ b/tests/test_7700_sparse_vector.py @@ -29,13 +29,11 @@ import array import json -import unittest import oracledb import test_env -@unittest.skipUnless(test_env.has_client_version(23, 7), "unsupported client") -@unittest.skipUnless(test_env.has_server_version(23, 7), "unsupported client") +@test_env.skip_unless_sparse_vectors_supported() class TestCase(test_env.BaseTestCase): def __test_insert_and_fetch(self, vector, column_name, expected_typecode): """ diff --git a/tests/test_7900_aq_raw_async.py b/tests/test_7900_aq_raw_async.py index 90621c5..0772a80 100644 --- a/tests/test_7900_aq_raw_async.py +++ b/tests/test_7900_aq_raw_async.py @@ -26,15 +26,11 @@ 7900 - Module for testing AQ with raw queues with asyncio """ -import unittest - import oracledb import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): raw_data = [ b"sample raw data 1", diff --git a/tests/test_8000_dataframe.py b/tests/test_8000_dataframe.py index 369b7ce..0054f54 100644 --- a/tests/test_8000_dataframe.py +++ b/tests/test_8000_dataframe.py @@ -29,7 +29,6 @@ import array import datetime import decimal -import unittest import oracledb @@ -626,8 +625,7 @@ def test_8025(self): fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) - @unittest.skipUnless(test_env.has_client_version(23), "unsupported client") - @unittest.skipUnless(test_env.has_server_version(23), "unsupported server") + @test_env.skip_unless_native_boolean_supported() def test_8026(self): "8026 - fetch boolean" data = [(True,), (False,), (False,), (True,), (True,)] @@ -767,12 +765,7 @@ def test_8029(self): self.assertIsNotNone(buffers["offsets"]) self.assertIsNotNone(buffers["validity"]) - @unittest.skipUnless( - test_env.has_client_version(23, 4), "unsupported client" - ) - @unittest.skipUnless( - test_env.has_server_version(23, 4), "unsupported server" - ) + @test_env.skip_unless_vectors_supported() def test_8030(self): "8030 - fetch float32 vector" @@ -806,12 +799,7 @@ def test_8030(self): fetched_df = fetched_tab.to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) - @unittest.skipUnless( - test_env.has_client_version(23, 4), "unsupported client" - ) - @unittest.skipUnless( - test_env.has_server_version(23, 4), "unsupported server" - ) + @test_env.skip_unless_vectors_supported() def test_8031(self): "8031 - fetch float64 vector" data = [ @@ -837,12 +825,7 @@ def test_8031(self): fetched_df = fetched_tab.to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) - @unittest.skipUnless( - test_env.has_client_version(23, 4), "unsupported client" - ) - @unittest.skipUnless( - test_env.has_server_version(23, 4), "unsupported server" - ) + @test_env.skip_unless_vectors_supported() def test_8032(self): "8032 - fetch int8 vector" data = [ @@ -868,12 +851,7 @@ def test_8032(self): fetched_df = fetched_tab.to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) - @unittest.skipUnless( - test_env.has_client_version(23, 4), "unsupported client" - ) - @unittest.skipUnless( - test_env.has_server_version(23, 4), "unsupported server" - ) + @test_env.skip_unless_vectors_supported() def test_8033(self): "8033 - fetch binary vector" data = [ @@ -899,12 +877,7 @@ def test_8033(self): fetched_df = fetched_tab.to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) - @unittest.skipUnless( - test_env.has_client_version(23, 4), "unsupported client" - ) - @unittest.skipUnless( - test_env.has_server_version(23, 4), "unsupported server" - ) + @test_env.skip_unless_vectors_supported() def test_8034(self): "8034 - fetch float32 vectors with None" data = [ @@ -933,12 +906,7 @@ def test_8034(self): fetched_df = fetched_tab.to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) - @unittest.skipUnless( - test_env.has_client_version(23, 4), "unsupported client" - ) - @unittest.skipUnless( - test_env.has_server_version(23, 4), "unsupported server" - ) + @test_env.skip_unless_vectors_supported() def test_8035(self): "8035 - fetch duplicate float64 vectors" data = [ @@ -994,12 +962,7 @@ def test_8035(self): fetched_df = fetched_tab.to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) - @unittest.skipUnless( - test_env.has_client_version(23, 7), "unsupported client" - ) - @unittest.skipUnless( - test_env.has_server_version(23, 7), "unsupported server" - ) + @test_env.skip_unless_sparse_vectors_supported() def test_8036(self): "8036 - fetch float32 sparse vectors" data = [ @@ -1048,12 +1011,7 @@ def test_8036(self): fetched_df = fetched_tab.to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) - @unittest.skipUnless( - test_env.has_client_version(23, 7), "unsupported client" - ) - @unittest.skipUnless( - test_env.has_server_version(23, 7), "unsupported server" - ) + @test_env.skip_unless_sparse_vectors_supported() def test_8037(self): "8037 - fetch float64 sparse vectors" data = [ @@ -1102,12 +1060,7 @@ def test_8037(self): fetched_df = fetched_tab.to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) - @unittest.skipUnless( - test_env.has_client_version(23, 4), "unsupported client" - ) - @unittest.skipUnless( - test_env.has_server_version(23, 4), "unsupported server" - ) + @test_env.skip_unless_vectors_supported() def test_8038(self): "8038 - DPY-3031 - Unsupported flexible vector formats" with self.assertRaisesFullCode("DPY-3031"): @@ -1119,12 +1072,7 @@ def test_8038(self): """ ) - @unittest.skipUnless( - test_env.has_client_version(23, 7), "unsupported client" - ) - @unittest.skipUnless( - test_env.has_server_version(23, 7), "unsupported server" - ) + @test_env.skip_unless_sparse_vectors_supported() def test_8039(self): "8039 - DPY-4007 -fetch sparse vectors with flexible dimensions" self.__check_interop() diff --git a/tests/test_8100_dataframe_async.py b/tests/test_8100_dataframe_async.py index 2737d9d..964a5d5 100644 --- a/tests/test_8100_dataframe_async.py +++ b/tests/test_8100_dataframe_async.py @@ -29,7 +29,6 @@ import array import datetime import decimal -import unittest import oracledb @@ -237,9 +236,7 @@ ] -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): def __check_interop(self): @@ -580,7 +577,7 @@ async def test_8121(self): fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) - @unittest.skipUnless(test_env.has_server_version(23), "unsupported server") + @test_env.skip_unless_native_boolean_supported() async def test_8122(self): "8122 - fetch boolean" data = [(True,), (False,), (False,), (True,), (True,)] @@ -605,12 +602,7 @@ async def test_8122(self): fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) - @unittest.skipUnless( - test_env.has_client_version(23, 4), "unsupported client" - ) - @unittest.skipUnless( - test_env.has_server_version(23, 4), "unsupported server" - ) + @test_env.skip_unless_vectors_supported() async def test_8123(self): "8123 - fetch float32 vector" data = [ @@ -638,12 +630,7 @@ async def test_8123(self): fetched_df = fetched_tab.to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) - @unittest.skipUnless( - test_env.has_client_version(23, 7), "unsupported client" - ) - @unittest.skipUnless( - test_env.has_server_version(23, 7), "unsupported server" - ) + @test_env.skip_unless_sparse_vectors_supported() async def test_8124(self): "8124 - fetch float64 sparse vectors" data = [ diff --git a/tests/test_8200_aq_bulk_async.py b/tests/test_8200_aq_bulk_async.py index 3b47ff5..14b8f78 100644 --- a/tests/test_8200_aq_bulk_async.py +++ b/tests/test_8200_aq_bulk_async.py @@ -27,8 +27,6 @@ """ import datetime -import threading -import unittest import oracledb import test_env @@ -63,9 +61,7 @@ ] -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): async def __deq_in_thread(self, results): async with test_env.get_connection_async() as conn: @@ -100,25 +96,8 @@ async def test_8201(self): await self.conn.commit() self.assertEqual(messages, []) - @unittest.skipIf( - test_env.get_is_thin(), "thin mode doesn't support enq immediate yet" - ) async def test_8202(self): - "8202 - test bulk dequeue with wait" - queue = await self.get_and_clear_queue(RAW_QUEUE_NAME) - results = [] - thread = threading.Thread(target=self.__deq_in_thread, args=(results,)) - thread.start() - messages = [ - self.conn.msgproperties(payload=data) for data in RAW_PAYLOAD_DATA - ] - queue.enqoptions.visibility = oracledb.ENQ_IMMEDIATE - await queue.enqmany(messages) - thread.join() - self.assertEqual(results, RAW_PAYLOAD_DATA) - - async def test_8203(self): - "8203 - test enqueue and dequeue multiple times" + "8202 - test enqueue and dequeue multiple times" queue = await self.get_and_clear_queue(RAW_QUEUE_NAME) data_to_enqueue = RAW_PAYLOAD_DATA for num in (2, 6, 4): @@ -136,48 +115,15 @@ async def test_8203(self): await self.conn.commit() self.assertEqual(all_data, RAW_PAYLOAD_DATA) - @unittest.skipIf( - test_env.get_is_thin(), "thin mode doesn't support enq immediate yet" - ) - async def test_8204(self): - "8204 - test visibility option for enqueue and dequeue" - queue = await self.get_and_clear_queue(RAW_QUEUE_NAME) - - # first test with ENQ_ON_COMMIT (commit required) - queue.enqoptions.visibility = oracledb.ENQ_ON_COMMIT - props1 = self.conn.msgproperties(payload="A first message") - props2 = self.conn.msgproperties(payload="A second message") - await queue.enqmany([props1, props2]) - async with test_env.get_connection_async() as other_conn: - other_queue = other_conn.queue(RAW_QUEUE_NAME) - other_queue.deqoptions.wait = oracledb.DEQ_NO_WAIT - other_queue.deqoptions.visibility = oracledb.DEQ_ON_COMMIT - messages = await other_queue.deqmany(5) - self.assertEqual(len(messages), 0) - await self.conn.commit() - messages = await other_queue.deqmany(5) - self.assertEqual(len(messages), 2) - await other_conn.rollback() - - # second test with ENQ_IMMEDIATE (no commit required) - queue.enqoptions.visibility = oracledb.ENQ_IMMEDIATE - other_queue.deqoptions.visibility = oracledb.DEQ_IMMEDIATE - queue.enqmany([props1, props2]) - messages = await other_queue.deqmany(5) - self.assertEqual(len(messages), 4) - await other_conn.rollback() - messages = await other_queue.deqmany(5) - self.assertEqual(len(messages), 0) - - async def test_8205(self): - "8205 - test error for messages with no payload" + async def test_8203(self): + "8203 - test error for messages with no payload" queue = await self.get_and_clear_queue(RAW_QUEUE_NAME) messages = [self.conn.msgproperties() for _ in RAW_PAYLOAD_DATA] with self.assertRaisesFullCode("DPY-2000"): await queue.enqmany(messages) - async def test_8206(self): - "8206 - verify that the msgid property is returned correctly" + async def test_8204(self): + "8204 - verify that the msgid property is returned correctly" queue = await self.get_and_clear_queue(RAW_QUEUE_NAME) messages = [ self.conn.msgproperties(payload=data) for data in RAW_PAYLOAD_DATA @@ -191,8 +137,8 @@ async def test_8206(self): msgids = set(message.msgid for message in messages) self.assertEqual(msgids, actual_msgids) - async def test_8207(self): - "4800 - test enqueuing and dequeuing JSON message" + async def test_8205(self): + "8205 - test enqueuing and dequeuing JSON message" queue = await self.get_and_clear_queue(JSON_QUEUE_NAME, "JSON") props = [ self.conn.msgproperties(payload=data) for data in JSON_DATA_PAYLOAD @@ -204,15 +150,15 @@ async def test_8207(self): actual_data = [message.payload for message in messages] self.assertEqual(actual_data, JSON_DATA_PAYLOAD) - async def test_8208(self): - "8208 - test enqueuing to a JSON queue without a JSON payload" + async def test_8206(self): + "8206 - test enqueuing to a JSON queue without a JSON payload" queue = await self.get_and_clear_queue(JSON_QUEUE_NAME, "JSON") props = self.conn.msgproperties(payload="string message") with self.assertRaisesFullCode("DPY-2062"): await queue.enqmany([props, props]) - async def test_8209(self): - "8209 - test errors for invalid values for enqmany and deqmany" + async def test_8207(self): + "8207 - test errors for invalid values for enqmany and deqmany" queue = await self.get_and_clear_queue(JSON_QUEUE_NAME, "JSON") props = self.conn.msgproperties(payload="string message") with self.assertRaises(TypeError): diff --git a/tests/test_8400_aq_dbobject_async.py b/tests/test_8400_aq_dbobject_async.py index 018c58d..3d46f8f 100644 --- a/tests/test_8400_aq_dbobject_async.py +++ b/tests/test_8400_aq_dbobject_async.py @@ -27,15 +27,12 @@ """ import decimal -import unittest import oracledb import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): book_type_name = "UDT_BOOK" book_queue_name = "TEST_BOOK_QUEUE" diff --git a/tests/test_8500_aq_json_async.py b/tests/test_8500_aq_json_async.py index 9375d4b..0d640be 100644 --- a/tests/test_8500_aq_json_async.py +++ b/tests/test_8500_aq_json_async.py @@ -35,9 +35,7 @@ import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): json_queue_name = "TEST_JSON_QUEUE" json_data = [ diff --git a/tests/test_8600_cursor_scrollable_async.py b/tests/test_8600_cursor_scrollable_async.py index f99d824..fbb9c59 100644 --- a/tests/test_8600_cursor_scrollable_async.py +++ b/tests/test_8600_cursor_scrollable_async.py @@ -26,14 +26,10 @@ 8600 - Module for testing scrollable cursors with asyncio """ -import unittest - import test_env -@unittest.skipUnless( - test_env.get_is_thin(), "asyncio not supported in thick mode" -) +@test_env.skip_unless_thin_mode() class TestCase(test_env.BaseAsyncTestCase): async def test_8600(self): "8600 - test creating a scrollable cursor" diff --git a/tests/test_env.py b/tests/test_env.py index f6243dc..9ccda83 100644 --- a/tests/test_env.py +++ b/tests/test_env.py @@ -490,6 +490,84 @@ def skip_soda_tests(): return False +def skip_if_drcp(): + return unittest.skipIf(get_is_drcp(), "not supported with DRCP") + + +def skip_if_implicit_pooling(): + return unittest.skipIf( + get_is_implicit_pooling(), "not supported with implicit pooling" + ) + + +def skip_unless_binary_vectors_supported(): + supported = has_client_version(23, 5) and has_server_version(23, 5) + return unittest.skipUnless(supported, "no binary vector support") + + +def skip_unless_call_timeout_supported(): + supported = has_client_version(18) + return unittest.skipUnless(supported, "no call timeout support") + + +def skip_unless_domains_supported(): + supported = has_server_version(23) + return unittest.skipUnless(supported, "no domain support") + + +def skip_unless_json_supported(): + supported = has_client_version(12, 2) and has_server_version(12, 2) + return unittest.skipUnless(supported, "no JSON support") + + +def skip_unless_long_passwords_supported(): + supported = has_server_version(23) + return unittest.skipUnless(supported, "no long password support") + + +def skip_unless_native_boolean_supported(): + supported = has_client_version(23) and has_server_version(23) + return unittest.skipUnless(supported, "no native boolean support") + + +def skip_unless_native_json_extensions_supported(): + supported = has_client_version(23) and has_server_version(23) + return unittest.skipUnless(supported, "no native JSON extensions support") + + +def skip_unless_native_json_supported(): + supported = has_client_version(21) and has_server_version(21) + return unittest.skipUnless(supported, "no native JSON support") + + +def skip_unless_plsql_boolean_supported(): + supported = has_client_version(12, 1) and has_server_version(12, 1) + return unittest.skipUnless(supported, "no PL/SQL boolean support") + + +def skip_unless_pool_timed_wait_supported(): + supported = has_client_version(12, 2) and has_server_version(12, 2) + return unittest.skipUnless(supported, "no pool timed wait support") + + +def skip_unless_sparse_vectors_supported(): + supported = has_client_version(23, 7) and has_server_version(23, 7) + return unittest.skipUnless(supported, "no sparse vector support") + + +def skip_unless_thick_mode(): + return unittest.skipIf(get_is_thin(), "requires thick mode") + + +def skip_unless_thin_mode(): + return unittest.skipUnless(get_is_thin(), "requires thin mode") + + +def skip_unless_vectors_supported(): + supported = has_client_version(23, 4) and has_server_version(23, 4) + return unittest.skipUnless(supported, "no vector support") + + class DefaultsContextManager: def __init__(self, attribute, desired_value): self.attribute = attribute From b63b71c1225a7d2d8418b1f74ba52c3c04f66a86 Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:42:23 -0600 Subject: [PATCH 05/17] Fixed bug in the calculation of attribute MessageProperties.deliverymode. Previously it was being set to the value of the attribute DeqOptions.deliverymode. --- doc/src/release_notes.rst | 3 +++ src/oracledb/impl/thin/messages/aq_array.pyx | 3 --- src/oracledb/impl/thin/messages/aq_base.pyx | 6 +++++- src/oracledb/impl/thin/queue.pyx | 1 - tests/test_2700_aq_dbobject.py | 3 +++ tests/test_8400_aq_dbobject_async.py | 3 +++ 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/doc/src/release_notes.rst b/doc/src/release_notes.rst index e2fa0dc..f0a1929 100644 --- a/doc/src/release_notes.rst +++ b/doc/src/release_notes.rst @@ -21,6 +21,9 @@ Thin Mode Changes thick mode`` is now raised when attempting to use session tagging with a connection pool. Previously a ``NotImplementedError`` exception was raised instead. +#) Fixed bug in the calculation of attribute + :attr:`MessageProperties.deliverymode`. Previously it was being set to the + value of the attribute :attr:`DeqOptions.deliverymode`. Thick Mode Changes ++++++++++++++++++ diff --git a/src/oracledb/impl/thin/messages/aq_array.pyx b/src/oracledb/impl/thin/messages/aq_array.pyx index 8158b3f..ebad7f6 100644 --- a/src/oracledb/impl/thin/messages/aq_array.pyx +++ b/src/oracledb/impl/thin/messages/aq_array.pyx @@ -69,9 +69,6 @@ cdef class AqArrayMessage(AqBaseMessage): props_impl.msgid = msgid[j * 16:(j + 1) * 16] else: props_impl.msgid = msgid - props_impl.delivery_mode = ( - self.deq_options_impl.delivery_mode - ) buf.read_ub2(&temp16) # extensions len if temp16 > 0: errors._raise_err(errors.ERR_NOT_IMPLEMENTED) diff --git a/src/oracledb/impl/thin/messages/aq_base.pyx b/src/oracledb/impl/thin/messages/aq_base.pyx index f1a31cf..dd5ff2b 100644 --- a/src/oracledb/impl/thin/messages/aq_base.pyx +++ b/src/oracledb/impl/thin/messages/aq_base.pyx @@ -121,7 +121,11 @@ cdef class AqBaseMessage(Message): errors._raise_err(errors.ERR_NOT_IMPLEMENTED) buf.skip_ub4() # csn buf.skip_ub4() # dsn - buf.skip_ub4() # flags + buf.read_ub4(&temp32) # flags + if temp32 == TNS_KPD_AQ_BUFMSG: + props_impl.delivery_mode = TNS_AQ_MSG_BUFFERED + else: + props_impl.delivery_mode = TNS_AQ_MSG_PERSISTENT if buf._caps.ttc_field_version >= TNS_CCAP_FIELD_VERSION_21_1: buf.skip_ub4() # shard number diff --git a/src/oracledb/impl/thin/queue.pyx b/src/oracledb/impl/thin/queue.pyx index 61cb3b3..904b2d0 100644 --- a/src/oracledb/impl/thin/queue.pyx +++ b/src/oracledb/impl/thin/queue.pyx @@ -74,7 +74,6 @@ cdef class BaseThinQueueImpl(BaseQueueImpl): message = self._conn_impl._create_message(AqDeqMessage) message.queue_impl = self message.deq_options_impl = self.deq_options_impl - props_impl.delivery_mode = message.deq_options_impl.delivery_mode message.props_impl = props_impl return message diff --git a/tests/test_2700_aq_dbobject.py b/tests/test_2700_aq_dbobject.py index 23a0bd3..f289932 100644 --- a/tests/test_2700_aq_dbobject.py +++ b/tests/test_2700_aq_dbobject.py @@ -239,6 +239,7 @@ def test_2710(self): queue.deqoptions.visibility = oracledb.DEQ_IMMEDIATE queue.deqoptions.wait = oracledb.DEQ_NO_WAIT props = queue.deqone() + self.assertEqual(props.deliverymode, oracledb.MSG_BUFFERED) book = props.payload results = (book.TITLE, book.AUTHORS, book.PRICE) other_conn.commit() @@ -264,6 +265,7 @@ def test_2711(self): queue.deqoptions.visibility = oracledb.DEQ_IMMEDIATE queue.deqoptions.wait = oracledb.DEQ_NO_WAIT props = queue.deqone() + self.assertEqual(props.deliverymode, oracledb.MSG_PERSISTENT) book = props.payload results = (book.TITLE, book.AUTHORS, book.PRICE) other_conn.commit() @@ -289,6 +291,7 @@ def test_2712(self): queue.deqoptions.visibility = oracledb.DEQ_IMMEDIATE queue.deqoptions.wait = oracledb.DEQ_NO_WAIT props = queue.deqone() + self.assertEqual(props.deliverymode, oracledb.MSG_PERSISTENT) book = props.payload results = (book.TITLE, book.AUTHORS, book.PRICE) other_conn.commit() diff --git a/tests/test_8400_aq_dbobject_async.py b/tests/test_8400_aq_dbobject_async.py index 3d46f8f..4a338b1 100644 --- a/tests/test_8400_aq_dbobject_async.py +++ b/tests/test_8400_aq_dbobject_async.py @@ -209,6 +209,7 @@ async def test_8409(self): queue.deqoptions.visibility = oracledb.DEQ_IMMEDIATE queue.deqoptions.wait = oracledb.DEQ_NO_WAIT props = await queue.deqone() + self.assertEqual(props.deliverymode, oracledb.MSG_BUFFERED) book = props.payload results = (book.TITLE, book.AUTHORS, book.PRICE) await other_conn.commit() @@ -234,6 +235,7 @@ async def test_8410(self): queue.deqoptions.visibility = oracledb.DEQ_IMMEDIATE queue.deqoptions.wait = oracledb.DEQ_NO_WAIT props = await queue.deqone() + self.assertEqual(props.deliverymode, oracledb.MSG_PERSISTENT) book = props.payload results = (book.TITLE, book.AUTHORS, book.PRICE) await other_conn.commit() @@ -259,6 +261,7 @@ async def test_8411(self): queue.deqoptions.visibility = oracledb.DEQ_IMMEDIATE queue.deqoptions.wait = oracledb.DEQ_NO_WAIT props = await queue.deqone() + self.assertEqual(props.deliverymode, oracledb.MSG_PERSISTENT) book = props.payload results = (book.TITLE, book.AUTHORS, book.PRICE) await other_conn.commit() From 28ff772c151c13adc9c7c0ef9d0003757af27464 Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:44:41 -0600 Subject: [PATCH 06/17] Update token parameter requirement wording. --- doc/src/user_guide/connection_handling.rst | 89 ++++++++++++---------- 1 file changed, 49 insertions(+), 40 deletions(-) diff --git a/doc/src/user_guide/connection_handling.rst b/doc/src/user_guide/connection_handling.rst index 9d2f986..542c824 100644 --- a/doc/src/user_guide/connection_handling.rst +++ b/doc/src/user_guide/connection_handling.rst @@ -3727,8 +3727,8 @@ Standalone connection example: # PROXY_USER: MYUSER # SESSION_USER: MYSESSIONUSER -You can also explicitly set the ``externalauth`` parameter to True in standalone -connections as shown below. The ``externalauth`` parameter is optional. +You can also set the ``externalauth`` parameter to *True* in standalone +connections: .. code-block:: python @@ -3738,7 +3738,7 @@ connections as shown below. The ``externalauth`` parameter is optional. # PROXY_USER: MYUSER # SESSION_USER: MYSESSIONUSER -Pooled connection example: +A connection pool example is: .. code-block:: python @@ -3949,8 +3949,8 @@ connect to Oracle Autonomous Database with mutual TLS (mTLS). See When using a class such as the :ref:`TokenHandlerOAuth class ` to generate OAuth2 tokens to connect to Oracle Autonomous Database in Thin mode, -you need to explicitly set the ``access_token``, ``config_dir``, -``wallet_location``, and ``wallet_password`` parameters of +you need to explicitly set the ``access_token``, and also any desired +``config_dir``, ``wallet_location``, and ``wallet_password`` parameters of :func:`~oracledb.connect`. For example: .. code:: python @@ -3966,9 +3966,10 @@ you need to explicitly set the ``access_token``, ``config_dir``, When using a class such as the :ref:`TokenHandlerOAuth class ` to generate OAuth2 tokens to connect to Oracle Autonomous Database in Thin mode, -you need to explicitly set the ``access_token``, ``homogeneous``, -``config_dir``, ``wallet_location``, and ``wallet_password`` parameters of -:func:`~oracledb.create_pool`. For example: +you need to explicitly set the ``access_token`` parameter of +:func:`~oracledb.create_pool`, and also any desired ``config_dir``, +``wallet_location``, and ``wallet_password`` parameters. The ``homogeneous`` +parameter must be *True* (its default value). For example: .. code:: python @@ -4004,15 +4005,16 @@ parameters of :func:`~oracledb.connect`. For example: When using a class such as the :ref:`TokenHandlerOAuth class ` to generate OAuth2 tokens to connect to Oracle Autonomous Database in Thick mode, -you need to explicitly set the ``access_token``, ``externalauth``, and -``homogeneous`` parameters of :func:`~oracledb.create_pool`. For example: +you need to explicitly set the ``access_token`` and ``externalauth`` parameters +of :func:`~oracledb.create_pool`. The ``homogeneous`` parameter must be *True* +(which is its default value). For example: .. code:: python pool = oracledb.create_pool( access_token=TokenHandlerOAuth(), externalauth=True, # must always be True in Thick mode - homogeneous=True, # must always be True in connection pools + homogeneous=True, # must always be True for connection pools dsn=mydb_low, min=1, max=5, increment=2) Note that the ``access_token`` parameter should be set to a callable. This is @@ -4200,9 +4202,9 @@ Oracle Autonomous Database with mutual TLS (mTLS). See :ref:`autonomousdb`. When using the :ref:`azure_tokens ` plugin to generate OAuth2 tokens to connect to Oracle Autonomous Database in Thin mode, -you need to explicitly set the ``extra_auth_params``, ``config_dir``, -``wallet_location``, and ``wallet_password`` parameter of -:func:`~oracledb.connect`. For example: +you need to explicitly set the ``extra_auth_params`` parameter, and also any +required ``config_dir``, ``wallet_location``, and ``wallet_password`` +parameters of :func:`~oracledb.connect`. For example: .. code:: python @@ -4227,9 +4229,10 @@ you need to explicitly set the ``extra_auth_params``, ``config_dir``, When using the :ref:`azure_tokens ` plugin to generate OAuth2 tokens to connect to Oracle Autonomous Database in Thin mode, -you need to explicitly set the ``homogeneous``, ``extra_auth_params``, -``config_dir``, ``wallet_location``, and ``wallet_password`` parameters of -:func:`~oracledb.create_pool`. For example: +you need to explicitly set the ``extra_auth_params`` parameter of +:func:`~oracledb.create_pool`, and also any desired ``config_dir``, +``wallet_location``, and ``wallet_password`` parameters. The ``homogeneous`` +parameter must be *True* (its default value). For example: .. code:: python @@ -4256,7 +4259,7 @@ you need to explicitly set the ``homogeneous``, ``extra_auth_params``, When using the :ref:`azure_tokens ` plugin to generate OAuth2 tokens to connect to Oracle Autonomous Database in Thick mode, you need to explicitly set the ``extra_auth_params`` and ``externalauth`` -parameter of :func:`~oracledb.connect`. For example: +parameters of :func:`~oracledb.connect`. For example: .. code:: python @@ -4279,8 +4282,9 @@ parameter of :func:`~oracledb.connect`. For example: When using the :ref:`azure_tokens ` plugin to generate OAuth2 tokens to connect to Oracle Autonomous Database in Thick mode, -you need to explicitly set the ``extra_auth_params``, ``externalauth``, and -``homogeneous`` parameters of :func:`~oracledb.create_pool`. +you need to explicitly set the ``extra_auth_params`` and ``externalauth`` +parameters of :func:`~oracledb.create_pool`. The ``homogeneous`` parameter must +be *True* (its default value). For example: .. code:: python @@ -4312,8 +4316,8 @@ issued by OCI IAM to authenticate to the Oracle Autonomous Database. Both Thin and Thick modes of the python-oracledb driver support OCI IAM token-based authentication. -When using python-oracledb in Thick mode, Oracle Client libraries 19.14 (or later), -or 21.5 (or later) are needed. +When using python-oracledb in Thick mode, Oracle Client libraries 19.14 (or +later), or 21.5 (or later) are needed. Standalone connections and pooled connections can be created in python-oracledb Thick and Thin modes using OCI IAM token-based authentication. This can be done @@ -4414,9 +4418,9 @@ to Oracle Autonomous Database with mutual TLS (mTLS). See :ref:`autonomousdb`. When using a class such as the :ref:`TokenHandlerIAM class ` to generate OCI IAM tokens to connect to Oracle Autonomous Database in Thin mode, -you need to explicitly set the ``access_token``, ``config_dir``, -``wallet_location``, and ``wallet_password`` parameters of -:func:`~oracledb.connect`. For example: +you need to explicitly set the ``access_token`` parameter of +:func:`~oracledb.connect`, and also any desired ``config_dir``, +``wallet_location``, and ``wallet_password`` parameters. For example: .. code:: python @@ -4431,15 +4435,16 @@ you need to explicitly set the ``access_token``, ``config_dir``, When using a class such as :ref:`TokenHandlerIAM class ` to generate OCI IAM tokens to connect to Oracle Autonomous Database in Thin mode, -you need to explicitly set the ``access_token``, ``homogeneous``, -``config_dir``, ``wallet_location``, and ``wallet_password`` parameters of -:func:`~oracledb.create_pool`. For example: +you need to explicitly set the ``access_token`` parameter of +:func:`~oracledb.create_pool`, and also any desired ``config_dir``, +``wallet_location``, and ``wallet_password`` parameters. The ``homogeneous`` +parameter must be *True* (its default value). For example: .. code:: python connection = oracledb.create_pool( access_token=TokenHandlerIAM(), - homogeneous=True, # must always be set to True for connection pools + homogeneous=True, # must always be True for connection pools dsn=mydb_low, config_dir="path_to_unzipped_wallet", wallet_location="location_of_pem_file", @@ -4469,15 +4474,16 @@ of :func:`~oracledb.connect`. For example: When using a class such as :ref:`TokenHandlerIAM class ` to generate OCI IAM tokens to connect to Oracle Autonomous Database in Thick mode, -you need to explicitly set the ``access_token``, ``externalauth``, and -``homogeneous`` parameters of :func:`oracledb.create_pool`. For example: +you need to explicitly set the ``access_token`` and ``externalauth`` parameters +of :func:`oracledb.create_pool`. The ``homogeneous`` parameter must be *True* +(its default value). For example: .. code:: python pool = oracledb.create_pool( access_token=TokenHandlerIAM(), externalauth=True, # must always be True in Thick mode - homogeneous=True, # must always be True in connection pools + homogeneous=True, # must always be True for connection pools dsn=mydb_low, min=1, max=5, increment=2) Note that the ``access_token`` parameter should be set to a callable. This is @@ -4683,8 +4689,9 @@ Oracle Autonomous Database with mutual TLS (mTLS). See :ref:`autonomousdb`. When using the :ref:`oci_tokens ` plugin to generate OCI IAM tokens to connect to Oracle Autonomous Database in Thin mode, you need -to explicitly set the ``config_dir``, ``wallet_location``, ``wallet_password`` -and ``extra_auth_params`` parameters of :func:`~oracledb.connect`. For example: +to explicitly set the ``extra_auth_params`` parameter of +:func:`~oracledb.connect`, and also any desired ``config_dir``, +``wallet_location``, and ``wallet_password`` parameters. For example: .. code:: python @@ -4707,9 +4714,10 @@ and ``extra_auth_params`` parameters of :func:`~oracledb.connect`. For example: When using the :ref:`oci_tokens ` plugin to generate OCI IAM tokens to connect to Oracle Autonomous Database in Thin mode, you need -to explicitly set the ``config_dir``, ``homogeneous``, ``wallet_location``, -``wallet_password``, and ``extra_auth_params`` parameters of -:func:`~oracledb.create_pool`. For example: +to explicitly set the ``extra_auth_params`` parameter of +:func:`~oracledb.create_pool`, and also any desired ``config_dir``, +``wallet_location``, and ``wallet_password`` parameters. The ``homogeneous`` +parameter must be *True* (its default value). For example: .. code:: python @@ -4761,9 +4769,10 @@ to explicitly set the ``externalauth`` and ``extra_auth_params`` parameters of **Connection Pools in Thick Mode Using OCI IAM Tokens** When using the :ref:`oci_tokens ` plugin to generate -OCI IAM tokens to connect to Oracle Autonomous Database in Thick mode, you -need to explicitly set the ``externalauth``, ``homogeneous``, and -``extra_auth_params`` parameters of :func:`~oracledb.create_pool`. For example: +OCI IAM tokens to connect to Oracle Autonomous Database in Thick mode, you need +to explicitly set the ``extra_auth_params`` and ``externalauth`` parameters of +:func:`~oracledb.create_pool`. The ``homogeneous`` parameter must be *True* +(its default value). For example: .. code:: python From fc8618a0f3c2127cfa946991d0b328b99deffd0a Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:45:43 -0600 Subject: [PATCH 07/17] Fixed bug with detection of when a connection has been closed by the database without notification. --- doc/src/release_notes.rst | 2 ++ src/oracledb/impl/thin/packet.pyx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/src/release_notes.rst b/doc/src/release_notes.rst index f0a1929..0fdf397 100644 --- a/doc/src/release_notes.rst +++ b/doc/src/release_notes.rst @@ -24,6 +24,8 @@ Thin Mode Changes #) Fixed bug in the calculation of attribute :attr:`MessageProperties.deliverymode`. Previously it was being set to the value of the attribute :attr:`DeqOptions.deliverymode`. +#) Fixed bug with detection of when a connection has been closed by the + database without notification. Thick Mode Changes ++++++++++++++++++ diff --git a/src/oracledb/impl/thin/packet.pyx b/src/oracledb/impl/thin/packet.pyx index 77fff14..a97b243 100644 --- a/src/oracledb/impl/thin/packet.pyx +++ b/src/oracledb/impl/thin/packet.pyx @@ -230,7 +230,7 @@ cdef class ReadBuffer(Buffer): else: errors._raise_err(errors.ERR_UNSUPPORTED_INBAND_NOTIFICATION, err_num=self._pending_error_num) - elif self._transport is None: + elif self._transport is None or self._transport._transport is None: if self._pending_error_num == TNS_ERR_SESSION_SHUTDOWN: errors._raise_err(errors.ERR_CONNECTION_CLOSED) errors._raise_err(errors.ERR_NOT_CONNECTED) From 8229dd2b8bba0d0cabcdc7a83ee19b95f542ca6c Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:48:09 -0600 Subject: [PATCH 08/17] Remove use of the DataFrame interchange protocol in favor of the Arrow PyCapsule interface; add top-level objects "DataFrame" and "ArrowArray" for consistency with the rest of the package. --- doc/src/api_manual/async_connection.rst | 4 +- doc/src/api_manual/connection.rst | 4 +- doc/src/api_manual/dataframe.rst | 143 +--- doc/src/release_notes.rst | 10 + doc/src/user_guide/dataframes.rst | 2 +- setup.cfg | 1 - setup.py | 34 +- src/oracledb/__init__.py | 8 +- src/oracledb/arrow_array.py | 103 +++ .../nanoarrow_bridge.pxd => arrow_impl.pxd} | 38 +- src/oracledb/arrow_impl.pyx | 42 + src/oracledb/base_impl.pxd | 12 +- src/oracledb/base_impl.pyx | 6 +- src/oracledb/dataframe.py | 99 +++ src/oracledb/errors.py | 2 + src/oracledb/impl/arrow/array.pyx | 403 ++++++++++ src/oracledb/impl/arrow/dataframe.pyx | 38 + .../arrow}/nanoarrow/nanoarrow.c | 0 .../arrow}/nanoarrow/nanoarrow.h | 0 src/oracledb/impl/arrow/utils.pyx | 304 ++++++++ src/oracledb/impl/base/converters.pyx | 12 +- src/oracledb/impl/base/cursor.pyx | 12 +- src/oracledb/impl/base/utils.pyx | 4 +- src/oracledb/impl/base/var.pyx | 6 +- src/oracledb/impl/thin/cursor.pyx | 4 +- src/oracledb/impl/thin/messages/base.pyx | 2 +- src/oracledb/impl/thin/var.pyx | 4 +- src/oracledb/interchange/__init__.py | 0 src/oracledb/interchange/buffer.py | 84 -- src/oracledb/interchange/column.py | 217 ------ src/oracledb/interchange/dataframe.py | 163 ---- src/oracledb/interchange/nanoarrow_bridge.pyx | 736 ------------------ src/oracledb/interchange/protocol.py | 538 ------------- src/oracledb/thin_impl.pyx | 4 +- tests/test_8000_dataframe.py | 226 +----- tests/test_8100_dataframe_async.py | 127 +-- 36 files changed, 1143 insertions(+), 2249 deletions(-) create mode 100644 src/oracledb/arrow_array.py rename src/oracledb/{interchange/nanoarrow_bridge.pxd => arrow_impl.pxd} (79%) create mode 100644 src/oracledb/arrow_impl.pyx create mode 100644 src/oracledb/dataframe.py create mode 100644 src/oracledb/impl/arrow/array.pyx create mode 100644 src/oracledb/impl/arrow/dataframe.pyx rename src/oracledb/{interchange => impl/arrow}/nanoarrow/nanoarrow.c (100%) rename src/oracledb/{interchange => impl/arrow}/nanoarrow/nanoarrow.h (100%) create mode 100644 src/oracledb/impl/arrow/utils.pyx delete mode 100644 src/oracledb/interchange/__init__.py delete mode 100644 src/oracledb/interchange/buffer.py delete mode 100644 src/oracledb/interchange/column.py delete mode 100644 src/oracledb/interchange/dataframe.py delete mode 100644 src/oracledb/interchange/nanoarrow_bridge.pyx delete mode 100644 src/oracledb/interchange/protocol.py diff --git a/doc/src/api_manual/async_connection.rst b/doc/src/api_manual/async_connection.rst index 1bf156d..cdcd420 100644 --- a/doc/src/api_manual/async_connection.rst +++ b/doc/src/api_manual/async_connection.rst @@ -147,7 +147,7 @@ AsyncConnection Methods .. note:: - The data frame support in python-oracledb 3.2 is a pre-release and may + The data frame support in python-oracledb 3.3 is a pre-release and may change in a future version. .. versionadded:: 3.0.0 @@ -175,7 +175,7 @@ AsyncConnection Methods .. note:: - The data frame support in python-oracledb 3.2 is a pre-release and may + The data frame support in python-oracledb 3.3 is a pre-release and may change in a future version. .. versionadded:: 3.0.0 diff --git a/doc/src/api_manual/connection.rst b/doc/src/api_manual/connection.rst index 2d70fef..3164b93 100644 --- a/doc/src/api_manual/connection.rst +++ b/doc/src/api_manual/connection.rst @@ -140,7 +140,7 @@ Connection Methods .. note:: - The data frame support in python-oracledb 3.2 is a pre-release and may + The data frame support in python-oracledb 3.3 is a pre-release and may change in a future version. .. dbapimethodextension:: @@ -172,7 +172,7 @@ Connection Methods .. note:: - The data frame support in python-oracledb 3.2 is a pre-release and may + The data frame support in python-oracledb 3.3 is a pre-release and may change in a future version. .. dbapimethodextension:: diff --git a/doc/src/api_manual/dataframe.rst b/doc/src/api_manual/dataframe.rst index 8cd01dc..90e22d2 100644 --- a/doc/src/api_manual/dataframe.rst +++ b/doc/src/api_manual/dataframe.rst @@ -13,7 +13,7 @@ from Oracle Database types to Arrow data types. .. note:: - The data frame support in python-oracledb 3.2 is a pre-release and may + The data frame support in python-oracledb 3.3 is a pre-release and may change in a future version. .. _oracledataframeobj: @@ -37,45 +37,25 @@ interface, giving access to the underlying Arrow array. OracleDataFrame Methods ----------------------- -The object implements the Python DataFrame Interchange Protocol `DataFrame API -Interface `__ - .. method:: OracleDataFrame.column_arrays() Returns a list of :ref:`OracleArrowArray ` objects, each containing a select list column. - This is an extension to the DataFrame Interchange Protocol. - .. method:: OracleDataFrame.column_names() Returns a list of the column names in the data frame. -.. method:: OracleDataFrame.get_chunks(n_chunks) - - Returns itself, since python-oracledb only uses one chunk. - .. method:: OracleDataFrame.get_column(i) - Returns an :ref:`OracleColumn ` object for the column + Returns an :ref:`OracleArrowArray ` object for the column at the given index ``i``. .. method:: OracleDataFrame.get_column_by_name(name) - Returns an :ref:`OracleColumn ` object for the column + Returns an :ref:`OracleArrowArray ` object for the column with the given name ``name``. -.. method:: OracleDataFrame.get_columns() - - Returns a list of :ref:`OracleColumn ` objects, one - object for each column in the data frame. - -.. method:: OracleDataFrame.num_chunks() - - Return the number of chunks the data frame consists of. - - This always returns 1. - .. method:: OracleDataFrame.num_columns() Returns the number of columns in the data frame. @@ -109,120 +89,3 @@ These are used for conversion to `PyArrow Tables :ref:`dataframeformat`. .. versionadded:: 3.0.0 - -.. _oraclecolumnobj: - -OracleColumn Objects -==================== - -OracleColumn objects are returned by :meth:`OracleDataFrame.get_column()`, -:meth:`OracleDataFrame.get_column_by_name()`, and -:meth:`OracleDataFrame.get_columns()`. - -.. versionadded:: 3.0.0 - -.. _oraclecolumnmeth: - -OracleColumn Methods --------------------- - -.. method:: OracleColumn.get_buffers() - - Returns a dictionary containing the underlying buffers. - - The returned dictionary contains the ``data``, ``validity``, and ``offset`` - keys. - - The ``data`` attribute is a two-element tuple whose first element is a - buffer containing the data and whose second element is the data buffer's - associated dtype. - - The ``validity`` attribute is a a two-element tuple whose first element - is a buffer containing mask values indicating missing data and whose - second element is the mask value buffer's associated dtype. The value of - this attribute is *None* if the null representation is not a bit or byte - mask. - - The ``offset`` attribute is a two-element tuple whose first element is a - buffer containing the offset values for variable-size binary data (for - example, variable-length strings) and whose second element is the offsets - buffer's associated dtype. The value of this attribute is *None* if the - data buffer does not have an associated offsets buffer. - -.. method:: OracleColumn.get_chunks(n_chunks) - - Returns itself, since python-oracledb only uses one chunk. - -.. method:: OracleColumn.num_chunks() - - Returns the number of chunks the column consists of. - - This always returns 1. - -.. method:: OracleColumn.size() - - Returns the number of rows in the column. - -.. _oraclecolumnattr: - -OracleColumn Attributes ------------------------ - -.. attribute:: OracleColumn.describe_null - - This read-only property returns the description of the null representation - that the column uses. - -.. attribute:: OracleColumn.dtype - - This read-only attribute returns the Dtype description as a tuple - containing the values for the attributes ``kind``, ``bit-width``, - ``format string``, and ``endianess``. - - The ``kind`` attribute specifies the type of the data. - - The ``bit-width`` attribute specifies the number of bits as an integer. - - The ``format string`` attribute specifies the data type description format - string in Apache Arrow C Data Interface format. - - The ``endianess`` attribute specifies the byte order of the data type. - Currently, only native endianess is supported. - -.. attribute:: OracleColumn.metadata - - This read-only attribute returns the metadata for the column as a - dictionary with string keys. - -.. attribute:: OracleColumn.null_count - - This read-only attribute returns the number of null row values, if known. - -.. attribute:: OracleColumn.offset - - This read-only attribute specifies the offset of the first row. - -.. _oraclecolumnbufferobj: - -OracleColumnBuffer Objects -========================== - -A buffer object backed by an ArrowArray consisting of a single chunk. - -This is an internal class used for conversion to third party data frames. - -.. versionadded:: 3.0.0 - -.. _oraclecolumnbufferattr: - -OracleColumnBuffer Attributes ------------------------------ - -.. attribute:: OracleColumnBuffer.bufsize - - This read-only property returns the buffer size in bytes. - -.. attribute:: OracleColumnBuffer.ptr - - This read-only attribute specifies the pointer to the start of the buffer - as an integer. diff --git a/doc/src/release_notes.rst b/doc/src/release_notes.rst index 0fdf397..44eb4d5 100644 --- a/doc/src/release_notes.rst +++ b/doc/src/release_notes.rst @@ -33,6 +33,16 @@ Thick Mode Changes Common Changes ++++++++++++++ +#) Changes to :ref:`data frame ` support: + + - Remove use of the DataFrame Interchange Protocol in + :ref:`OracleDataFrames `. + - Documentation on methods and attributes on the ``DataFrame`` and + ``ArrowArray`` objects are now available in Python plugins such as those + found in VS Code + + Note the data frame support in python-oracledb 3.3 is a pre-release, and + may change in a future version oracledb `3.2.0 `__ (June 2025) -------------------------------------------------------------------------------------------------- diff --git a/doc/src/user_guide/dataframes.rst b/doc/src/user_guide/dataframes.rst index 3c1b35f..b500b51 100644 --- a/doc/src/user_guide/dataframes.rst +++ b/doc/src/user_guide/dataframes.rst @@ -18,7 +18,7 @@ frame objects of other libraries. .. note:: - The data frame support in python-oracledb 3.2 is a pre-release and may + The data frame support in python-oracledb 3.3 is a pre-release and may change in a future version. **Fetching Data Frames** diff --git a/setup.cfg b/setup.cfg index feddd7f..39864d2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -44,7 +44,6 @@ test_suite = tests packages = oracledb oracledb.plugins - oracledb.interchange package_dir = =src diff --git a/setup.py b/setup.py index 9e75373..3718bf3 100644 --- a/setup.py +++ b/setup.py @@ -31,13 +31,18 @@ # base source directory source_dir = os.path.join("src", "oracledb") -# determine the nanoarrow bridge dependent source files (included) -base_dir = os.path.join(source_dir, "interchange") -nanoarrow_bridge_depends = [ - os.path.join(base_dir, "nanoarrow", "nanoarrow.c"), - os.path.join(base_dir, "nanoarrow", "nanoarrow.h"), +# determine the Arrow dependent source files (included) +impl_dir = os.path.join(source_dir, "impl", "arrow") +nanoarrow_include_dir = os.path.join(impl_dir, "nanoarrow") +arrow_depends = [ + os.path.join(impl_dir, n) + for n in sorted(os.listdir(impl_dir)) + if n.endswith(".pyx") or n.endswith(".pxi") or n.endswith(".pxd") ] -nanoarrow_bridge_pxd = os.path.join(base_dir, "nanoarrow_bridge.pxd") +arrow_depends.append(os.path.join(nanoarrow_include_dir, "nanoarrow.c")) +arrow_depends.append(os.path.join(nanoarrow_include_dir, "nanoarrow.h")) +arrow_pxd = os.path.join(source_dir, "arrow_impl.pxd") +arrow_depends.append(arrow_pxd) # determine the base implementation dependent source files (included) impl_dir = os.path.join(source_dir, "impl", "base") @@ -47,7 +52,7 @@ if n.endswith(".pyx") ] base_pxd = os.path.join(source_dir, "base_impl.pxd") -base_depends.extend([base_pxd, nanoarrow_bridge_pxd]) +base_depends.extend([base_pxd, arrow_pxd]) # determine the thick mode dependent source files (included) impl_dir = os.path.join(source_dir, "impl", "thick") @@ -77,6 +82,7 @@ ] thin_depends.append(base_pxd) + # if the platform is macOS: # - target the minimum OS version that current Python packages work with. # (Use 'otool -l /path/to/python' and look for 'version' in the @@ -99,14 +105,14 @@ Extension( "oracledb.base_impl", sources=["src/oracledb/base_impl.pyx"], - include_dirs=["src/oracledb/interchange/nanoarrow"], + include_dirs=[nanoarrow_include_dir], depends=base_depends, extra_compile_args=extra_compile_args, ), Extension( "oracledb.thin_impl", sources=["src/oracledb/thin_impl.pyx"], - include_dirs=["src/oracledb/interchange/nanoarrow"], + include_dirs=[nanoarrow_include_dir], depends=thin_depends, extra_compile_args=extra_compile_args, ), @@ -115,16 +121,16 @@ sources=["src/oracledb/thick_impl.pyx"], include_dirs=[ "src/oracledb/impl/thick/odpi/include", - "src/oracledb/interchange/nanoarrow", + nanoarrow_include_dir, ], depends=thick_depends, extra_compile_args=extra_compile_args, ), Extension( - "oracledb.interchange.nanoarrow_bridge", - sources=["src/oracledb/interchange/nanoarrow_bridge.pyx"], - include_dirs=["src/oracledb/interchange/nanoarrow"], - depends=nanoarrow_bridge_depends, + "oracledb.arrow_impl", + sources=["src/oracledb/arrow_impl.pyx"], + include_dirs=[nanoarrow_include_dir], + depends=arrow_depends, extra_compile_args=extra_compile_args, ), ] diff --git a/src/oracledb/__init__.py b/src/oracledb/__init__.py index f15a5a7..ab3608f 100644 --- a/src/oracledb/__init__.py +++ b/src/oracledb/__init__.py @@ -316,8 +316,12 @@ SparseVector as SparseVector, ) -from .interchange.dataframe import ( - OracleDataFrame as OracleDataFrame, +from .arrow_array import ( + ArrowArray as ArrowArray, +) + +from .dataframe import ( + DataFrame as DataFrame, ) from . import builtin_hooks diff --git a/src/oracledb/arrow_array.py b/src/oracledb/arrow_array.py new file mode 100644 index 0000000..d1afeec --- /dev/null +++ b/src/oracledb/arrow_array.py @@ -0,0 +1,103 @@ +# ----------------------------------------------------------------------------- +# Copyright (c) 2025, Oracle and/or its affiliates. +# +# This software is dual-licensed to you under the Universal Permissive License +# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License +# 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose +# either license. +# +# If you elect to accept the software under the Apache License, Version 2.0, +# the following applies: +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ----------------------------------------------------------------------------- + +# ----------------------------------------------------------------------------- +# arrow_array.py +# +# Implement an ArrowArray that is used for efficiently transferring Arrow +# array data to other data frame libraries. +# ----------------------------------------------------------------------------- + +from . import errors + + +class ArrowArray: + _impl = None + + def __init__(self): + errors._raise_err(errors.ERR_INTERNAL_CREATION_REQUIRED) + + def __len__(self): + return self.num_rows + + def __repr__(self): + return ( + f"ArrowArray(name={self.name}, " + f"len={self.num_rows}, " + f"type={self.dtype})" + ) + + def __str__(self): + return self.__repr__() + + @classmethod + def _from_impl(cls, impl): + array = cls.__new__(cls) + array._impl = impl + return array + + def __arrow_c_array__(self, requested_schema=None): + """ + Returns a tuple containing an ArrowSchema and ArrowArray PyCapsules. + """ + if requested_schema is not None: + raise NotImplementedError("requested_schema") + return ( + self._impl.get_schema_capsule(), + self._impl.get_array_capsule(), + ) + + def __arrow_c_schema__(self): + """ + Returns an ArrowSchema PyCapsule. + """ + return self._impl.get_schema_capsule() + + @property + def dtype(self) -> str: + """ + Returns the data type associated with the array. + """ + return self._impl.get_data_type() + + @property + def name(self) -> str: + """ + Returns the name associated with the array. + """ + return self._impl.get_name() + + @property + def null_count(self) -> int: + """ + Returns the number of rows that contain null values. + """ + return self._impl.get_null_count() + + @property + def num_rows(self) -> int: + """ + Returns the number of rows in the array. + """ + return self._impl.get_num_rows() diff --git a/src/oracledb/interchange/nanoarrow_bridge.pxd b/src/oracledb/arrow_impl.pxd similarity index 79% rename from src/oracledb/interchange/nanoarrow_bridge.pxd rename to src/oracledb/arrow_impl.pxd index 4a03523..bbb84cc 100644 --- a/src/oracledb/interchange/nanoarrow_bridge.pxd +++ b/src/oracledb/arrow_impl.pxd @@ -23,10 +23,10 @@ #------------------------------------------------------------------------------ #------------------------------------------------------------------------------ -# nanoarrow_bridge.pxd +# arrow_impl.pxd # -# Cython definition file declaring the classes used for bridging between the -# nanoarrow C interface and Python. +# Cython definition file declaring the classes used for implementing the Arrow +# interface. #------------------------------------------------------------------------------ # cython: language_level = 3 @@ -77,40 +77,32 @@ cdef extern from "nanoarrow.h": NANOARROW_TIME_UNIT_NANO -cdef class OracleArrowArray: - """ - OracleArrowArray corresponds to a Column in the Relational model - - It uses functions defined in the Arrow C Data Interface - to work with Arrow buffers and incrementally append values - - The only user-facing API in this object will be __arrow_c_array__() - which is documented in the Arrow PyCapsule Interface. Arrow-backed - DataFrame libraries will use __arrow_c_array__() to directly access - the underlying arrow data - - """ +cdef class ArrowArrayImpl: cdef: - public int32_t precision - public int32_t scale - public str name - public ArrowType arrow_type - public ArrowTimeUnit time_unit + int32_t precision + int32_t scale + str name + ArrowType arrow_type + ArrowTimeUnit time_unit double factor ArrowArray *arrow_array ArrowSchema *arrow_schema ArrowType child_arrow_type - cdef str _schema_to_string(self) cdef int append_bytes(self, void* ptr, int64_t num_bytes) except -1 cdef int append_decimal(self, void* ptr, int64_t num_bytes) except -1 cdef int append_double(self, double value) except -1 cdef int append_float(self, float value) except -1 cdef int append_int64(self, int64_t value) except -1 - cdef int append_last_value(self, OracleArrowArray array) except -1 + cdef int append_last_value(self, ArrowArrayImpl array) except -1 cdef int append_null(self) except -1 cdef int append_sparse_vector(self, int64_t num_dimensions, array.array indices, array.array values) except -1 cdef int append_vector(self, array.array value) except -1 cdef int finish_building(self) except -1 + + +cdef class DataFrameImpl: + cdef: + list arrays diff --git a/src/oracledb/arrow_impl.pyx b/src/oracledb/arrow_impl.pyx new file mode 100644 index 0000000..5983aa0 --- /dev/null +++ b/src/oracledb/arrow_impl.pyx @@ -0,0 +1,42 @@ +#------------------------------------------------------------------------------ +# Copyright (c) 2025, Oracle and/or its affiliates. +# +# This software is dual-licensed to you under the Universal Permissive License +# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License +# 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose +# either license. +# +# If you elect to accept the software under the Apache License, Version 2.0, +# the following applies: +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#------------------------------------------------------------------------------ + +#------------------------------------------------------------------------------ +# arrow_impl.pyx +# +# Cython file for the Arrow implementation. +#------------------------------------------------------------------------------ + +# cython: language_level=3 + +cimport cpython + +from libc.stdint cimport uintptr_t +from libc.string cimport memcpy, strlen, strchr + +from . import errors + +include "impl/arrow/utils.pyx" +include "impl/arrow/array.pyx" +include "impl/arrow/dataframe.pyx" diff --git a/src/oracledb/base_impl.pxd b/src/oracledb/base_impl.pxd index f00dc07..d2e9792 100644 --- a/src/oracledb/base_impl.pxd +++ b/src/oracledb/base_impl.pxd @@ -39,10 +39,10 @@ cimport cpython.datetime as cydatetime ctypedef unsigned char char_type -from .interchange.nanoarrow_bridge cimport ( +from .arrow_impl cimport ( ArrowTimeUnit, ArrowType, - OracleArrowArray, + ArrowArrayImpl, ) cdef enum: @@ -723,7 +723,7 @@ cdef class BaseVarImpl: BaseConnImpl _conn_impl OracleMetadata _fetch_metadata list _values - OracleArrowArray _arrow_array + ArrowArrayImpl _arrow_array bint _has_returned_data bint _is_value_set @@ -736,7 +736,7 @@ cdef class BaseVarImpl: cdef DbType _check_fetch_conversion(self) cdef int _create_arrow_array(self) except -1 cdef int _finalize_init(self) except -1 - cdef OracleArrowArray _finish_building_arrow_array(self) + cdef ArrowArrayImpl _finish_building_arrow_array(self) cdef DbType _get_adjusted_type(self, uint8_t ora_type_num) cdef list _get_array_value(self) cdef object _get_scalar_value(self, uint32_t pos) @@ -972,13 +972,13 @@ cdef struct OracleData: cdef int convert_oracle_data_to_arrow(OracleMetadata from_metadata, OracleMetadata to_metadatda, OracleData* data, - OracleArrowArray arrow_array) except -1 + ArrowArrayImpl arrow_array) except -1 cdef object convert_oracle_data_to_python(OracleMetadata from_metadata, OracleMetadata to_metadatda, OracleData* data, const char* encoding_errors, bint from_dbobject) -cdef int convert_vector_to_arrow(OracleArrowArray arrow_array, +cdef int convert_vector_to_arrow(ArrowArrayImpl arrow_array, object vector) except -1 cdef cydatetime.datetime convert_date_to_python(OracleDataBuffer *buffer) cdef uint16_t decode_uint16be(const char_type *buf) diff --git a/src/oracledb/base_impl.pyx b/src/oracledb/base_impl.pyx index 3a83c94..1004b89 100644 --- a/src/oracledb/base_impl.pyx +++ b/src/oracledb/base_impl.pyx @@ -44,7 +44,8 @@ from cpython cimport array from .constants import VECTOR_META_FLAG_SPARSE_VECTOR -from .interchange.nanoarrow_bridge cimport ( +from .arrow_impl cimport ( + DataFrameImpl, NANOARROW_TIME_UNIT_SECOND, NANOARROW_TIME_UNIT_MILLI, NANOARROW_TIME_UNIT_MICRO, @@ -88,11 +89,12 @@ import warnings cydatetime.import_datetime() # Python types used by the driver +cdef type PY_TYPE_ARROW_ARRAY cdef type PY_TYPE_ASYNC_CURSOR cdef type PY_TYPE_ASYNC_LOB cdef type PY_TYPE_BOOL = bool cdef type PY_TYPE_CURSOR -cdef object PY_TYPE_DATAFRAME +cdef type PY_TYPE_DATAFRAME cdef type PY_TYPE_DATE = datetime.date cdef type PY_TYPE_DATETIME = datetime.datetime cdef type PY_TYPE_DB_OBJECT diff --git a/src/oracledb/dataframe.py b/src/oracledb/dataframe.py new file mode 100644 index 0000000..90fea89 --- /dev/null +++ b/src/oracledb/dataframe.py @@ -0,0 +1,99 @@ +# ----------------------------------------------------------------------------- +# Copyright (c) 2025, Oracle and/or its affiliates. +# +# This software is dual-licensed to you under the Universal Permissive License +# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License +# 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose +# either license. +# +# If you elect to accept the software under the Apache License, Version 2.0, +# the following applies: +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ----------------------------------------------------------------------------- + +# ----------------------------------------------------------------------------- +# dataframe.py +# +# Implement a data frame that can be used for efficiently transferring Arrow +# array data to other data frame libraries. +# ----------------------------------------------------------------------------- + +from typing import List + +from .arrow_array import ArrowArray +from . import errors + + +class DataFrame: + _impl = None + + def __init__(self): + errors._raise_err(errors.ERR_INTERNAL_CREATION_REQUIRED) + + @classmethod + def _from_impl(cls, impl): + df = cls.__new__(cls) + df._impl = impl + df._arrays = [ArrowArray._from_impl(a) for a in impl.get_arrays()] + df._arrays_by_name = {} + for array in df._arrays: + df._arrays_by_name[array.name] = array + return df + + def column_arrays(self) -> List: + """ + Returns a list of the Arrow arrays corresponding to each column in the + data frame. + """ + return self._arrays + + def column_names(self) -> List[str]: + """ + Returns a list of the names of the columns in the data frame. + """ + return [a.name for a in self._arrays] + + def get_column(self, i: int) -> ArrowArray: + """ + Returns a column from the data frame given its zero-based index. If the + index is out of range, an IndexError exception is raised. + """ + if i < 0 or i >= self.num_columns(): + raise IndexError( + f"Column index {i} is out of bounds for " + f"DataFrame with {self.num_columns()} columns" + ) + return self._arrays[i] + + def get_column_by_name(self, name: str) -> ArrowArray: + """ + Returns a column from the data frame given the name of the column. If + the column name is not found, a KeyError exception is raised. + """ + try: + return self._arrays_by_name[name] + except KeyError: + raise KeyError(f"Column {name} not found in DataFrame") + + def num_columns(self) -> int: + """ + Returns the number of columns in the data frame. + """ + return len(self._arrays) + + def num_rows(self) -> int: + """ + Returns the number of rows in the data frame. + """ + return len(self._arrays[0]) diff --git a/src/oracledb/errors.py b/src/oracledb/errors.py index 1f06620..3f1f15b 100644 --- a/src/oracledb/errors.py +++ b/src/oracledb/errors.py @@ -371,6 +371,7 @@ def _raise_not_supported(feature: str) -> None: ERR_UNKNOWN_TRANSACTION_STATE = 5010 ERR_UNEXPECTED_PIPELINE_FAILURE = 5011 ERR_NOT_IMPLEMENTED = 5012 +ERR_INTERNAL_CREATION_REQUIRED = 5013 # error numbers that result in OperationalError ERR_LISTENER_REFUSED_CONNECTION = 6000 @@ -618,6 +619,7 @@ def _raise_not_supported(feature: str) -> None: "internal error: read integer of length {length} when expecting " "integer of no more than length {max_length}" ), + ERR_INTERNAL_CREATION_REQUIRED: "object may not be created directly", ERR_INVALID_ACCESS_TOKEN_PARAM: ( "invalid access token: value must be a string (for OAuth), a " "2-tuple containing the token and private key strings (for IAM), " diff --git a/src/oracledb/impl/arrow/array.pyx b/src/oracledb/impl/arrow/array.pyx new file mode 100644 index 0000000..311d6ec --- /dev/null +++ b/src/oracledb/impl/arrow/array.pyx @@ -0,0 +1,403 @@ +#------------------------------------------------------------------------------ +# Copyright (c) 2025, Oracle and/or its affiliates. +# +# This software is dual-licensed to you under the Universal Permissive License +# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License +# 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose +# either license. +# +# If you elect to accept the software under the Apache License, Version 2.0, +# the following applies: +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#------------------------------------------------------------------------------ + +#------------------------------------------------------------------------------ +# array.pyx +# +# Cython implementation of the ArrowArrayImpl class. +#------------------------------------------------------------------------------ + +cdef class ArrowArrayImpl: + + def __cinit__(self, ArrowType arrow_type, str name, int8_t precision, + int8_t scale, ArrowTimeUnit time_unit, + ArrowType child_arrow_type): + cdef ArrowType storage_type = arrow_type + self.arrow_type = arrow_type + self.child_arrow_type = child_arrow_type + self.time_unit = time_unit + self.name = name + self.arrow_array = \ + cpython.PyMem_Malloc(sizeof(ArrowArray)) + if arrow_type == NANOARROW_TYPE_TIMESTAMP: + storage_type = NANOARROW_TYPE_INT64 + if time_unit == NANOARROW_TIME_UNIT_MILLI: + self.factor = 1e3 + elif time_unit == NANOARROW_TIME_UNIT_MICRO: + self.factor = 1e6 + elif time_unit == NANOARROW_TIME_UNIT_NANO: + self.factor = 1e9 + else: + self.factor = 1 + + self.arrow_schema = \ + cpython.PyMem_Malloc(sizeof(ArrowSchema)) + if arrow_type == NANOARROW_TYPE_DECIMAL128: + self.precision = precision + self.scale = scale + ArrowSchemaInit(self.arrow_schema) + _check_nanoarrow( + ArrowSchemaSetTypeDecimal( + self.arrow_schema, + arrow_type, + precision, + scale + ) + ) + elif arrow_type == NANOARROW_TYPE_STRUCT: + # Currently struct is used for Sparse vector only + build_arrow_schema_for_sparse_vector(self.arrow_schema, + child_arrow_type) + else: + _check_nanoarrow( + ArrowSchemaInitFromType( + self.arrow_schema, + storage_type + ) + ) + if arrow_type == NANOARROW_TYPE_TIMESTAMP: + _check_nanoarrow( + ArrowSchemaSetTypeDateTime( + self.arrow_schema, + arrow_type, + time_unit, + NULL + ) + ) + if arrow_type == NANOARROW_TYPE_LIST: + # Set the schema for child using child_arrow_type + _check_nanoarrow( + ArrowSchemaSetType( + self.arrow_schema.children[0], + child_arrow_type + ) + ) + _check_nanoarrow( + ArrowArrayInitFromSchema( + self.arrow_array, + self.arrow_schema, + NULL + ) + ) + elif arrow_type == NANOARROW_TYPE_STRUCT: + _check_nanoarrow( + ArrowArrayInitFromSchema( + self.arrow_array, + self.arrow_schema, + NULL + ) + ) + else: # primitive type array init + _check_nanoarrow( + ArrowArrayInitFromType( + self.arrow_array, + storage_type + ) + ) + _check_nanoarrow(ArrowArrayStartAppending(self.arrow_array)) + _check_nanoarrow(ArrowSchemaSetName(self.arrow_schema, name.encode())) + + def __dealloc__(self): + if self.arrow_array != NULL: + if self.arrow_array.release != NULL: + ArrowArrayRelease(self.arrow_array) + cpython.PyMem_Free(self.arrow_array) + if self.arrow_schema != NULL: + if self.arrow_schema.release != NULL: + ArrowSchemaRelease(self.arrow_schema) + cpython.PyMem_Free(self.arrow_schema) + + cdef int append_bytes(self, void* ptr, int64_t num_bytes) except -1: + """ + Append a value of type bytes to the array. + """ + cdef ArrowBufferView data + data.data.data = ptr + data.size_bytes = num_bytes + _check_nanoarrow(ArrowArrayAppendBytes(self.arrow_array, data)) + + cdef int append_decimal(self, void* ptr, int64_t num_bytes) except -1: + """ + Append a value of type ArrowDecimal to the array + + Arrow decimals are fixed-point decimal numbers encoded as a + scaled integer. decimal128(7, 3) can exactly represent the numbers + 1234.567 and -1234.567 encoded internally as the 128-bit integers + 1234567 and -1234567, respectively. + """ + cdef: + ArrowStringView decimal_view + ArrowDecimal decimal + decimal_view.data = ptr + decimal_view.size_bytes = num_bytes + ArrowDecimalInit(&decimal, 128, self.precision, self.scale) + _check_nanoarrow(ArrowDecimalSetDigits(&decimal, decimal_view)) + _check_nanoarrow(ArrowArrayAppendDecimal(self.arrow_array, &decimal)) + + cdef int append_double(self, double value) except -1: + """ + Append a value of type double to the array. + """ + _check_nanoarrow(ArrowArrayAppendDouble(self.arrow_array, value)) + + cdef int append_float(self, float value) except -1: + """ + Append a value of type float to the array. + """ + self.append_double(value) + + cdef int append_int64(self, int64_t value) except -1: + """ + Append a value of type int64_t to the array. + """ + _check_nanoarrow(ArrowArrayAppendInt(self.arrow_array, value)) + + cdef int append_last_value(self, ArrowArrayImpl array) except -1: + """ + Appends the last value of the given array to this array. + """ + cdef: + int32_t start_offset, end_offset + ArrowBuffer *offsets_buffer + ArrowBuffer *data_buffer + ArrowDecimal decimal + int64_t *as_int64 + int32_t *as_int32 + double *as_double + float *as_float + int8_t as_bool + int64_t index + uint8_t *ptr + void* temp + ArrowBitmap *bitamp + if array is None: + array = self + index = array.arrow_array.length - 1 + bitmap = ArrowArrayValidityBitmap(array.arrow_array) + if bitmap != NULL and bitmap.buffer.data != NULL: + as_bool = ArrowBitGet(bitmap.buffer.data, index) + if not as_bool: + self.append_null() + return 0 + if array.arrow_type in (NANOARROW_TYPE_INT64, NANOARROW_TYPE_TIMESTAMP): + data_buffer = ArrowArrayBuffer(array.arrow_array, 1) + as_int64 = data_buffer.data + self.append_int64(as_int64[index]) + elif array.arrow_type == NANOARROW_TYPE_DOUBLE: + data_buffer = ArrowArrayBuffer(array.arrow_array, 1) + as_double = data_buffer.data + self.append_double(as_double[index]) + elif array.arrow_type == NANOARROW_TYPE_FLOAT: + data_buffer = ArrowArrayBuffer(array.arrow_array, 1) + as_float = data_buffer.data + self.append_double(as_float[index]) + elif array.arrow_type == NANOARROW_TYPE_BOOL: + data_buffer = ArrowArrayBuffer(array.arrow_array, 1) + as_bool = ArrowBitGet(data_buffer.data, index) + self.append_int64(as_bool) + elif array.arrow_type == NANOARROW_TYPE_DECIMAL128: + data_buffer = ArrowArrayBuffer(array.arrow_array, 1) + ArrowDecimalInit(&decimal, 128, self.precision, self.scale) + ptr = data_buffer.data + index * 16 + ArrowDecimalSetBytes(&decimal, ptr) + _check_nanoarrow(ArrowArrayAppendDecimal(self.arrow_array, + &decimal)) + elif array.arrow_type in ( + NANOARROW_TYPE_BINARY, + NANOARROW_TYPE_STRING + ): + offsets_buffer = ArrowArrayBuffer(array.arrow_array, 1) + data_buffer = ArrowArrayBuffer(array.arrow_array, 2) + as_int32 = offsets_buffer.data + start_offset = as_int32[index] + end_offset = as_int32[index + 1] + temp = cpython.PyMem_Malloc(end_offset - start_offset) + memcpy(temp, &data_buffer.data[start_offset], + end_offset - start_offset) + try: + self.append_bytes(temp, end_offset - start_offset) + finally: + cpython.PyMem_Free(temp) + + elif array.arrow_type in ( + NANOARROW_TYPE_LARGE_BINARY, + NANOARROW_TYPE_LARGE_STRING + ): + offsets_buffer = ArrowArrayBuffer(array.arrow_array, 1) + data_buffer = ArrowArrayBuffer(array.arrow_array, 2) + as_int64 = offsets_buffer.data + start_offset = as_int64[index] + end_offset = as_int64[index + 1] + temp = cpython.PyMem_Malloc(end_offset - start_offset) + memcpy(temp, &data_buffer.data[start_offset], + end_offset - start_offset) + try: + self.append_bytes(temp, end_offset - start_offset) + finally: + cpython.PyMem_Free(temp) + + cdef int append_null(self) except -1: + """ + Append a null value to the array. + """ + _check_nanoarrow(ArrowArrayAppendNull(self.arrow_array, 1)) + + cdef int append_vector(self, array.array value) except -1: + """ + Append a vector to the array. + """ + if self.child_arrow_type == NANOARROW_TYPE_FLOAT: + append_float_array(self.arrow_array, value) + elif self.child_arrow_type == NANOARROW_TYPE_DOUBLE: + append_double_array(self.arrow_array, value) + elif self.child_arrow_type == NANOARROW_TYPE_INT8: + append_int8_array(self.arrow_array, value) + elif self.child_arrow_type == NANOARROW_TYPE_UINT8: + append_uint8_array(self.arrow_array, value) + + cdef int append_sparse_vector(self, + int64_t num_dims, + array.array indices, + array.array values) except -1: + """ + Append a sparse vector to the array. + """ + cdef ArrowArray *array + + # validate that the array supports sparse vectors + if self.arrow_type != NANOARROW_TYPE_STRUCT: + errors._raise_err(errors.ERR_ARROW_SPARSE_VECTOR_NOT_ALLOWED) + + # append number of dimensions + array = self.arrow_array.children[0] + _check_nanoarrow(ArrowArrayAppendInt(array, num_dims)) + + # append indices array + array = self.arrow_array.children[1] + append_uint32_array(array, indices) + + # append values array + array = self.arrow_array.children[2] + if self.child_arrow_type == NANOARROW_TYPE_FLOAT: + append_float_array(array, values) + elif self.child_arrow_type == NANOARROW_TYPE_DOUBLE: + append_double_array(array, values) + elif self.child_arrow_type == NANOARROW_TYPE_INT8: + append_int8_array(array, values) + elif self.child_arrow_type == NANOARROW_TYPE_UINT8: + append_uint8_array(array, values) + + # indicate structure is completed + _check_nanoarrow(ArrowArrayFinishElement(self.arrow_array)) + + cdef int finish_building(self) except -1: + """ + Finish building the array. No more data will be added to it. + """ + _check_nanoarrow(ArrowArrayFinishBuildingDefault(self.arrow_array, + NULL)) + + def get_array_capsule(self): + """ + Internal method for getting a PyCapsule pointer to the array. + """ + cdef ArrowArray *array + array = cpython.PyMem_Malloc(sizeof(ArrowArray)) + try: + copy_arrow_array(self, self.arrow_array, array) + except: + cpython.PyMem_Free(array) + raise + return cpython.PyCapsule_New( + array, 'arrow_array', &pycapsule_array_deleter + ) + + def get_data_type(self): + """ + Internal method for getting the data type associated with the array. + """ + cdef char buffer[81] + ArrowSchemaToString(self.arrow_schema, buffer, sizeof(buffer), 0) + return buffer.decode() + + def get_name(self): + """ + Internal method for getting the name associated with the array. + """ + return self.name + + def get_null_count(self): + """ + Internal method for getting the number of rows containing null values. + """ + return self.arrow_array.null_count + + def get_num_rows(self): + """ + Internal method for getting the number of rows in the array. + """ + return self.arrow_array.length + + def get_schema_capsule(self): + """ + Internal method for getting a PyCapsule pointer to the schema. + """ + cdef ArrowSchema *schema + schema = cpython.PyMem_Malloc(sizeof(ArrowSchema)) + try: + _check_nanoarrow(ArrowSchemaDeepCopy(self.arrow_schema, schema)) + except: + cpython.PyMem_Free(schema) + raise + return cpython.PyCapsule_New( + schema, 'arrow_schema', &pycapsule_schema_deleter + ) + + +cdef void pycapsule_array_deleter(object array_capsule) noexcept: + """ + Called when the PyCapsule pointer is no longer required and performs the + necessary cleanup. + """ + cdef ArrowArray* array + array = cpython.PyCapsule_GetPointer( + array_capsule, "arrow_array" + ) + if array.release != NULL: + ArrowArrayRelease(array) + cpython.PyMem_Free(array) + + +cdef void pycapsule_schema_deleter(object schema_capsule) noexcept: + """ + Called when the PyCapsule pointer is no longer required and performs the + necessary cleanup. + """ + cdef ArrowSchema* schema + schema = cpython.PyCapsule_GetPointer( + schema_capsule, "arrow_schema" + ) + if schema.release != NULL: + ArrowSchemaRelease(schema) + cpython.PyMem_Free(schema) diff --git a/src/oracledb/impl/arrow/dataframe.pyx b/src/oracledb/impl/arrow/dataframe.pyx new file mode 100644 index 0000000..8074617 --- /dev/null +++ b/src/oracledb/impl/arrow/dataframe.pyx @@ -0,0 +1,38 @@ +#------------------------------------------------------------------------------ +# Copyright (c) 2025, Oracle and/or its affiliates. +# +# This software is dual-licensed to you under the Universal Permissive License +# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License +# 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose +# either license. +# +# If you elect to accept the software under the Apache License, Version 2.0, +# the following applies: +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#------------------------------------------------------------------------------ + +#------------------------------------------------------------------------------ +# dataframe.pyx +# +# Cython implementation of the DataFrameImpl class. +#------------------------------------------------------------------------------ + +cdef class DataFrameImpl: + + def get_arrays(self): + """ + Internal method for getting the list of arrays associated with the data + frame. + """ + return self.arrays diff --git a/src/oracledb/interchange/nanoarrow/nanoarrow.c b/src/oracledb/impl/arrow/nanoarrow/nanoarrow.c similarity index 100% rename from src/oracledb/interchange/nanoarrow/nanoarrow.c rename to src/oracledb/impl/arrow/nanoarrow/nanoarrow.c diff --git a/src/oracledb/interchange/nanoarrow/nanoarrow.h b/src/oracledb/impl/arrow/nanoarrow/nanoarrow.h similarity index 100% rename from src/oracledb/interchange/nanoarrow/nanoarrow.h rename to src/oracledb/impl/arrow/nanoarrow/nanoarrow.h diff --git a/src/oracledb/impl/arrow/utils.pyx b/src/oracledb/impl/arrow/utils.pyx new file mode 100644 index 0000000..bb3cbf7 --- /dev/null +++ b/src/oracledb/impl/arrow/utils.pyx @@ -0,0 +1,304 @@ +#------------------------------------------------------------------------------ +# Copyright (c) 2025, Oracle and/or its affiliates. +# +# This software is dual-licensed to you under the Universal Permissive License +# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License +# 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose +# either license. +# +# If you elect to accept the software under the Apache License, Version 2.0, +# the following applies: +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#------------------------------------------------------------------------------ + +#------------------------------------------------------------------------------ +# utils.pyx +# +# Contains utilities and definitions used by the other files in this module. +#------------------------------------------------------------------------------ + +cdef extern from "nanoarrow.c": + + ctypedef int ArrowErrorCode + + ctypedef void (*ArrowBufferDeallocatorCallback) + + cdef struct ArrowBufferAllocator: + void *private_data + + cdef struct ArrowBuffer: + uint8_t *data + int64_t size_bytes + ArrowBufferAllocator allocator + + cdef union ArrowBufferViewData: + const void* data + + cdef struct ArrowBufferView: + ArrowBufferViewData data + int64_t size_bytes + + cdef struct ArrowBitmap: + ArrowBuffer buffer + + cdef struct ArrowArrayView: + ArrowBufferView *buffer_views + + cdef struct ArrowDecimal: + pass + + cdef struct ArrowError: + pass + + cdef struct ArrowStringView: + const char* data + int64_t size_bytes + + cdef ArrowErrorCode NANOARROW_OK + + ArrowErrorCode ArrowArrayAllocateChildren(ArrowArray *array, + int64_t n_children) + ArrowErrorCode ArrowArrayAppendBytes(ArrowArray* array, + ArrowBufferView value) + ArrowErrorCode ArrowArrayAppendDecimal(ArrowArray* array, + const ArrowDecimal* value) + ArrowErrorCode ArrowArrayAppendDouble(ArrowArray* array, double value) + ArrowErrorCode ArrowArrayAppendInt(ArrowArray* array, int64_t value) + ArrowErrorCode ArrowArrayAppendNull(ArrowArray* array, int64_t n) + ArrowBuffer* ArrowArrayBuffer(ArrowArray* array, int64_t i) + ArrowErrorCode ArrowArrayFinishBuildingDefault(ArrowArray* array, + ArrowError* error) + ArrowErrorCode ArrowArrayFinishElement(ArrowArray *array) + ArrowErrorCode ArrowArrayInitFromSchema(ArrowArray *array, + ArrowSchema *schema, + ArrowError *error) + ArrowErrorCode ArrowArrayInitFromType(ArrowArray* array, + ArrowType storage_type) + void ArrowArrayRelease(ArrowArray *array) + ArrowErrorCode ArrowArrayReserve(ArrowArray* array, + int64_t additional_size_elements) + ArrowErrorCode ArrowArrayStartAppending(ArrowArray* array) + ArrowBitmap* ArrowArrayValidityBitmap(ArrowArray* array) + ArrowErrorCode ArrowArrayViewInitFromArray(ArrowArrayView* array_view, + ArrowArray* array) + int8_t ArrowBitGet(const uint8_t* bits, int64_t i) + ArrowBufferAllocator ArrowBufferDeallocator(ArrowBufferDeallocatorCallback, + void *private_data) + void ArrowDecimalInit(ArrowDecimal* decimal, int32_t bitwidth, + int32_t precision, int32_t scale) + void ArrowDecimalSetBytes(ArrowDecimal *decimal, const uint8_t* value) + ArrowErrorCode ArrowDecimalSetDigits(ArrowDecimal* decimal, + ArrowStringView value) + ArrowErrorCode ArrowSchemaDeepCopy(const ArrowSchema *schema, + ArrowSchema *schema_out) + void ArrowSchemaInit(ArrowSchema* schema) + ArrowErrorCode ArrowSchemaInitFromType(ArrowSchema* schema, ArrowType type) + void ArrowSchemaRelease(ArrowSchema *schema) + ArrowErrorCode ArrowSchemaSetName(ArrowSchema* schema, const char* name) + ArrowErrorCode ArrowSchemaSetType(ArrowSchema * schema, ArrowType type) + ArrowErrorCode ArrowSchemaSetTypeDateTime(ArrowSchema* schema, + ArrowType arrow_type, + ArrowTimeUnit time_unit, + const char* timezone) + ArrowErrorCode ArrowSchemaSetTypeStruct(ArrowSchema *schema, + int64_t n_children) + ArrowErrorCode ArrowSchemaSetTypeDecimal(ArrowSchema* schema, + ArrowType type, + int32_t decimal_precision, + int32_t decimal_scale) + int64_t ArrowSchemaToString(const ArrowSchema* schema, char* out, + int64_t n, char recursive) + +cdef int _check_nanoarrow(int code) except -1: + """ + Checks the return code of the nanoarrow function and raises an exception if + it is not NANOARROW_OK. + """ + if code != NANOARROW_OK: + errors._raise_err(errors.ERR_ARROW_C_API_ERROR, code=code) + + + +cdef int append_double_array(ArrowArray *arrow_array, + array.array value) except -1: + """ + Appends an array of doubles to the Arrow array. + """ + cdef: + ArrowArray *child_array = arrow_array.children[0] + double *double_buf = value.data.as_doubles + Py_ssize_t i + for i in range(len(value)): + _check_nanoarrow(ArrowArrayAppendDouble(child_array, double_buf[i])) + _check_nanoarrow(ArrowArrayFinishElement(arrow_array)) + + +cdef int append_float_array(ArrowArray *arrow_array, + array.array value) except -1: + """ + Appends an array of floats to the Arrow array. + """ + cdef: + ArrowArray *child_array = arrow_array.children[0] + float *float_buf = value.data.as_floats + Py_ssize_t i + for i in range(len(value)): + _check_nanoarrow(ArrowArrayAppendDouble(child_array, float_buf[i])) + _check_nanoarrow(ArrowArrayFinishElement(arrow_array)) + + +cdef int append_int8_array(ArrowArray *arrow_array, + array.array value) except -1: + """ + Appends an array of signed one-byte integers to the Arrow array. + """ + cdef: + ArrowArray *child_array = arrow_array.children[0] + int8_t *int8_buf = value.data.as_schars + Py_ssize_t i + for i in range(len(value)): + _check_nanoarrow(ArrowArrayAppendInt(child_array, int8_buf[i])) + _check_nanoarrow(ArrowArrayFinishElement(arrow_array)) + + +cdef int append_uint8_array(ArrowArray *arrow_array, + array.array value) except -1: + """ + Appends an array of unsigned one-byte integers to the Arrow array. + """ + cdef: + ArrowArray *child_array = arrow_array.children[0] + uint8_t *uint8_buf = value.data.as_uchars + Py_ssize_t i + for i in range(len(value)): + _check_nanoarrow(ArrowArrayAppendInt(child_array, uint8_buf[i])) + _check_nanoarrow(ArrowArrayFinishElement(arrow_array)) + + +cdef int append_uint32_array(ArrowArray *arrow_array, + array.array value) except -1: + """ + Appends an array of unsigned four-byte integers to the Arrow array. Note + that Python's array.array doesn't natively support uint32_t but an upper + layer has verified that the data in the buffer consists of only four byte + integers. + """ + cdef: + uint32_t *uint32_buf = value.data.as_voidptr + ArrowArray *child_array = arrow_array.children[0] + Py_ssize_t i + for i in range(len(value)): + _check_nanoarrow(ArrowArrayAppendInt(child_array, uint32_buf[i])) + _check_nanoarrow(ArrowArrayFinishElement(arrow_array)) + + +cdef void arrow_buffer_dealloc_callback(ArrowBufferAllocator *allocator, + uint8_t *ptr, int64_t size): + """ + ArrowBufferDeallocatorCallback for an ArrowBuffer borrowed from an Arrow + array. + """ + cpython.Py_DECREF( allocator.private_data) + + +cdef int copy_arrow_array(ArrowArrayImpl array_impl, + ArrowArray *src, ArrowArray *dest) except -1: + """ + Shallow copy source ArrowArray to destination ArrowArray. The source + ArrowArray belongs to the wrapper ArrowArrayImpl. The shallow copy idea + is borrowed from nanoarrow: + https://github.com/apache/arrow-nanoarrow/main/blob/python + """ + cdef: + ArrowBuffer *dest_buffer + ssize_t i + _check_nanoarrow( + ArrowArrayInitFromType( + dest, NANOARROW_TYPE_UNINITIALIZED + ) + ) + + # Copy metadata + dest.length = src.length + dest.offset = src.offset + dest.null_count = src.null_count + + # Borrow an ArrowBuffer belonging to ArrowArrayImpl. The ArrowBuffer can + # belong to an immediate ArrowArray or a child (in case of nested types). + # Either way, we PY_INCREF(array_impl), so that it is not + # prematurely garbage collected. The corresponding PY_DECREF happens in the + # ArrowBufferDeAllocator callback. + for i in range(src.n_buffers): + if src.buffers[i] != NULL: + dest_buffer = ArrowArrayBuffer(dest, i) + dest_buffer.data = src.buffers[i] + dest_buffer.size_bytes = 0 + dest_buffer.allocator = ArrowBufferDeallocator( + arrow_buffer_dealloc_callback, + array_impl + ) + cpython.Py_INCREF(array_impl) + dest.buffers[i] = src.buffers[i] + dest.n_buffers = src.n_buffers + + # shallow copy of children (recursive call) + if src.n_children > 0: + _check_nanoarrow(ArrowArrayAllocateChildren(dest, src.n_children)) + for i in range(src.n_children): + copy_arrow_array(array_impl, src.children[i], dest.children[i]) + + +cdef int build_arrow_schema_for_sparse_vector( + ArrowSchema *schema, + ArrowType vector_value_type +) except -1: + + # Initialize struct with 3 fields - num_dimensions, indices, values + ArrowSchemaInit(schema) + _check_nanoarrow(ArrowSchemaSetTypeStruct(schema, 3)) + + # first child: "num_dimensions" + _check_nanoarrow( + ArrowSchemaSetType(schema.children[0], NANOARROW_TYPE_INT64) + ) + _check_nanoarrow(ArrowSchemaSetName(schema.children[0], "num_dimensions")) + + # second child: "indices" + _check_nanoarrow(ArrowSchemaSetType( + schema.children[1], + NANOARROW_TYPE_LIST + ) + ) + _check_nanoarrow( + ArrowSchemaSetType( + schema.children[1].children[0], + NANOARROW_TYPE_UINT32 + ) + ) + _check_nanoarrow(ArrowSchemaSetName(schema.children[1], "indices")) + + # third child: "values" + _check_nanoarrow( + ArrowSchemaSetType( + schema.children[2], + NANOARROW_TYPE_LIST + ) + ) + _check_nanoarrow( + ArrowSchemaSetType( + schema.children[2].children[0], + vector_value_type + ) + ) + _check_nanoarrow(ArrowSchemaSetName(schema.children[2], "values")) diff --git a/src/oracledb/impl/base/converters.pyx b/src/oracledb/impl/base/converters.pyx index 8180945..e8382af 100644 --- a/src/oracledb/impl/base/converters.pyx +++ b/src/oracledb/impl/base/converters.pyx @@ -47,7 +47,7 @@ cdef cydatetime.datetime convert_date_to_python(OracleDataBuffer *buffer): return output -cdef int convert_date_to_arrow_timestamp(OracleArrowArray arrow_array, +cdef int convert_date_to_arrow_timestamp(ArrowArrayImpl arrow_array, OracleDataBuffer *buffer) except -1: """ Converts a DATE, TIMESTAMP, TIMESTAMP WITH LOCAL TIME ZONE or TIMESTAMP @@ -85,7 +85,7 @@ cdef object convert_interval_ym_to_python(OracleDataBuffer *buffer): return PY_TYPE_INTERVAL_YM(value.years, value.months) -cdef int convert_number_to_arrow_decimal(OracleArrowArray arrow_array, +cdef int convert_number_to_arrow_decimal(ArrowArrayImpl arrow_array, OracleDataBuffer *buffer) except -1: """ Converts a NUMBER value stored in the buffer to Arrow DECIMAL128. @@ -137,7 +137,7 @@ cdef int convert_number_to_arrow_decimal(OracleArrowArray arrow_array, -cdef int convert_number_to_arrow_double(OracleArrowArray arrow_array, +cdef int convert_number_to_arrow_double(ArrowArrayImpl arrow_array, OracleDataBuffer *buffer) except -1: """ Converts a NUMBER value stored in the buffer to Arrow DOUBLE. @@ -149,7 +149,7 @@ cdef int convert_number_to_arrow_double(OracleArrowArray arrow_array, arrow_array.append_double(atof(value.chars[:value.num_chars])) -cdef int convert_number_to_arrow_int64(OracleArrowArray arrow_array, +cdef int convert_number_to_arrow_int64(ArrowArrayImpl arrow_array, OracleDataBuffer *buffer) except -1: """ Converts a NUMBER value stored in the buffer to Arrow INT64. @@ -224,7 +224,7 @@ cdef object convert_str_to_python(OracleDataBuffer *buffer, uint8_t csfrm, cdef int convert_oracle_data_to_arrow(OracleMetadata from_metadata, OracleMetadata to_metadata, OracleData* data, - OracleArrowArray arrow_array) except -1: + ArrowArrayImpl arrow_array) except -1: """ Converts the value stored in OracleData to Arrow format. """ @@ -440,7 +440,7 @@ cdef object convert_oracle_data_to_python(OracleMetadata from_metadata, output_type=to_metadata.dbtype.name) -cdef int convert_vector_to_arrow(OracleArrowArray arrow_array, +cdef int convert_vector_to_arrow(ArrowArrayImpl arrow_array, object vector) except -1: """ Converts the vector to the format required by the Arrow array. diff --git a/src/oracledb/impl/base/cursor.pyx b/src/oracledb/impl/base/cursor.pyx index 5d6b11d..cc827b8 100644 --- a/src/oracledb/impl/base/cursor.pyx +++ b/src/oracledb/impl/base/cursor.pyx @@ -519,11 +519,13 @@ cdef class BaseCursorImpl: Flush all buffers and return an Oracle Data frame. """ cdef: + DataFrameImpl df_impl BaseVarImpl var_impl - list columns = [] + df_impl = DataFrameImpl.__new__(DataFrameImpl) + df_impl.arrays = [] for var_impl in self.fetch_var_impls: - columns.append(var_impl._finish_building_arrow_array()) - return PY_TYPE_DATAFRAME(columns) + df_impl.arrays.append(var_impl._finish_building_arrow_array()) + return PY_TYPE_DATAFRAME._from_impl(df_impl) def close(self, bint in_del=False): """ @@ -576,7 +578,7 @@ cdef class BaseCursorImpl: def fetch_df_all(self, cursor): """ - Internal method used for fetching all data as OracleDataFrame + Internal method used for fetching all data as DataFrame """ while self._more_rows_to_fetch: self._fetch_rows(cursor) @@ -584,7 +586,7 @@ cdef class BaseCursorImpl: def fetch_df_batches(self, cursor, int batch_size): """ - Internal method used for fetching next batch as OracleDataFrame + Internal method used for fetching next batch as DataFrame cursor.arraysize = batchsize """ cdef: diff --git a/src/oracledb/impl/base/utils.pyx b/src/oracledb/impl/base/utils.pyx index 04d1902..9bdc64b 100644 --- a/src/oracledb/impl/base/utils.pyx +++ b/src/oracledb/impl/base/utils.pyx @@ -219,6 +219,7 @@ def init_base_impl(package): ENUM_AUTH_MODE, \ ENUM_POOL_GET_MODE, \ ENUM_PURITY, \ + PY_TYPE_ARROW_ARRAY, \ PY_TYPE_ASYNC_CURSOR, \ PY_TYPE_ASYNC_LOB, \ PY_TYPE_CONNECT_PARAMS, \ @@ -245,11 +246,12 @@ def init_base_impl(package): ENUM_AUTH_MODE = package.AuthMode ENUM_PURITY = package.Purity ENUM_POOL_GET_MODE = package.PoolGetMode + PY_TYPE_ARROW_ARRAY = package.ArrowArray PY_TYPE_ASYNC_CURSOR = package.AsyncCursor PY_TYPE_ASYNC_LOB = package.AsyncLOB PY_TYPE_CONNECT_PARAMS = package.ConnectParams PY_TYPE_CURSOR = package.Cursor - PY_TYPE_DATAFRAME = package.OracleDataFrame + PY_TYPE_DATAFRAME = package.DataFrame PY_TYPE_DB_OBJECT = package.DbObject PY_TYPE_DB_OBJECT_TYPE = package.DbObjectType PY_TYPE_FETCHINFO = package.FetchInfo diff --git a/src/oracledb/impl/base/var.pyx b/src/oracledb/impl/base/var.pyx index 1fb79e6..1d39820 100644 --- a/src/oracledb/impl/base/var.pyx +++ b/src/oracledb/impl/base/var.pyx @@ -280,7 +280,7 @@ cdef class BaseVarImpl: else: errors._raise_err(errors.ERR_ARROW_UNSUPPORTED_VECTOR_FORMAT) - self._arrow_array = OracleArrowArray( + self._arrow_array = ArrowArrayImpl( arrow_type=self.metadata._arrow_type, name=self.metadata.name, precision=self.metadata.precision, @@ -298,13 +298,13 @@ cdef class BaseVarImpl: self.num_elements = 1 self._has_returned_data = False - cdef OracleArrowArray _finish_building_arrow_array(self): + cdef ArrowArrayImpl _finish_building_arrow_array(self): """ Finish building the Arrow array associated with the variable and then return that array (after clearing it in the variable so that a new array will be built if more rows are fetched). """ - cdef OracleArrowArray array = self._arrow_array + cdef ArrowArrayImpl array = self._arrow_array array.finish_building() self._arrow_array = None return array diff --git a/src/oracledb/impl/thin/cursor.pyx b/src/oracledb/impl/thin/cursor.pyx index 5133e03..205a8da 100644 --- a/src/oracledb/impl/thin/cursor.pyx +++ b/src/oracledb/impl/thin/cursor.pyx @@ -434,7 +434,7 @@ cdef class AsyncThinCursorImpl(BaseThinCursorImpl): async def fetch_df_all(self, cursor): """ - Internal method used for fetching all data as OracleDataFrame + Internal method used for fetching all data as DataFrame """ while self._more_rows_to_fetch: await self._fetch_rows_async(cursor) @@ -442,7 +442,7 @@ cdef class AsyncThinCursorImpl(BaseThinCursorImpl): async def fetch_df_batches(self, cursor, int batch_size): """ - Internal method used for fetching next batch as OracleDataFrame. + Internal method used for fetching next batch as DataFrame. """ # Return the prefetched batch yield self._finish_building_arrow_arrays() diff --git a/src/oracledb/impl/thin/messages/base.pyx b/src/oracledb/impl/thin/messages/base.pyx index 581c74e..1b9a074 100644 --- a/src/oracledb/impl/thin/messages/base.pyx +++ b/src/oracledb/impl/thin/messages/base.pyx @@ -910,7 +910,7 @@ cdef class MessageWithData(Message): var_impl._fetch_metadata) statement._last_output_type_handler = type_handler - # Create OracleArrowArray if fetching arrow is enabled + # create Arrow arrays if fetching arrow is enabled if cursor_impl.fetching_arrow: cursor_impl._create_arrow_arrays() diff --git a/src/oracledb/impl/thin/var.pyx b/src/oracledb/impl/thin/var.pyx index 0fa7c61..db005a9 100644 --- a/src/oracledb/impl/thin/var.pyx +++ b/src/oracledb/impl/thin/var.pyx @@ -32,7 +32,7 @@ cdef class ThinVarImpl(BaseVarImpl): cdef: object _last_raw_value - OracleArrowArray _last_arrow_array + ArrowArrayImpl _last_arrow_array list _coroutine_indexes cdef int _bind(self, object conn, BaseCursorImpl cursor_impl, @@ -113,7 +113,7 @@ cdef class ThinVarImpl(BaseVarImpl): BaseVarImpl._finalize_init(self) self._values = [None] * self.num_elements - cdef OracleArrowArray _finish_building_arrow_array(self): + cdef ArrowArrayImpl _finish_building_arrow_array(self): """ Finish building the Arrow array associated with the variable and then return that array (after clearing it in the variable so that a new diff --git a/src/oracledb/interchange/__init__.py b/src/oracledb/interchange/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/oracledb/interchange/buffer.py b/src/oracledb/interchange/buffer.py deleted file mode 100644 index 798a8db..0000000 --- a/src/oracledb/interchange/buffer.py +++ /dev/null @@ -1,84 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2025, Oracle and/or its affiliates. -# -# This software is dual-licensed to you under the Universal Permissive License -# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License -# 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose -# either license. -# -# If you elect to accept the software under the Apache License, Version 2.0, -# the following applies: -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ----------------------------------------------------------------------------- - -# ----------------------------------------------------------------------------- -# buffer.py -# -# Implements the Buffer class as documented in DataFrame API -# ----------------------------------------------------------------------------- - -from typing import Tuple - -from .protocol import ( - Buffer, - DlpackDeviceType, -) - - -class OracleColumnBuffer(Buffer): - """ - OracleColumnBuffer represents a contiguous memory buffer in the DataFrame - Interchange Protocol. It provides access to raw binary data that backs - various components of the data frame such as column values, validity masks - and offsets for variable-length data types. - """ - - def __init__(self, buffer_type, size_in_bytes, address) -> None: - self.buffer_type = buffer_type - self.size_in_bytes = size_in_bytes - self.address = address - - def __dlpack__(self): - """ - Represent this structure as a DLPack interface. - """ - raise NotImplementedError("__dlpack__") - - def __dlpack_device__(self) -> Tuple[DlpackDeviceType, None]: - """ - Device type and device ID for where the data - in the buffer resides - """ - return (DlpackDeviceType.CPU, None) - - def __repr__(self) -> str: - device = self.__dlpack_device__()[0].name - return ( - f"OracleColumnBuffer(bufsize={self.bufsize}, " - f"ptr={self.ptr}, type={self.buffer_type}, device={device!r})" - ) - - @property - def bufsize(self) -> int: - """ - Returns the total size of buffer in bytes. - """ - return self.size_in_bytes - - @property - def ptr(self) -> int: - """ - Returns the memory address of the buffer. - """ - return self.address diff --git a/src/oracledb/interchange/column.py b/src/oracledb/interchange/column.py deleted file mode 100644 index c44873d..0000000 --- a/src/oracledb/interchange/column.py +++ /dev/null @@ -1,217 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2025, Oracle and/or its affiliates. -# -# This software is dual-licensed to you under the Universal Permissive License -# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License -# 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose -# either license. -# -# If you elect to accept the software under the Apache License, Version 2.0, -# the following applies: -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ----------------------------------------------------------------------------- - -# ----------------------------------------------------------------------------- -# column.py -# -# Implements the Column class as documented in DataFrame API -# ----------------------------------------------------------------------------- - -from typing import Any, Dict, Iterable, Optional, Tuple - -from .buffer import OracleColumnBuffer -from .protocol import ( - CategoricalDescription, - Column, - Dtype, - ColumnBuffers, - ColumnNullType, - DtypeKind, -) - -from .nanoarrow_bridge import ( - ArrowTimeUnit, - ArrowType, -) - - -class OracleColumn(Column): - """ - OracleColumn represents a column in the DataFrame Interchange Protocol. It - provides a standardized way to expose a column's data, metadata and chunks, - allowing interoperability between data frame libraries. - """ - - def __init__(self, ora_arrow_array: object): - self.ora_arrow_array = ora_arrow_array - self._buffer_info = ora_arrow_array.get_buffer_info() - - def __arrow_c_array__(self, requested_schema=None): - return self.ora_arrow_array.__arrow_c_array__( - requested_schema=requested_schema - ) - - def _data_buffer(self): - buffer = self._buffer_info.get("data") - if buffer is None: - return None - size_bytes, address = buffer - data_buffer = OracleColumnBuffer( - size_in_bytes=size_bytes, address=address, buffer_type="data" - ) - return data_buffer, self.dtype - - def _offsets_buffer(self): - buffer = self._buffer_info.get("offsets") - if buffer is None: - return None - size_bytes, address = buffer - offsets_buffer = OracleColumnBuffer( - size_in_bytes=size_bytes, address=address, buffer_type="offsets" - ) - if self.ora_arrow_array.arrow_type in ( - ArrowType.NANOARROW_TYPE_LARGE_STRING, - ArrowType.NANOARROW_TYPE_LARGE_BINARY, - ): - dtype = (DtypeKind.INT, 64, "l", "=") - else: - dtype = (DtypeKind.INT, 32, "i", "=") - return offsets_buffer, dtype - - def _validity_buffer(self): - buffer = self._buffer_info.get("validity") - if buffer is None: - return None - size_bytes, address = buffer - validity_buffer = OracleColumnBuffer( - size_in_bytes=size_bytes, address=address, buffer_type="validity" - ) - dtype = (DtypeKind.BOOL, 1, "b", "=") - return validity_buffer, dtype - - def describe_categorical(self) -> CategoricalDescription: - """ - Returns a description of a categorical data type. - """ - raise NotImplementedError() - - @property - def describe_null(self) -> Tuple[ColumnNullType, Optional[int]]: - """ - Returns a description of the null representation used by the column. - """ - if self.null_count == 0: - return ColumnNullType.NON_NULLABLE, None - else: - return ColumnNullType.USE_BITMASK, 0 - - @property - def dtype(self) -> Dtype: - """ - Returns the data type of the column. The returned dtype provides - information on the storage format and the type of data in the column. - """ - arrow_type = self.ora_arrow_array.arrow_type - if arrow_type == ArrowType.NANOARROW_TYPE_INT64: - return (DtypeKind.INT, 64, "l", "=") - elif arrow_type == ArrowType.NANOARROW_TYPE_DOUBLE: - return (DtypeKind.FLOAT, 64, "g", "=") - elif arrow_type == ArrowType.NANOARROW_TYPE_FLOAT: - return (DtypeKind.FLOAT, 64, "g", "=") - elif arrow_type == ArrowType.NANOARROW_TYPE_STRING: - return (DtypeKind.STRING, 8, "u", "=") - elif arrow_type == ArrowType.NANOARROW_TYPE_TIMESTAMP: - time_unit = self.ora_arrow_array.time_unit - if time_unit == ArrowTimeUnit.NANOARROW_TIME_UNIT_MICRO: - return (DtypeKind.DATETIME, 64, "tsu:", "=") - elif time_unit == ArrowTimeUnit.NANOARROW_TIME_UNIT_SECOND: - return (DtypeKind.DATETIME, 64, "tss:", "=") - elif time_unit == ArrowTimeUnit.NANOARROW_TIME_UNIT_MILLI: - return (DtypeKind.DATETIME, 64, "tsm:", "=") - elif time_unit == ArrowTimeUnit.NANOARROW_TIME_UNIT_NANO: - return (DtypeKind.DATETIME, 64, "tsn:", "=") - elif arrow_type == ArrowType.NANOARROW_TYPE_DECIMAL128: - array = self.ora_arrow_array - return ( - DtypeKind.DECIMAL, - 128, - f"d:{array.precision}.{array.scale}", - "=", - ) - elif arrow_type == ArrowType.NANOARROW_TYPE_BINARY: - return (DtypeKind.STRING, 8, "z", "=") - elif arrow_type == ArrowType.NANOARROW_TYPE_LARGE_BINARY: - return (DtypeKind.STRING, 8, "Z", "=") - elif arrow_type == ArrowType.NANOARROW_TYPE_LARGE_STRING: - return (DtypeKind.STRING, 8, "U", "=") - - def get_buffers(self) -> ColumnBuffers: - """ - Returns a dictionary specifying the memory buffers backing the column. - This currently consists of: - - "data": the main buffer storing column values - - "validity": a buffer containing null/missing values - - "offsets": a buffer for variable-length types like string - """ - return { - "data": self._data_buffer(), - "validity": self._validity_buffer(), - "offsets": self._offsets_buffer(), - } - - def get_chunks(self, n_chunks: Optional[int] = None) -> Iterable[Column]: - """ - Return an iterator containing the column chunks. Currently this only - returns itself. - """ - yield self - - @property - def metadata(self) -> Dict[str, Any]: - """ - Returns metadata about the column. - """ - return { - "name": self.ora_arrow_array.name, - "size": self.size(), - "num_chunks": self.num_chunks(), - } - - @property - def null_count(self) -> int: - """ - Returns the number of null elements. - """ - return self.ora_arrow_array.null_count - - def num_chunks(self) -> int: - """ - Returns the number of chunks used by the column. This method currently - always returns the value 1, implying that the column uses contiguous - memory. - """ - return 1 - - @property - def offset(self) -> int: - """ - Returns the offset of the first element. - """ - return self.ora_arrow_array.offset - - def size(self) -> int: - """ - Returns the number of elements in the column. - """ - return len(self.ora_arrow_array) diff --git a/src/oracledb/interchange/dataframe.py b/src/oracledb/interchange/dataframe.py deleted file mode 100644 index 768145b..0000000 --- a/src/oracledb/interchange/dataframe.py +++ /dev/null @@ -1,163 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2025, Oracle and/or its affiliates. -# -# This software is dual-licensed to you under the Universal Permissive License -# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License -# 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose -# either license. -# -# If you elect to accept the software under the Apache License, Version 2.0, -# the following applies: -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ----------------------------------------------------------------------------- - -# ----------------------------------------------------------------------------- -# dataframe.py -# -# Implement DataFrame class as documented in the standard -# https://data-apis.org/dataframe-protocol/latest/API.html -# ----------------------------------------------------------------------------- - -from typing import Any, Dict, Iterable, List, Optional, Sequence - -from .column import OracleColumn - -from .protocol import DataFrame - - -class OracleDataFrame(DataFrame): - """ - OracleDataFrame is an implementation of the DataFrame Interchange Protocol. - It provides an interface for exchanging tabular data between different data - frame libraries (e.g. pandas, pyarrow, polars). - """ - - def __init__( - self, - oracle_arrow_arrays: List, - allow_copy: bool = True, - ): - self._cols = [] - self._cols_map = {} - self._rows = None - self._arrays = oracle_arrow_arrays - for ora_arrow_array in oracle_arrow_arrays: - column = OracleColumn(ora_arrow_array=ora_arrow_array) - self._rows = column.size() - self._cols.append(column) - self._cols_map[ora_arrow_array.name] = column - self.allow_copy = allow_copy - - def __dataframe__( - self, - nan_as_null: bool = False, # noqa: FBT001 - allow_copy: bool = True, # noqa: FBT001 - ) -> DataFrame: - """ - Returns a data frame adhering to the DataFrame Interchange protocol. - """ - return self - - def get_chunks( - self, n_chunks: Optional[int] = None - ) -> Iterable[DataFrame]: - """ - Returns an iterator for each of the chunks in the data frame. Since - there is currently only one chunk, this simply returns itself. - """ - yield self - - def column_arrays(self) -> List: - """ - Returns a list of the Arrow arrays corresponding to each column in the - data frame. - """ - return self._arrays - - def column_names(self) -> List[str]: - """ - Returns a list of the names of the columns in the data frame. - """ - return list(self._cols_map.keys()) - - def get_column(self, i: int) -> OracleColumn: - """ - Returns a column from the data frame given its zero-based index. If the - index is out of range, an IndexError exception is raised. - """ - if i < 0 or i >= self.num_columns(): - raise IndexError( - f"Column index {i} is out of bounds for " - f"DataFrame with {self.num_columns()} columns" - ) - return self._cols[i] - - def get_column_by_name(self, name: str) -> OracleColumn: - """ - Returns a column from the data frame given the name of the column. If - the column name is not found, a KeyError exception is raised. - """ - if name not in self._cols_map: - raise KeyError(f"Column {name} not found in DataFrame") - return self._cols_map[name] - - def get_columns(self) -> List[OracleColumn]: - """ - Returns a list of all of the columns in the data frame. - """ - return self._cols - - @property - def metadata(self) -> Dict[str, Any]: - """ - Returns metadata for the data frame. Currently this returns - information about the number of columns (num_columns), number of rows - (num_rows) and number of chunks (num_chunks). - """ - return { - "num_columns": self.num_columns(), - "num_rows": self.num_rows(), - "num_chunks": self.num_chunks(), - } - - def num_chunks(self) -> int: - """ - Returns the number of chunks (contiguous memory blocks) in the data - frame. Currently this always returns 1. - """ - return 1 - - def num_columns(self) -> int: - """ - Returns the number of columns in the data frame. - """ - return len(self._cols) - - def num_rows(self) -> int: - """ - Returns the number of rows in the data frame. - """ - return self._rows - - def select_columns(self, indices: Sequence[int]) -> "DataFrame": - """ - Create a new DataFrame by selecting a subset of columns by index. - """ - raise NotImplementedError() - - def select_columns_by_name(self, names: Sequence[str]) -> "DataFrame": - """ - Create a new DataFrame by selecting a subset of columns by name. - """ - raise NotImplementedError() diff --git a/src/oracledb/interchange/nanoarrow_bridge.pyx b/src/oracledb/interchange/nanoarrow_bridge.pyx deleted file mode 100644 index 461d711..0000000 --- a/src/oracledb/interchange/nanoarrow_bridge.pyx +++ /dev/null @@ -1,736 +0,0 @@ -#------------------------------------------------------------------------------ -# Copyright (c) 2025, Oracle and/or its affiliates. -# -# This software is dual-licensed to you under the Universal Permissive License -# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License -# 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose -# either license. -# -# If you elect to accept the software under the Apache License, Version 2.0, -# the following applies: -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#------------------------------------------------------------------------------ -#------------------------------------------------------------------------------ -# nanoarrow_bridge.pyx -# -# Cython wrapper around the Arrow C Data interface -#------------------------------------------------------------------------------ - -cimport cpython - -from libc.stdint cimport uintptr_t -from libc.string cimport memcpy, strlen, strchr - -from .. import errors - -cdef extern from "nanoarrow/nanoarrow.c": - - ctypedef int ArrowErrorCode - - ctypedef void (*ArrowBufferDeallocatorCallback) - - cdef struct ArrowBufferAllocator: - void *private_data - - cdef struct ArrowBuffer: - uint8_t *data - int64_t size_bytes - ArrowBufferAllocator allocator - - cdef union ArrowBufferViewData: - const void* data - - cdef struct ArrowBufferView: - ArrowBufferViewData data - int64_t size_bytes - - cdef struct ArrowBitmap: - ArrowBuffer buffer - - cdef struct ArrowArrayView: - ArrowBufferView *buffer_views - - cdef struct ArrowDecimal: - pass - - cdef struct ArrowError: - pass - - cdef struct ArrowStringView: - const char* data - int64_t size_bytes - - cdef ArrowErrorCode NANOARROW_OK - - ArrowErrorCode ArrowArrayAllocateChildren(ArrowArray *array, - int64_t n_children) - ArrowErrorCode ArrowArrayAppendBytes(ArrowArray* array, - ArrowBufferView value) - ArrowErrorCode ArrowArrayAppendDecimal(ArrowArray* array, - const ArrowDecimal* value) - ArrowErrorCode ArrowArrayAppendDouble(ArrowArray* array, double value) - ArrowErrorCode ArrowArrayAppendInt(ArrowArray* array, int64_t value) - ArrowErrorCode ArrowArrayAppendNull(ArrowArray* array, int64_t n) - ArrowBuffer* ArrowArrayBuffer(ArrowArray* array, int64_t i) - ArrowErrorCode ArrowArrayFinishBuildingDefault(ArrowArray* array, - ArrowError* error) - ArrowErrorCode ArrowArrayFinishElement(ArrowArray *array) - ArrowErrorCode ArrowArrayInitFromSchema(ArrowArray *array, - ArrowSchema *schema, - ArrowError *error) - ArrowErrorCode ArrowArrayInitFromType(ArrowArray* array, - ArrowType storage_type) - void ArrowArrayRelease(ArrowArray *array) - ArrowErrorCode ArrowArrayReserve(ArrowArray* array, - int64_t additional_size_elements) - ArrowErrorCode ArrowArrayStartAppending(ArrowArray* array) - ArrowBitmap* ArrowArrayValidityBitmap(ArrowArray* array) - ArrowErrorCode ArrowArrayViewInitFromArray(ArrowArrayView* array_view, - ArrowArray* array) - int8_t ArrowBitGet(const uint8_t* bits, int64_t i) - ArrowBufferAllocator ArrowBufferDeallocator(ArrowBufferDeallocatorCallback, - void *private_data) - void ArrowDecimalInit(ArrowDecimal* decimal, int32_t bitwidth, - int32_t precision, int32_t scale) - void ArrowDecimalSetBytes(ArrowDecimal *decimal, const uint8_t* value) - ArrowErrorCode ArrowDecimalSetDigits(ArrowDecimal* decimal, - ArrowStringView value) - ArrowErrorCode ArrowSchemaDeepCopy(const ArrowSchema *schema, - ArrowSchema *schema_out) - void ArrowSchemaInit(ArrowSchema* schema) - ArrowErrorCode ArrowSchemaInitFromType(ArrowSchema* schema, ArrowType type) - void ArrowSchemaRelease(ArrowSchema *schema) - ArrowErrorCode ArrowSchemaSetName(ArrowSchema* schema, const char* name) - ArrowErrorCode ArrowSchemaSetType(ArrowSchema * schema, ArrowType type) - ArrowErrorCode ArrowSchemaSetTypeDateTime(ArrowSchema* schema, - ArrowType arrow_type, - ArrowTimeUnit time_unit, - const char* timezone) - ArrowErrorCode ArrowSchemaSetTypeStruct(ArrowSchema *schema, - int64_t n_children) - ArrowErrorCode ArrowSchemaSetTypeDecimal(ArrowSchema* schema, - ArrowType type, - int32_t decimal_precision, - int32_t decimal_scale) - int64_t ArrowSchemaToString(const ArrowSchema* schema, char* out, - int64_t n, char recursive) - -cdef int _check_nanoarrow(int code) except -1: - """ - Checks the return code of the nanoarrow function and raises an exception if - it is not NANOARROW_OK. - """ - if code != NANOARROW_OK: - errors._raise_err(errors.ERR_ARROW_C_API_ERROR, code=code) - - -cdef void pycapsule_array_deleter(object array_capsule) noexcept: - cdef ArrowArray* array = cpython.PyCapsule_GetPointer( - array_capsule, "arrow_array" - ) - if array.release != NULL: - ArrowArrayRelease(array) - cpython.PyMem_Free(array) - - -cdef void pycapsule_schema_deleter(object schema_capsule) noexcept: - cdef ArrowSchema* schema = cpython.PyCapsule_GetPointer( - schema_capsule, "arrow_schema" - ) - if schema.release != NULL: - ArrowSchemaRelease(schema) - cpython.PyMem_Free(schema) - - -cdef int append_double_array(ArrowArray *arrow_array, - array.array value) except -1: - """ - Appends an array of doubles to the Arrow array. - """ - cdef: - ArrowArray *child_array = arrow_array.children[0] - double *double_buf = value.data.as_doubles - Py_ssize_t i - for i in range(len(value)): - _check_nanoarrow(ArrowArrayAppendDouble(child_array, double_buf[i])) - _check_nanoarrow(ArrowArrayFinishElement(arrow_array)) - - -cdef int append_float_array(ArrowArray *arrow_array, - array.array value) except -1: - """ - Appends an array of floats to the Arrow array. - """ - cdef: - ArrowArray *child_array = arrow_array.children[0] - float *float_buf = value.data.as_floats - Py_ssize_t i - for i in range(len(value)): - _check_nanoarrow(ArrowArrayAppendDouble(child_array, float_buf[i])) - _check_nanoarrow(ArrowArrayFinishElement(arrow_array)) - - -cdef int append_int8_array(ArrowArray *arrow_array, - array.array value) except -1: - """ - Appends an array of signed one-byte integers to the Arrow array. - """ - cdef: - ArrowArray *child_array = arrow_array.children[0] - int8_t *int8_buf = value.data.as_schars - Py_ssize_t i - for i in range(len(value)): - _check_nanoarrow(ArrowArrayAppendInt(child_array, int8_buf[i])) - _check_nanoarrow(ArrowArrayFinishElement(arrow_array)) - - -cdef int append_uint8_array(ArrowArray *arrow_array, - array.array value) except -1: - """ - Appends an array of unsigned one-byte integers to the Arrow array. - """ - cdef: - ArrowArray *child_array = arrow_array.children[0] - uint8_t *uint8_buf = value.data.as_uchars - Py_ssize_t i - for i in range(len(value)): - _check_nanoarrow(ArrowArrayAppendInt(child_array, uint8_buf[i])) - _check_nanoarrow(ArrowArrayFinishElement(arrow_array)) - - -cdef int append_uint32_array(ArrowArray *arrow_array, - array.array value) except -1: - """ - Appends an array of unsigned four-byte integers to the Arrow array. Note - that Python's array.array doesn't natively support uint32_t but an upper - layer has verified that the data in the buffer consists of only four byte - integers. - """ - cdef: - uint32_t *uint32_buf = value.data.as_voidptr - ArrowArray *child_array = arrow_array.children[0] - Py_ssize_t i - for i in range(len(value)): - _check_nanoarrow(ArrowArrayAppendInt(child_array, uint32_buf[i])) - _check_nanoarrow(ArrowArrayFinishElement(arrow_array)) - - -cdef void arrow_buffer_dealloc_callback(ArrowBufferAllocator *allocator, - uint8_t *ptr, int64_t size): - """ - ArrowBufferDeallocatorCallback for an ArrowBuffer borrowed from - OracleArrowArray - """ - cpython.Py_DECREF( allocator.private_data) - - -cdef int copy_arrow_array(OracleArrowArray oracle_arrow_array, - ArrowArray *src, ArrowArray *dest) except -1: - """ - Shallow copy source ArrowArray to destination ArrowArray. The source - ArrowArray belongs to the wrapper OracleArrowArray. The shallow copy idea - is borrowed from nanoarrow: - https://github.com/apache/arrow-nanoarrow/main/blob/python - """ - cdef: - ArrowBuffer *dest_buffer - ssize_t i - _check_nanoarrow( - ArrowArrayInitFromType( - dest, NANOARROW_TYPE_UNINITIALIZED - ) - ) - - # Copy metadata - dest.length = src.length - dest.offset = src.offset - dest.null_count = src.null_count - - # Borrow an ArrowBuffer belonging to OracleArrowArray. The ArrowBuffer can - # belong to an immediate ArrowArray or a child (in case of nested types). - # Either way, we PY_INCREF(oracle_arrow_array), so that it is not - # prematurely garbage collected. The corresponding PY_DECREF happens in the - # ArrowBufferDeAllocator callback. - for i in range(src.n_buffers): - if src.buffers[i] != NULL: - dest_buffer = ArrowArrayBuffer(dest, i) - dest_buffer.data = src.buffers[i] - dest_buffer.size_bytes = 0 - dest_buffer.allocator = ArrowBufferDeallocator( - arrow_buffer_dealloc_callback, - oracle_arrow_array - ) - cpython.Py_INCREF(oracle_arrow_array) - dest.buffers[i] = src.buffers[i] - dest.n_buffers = src.n_buffers - - # shallow copy of children (recursive call) - if src.n_children > 0: - _check_nanoarrow(ArrowArrayAllocateChildren(dest, src.n_children)) - for i in range(src.n_children): - copy_arrow_array( - oracle_arrow_array, src.children[i], dest.children[i] - ) - -cdef int build_arrow_schema_for_sparse_vector( - ArrowSchema *schema, - ArrowType vector_value_type -) except -1: - - # Initialize struct with 3 fields - num_dimensions, indices, values - ArrowSchemaInit(schema) - _check_nanoarrow(ArrowSchemaSetTypeStruct(schema, 3)) - - # first child: "num_dimensions" - _check_nanoarrow( - ArrowSchemaSetType(schema.children[0], NANOARROW_TYPE_INT64) - ) - _check_nanoarrow(ArrowSchemaSetName(schema.children[0], "num_dimensions")) - - # second child: "indices" - _check_nanoarrow(ArrowSchemaSetType( - schema.children[1], - NANOARROW_TYPE_LIST - ) - ) - _check_nanoarrow( - ArrowSchemaSetType( - schema.children[1].children[0], - NANOARROW_TYPE_UINT32 - ) - ) - _check_nanoarrow(ArrowSchemaSetName(schema.children[1], "indices")) - - # third child: "values" - _check_nanoarrow( - ArrowSchemaSetType( - schema.children[2], - NANOARROW_TYPE_LIST - ) - ) - _check_nanoarrow( - ArrowSchemaSetType( - schema.children[2].children[0], - vector_value_type - ) - ) - _check_nanoarrow(ArrowSchemaSetName(schema.children[2], "values")) - - -cdef class OracleArrowArray: - - def __cinit__(self, ArrowType arrow_type, str name, int8_t precision, - int8_t scale, ArrowTimeUnit time_unit, - ArrowType child_arrow_type): - cdef ArrowType storage_type = arrow_type - self.arrow_type = arrow_type - self.child_arrow_type = child_arrow_type - self.time_unit = time_unit - self.name = name - self.arrow_array = \ - cpython.PyMem_Malloc(sizeof(ArrowArray)) - if arrow_type == NANOARROW_TYPE_TIMESTAMP: - storage_type = NANOARROW_TYPE_INT64 - if time_unit == NANOARROW_TIME_UNIT_MILLI: - self.factor = 1e3 - elif time_unit == NANOARROW_TIME_UNIT_MICRO: - self.factor = 1e6 - elif time_unit == NANOARROW_TIME_UNIT_NANO: - self.factor = 1e9 - else: - self.factor = 1 - - self.arrow_schema = \ - cpython.PyMem_Malloc(sizeof(ArrowSchema)) - if arrow_type == NANOARROW_TYPE_DECIMAL128: - self.precision = precision - self.scale = scale - ArrowSchemaInit(self.arrow_schema) - _check_nanoarrow( - ArrowSchemaSetTypeDecimal( - self.arrow_schema, - arrow_type, - precision, - scale - ) - ) - elif arrow_type == NANOARROW_TYPE_STRUCT: - # Currently struct is used for Sparse vector only - build_arrow_schema_for_sparse_vector(self.arrow_schema, - child_arrow_type) - else: - _check_nanoarrow( - ArrowSchemaInitFromType( - self.arrow_schema, - storage_type - ) - ) - if arrow_type == NANOARROW_TYPE_TIMESTAMP: - _check_nanoarrow( - ArrowSchemaSetTypeDateTime( - self.arrow_schema, - arrow_type, - time_unit, - NULL - ) - ) - if arrow_type == NANOARROW_TYPE_LIST: - # Set the schema for child using child_arrow_type - _check_nanoarrow( - ArrowSchemaSetType( - self.arrow_schema.children[0], - child_arrow_type - ) - ) - _check_nanoarrow( - ArrowArrayInitFromSchema( - self.arrow_array, - self.arrow_schema, - NULL - ) - ) - elif arrow_type == NANOARROW_TYPE_STRUCT: - _check_nanoarrow( - ArrowArrayInitFromSchema( - self.arrow_array, - self.arrow_schema, - NULL - ) - ) - else: # primitive type array init - _check_nanoarrow( - ArrowArrayInitFromType( - self.arrow_array, - storage_type - ) - ) - _check_nanoarrow(ArrowArrayStartAppending(self.arrow_array)) - _check_nanoarrow(ArrowSchemaSetName(self.arrow_schema, name.encode())) - - def __dealloc__(self): - if self.arrow_array != NULL: - if self.arrow_array.release != NULL: - ArrowArrayRelease(self.arrow_array) - cpython.PyMem_Free(self.arrow_array) - if self.arrow_schema != NULL: - if self.arrow_schema.release != NULL: - ArrowSchemaRelease(self.arrow_schema) - cpython.PyMem_Free(self.arrow_schema) - - def __len__(self): - return self.arrow_array.length - - def __repr__(self): - return ( - f"OracleArrowArray(name={self.name}, " - f"len={self.arrow_array.length}, " - f"type={self._schema_to_string()})" - ) - - def __str__(self): - return self.__repr__() - - cdef str _schema_to_string(self): - """ - Converts the schema to a string representation. - """ - cdef char buffer[81] - ArrowSchemaToString(self.arrow_schema, buffer, sizeof(buffer), 0) - return buffer.decode() - - cdef int append_bytes(self, void* ptr, int64_t num_bytes) except -1: - """ - Append a value of type bytes to the array. - """ - cdef ArrowBufferView data - data.data.data = ptr - data.size_bytes = num_bytes - _check_nanoarrow(ArrowArrayAppendBytes(self.arrow_array, data)) - - cdef int append_decimal(self, void* ptr, int64_t num_bytes) except -1: - """ - Append a value of type ArrowDecimal to the array - - Arrow decimals are fixed-point decimal numbers encoded as a - scaled integer. decimal128(7, 3) can exactly represent the numbers - 1234.567 and -1234.567 encoded internally as the 128-bit integers - 1234567 and -1234567, respectively. - """ - cdef: - ArrowStringView decimal_view - ArrowDecimal decimal - decimal_view.data = ptr - decimal_view.size_bytes = num_bytes - ArrowDecimalInit(&decimal, 128, self.precision, self.scale) - _check_nanoarrow(ArrowDecimalSetDigits(&decimal, decimal_view)) - _check_nanoarrow(ArrowArrayAppendDecimal(self.arrow_array, &decimal)) - - cdef int append_double(self, double value) except -1: - """ - Append a value of type double to the array. - """ - _check_nanoarrow(ArrowArrayAppendDouble(self.arrow_array, value)) - - cdef int append_float(self, float value) except -1: - """ - Append a value of type float to the array. - """ - self.append_double(value) - - cdef int append_int64(self, int64_t value) except -1: - """ - Append a value of type int64_t to the array. - """ - _check_nanoarrow(ArrowArrayAppendInt(self.arrow_array, value)) - - cdef int append_last_value(self, OracleArrowArray array) except -1: - """ - Appends the last value of the given array to this array. - """ - cdef: - int32_t start_offset, end_offset - ArrowBuffer *offsets_buffer - ArrowBuffer *data_buffer - ArrowDecimal decimal - int64_t *as_int64 - int32_t *as_int32 - double *as_double - float *as_float - int8_t as_bool - int64_t index - uint8_t *ptr - void* temp - ArrowBitmap *bitamp - if array is None: - array = self - index = array.arrow_array.length - 1 - bitmap = ArrowArrayValidityBitmap(array.arrow_array) - if bitmap != NULL and bitmap.buffer.data != NULL: - as_bool = ArrowBitGet(bitmap.buffer.data, index) - if not as_bool: - self.append_null() - return 0 - if array.arrow_type in (NANOARROW_TYPE_INT64, NANOARROW_TYPE_TIMESTAMP): - data_buffer = ArrowArrayBuffer(array.arrow_array, 1) - as_int64 = data_buffer.data - self.append_int64(as_int64[index]) - elif array.arrow_type == NANOARROW_TYPE_DOUBLE: - data_buffer = ArrowArrayBuffer(array.arrow_array, 1) - as_double = data_buffer.data - self.append_double(as_double[index]) - elif array.arrow_type == NANOARROW_TYPE_FLOAT: - data_buffer = ArrowArrayBuffer(array.arrow_array, 1) - as_float = data_buffer.data - self.append_double(as_float[index]) - elif array.arrow_type == NANOARROW_TYPE_BOOL: - data_buffer = ArrowArrayBuffer(array.arrow_array, 1) - as_bool = ArrowBitGet(data_buffer.data, index) - self.append_int64(as_bool) - elif array.arrow_type == NANOARROW_TYPE_DECIMAL128: - data_buffer = ArrowArrayBuffer(array.arrow_array, 1) - ArrowDecimalInit(&decimal, 128, self.precision, self.scale) - ptr = data_buffer.data + index * 16 - ArrowDecimalSetBytes(&decimal, ptr) - _check_nanoarrow(ArrowArrayAppendDecimal(self.arrow_array, - &decimal)) - elif array.arrow_type in ( - NANOARROW_TYPE_BINARY, - NANOARROW_TYPE_STRING - ): - offsets_buffer = ArrowArrayBuffer(array.arrow_array, 1) - data_buffer = ArrowArrayBuffer(array.arrow_array, 2) - as_int32 = offsets_buffer.data - start_offset = as_int32[index] - end_offset = as_int32[index + 1] - temp = cpython.PyMem_Malloc(end_offset - start_offset) - memcpy(temp, &data_buffer.data[start_offset], - end_offset - start_offset) - try: - self.append_bytes(temp, end_offset - start_offset) - finally: - cpython.PyMem_Free(temp) - - elif array.arrow_type in ( - NANOARROW_TYPE_LARGE_BINARY, - NANOARROW_TYPE_LARGE_STRING - ): - offsets_buffer = ArrowArrayBuffer(array.arrow_array, 1) - data_buffer = ArrowArrayBuffer(array.arrow_array, 2) - as_int64 = offsets_buffer.data - start_offset = as_int64[index] - end_offset = as_int64[index + 1] - temp = cpython.PyMem_Malloc(end_offset - start_offset) - memcpy(temp, &data_buffer.data[start_offset], - end_offset - start_offset) - try: - self.append_bytes(temp, end_offset - start_offset) - finally: - cpython.PyMem_Free(temp) - - cdef int append_null(self) except -1: - """ - Append a null value to the array. - """ - _check_nanoarrow(ArrowArrayAppendNull(self.arrow_array, 1)) - - cdef int append_vector(self, array.array value) except -1: - """ - Append a vector to the array. - """ - if self.child_arrow_type == NANOARROW_TYPE_FLOAT: - append_float_array(self.arrow_array, value) - elif self.child_arrow_type == NANOARROW_TYPE_DOUBLE: - append_double_array(self.arrow_array, value) - elif self.child_arrow_type == NANOARROW_TYPE_INT8: - append_int8_array(self.arrow_array, value) - elif self.child_arrow_type == NANOARROW_TYPE_UINT8: - append_uint8_array(self.arrow_array, value) - - cdef int append_sparse_vector(self, - int64_t num_dims, - array.array indices, - array.array values) except -1: - """ - Append a sparse vector to the array. - """ - cdef ArrowArray *array - - # validate that the array supports sparse vectors - if self.arrow_type != NANOARROW_TYPE_STRUCT: - errors._raise_err(errors.ERR_ARROW_SPARSE_VECTOR_NOT_ALLOWED) - - # append number of dimensions - array = self.arrow_array.children[0] - _check_nanoarrow(ArrowArrayAppendInt(array, num_dims)) - - # append indices array - array = self.arrow_array.children[1] - append_uint32_array(array, indices) - - # append values array - array = self.arrow_array.children[2] - if self.child_arrow_type == NANOARROW_TYPE_FLOAT: - append_float_array(array, values) - elif self.child_arrow_type == NANOARROW_TYPE_DOUBLE: - append_double_array(array, values) - elif self.child_arrow_type == NANOARROW_TYPE_INT8: - append_int8_array(array, values) - elif self.child_arrow_type == NANOARROW_TYPE_UINT8: - append_uint8_array(array, values) - - # indicate structure is completed - _check_nanoarrow(ArrowArrayFinishElement(self.arrow_array)) - - cdef int finish_building(self) except -1: - """ - Finish building the array. No more data will be added to it. - """ - _check_nanoarrow(ArrowArrayFinishBuildingDefault(self.arrow_array, - NULL)) - - def get_buffer_info(self): - """ - Get buffer information required by the dataframe interchange logic. - """ - cdef: - int64_t n_buffers = self.arrow_array.n_buffers - ArrowBufferView *buffer - ArrowArrayView view - _check_nanoarrow(ArrowArrayViewInitFromArray(&view, self.arrow_array)) - - # initialize all buffers to None to begin with - buffers = { - "validity": None, - "offsets": None, - "data": None - } - - # validity buffer - if n_buffers > 0 and self.arrow_array.null_count > 0: - buffer = &view.buffer_views[0] - buffers["validity"] = ( - buffer.size_bytes, - buffer.data.data - ) - - # data / offset buffer - if n_buffers == 2: - buffer = &view.buffer_views[1] - buffers["data"] = ( - buffer.size_bytes, - buffer.data.data - ) - elif n_buffers == 3: - buffer = &view.buffer_views[1] - buffers["offsets"] = ( - buffer.size_bytes, - buffer.data.data - ) - buffer = &view.buffer_views[2] - buffers["data"] = ( - buffer.size_bytes, - buffer.data.data - ) - - return buffers - - @property - def null_count(self) -> int: - return self.arrow_array.null_count - - @property - def offset(self) -> int: - return self.arrow_array.offset - - def __arrow_c_schema__(self): - """ - Export an ArrowSchema PyCapsule - """ - cdef ArrowSchema *exported_schema = \ - cpython.PyMem_Malloc(sizeof(ArrowSchema)) - try: - _check_nanoarrow( - ArrowSchemaDeepCopy( - self.arrow_schema, - exported_schema - ) - ) - except: - cpython.PyMem_Free(exported_schema) - raise - return cpython.PyCapsule_New( - exported_schema, 'arrow_schema', &pycapsule_schema_deleter - ) - - def __arrow_c_array__(self, requested_schema=None): - """ - Returns - ------- - Tuple[PyCapsule, PyCapsule] - A pair of PyCapsules containing a C ArrowSchema and ArrowArray, - respectively. - """ - if requested_schema is not None: - raise NotImplementedError("requested_schema") - cdef ArrowArray *exported_array = \ - cpython.PyMem_Malloc(sizeof(ArrowArray)) - try: - copy_arrow_array(self, self.arrow_array, exported_array) - array_capsule = cpython.PyCapsule_New( - exported_array, 'arrow_array', &pycapsule_array_deleter - ) - except: - cpython.PyMem_Free(exported_array) - raise - return self.__arrow_c_schema__(), array_capsule diff --git a/src/oracledb/interchange/protocol.py b/src/oracledb/interchange/protocol.py deleted file mode 100644 index 91739c7..0000000 --- a/src/oracledb/interchange/protocol.py +++ /dev/null @@ -1,538 +0,0 @@ -# ----------------------------------------------------------------------------- -# MIT License - -# Copyright (c) 2025 Consortium for Python Data API Standards contributors - -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: - -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# ----------------------------------------------------------------------------- - -# ----------------------------------------------------------------------------- -# protocol.py -# -# Implement DataFrame class as documented in the standard -# https://data-apis.org/dataframe-protocol/latest/API.html -# -# The DataFrame API standard has this file with the following changes: -# https://github.com/data-apis/dataframe-api/blob/main/protocol/dataframe_protocol.py -# - addition of license and this block of comments -# - addition of DtypeKind DECIMAL (24) -# - correction of typing for Column for older versions of Python -# - Black formatting -# ----------------------------------------------------------------------------- - -from abc import ( - ABC, - abstractmethod, -) -import enum -from typing import ( - Any, - Dict, - Iterable, - Optional, - Sequence, - Tuple, - TypedDict, -) - - -class DlpackDeviceType(enum.IntEnum): - """Integer enum for device type codes matching DLPack.""" - - CPU = 1 - CUDA = 2 - CPU_PINNED = 3 - OPENCL = 4 - VULKAN = 7 - METAL = 8 - VPI = 9 - ROCM = 10 - - -class DtypeKind(enum.IntEnum): - """ - Integer enum for data types. - - Attributes - ---------- - INT : int - Matches to signed integer data type. - UINT : int - Matches to unsigned integer data type. - FLOAT : int - Matches to floating point data type. - BOOL : int - Matches to boolean data type. - STRING : int - Matches to string data type (UTF-8 encoded). - DATETIME : int - Matches to datetime data type. - CATEGORICAL : int - Matches to categorical data type. - """ - - INT = 0 - UINT = 1 - FLOAT = 2 - BOOL = 20 - STRING = 21 # UTF-8 - DATETIME = 22 - CATEGORICAL = 23 - DECIMAL = 24 - - -Dtype = Tuple[DtypeKind, int, str, str] # see Column.dtype - - -class ColumnNullType(enum.IntEnum): - """ - Integer enum for null type representation. - - Attributes - ---------- - NON_NULLABLE : int - Non-nullable column. - USE_NAN : int - Use explicit float NaN value. - USE_SENTINEL : int - Sentinel value besides NaN. - USE_BITMASK : int - The bit is set/unset representing a null on a certain position. - USE_BYTEMASK : int - The byte is set/unset representing a null on a certain position. - """ - - NON_NULLABLE = 0 - USE_NAN = 1 - USE_SENTINEL = 2 - USE_BITMASK = 3 - USE_BYTEMASK = 4 - - -class ColumnBuffers(TypedDict): - # first element is a buffer containing the column data; - # second element is the data buffer's associated dtype - data: Tuple["Buffer", Dtype] - - # first element is a buffer containing mask values indicating missing data; - # second element is the mask value buffer's associated dtype. - # None if the null representation is not a bit or byte mask - validity: Optional[Tuple["Buffer", Dtype]] - - # first element is a buffer containing the offset values for - # variable-size binary data (e.g., variable-length strings); - # second element is the offsets buffer's associated dtype. - # None if the data buffer does not have an associated offsets buffer - offsets: Optional[Tuple["Buffer", Dtype]] - - -class CategoricalDescription(TypedDict): - # whether the ordering of dictionary indices is semantically meaningful - is_ordered: bool - # whether a dictionary-style mapping of categorical values to other objects - # exists - is_dictionary: bool - # Python-level only (e.g. ``{int: str}``). - # None if not a dictionary-style categorical. - categories: Optional["Column"] - - -class Buffer(ABC): - """ - Data in the buffer is guaranteed to be contiguous in memory. - - Note that there is no dtype attribute present, a buffer can be thought of - as simply a block of memory. However, if the column that the buffer is - attached to has a dtype that's supported by DLPack and ``__dlpack__`` is - implemented, then that dtype information will be contained in the return - value from ``__dlpack__``. - - This distinction is useful to support both data exchange via DLPack on a - buffer and (b) dtypes like variable-length strings which do not have a - fixed number of bytes per element. - """ - - @property - @abstractmethod - def bufsize(self) -> int: - """ - Buffer size in bytes. - """ - pass - - @property - @abstractmethod - def ptr(self) -> int: - """ - Pointer to start of the buffer as an integer. - """ - pass - - @abstractmethod - def __dlpack__(self): - """ - Produce DLPack capsule (see array API standard). - - Raises: - - - TypeError : if the buffer contains unsupported dtypes. - - NotImplementedError : if DLPack support is not implemented - - Useful to have to connect to array libraries. Support optional because - it's not completely trivial to implement for a Python-only library. - """ - raise NotImplementedError("__dlpack__") - - @abstractmethod - def __dlpack_device__(self) -> Tuple[DlpackDeviceType, Optional[int]]: - """ - Device type and device ID for where the data in the buffer resides. - Uses device type codes matching DLPack. - Note: must be implemented even if ``__dlpack__`` is not. - """ - pass - - -class Column(ABC): - """ - A column object, with only the methods and properties required by the - interchange protocol defined. - - A column can contain one or more chunks. Each chunk can contain up to three - buffers - a data buffer, a mask buffer (depending on null representation), - and an offsets buffer (if variable-size binary; e.g., variable-length - strings). - - TBD: there's also the "chunk" concept here, which is implicit in Arrow as - multiple buffers per array (= column here). Semantically it may make - sense to have both: chunks were meant for example for lazy evaluation - of data which doesn't fit in memory, while multiple buffers per column - could also come from doing a selection operation on a single - contiguous buffer. - - Given these concepts, one would expect chunks to be all of the same - size (say a 10,000 row dataframe could have 10 chunks of 1,000 rows), - while multiple buffers could have data-dependent lengths. Not an issue - in pandas if one column is backed by a single NumPy array, but in - Arrow it seems possible. - Are multiple chunks *and* multiple buffers per column necessary for - the purposes of this interchange protocol, or must producers either - reuse the chunk concept for this or copy the data? - - Note: this Column object can only be produced by ``__dataframe__``, so - doesn't need its own version or ``__column__`` protocol. - """ - - @abstractmethod - def size(self) -> int: - """ - Size of the column, in elements. - - Corresponds to DataFrame.num_rows() if column is a single chunk; - equal to size of this current chunk otherwise. - - Is a method rather than a property because it may cause a (potentially - expensive) computation for some dataframe implementations. - """ - pass - - @property - @abstractmethod - def offset(self) -> int: - """ - Offset of first element. - - May be > 0 if using chunks; for example for a column with N chunks of - equal size M (only the last chunk may be shorter), - ``offset = n * M``, ``n = 0 .. N-1``. - """ - pass - - @property - @abstractmethod - def dtype(self) -> Dtype: - """ - Dtype description as a tuple ``(kind, bit-width, format string, - endianness)``. - - Bit-width : the number of bits as an integer - Format string : data type description format string in Apache Arrow C - Data Interface format. - Endianness : current only native endianness (``=``) is supported - - Notes: - - Kind specifiers are aligned with DLPack where possible (hence the - jump to 20, leave enough room for future extension) - - Masks must be specified as boolean with either bit width 1 (for - bit masks) or 8 (for byte masks). - - Dtype width in bits was preferred over bytes - - Endianness isn't too useful, but included now in case in the - future we need to support non-native endianness - - Went with Apache Arrow format strings over NumPy format strings - because they're more complete from a dataframe perspective - - Format strings are mostly useful for datetime specification, and - for categoricals. - - For categoricals, the format string describes the type of the - categorical in the data buffer. In case of a separate encoding of - the categorical (e.g. an integer to string mapping), this can - be derived from ``self.describe_categorical``. - - Data types not included: complex, Arrow-style null, binary, - decimal, and nested (list, struct, map, union) dtypes. - """ - pass - - @property - @abstractmethod - def describe_categorical(self) -> CategoricalDescription: - """ - If the dtype is categorical, there are two options: - - There are only values in the data buffer. - - There is a separate non-categorical Column encoding categorical - values. - - Raises TypeError if the dtype is not categorical - - Returns the dictionary with description on how to interpret the data - buffer: - - "is_ordered" : bool, whether the ordering of dictionary indices - is semantically meaningful. - - "is_dictionary" : bool, whether a mapping of - categorical values to other objects exists - - "categories" : Column representing the (implicit) mapping of - indices to category values (e.g. an array of cat1, - cat2, ...). - None if not a dictionary-style categorical. - - TBD: are there any other in-memory representations that are needed? - """ - pass - - @property - @abstractmethod - def describe_null(self) -> Tuple[ColumnNullType, Any]: - """ - Return the missing value (or "null") representation the column dtype - uses, as a tuple ``(kind, value)``. - - Value : if kind is "sentinel value", the actual value. If kind is a bit - mask or a byte mask, the value (0 or 1) indicating a missing value. - None otherwise. - """ - pass - - @property - @abstractmethod - def null_count(self) -> Optional[int]: - """ - Number of null elements, if known. - - Note: Arrow uses -1 to indicate "unknown", but None seems cleaner. - """ - pass - - @property - @abstractmethod - def metadata(self) -> Dict[str, Any]: - """ - The metadata for the column. See `DataFrame.metadata` for more details. - """ - pass - - @abstractmethod - def num_chunks(self) -> int: - """ - Return the number of chunks the column consists of. - """ - pass - - @abstractmethod - def get_chunks(self, n_chunks: Optional[int] = None) -> Iterable["Column"]: - """ - Return an iterator yielding the chunks. - - See `DataFrame.get_chunks` for details on ``n_chunks``. - """ - pass - - @abstractmethod - def get_buffers(self) -> ColumnBuffers: - """ - Return a dictionary containing the underlying buffers. - - The returned dictionary has the following contents: - - - "data": a two-element tuple whose first element is a buffer - containing the data and whose second element is the data - buffer's associated dtype. - - "validity": a two-element tuple whose first element is a buffer - containing mask values indicating missing data and - whose second element is the mask value buffer's - associated dtype. None if the null representation is - not a bit or byte mask. - - "offsets": a two-element tuple whose first element is a buffer - containing the offset values for variable-size binary - data (e.g., variable-length strings) and whose second - element is the offsets buffer's associated dtype. None - if the data buffer does not have an associated offsets - buffer. - """ - pass - - -# def get_children(self) -> Iterable[Column]: -# """ -# Children columns underneath the column, each object in this iterator -# must adhere to the column specification. -# """ -# pass - - -class DataFrame(ABC): - """ - A data frame class, with only the methods required by the interchange - protocol defined. - - A "data frame" represents an ordered collection of named columns. - A column's "name" must be a unique string. - Columns may be accessed by name or by position. - - This could be a public data frame class, or an object with the methods and - attributes defined on this DataFrame class could be returned from the - ``__dataframe__`` method of a public data frame class in a library adhering - to the dataframe interchange protocol specification. - """ - - version = 0 # version of the protocol - - @abstractmethod - def __dataframe__( - self, nan_as_null: bool = False, allow_copy: bool = True - ) -> "DataFrame": - """ - Construct a new exchange object, potentially changing the parameters. - - ``nan_as_null`` is a DEPRECATED keyword that should not be used. See - warning below. - ``allow_copy`` is a keyword that defines whether or not the library is - allowed to make a copy of the data. For example, copying data would be - necessary if a library supports strided buffers, given that this - protocol specifies contiguous buffers. - - WARNING: the ``nan_as_null`` parameter will be removed from the API - protocol. Please avoid passing it as either a positional or keyword - argument. Call this method using ``.__dataframe__(allow_copy=...)``. - """ - pass - - @property - @abstractmethod - def metadata(self) -> Dict[str, Any]: - """ - The metadata for the data frame, as a dictionary with string keys. The - contents of `metadata` may be anything, they are meant for a library - to store information that it needs to, e.g., roundtrip losslessly or - for two implementations to share data that is not (yet) part of the - interchange protocol specification. For avoiding collisions with other - entries, please add name the keys with the name of the library - followed by a period and the desired name, e.g, ``pandas.indexcol``. - """ - pass - - @abstractmethod - def num_columns(self) -> int: - """ - Return the number of columns in the DataFrame. - """ - pass - - @abstractmethod - def num_rows(self) -> Optional[int]: - # TODO: not happy with Optional, but need to flag it may be expensive - # why include it if it may be None - what do we expect consumers - # to do here? - """ - Return the number of rows in the DataFrame, if available. - """ - pass - - @abstractmethod - def num_chunks(self) -> int: - """ - Return the number of chunks the DataFrame consists of. - """ - pass - - @abstractmethod - def column_names(self) -> Iterable[str]: - """ - Return an iterator yielding the column names. - """ - pass - - @abstractmethod - def get_column(self, i: int) -> Column: - """ - Return the column at the indicated position. - """ - pass - - @abstractmethod - def get_column_by_name(self, name: str) -> Column: - """ - Return the column whose name is the indicated name. - """ - pass - - @abstractmethod - def get_columns(self) -> Iterable[Column]: - """ - Return an iterator yielding the columns. - """ - pass - - @abstractmethod - def select_columns(self, indices: Sequence[int]) -> "DataFrame": - """ - Create a new DataFrame by selecting a subset of columns by index. - """ - pass - - @abstractmethod - def select_columns_by_name(self, names: Sequence[str]) -> "DataFrame": - """ - Create a new DataFrame by selecting a subset of columns by name. - """ - pass - - @abstractmethod - def get_chunks( - self, n_chunks: Optional[int] = None - ) -> Iterable["DataFrame"]: - """ - Return an iterator yielding the chunks. - - By default (None), yields the chunks that the data is stored as by the - producer. If given, ``n_chunks`` must be a multiple of - ``self.num_chunks()``, meaning the producer must subdivide each chunk - before yielding it. - - Note that the producer must ensure that all columns are chunked the - same way. - """ - pass diff --git a/src/oracledb/thin_impl.pyx b/src/oracledb/thin_impl.pyx index 157a22e..b9c48bf 100644 --- a/src/oracledb/thin_impl.pyx +++ b/src/oracledb/thin_impl.pyx @@ -193,9 +193,7 @@ from .base_impl import ( DB_TYPE_XMLTYPE, ) -from .interchange.nanoarrow_bridge cimport ( - OracleArrowArray, -) +from .arrow_impl cimport ArrowArrayImpl ctypedef unsigned char char_type diff --git a/tests/test_8000_dataframe.py b/tests/test_8000_dataframe.py index 0054f54..ab034b1 100644 --- a/tests/test_8000_dataframe.py +++ b/tests/test_8000_dataframe.py @@ -409,12 +409,6 @@ def test_8000(self): ora_df = self.conn.fetch_df_all(statement) self.assertEqual(ora_df.num_rows(), len(DATASET_1)) self.assertEqual(ora_df.num_columns(), len(DATASET_1[0])) - metadata = dict( - num_columns=ora_df.num_columns(), - num_rows=ora_df.num_rows(), - num_chunks=1, - ) - self.assertEqual(ora_df.metadata, metadata) def test_8001(self): "8001 - test conversion to external dataframe" @@ -493,37 +487,19 @@ def test_8013(self): ora_df.get_column_by_name("missing_column") def test_8014(self): - "8014 - check size and null count with no nulls" - self.__populate_table(DATASET_1) - statement = "select * from TestDataFrame order by Id" - ora_df = self.conn.fetch_df_all(statement) - col = ora_df.get_column(0) - self.assertEqual(col.size(), len(DATASET_1)) - self.assertEqual(col.null_count, 0) - - def test_8015(self): - "8015 - check size and null count with nulls present" - self.__populate_table(DATASET_2) - statement = "select * from TestDataFrame order by Id" - ora_df = self.conn.fetch_df_all(statement) - col = ora_df.get_column_by_name("SALARY") - self.assertEqual(col.size(), len(DATASET_2)) - self.assertEqual(col.null_count, 2) - - def test_8016(self): - "8016 - check unsupported error" + "8014 - check unsupported error" statement = "select cursor(select user from dual) from dual" with self.assertRaisesFullCode("DPY-3030"): self.conn.fetch_df_all(statement) - def test_8017(self): - "8017 - batches with specification of size matching number of rows" + def test_8015(self): + "8015 - batches with specification of size matching number of rows" self.__test_df_batches_interop( DATASET_2, batch_size=len(DATASET_2), num_batches=1 ) - def test_8018(self): - "8018 - verify get_column() returns the correct value" + def test_8016(self): + "8016 - verify get_column() returns the correct value" self.__check_interop() self.__populate_table(DATASET_1) statement = "select * from TestDataFrame order by Id" @@ -531,47 +507,12 @@ def test_8018(self): array = pyarrow.array(ora_df.get_column(1)) self.assertEqual(array.to_pylist(), ["John", "Big"]) - def test_8019(self): - "8019 - verify OracleColumn and get_buffers" - self.__populate_table(DATASET_1) - statement = "select * from TestDataFrame order by Id" - ora_df = self.conn.fetch_df_all(statement) - ora_col = ora_df.get_column(1) - self.assertEqual(ora_col.num_chunks(), 1) - self.assertEqual(ora_col.size(), 2) - - buffers = ora_col.get_buffers() - self.assertEqual(len(buffers), 3) - self.assertIsNotNone(buffers["data"]) - self.assertIsNotNone(buffers["offsets"]) - self.assertIsNone(buffers["validity"]) - - def test_8020(self): - "8020 - verify OracleColumn Attributes" - self.__populate_table(DATASET_2) - statement = "select * from TestDataFrame order by Id" - ora_df = self.conn.fetch_df_all(statement) - - ora_col = ora_df.get_column(0) - self.assertEqual(ora_col.describe_null[0], 0) - self.assertEqual(ora_col.dtype[0], 0) - metadata = {"name": "ID", "size": 4, "num_chunks": 1} - self.assertEqual(metadata, ora_col.metadata) - self.assertEqual(ora_col.null_count, 0) - - ora_col = ora_df.get_column(4) - self.assertEqual(ora_col.describe_null[0], 3) - self.assertEqual(ora_col.dtype[0], 21) - metadata = {"name": "COUNTRY", "size": 4, "num_chunks": 1} - self.assertEqual(metadata, ora_col.metadata) - self.assertEqual(ora_col.null_count, 2) - - def test_8021(self): - "8021 - batches with size that has duplicate rows across batches" + def test_8017(self): + "8017 - batches with size that has duplicate rows across batches" self.__test_df_batches_interop(DATASET_4, batch_size=3, num_batches=2) - def test_8022(self): - "8022 - fetch_decimals without precision and scale specified" + def test_8018(self): + "8018 - fetch_decimals without precision and scale specified" data = [(1.0,)] self.__check_interop() with test_env.DefaultsContextManager("fetch_decimals", True): @@ -583,8 +524,8 @@ def test_8022(self): fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) - def test_8023(self): - "8023 - fetch clob" + def test_8019(self): + "8019 - fetch clob" data = [("test_8023",)] self.__check_interop() ora_df = self.conn.fetch_df_all( @@ -597,8 +538,8 @@ def test_8023(self): fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) - def test_8024(self): - "8024 - fetch blob" + def test_8020(self): + "8020 - fetch blob" data = [(b"test_8024",)] self.__check_interop() ora_df = self.conn.fetch_df_all( @@ -611,8 +552,8 @@ def test_8024(self): fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) - def test_8025(self): - "8025 - fetch raw" + def test_8021(self): + "8021 - fetch raw" data = [(b"test_8025",)] self.__check_interop() ora_df = self.conn.fetch_df_all( @@ -626,8 +567,8 @@ def test_8025(self): self.assertEqual(fetched_data, data) @test_env.skip_unless_native_boolean_supported() - def test_8026(self): - "8026 - fetch boolean" + def test_8022(self): + "8022 - fetch boolean" data = [(True,), (False,), (False,), (True,), (True,)] self.__check_interop() ora_df = self.conn.fetch_df_all( @@ -650,8 +591,8 @@ def test_8026(self): fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) - def test_8027(self): - "8027 - fetch data with multiple rows containing null values" + def test_8023(self): + "8023 - fetch data with multiple rows containing null values" self.__check_interop() ora_df = self.conn.fetch_df_all( """ @@ -692,82 +633,9 @@ def test_8027(self): fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) - def test_8028(self): - "8028 - verify dtype for all Arrow types" - query = """ - select - cast(1 as number(10)) as col_int64, - cast(1.23 as binary_double) as col_double, - cast(7.14 as binary_float) as col_float, - cast('abcd' as varchar2(10)) as col_string, - cast('efgh' as nvarchar2(6)) as col_nstring, - cast('ijkl' as char(4)) as col_char, - cast('mnop' as nchar(4)) as col_nchar, - cast(systimestamp as timestamp(0)) as col_ts_sec, - cast(systimestamp as timestamp(3)) as col_ts_ms, - cast(systimestamp as timestamp(6)) as col_ts_us, - cast(systimestamp as timestamp(9)) as col_ts_ns, - to_clob('abc') as col_large_string, - to_nclob('def') as col_large_nstring, - utl_raw.cast_to_raw('abc2') as col_binary, - to_blob(utl_raw.cast_to_raw('abc3')) as col_large_binary - from dual - """ - decimal_query = ( - "select cast(123.45 as decimal(10, 2)) as col_decimal128 from dual" - ) - - # determine dtype kind enumeration - ora_df = self.conn.fetch_df_all("select user from dual") - col = ora_df.get_column(0) - dtype_kind = type(col.dtype[0]) - - expected_dtypes = { - "COL_INT64": (dtype_kind.INT, 64, "l", "="), - "COL_DOUBLE": (dtype_kind.FLOAT, 64, "g", "="), - "COL_FLOAT": (dtype_kind.FLOAT, 64, "g", "="), - "COL_STRING": (dtype_kind.STRING, 8, "u", "="), - "COL_NSTRING": (dtype_kind.STRING, 8, "u", "="), - "COL_CHAR": (dtype_kind.STRING, 8, "u", "="), - "COL_NCHAR": (dtype_kind.STRING, 8, "u", "="), - "COL_TS_SEC": (dtype_kind.DATETIME, 64, "tss:", "="), - "COL_TS_MS": (dtype_kind.DATETIME, 64, "tsm:", "="), - "COL_TS_US": (dtype_kind.DATETIME, 64, "tsu:", "="), - "COL_TS_NS": (dtype_kind.DATETIME, 64, "tsn:", "="), - "COL_LARGE_STRING": (dtype_kind.STRING, 8, "U", "="), - "COL_LARGE_NSTRING": (dtype_kind.STRING, 8, "U", "="), - "COL_BINARY": (dtype_kind.STRING, 8, "z", "="), - "COL_LARGE_BINARY": (dtype_kind.STRING, 8, "Z", "="), - "COL_DECIMAL128": (dtype_kind.DECIMAL, 128, "d:10.2", "="), - } - - # check query without fetch_decimals enabled - ora_df = self.conn.fetch_df_all(query) - for i, name in enumerate(ora_df.column_names()): - col = ora_df.get_column(i) - self.assertEqual(col.dtype, expected_dtypes[name]) - - # check query with fetch_decimals enabled - with test_env.DefaultsContextManager("fetch_decimals", True): - ora_df = self.conn.fetch_df_all(decimal_query) - col = ora_df.get_column(0) - self.assertEqual(col.dtype, expected_dtypes["COL_DECIMAL128"]) - - def test_8029(self): - "8029 - verify get_buffers() with data frames containing null values" - self.__populate_table(DATASET_2) - statement = "select * from TestDataFrame order by Id" - ora_df = self.conn.fetch_df_all(statement) - country_col = ora_df.get_column_by_name("COUNTRY") - buffers = country_col.get_buffers() - self.assertEqual(len(buffers), 3) - self.assertIsNotNone(buffers["data"]) - self.assertIsNotNone(buffers["offsets"]) - self.assertIsNotNone(buffers["validity"]) - @test_env.skip_unless_vectors_supported() - def test_8030(self): - "8030 - fetch float32 vector" + def test_8024(self): + "8024 - fetch float32 vector" # float32 is a special case while comparing dataframe values # Converting Dataframe cell value of type numpy.ndarray[float32] @@ -789,8 +657,6 @@ def test_8030(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - ora_col = ora_df.get_column(0) - self.assertEqual(ora_col.null_count, 0) fetched_tab = pyarrow.Table.from_arrays( ora_df.column_arrays(), names=ora_df.column_names() ) @@ -800,8 +666,8 @@ def test_8030(self): self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_vectors_supported() - def test_8031(self): - "8031 - fetch float64 vector" + def test_8025(self): + "8025 - fetch float64 vector" data = [ ([34.6, 77.8],), ([34.6, 77.8, 55.9],), @@ -816,8 +682,6 @@ def test_8031(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - ora_col = ora_df.get_column(0) - self.assertEqual(ora_col.null_count, 0) fetched_tab = pyarrow.Table.from_arrays( ora_df.column_arrays(), names=ora_df.column_names() ) @@ -826,8 +690,8 @@ def test_8031(self): self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_vectors_supported() - def test_8032(self): - "8032 - fetch int8 vector" + def test_8026(self): + "8026 - fetch int8 vector" data = [ ([34, -77],), ([34, 77, 55],), @@ -842,8 +706,6 @@ def test_8032(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - ora_col = ora_df.get_column(0) - self.assertEqual(ora_col.null_count, 0) fetched_tab = pyarrow.Table.from_arrays( ora_df.column_arrays(), names=ora_df.column_names() ) @@ -852,8 +714,8 @@ def test_8032(self): self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_vectors_supported() - def test_8033(self): - "8033 - fetch binary vector" + def test_8027(self): + "8027 - fetch binary vector" data = [ ([3, 2, 3],), ([3, 2],), @@ -868,8 +730,6 @@ def test_8033(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - ora_col = ora_df.get_column(0) - self.assertEqual(ora_col.null_count, 0) fetched_tab = pyarrow.Table.from_arrays( ora_df.column_arrays(), names=ora_df.column_names() ) @@ -878,8 +738,8 @@ def test_8033(self): self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_vectors_supported() - def test_8034(self): - "8034 - fetch float32 vectors with None" + def test_8028(self): + "8028 - fetch float32 vectors with None" data = [ (array.array("f", [34.6, 77.8]).tolist(),), (array.array("f", [34.6, 77.8, 55.9]).tolist(),), @@ -897,8 +757,6 @@ def test_8034(self): ) self.assertEqual(ora_df.num_rows(), 3) self.assertEqual(ora_df.num_columns(), 1) - ora_col = ora_df.get_column(0) - self.assertEqual(ora_col.null_count, 1) fetched_tab = pyarrow.Table.from_arrays( ora_df.column_arrays(), names=ora_df.column_names() ) @@ -907,8 +765,8 @@ def test_8034(self): self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_vectors_supported() - def test_8035(self): - "8035 - fetch duplicate float64 vectors" + def test_8029(self): + "8029 - fetch duplicate float64 vectors" data = [ ([34.6, 77.8],), ([34.6, 77.8],), @@ -953,8 +811,6 @@ def test_8035(self): ) self.assertEqual(ora_df.num_rows(), 12) self.assertEqual(ora_df.num_columns(), 1) - ora_col = ora_df.get_column(0) - self.assertEqual(ora_col.null_count, 0) fetched_tab = pyarrow.Table.from_arrays( ora_df.column_arrays(), names=ora_df.column_names() ) @@ -963,8 +819,8 @@ def test_8035(self): self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_sparse_vectors_supported() - def test_8036(self): - "8036 - fetch float32 sparse vectors" + def test_8030(self): + "8030 - fetch float32 sparse vectors" data = [ ( { @@ -1001,8 +857,6 @@ def test_8036(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - ora_col = ora_df.get_column(0) - self.assertEqual(ora_col.null_count, 0) fetched_tab = pyarrow.Table.from_arrays( ora_df.column_arrays(), names=ora_df.column_names() ) @@ -1012,8 +866,8 @@ def test_8036(self): self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_sparse_vectors_supported() - def test_8037(self): - "8037 - fetch float64 sparse vectors" + def test_8031(self): + "8031 - fetch float64 sparse vectors" data = [ ( { @@ -1050,8 +904,6 @@ def test_8037(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - ora_col = ora_df.get_column(0) - self.assertEqual(ora_col.null_count, 0) fetched_tab = pyarrow.Table.from_arrays( ora_df.column_arrays(), names=ora_df.column_names() ) @@ -1061,8 +913,8 @@ def test_8037(self): self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_vectors_supported() - def test_8038(self): - "8038 - DPY-3031 - Unsupported flexible vector formats" + def test_8032(self): + "8032 - DPY-3031 - Unsupported flexible vector formats" with self.assertRaisesFullCode("DPY-3031"): self.conn.fetch_df_all( """ @@ -1073,8 +925,8 @@ def test_8038(self): ) @test_env.skip_unless_sparse_vectors_supported() - def test_8039(self): - "8039 - DPY-4007 -fetch sparse vectors with flexible dimensions" + def test_8033(self): + "8033 - DPY-4007 -fetch sparse vectors with flexible dimensions" self.__check_interop() with self.assertRaisesFullCode("DPY-2065"): self.conn.fetch_df_all( diff --git a/tests/test_8100_dataframe_async.py b/tests/test_8100_dataframe_async.py index 964a5d5..2592ac1 100644 --- a/tests/test_8100_dataframe_async.py +++ b/tests/test_8100_dataframe_async.py @@ -415,12 +415,6 @@ async def test_8100(self): ora_df = await self.conn.fetch_df_all(statement) self.assertEqual(ora_df.num_rows(), len(DATASET_1)) self.assertEqual(ora_df.num_columns(), len(DATASET_1[0])) - metadata = dict( - num_columns=ora_df.num_columns(), - num_rows=ora_df.num_rows(), - num_chunks=1, - ) - self.assertEqual(ora_df.metadata, metadata) async def test_8101(self): "8101 - test conversion to external dataframe" @@ -501,43 +495,25 @@ async def test_8113(self): ora_df.get_column_by_name("missing_column") async def test_8114(self): - "8114 - check size and null count with no nulls" - await self.__populate_table(DATASET_1) - statement = "select * from TestDataFrame order by Id" - ora_df = await self.conn.fetch_df_all(statement) - col = ora_df.get_column(0) - self.assertEqual(col.size(), len(DATASET_1)) - self.assertEqual(col.null_count, 0) - - async def test_8115(self): - "8115 - check size and null count with nulls present" - await self.__populate_table(DATASET_2) - statement = "select * from TestDataFrame order by Id" - ora_df = await self.conn.fetch_df_all(statement) - col = ora_df.get_column_by_name("SALARY") - self.assertEqual(col.size(), len(DATASET_2)) - self.assertEqual(col.null_count, 2) - - async def test_8116(self): - "8116 - check unsupported error" + "8114 - check unsupported error" statement = "select cursor(select user from dual) from dual" with self.assertRaisesFullCode("DPY-3030"): await self.conn.fetch_df_all(statement) - async def test_8117(self): - "8117 - batches with specification of size matching number of rows" + async def test_8115(self): + "8115 - batches with specification of size matching number of rows" await self.__test_df_batches_interop( DATASET_2, batch_size=len(DATASET_2), num_batches=1 ) - async def test_8118(self): - "8118 - batches with size that has duplicate rows across batches" + async def test_8116(self): + "8116 - batches with size that has duplicate rows across batches" await self.__test_df_batches_interop( DATASET_4, batch_size=3, num_batches=2 ) - async def test_8119(self): - "8119 - fetch_decimals without precision and scale specified" + async def test_8117(self): + "8117 - fetch_decimals without precision and scale specified" data = [(1.0,)] self.__check_interop() with test_env.DefaultsContextManager("fetch_decimals", True): @@ -549,8 +525,8 @@ async def test_8119(self): fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) - async def test_8120(self): - "8120 - fetch clob" + async def test_8118(self): + "8118 - fetch clob" data = [("test_8023",)] self.__check_interop() ora_df = await self.conn.fetch_df_all( @@ -563,8 +539,8 @@ async def test_8120(self): fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) - async def test_8121(self): - "8121 - fetch blob" + async def test_8119(self): + "8119 - fetch blob" data = [(b"test_8024",)] self.__check_interop() ora_df = await self.conn.fetch_df_all( @@ -578,8 +554,8 @@ async def test_8121(self): self.assertEqual(fetched_data, data) @test_env.skip_unless_native_boolean_supported() - async def test_8122(self): - "8122 - fetch boolean" + async def test_8120(self): + "8120 - fetch boolean" data = [(True,), (False,), (False,), (True,), (True,)] self.__check_interop() ora_df = await self.conn.fetch_df_all( @@ -603,8 +579,8 @@ async def test_8122(self): self.assertEqual(fetched_data, data) @test_env.skip_unless_vectors_supported() - async def test_8123(self): - "8123 - fetch float32 vector" + async def test_8121(self): + "8121 - fetch float32 vector" data = [ (array.array("f", [34.6, 77.8]).tolist(),), (array.array("f", [34.6, 77.8, 55.9]).tolist(),), @@ -619,8 +595,6 @@ async def test_8123(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - ora_col = ora_df.get_column(0) - self.assertEqual(ora_col.null_count, 0) fetched_tab = pyarrow.Table.from_arrays( ora_df.column_arrays(), names=ora_df.column_names() ) @@ -631,8 +605,8 @@ async def test_8123(self): self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_sparse_vectors_supported() - async def test_8124(self): - "8124 - fetch float64 sparse vectors" + async def test_8122(self): + "8122 - fetch float64 sparse vectors" data = [ ( { @@ -669,8 +643,6 @@ async def test_8124(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - ora_col = ora_df.get_column(0) - self.assertEqual(ora_col.null_count, 0) fetched_tab = pyarrow.Table.from_arrays( ora_df.column_arrays(), names=ora_df.column_names() ) @@ -679,8 +651,8 @@ async def test_8124(self): fetched_df = fetched_tab.to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) - async def test_8125(self): - "8125 - fetch data with multiple rows containing null values" + async def test_8123(self): + "8123 - fetch data with multiple rows containing null values" self.__check_interop() ora_df = await self.conn.fetch_df_all( """ @@ -721,67 +693,6 @@ async def test_8125(self): fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) - async def test_8126(self): - "8126 - verify dtype for all Arrow types" - query = """ - select - cast(1 as number(10)) as col_int64, - cast(1.23 as binary_double) as col_double, - cast(7.14 as binary_float) as col_float, - cast('abcd' as varchar2(10)) as col_string, - cast('efgh' as nvarchar2(6)) as col_nstring, - cast('ijkl' as char(4)) as col_char, - cast('mnop' as nchar(4)) as col_nchar, - cast(systimestamp as timestamp(0)) as col_ts_sec, - cast(systimestamp as timestamp(3)) as col_ts_ms, - cast(systimestamp as timestamp(6)) as col_ts_us, - cast(systimestamp as timestamp(9)) as col_ts_ns, - to_clob('abc') as col_large_string, - to_nclob('def') as col_large_nstring, - utl_raw.cast_to_raw('abc2') as col_binary, - to_blob(utl_raw.cast_to_raw('abc3')) as col_large_binary - from dual - """ - decimal_query = ( - "select cast(123.45 as decimal(10, 2)) as col_decimal128 from dual" - ) - - # determine dtype kind enumeration - ora_df = await self.conn.fetch_df_all("select user from dual") - col = ora_df.get_column(0) - dtype_kind = type(col.dtype[0]) - - expected_dtypes = { - "COL_INT64": (dtype_kind.INT, 64, "l", "="), - "COL_DOUBLE": (dtype_kind.FLOAT, 64, "g", "="), - "COL_FLOAT": (dtype_kind.FLOAT, 64, "g", "="), - "COL_STRING": (dtype_kind.STRING, 8, "u", "="), - "COL_NSTRING": (dtype_kind.STRING, 8, "u", "="), - "COL_CHAR": (dtype_kind.STRING, 8, "u", "="), - "COL_NCHAR": (dtype_kind.STRING, 8, "u", "="), - "COL_TS_SEC": (dtype_kind.DATETIME, 64, "tss:", "="), - "COL_TS_MS": (dtype_kind.DATETIME, 64, "tsm:", "="), - "COL_TS_US": (dtype_kind.DATETIME, 64, "tsu:", "="), - "COL_TS_NS": (dtype_kind.DATETIME, 64, "tsn:", "="), - "COL_LARGE_STRING": (dtype_kind.STRING, 8, "U", "="), - "COL_LARGE_NSTRING": (dtype_kind.STRING, 8, "U", "="), - "COL_BINARY": (dtype_kind.STRING, 8, "z", "="), - "COL_LARGE_BINARY": (dtype_kind.STRING, 8, "Z", "="), - "COL_DECIMAL128": (dtype_kind.DECIMAL, 128, "d:10.2", "="), - } - - # check query without fetch_decimals enabled - ora_df = await self.conn.fetch_df_all(query) - for i, name in enumerate(ora_df.column_names()): - col = ora_df.get_column(i) - self.assertEqual(col.dtype, expected_dtypes[name]) - - # check query with fetch_decimals enabled - with test_env.DefaultsContextManager("fetch_decimals", True): - ora_df = await self.conn.fetch_df_all(decimal_query) - col = ora_df.get_column(0) - self.assertEqual(col.dtype, expected_dtypes["COL_DECIMAL128"]) - if __name__ == "__main__": test_env.run_test_cases() From a0d7ae91bac1611c35f3ae7536f1fc1897f66c44 Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:50:09 -0600 Subject: [PATCH 09/17] Add Instance Principal Authentication section. --- doc/src/user_guide/connection_handling.rst | 105 ++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/doc/src/user_guide/connection_handling.rst b/doc/src/user_guide/connection_handling.rst index 542c824..133c674 100644 --- a/doc/src/user_guide/connection_handling.rst +++ b/doc/src/user_guide/connection_handling.rst @@ -4621,7 +4621,7 @@ the following table. With Simple Authentication, the individual configuration parameters can be provided at runtime. - With Instance Principal Authentication, OCI compute instances can be authorized to access services on Oracle Cloud such as Oracle Autonomous Database. Python-oracledb applications running on such a compute instance are automatically authenticated, eliminating the need to provide database user credentials. This authentication method will only work on compute instances where internal network endpoints are reachable. For more information on OCI compute instances, see `OCI Compute Instances `__, `Creating a Compute Instance `__, and `Calling Services from a Compute Instance `__. + With Instance Principal Authentication, OCI compute instances can be authorized to access services on Oracle Cloud such as Oracle Autonomous Database. Python-oracledb applications running on such a compute instance are automatically authenticated, eliminating the need to provide database user credentials. This authentication method will only work on compute instances where internal network endpoints are reachable. See :ref:`instanceprincipalauth`. See `OCI SDK Authentication Methods `__ for more information. - Required @@ -4790,6 +4790,109 @@ to explicitly set the ``extra_auth_params`` and ``externalauth`` parameters of dsn=mydb_low, extra_auth_params=token_based_auth) +.. _instanceprincipalauth: + +Instance Principal Authentication +================================= + +With Instance Principal Authentication, Oracle Cloud Infrastructure (OCI) +compute instances can be authorized to access services on Oracle Cloud such as +Oracle Autonomous Database. Python-oracledb applications running on such a +compute instance do not need to provide database user credentials. + +Each compute instance behaves as a distinct type of Identity and Access +Management (IAM) Principal, that is, each compute instance has a unique +identity in the form of a digital certificate which is managed by OCI. When +using Instance Principal Authentication, a compute instance authenticates with +OCI IAM using this identity and obtains a short-lived token. This token is +then used to access Oracle Cloud services without storing or managing any +secrets in your application. + +The example below demonstrates how to connect to Oracle Autonomous +Database using Instance Principal authentication. To enable this, use +python-oracledb's :ref:`oci_tokens ` plugin which +is pre-installed with the ``oracledb`` module. + +**Step 1: Create an OCI Compute Instance** + +An `OCI compute instance `__ is a virtual machine running +within OCI that provides compute resources for your application. This compute +instance will be used to authenticate access to Oracle Cloud services when +using Instance Principal Authentication. + +To create an OCI compute instance, see the steps in `Creating an Instance +`__ section of the Oracle Cloud Infrastructure +documentation. + +For more information on OCI compute instances, see `Calling Services from a +Compute Instance `__. + +**Step 2: Install the OCI CLI on your compute instance** + +The `OCI Command Line Interface (CLI) `__ that can be used on its own or with +the Oracle Cloud console to complete OCI tasks. + +To install the OCI CLI on your compute instance, see the installation +instructions in the `Installing the CLI `__ section of Oracle Cloud Infrastructure +documentation. + +**Step 3: Create a Dynamic Group** + +A Dynamic Group is used to define rules to group the compute instances that +require access. + +To create a dynamic group using the Oracle Cloud console, see the steps in the +`To create a dynamic group `__ section of the Oracle Cloud +Infrastructure documentation. + +**Step 4: Create an IAM Policy** + +An IAM Policy is used to grant a dynamic group permission to access the +required OCI services such as Oracle Autonomous Database. + +To create an IAM policy using Oracle Cloud console, see the steps in the +`Create an IAM Policy `__ section of the Oracle Cloud +Infrastructure documentation. + +**Step 5: Map an Instance Principal to an Oracle Database User** + +You must map the Instance Principal to an Oracle Database user. For more +information, see `Accessing the Database Using an Instance Principal +`__. + +Also, make sure that external authentication is enabled on Oracle ADB and +Oracle Database parameter ``IDENTITY_PROVIDER_TYPE`` is set to *OCI_IAM*. For +the steps, see `Enable IAM Authentication on ADB `__. + +**Step 6: Deploy your application on the Compute Instance** + +To use Instance Principal authentication, set ``extra_auth_params`` when +creating a standalone connection or a connection pool, for example: + +.. code-block:: python + + import oracledb + import oracledb.plugins.oci_tokens + + token_based_auth = { + "auth_type": "InstancePrincipal" + } + + connection = oracledb.connect( + dsn=mydb_low, + extra_auth_params=token_based_auth + ) + Privileged Connections ====================== From f9c435b965e329c7d5d9a58ada5538f35b38cdbf Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:50:28 -0600 Subject: [PATCH 10/17] Upgraded nanoarrow version to 0.7.0. --- doc/src/release_notes.rst | 1 + src/oracledb/impl/arrow/nanoarrow/nanoarrow.c | 251 +++++++++- src/oracledb/impl/arrow/nanoarrow/nanoarrow.h | 447 ++++++++++++------ 3 files changed, 538 insertions(+), 161 deletions(-) diff --git a/doc/src/release_notes.rst b/doc/src/release_notes.rst index 44eb4d5..75de4f0 100644 --- a/doc/src/release_notes.rst +++ b/doc/src/release_notes.rst @@ -40,6 +40,7 @@ Common Changes - Documentation on methods and attributes on the ``DataFrame`` and ``ArrowArray`` objects are now available in Python plugins such as those found in VS Code + - Upgraded Arrow C Data (nanoarrow) API version to 0.7.0 Note the data frame support in python-oracledb 3.3 is a pre-release, and may change in a future version diff --git a/src/oracledb/impl/arrow/nanoarrow/nanoarrow.c b/src/oracledb/impl/arrow/nanoarrow/nanoarrow.c index 8f26598..80b79ee 100644 --- a/src/oracledb/impl/arrow/nanoarrow/nanoarrow.c +++ b/src/oracledb/impl/arrow/nanoarrow/nanoarrow.c @@ -111,6 +111,7 @@ void ArrowLayoutInit(struct ArrowLayout* layout, enum ArrowType storage_type) { case NANOARROW_TYPE_UINT32: case NANOARROW_TYPE_INT32: case NANOARROW_TYPE_FLOAT: + case NANOARROW_TYPE_DECIMAL32: layout->element_size_bits[1] = 32; break; case NANOARROW_TYPE_INTERVAL_MONTHS: @@ -122,6 +123,7 @@ void ArrowLayoutInit(struct ArrowLayout* layout, enum ArrowType storage_type) { case NANOARROW_TYPE_INT64: case NANOARROW_TYPE_DOUBLE: case NANOARROW_TYPE_INTERVAL_DAY_TIME: + case NANOARROW_TYPE_DECIMAL64: layout->element_size_bits[1] = 64; break; @@ -188,6 +190,24 @@ void ArrowLayoutInit(struct ArrowLayout* layout, enum ArrowType storage_type) { layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_DATA; layout->buffer_data_type[1] = NANOARROW_TYPE_STRING_VIEW; layout->element_size_bits[1] = 128; + break; + + case NANOARROW_TYPE_LIST_VIEW: + layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_VIEW_OFFSET; + layout->buffer_data_type[1] = NANOARROW_TYPE_INT32; + layout->element_size_bits[1] = 32; + layout->buffer_type[2] = NANOARROW_BUFFER_TYPE_SIZE; + layout->buffer_data_type[2] = NANOARROW_TYPE_INT32; + layout->element_size_bits[2] = 32; + break; + case NANOARROW_TYPE_LARGE_LIST_VIEW: + layout->buffer_type[1] = NANOARROW_BUFFER_TYPE_VIEW_OFFSET; + layout->buffer_data_type[1] = NANOARROW_TYPE_INT64; + layout->element_size_bits[1] = 64; + layout->buffer_type[2] = NANOARROW_BUFFER_TYPE_SIZE; + layout->buffer_data_type[2] = NANOARROW_TYPE_INT64; + layout->element_size_bits[2] = 64; + break; default: break; @@ -326,13 +346,14 @@ ArrowErrorCode ArrowDecimalSetDigits(struct ArrowDecimal* decimal, // Use 32-bit words for portability uint32_t words32[8]; - int n_words32 = decimal->n_words * 2; + memset(words32, 0, sizeof(words32)); + int n_words32 = decimal->n_words > 0 ? decimal->n_words * 2 : 1; NANOARROW_DCHECK(n_words32 <= 8); memset(words32, 0, sizeof(words32)); ShiftAndAdd(value, words32, n_words32); - if (decimal->low_word_index == 0) { + if (_ArrowIsLittleEndian() || n_words32 == 1) { memcpy(decimal->words, words32, sizeof(uint32_t) * n_words32); } else { uint64_t lo; @@ -356,11 +377,31 @@ ArrowErrorCode ArrowDecimalSetDigits(struct ArrowDecimal* decimal, // https://github.com/apache/arrow/blob/cd3321b28b0c9703e5d7105d6146c1270bbadd7f/cpp/src/arrow/util/decimal.cc#L365 ArrowErrorCode ArrowDecimalAppendDigitsToBuffer(const struct ArrowDecimal* decimal, struct ArrowBuffer* buffer) { - NANOARROW_DCHECK(decimal->n_words == 2 || decimal->n_words == 4); + NANOARROW_DCHECK(decimal->n_words == 0 || decimal->n_words == 1 || + decimal->n_words == 2 || decimal->n_words == 4); + + // For the 32-bit case, just use snprintf() + if (decimal->n_words == 0) { + int32_t value; + memcpy(&value, decimal->words, sizeof(int32_t)); + NANOARROW_RETURN_NOT_OK(ArrowBufferReserve(buffer, 16)); + int n_chars = snprintf((char*)buffer->data + buffer->size_bytes, + (buffer->capacity_bytes - buffer->size_bytes), "%d", value); + if (n_chars <= 0) { + return EINVAL; + } + + buffer->size_bytes += n_chars; + return NANOARROW_OK; + } + int is_negative = ArrowDecimalSign(decimal) < 0; uint64_t words_little_endian[4]; - if (decimal->low_word_index == 0) { + if (decimal->n_words == 0) { + words_little_endian[0] = 0; + memcpy(words_little_endian, decimal->words, sizeof(uint32_t)); + } else if (decimal->low_word_index == 0) { memcpy(words_little_endian, decimal->words, decimal->n_words * sizeof(uint64_t)); } else { for (int i = 0; i < decimal->n_words; i++) { @@ -370,21 +411,33 @@ ArrowErrorCode ArrowDecimalAppendDigitsToBuffer(const struct ArrowDecimal* decim // We've already made a copy, so negate that if needed if (is_negative) { - uint64_t carry = 1; - for (int i = 0; i < decimal->n_words; i++) { - uint64_t elem = words_little_endian[i]; - elem = ~elem + carry; - carry &= (elem == 0); - words_little_endian[i] = elem; + if (decimal->n_words == 0) { + uint32_t elem = (uint32_t)words_little_endian[0]; + elem = ~elem + 1; + words_little_endian[0] = (int32_t)elem; + } else { + uint64_t carry = 1; + for (int i = 0; i < decimal->n_words; i++) { + uint64_t elem = words_little_endian[i]; + elem = ~elem + carry; + carry &= (elem == 0); + words_little_endian[i] = elem; + } } } // Find the most significant word that is non-zero int most_significant_elem_idx = -1; - for (int i = decimal->n_words - 1; i >= 0; i--) { - if (words_little_endian[i] != 0) { - most_significant_elem_idx = i; - break; + if (decimal->n_words == 0) { + if (words_little_endian[0] != 0) { + most_significant_elem_idx = 0; + } + } else { + for (int i = decimal->n_words - 1; i >= 0; i--) { + if (words_little_endian[i] != 0) { + most_significant_elem_idx = i; + break; + } } } @@ -462,6 +515,50 @@ ArrowErrorCode ArrowDecimalAppendDigitsToBuffer(const struct ArrowDecimal* decim return NANOARROW_OK; } + +ArrowErrorCode ArrowDecimalAppendStringToBuffer(const struct ArrowDecimal* decimal, + struct ArrowBuffer* buffer) { + int64_t buffer_size = buffer->size_bytes; + NANOARROW_RETURN_NOT_OK(ArrowDecimalAppendDigitsToBuffer(decimal, buffer)); + int64_t digits_size = buffer->size_bytes - buffer_size; + + if (decimal->scale <= 0) { + // e.g., digits are -12345 and scale is -2 -> -1234500 + // Just add zeros to the end + for (int i = decimal->scale; i < 0; i++) { + NANOARROW_RETURN_NOT_OK(ArrowBufferAppendInt8(buffer, '0')); + } + return NANOARROW_OK; + } + + int is_negative = buffer->data[0] == '-'; + int64_t num_digits = digits_size - is_negative; + if (num_digits <= decimal->scale) { + // e.g., digits are -12345 and scale is 6 -> -0.012345 + // Insert "0." between the (maybe) negative sign and the digits + int64_t num_zeros_after_decimal = decimal->scale - num_digits; + NANOARROW_RETURN_NOT_OK( + ArrowBufferResize(buffer, buffer->size_bytes + num_zeros_after_decimal + 2, 0)); + + uint8_t* digits_start = buffer->data + is_negative; + memmove(digits_start + num_zeros_after_decimal + 2, digits_start, num_digits); + *digits_start++ = '0'; + *digits_start++ = '.'; + for (int i = 0; i < num_zeros_after_decimal; i++) { + *digits_start++ = '0'; + } + + } else { + // e.g., digits are -12345 and scale is 4 -> -1.2345 + // Insert a decimal point before scale digits of output + NANOARROW_RETURN_NOT_OK(ArrowBufferResize(buffer, buffer->size_bytes + 1, 0)); + uint8_t* decimal_point_to_be = buffer->data + buffer->size_bytes - 1 - decimal->scale; + memmove(decimal_point_to_be + 1, decimal_point_to_be, decimal->scale); + *decimal_point_to_be = '.'; + } + + return NANOARROW_OK; +} // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information @@ -589,6 +686,10 @@ static const char* ArrowSchemaFormatTemplate(enum ArrowType type) { return "+l"; case NANOARROW_TYPE_LARGE_LIST: return "+L"; + case NANOARROW_TYPE_LIST_VIEW: + return "+vl"; + case NANOARROW_TYPE_LARGE_LIST_VIEW: + return "+vL"; case NANOARROW_TYPE_STRUCT: return "+s"; case NANOARROW_TYPE_MAP: @@ -607,6 +708,8 @@ static int ArrowSchemaInitChildrenIfNeeded(struct ArrowSchema* schema, case NANOARROW_TYPE_LIST: case NANOARROW_TYPE_LARGE_LIST: case NANOARROW_TYPE_FIXED_SIZE_LIST: + case NANOARROW_TYPE_LIST_VIEW: + case NANOARROW_TYPE_LARGE_LIST_VIEW: NANOARROW_RETURN_NOT_OK(ArrowSchemaAllocateChildren(schema, 1)); ArrowSchemaInit(schema->children[0]); NANOARROW_RETURN_NOT_OK(ArrowSchemaSetName(schema->children[0], "item")); @@ -735,11 +838,35 @@ ArrowErrorCode ArrowSchemaSetTypeDecimal(struct ArrowSchema* schema, enum ArrowT char buffer[64]; int n_chars; switch (type) { + case NANOARROW_TYPE_DECIMAL32: + if (decimal_precision > 9) { + return EINVAL; + } + + n_chars = snprintf(buffer, sizeof(buffer), "d:%d,%d,32", decimal_precision, + decimal_scale); + break; + case NANOARROW_TYPE_DECIMAL64: + if (decimal_precision > 18) { + return EINVAL; + } + + n_chars = snprintf(buffer, sizeof(buffer), "d:%d,%d,64", decimal_precision, + decimal_scale); + break; case NANOARROW_TYPE_DECIMAL128: + if (decimal_precision > 38) { + return EINVAL; + } + n_chars = snprintf(buffer, sizeof(buffer), "d:%d,%d", decimal_precision, decimal_scale); break; case NANOARROW_TYPE_DECIMAL256: + if (decimal_precision > 76) { + return EINVAL; + } + n_chars = snprintf(buffer, sizeof(buffer), "d:%d,%d,256", decimal_precision, decimal_scale); break; @@ -1185,6 +1312,12 @@ static ArrowErrorCode ArrowSchemaViewParse(struct ArrowSchemaView* schema_view, *format_end_out = parse_end; switch (schema_view->decimal_bitwidth) { + case 32: + ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_DECIMAL32); + return NANOARROW_OK; + case 64: + ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_DECIMAL64); + return NANOARROW_OK; case 128: ArrowSchemaViewSetPrimitive(schema_view, NANOARROW_TYPE_DECIMAL128); return NANOARROW_OK; @@ -1321,6 +1454,24 @@ static ArrowErrorCode ArrowSchemaViewParse(struct ArrowSchemaView* schema_view, return EINVAL; } + // views + case 'v': + switch (format[2]) { + case 'l': + schema_view->storage_type = NANOARROW_TYPE_LIST_VIEW; + schema_view->type = NANOARROW_TYPE_LIST_VIEW; + *format_end_out = format + 3; + return NANOARROW_OK; + case 'L': + schema_view->storage_type = NANOARROW_TYPE_LARGE_LIST_VIEW; + schema_view->type = NANOARROW_TYPE_LARGE_LIST_VIEW; + *format_end_out = format + 3; + return NANOARROW_OK; + default: + ArrowErrorSet( + error, "Expected view format string +vl or +vL but found '%s'", format); + return EINVAL; + } default: ArrowErrorSet(error, "Expected nested type format string but found '%s'", format); @@ -1621,6 +1772,8 @@ static ArrowErrorCode ArrowSchemaViewValidate(struct ArrowSchemaView* schema_vie case NANOARROW_TYPE_HALF_FLOAT: case NANOARROW_TYPE_FLOAT: case NANOARROW_TYPE_DOUBLE: + case NANOARROW_TYPE_DECIMAL32: + case NANOARROW_TYPE_DECIMAL64: case NANOARROW_TYPE_DECIMAL128: case NANOARROW_TYPE_DECIMAL256: case NANOARROW_TYPE_STRING: @@ -1649,7 +1802,9 @@ static ArrowErrorCode ArrowSchemaViewValidate(struct ArrowSchemaView* schema_vie return ArrowSchemaViewValidateNChildren(schema_view, 0, error); case NANOARROW_TYPE_LIST: + case NANOARROW_TYPE_LIST_VIEW: case NANOARROW_TYPE_LARGE_LIST: + case NANOARROW_TYPE_LARGE_LIST_VIEW: case NANOARROW_TYPE_FIXED_SIZE_LIST: return ArrowSchemaViewValidateNChildren(schema_view, 1, error); @@ -1759,7 +1914,7 @@ ArrowErrorCode ArrowSchemaViewInit(struct ArrowSchemaView* schema_view, ArrowLayoutInit(&schema_view->layout, schema_view->storage_type); if (schema_view->storage_type == NANOARROW_TYPE_FIXED_SIZE_BINARY) { - schema_view->layout.element_size_bits[1] = schema_view->fixed_size * 8; + schema_view->layout.element_size_bits[1] = (int64_t)schema_view->fixed_size * 8; } else if (schema_view->storage_type == NANOARROW_TYPE_FIXED_SIZE_LIST) { schema_view->layout.child_size_elements = schema_view->fixed_size; } @@ -1780,6 +1935,8 @@ static int64_t ArrowSchemaTypeToStringInternal(struct ArrowSchemaView* schema_vi char* out, int64_t n) { const char* type_string = ArrowTypeString(schema_view->type); switch (schema_view->type) { + case NANOARROW_TYPE_DECIMAL32: + case NANOARROW_TYPE_DECIMAL64: case NANOARROW_TYPE_DECIMAL128: case NANOARROW_TYPE_DECIMAL256: return snprintf(out, n, "%s(%" PRId32 ", %" PRId32 ")", type_string, @@ -2237,6 +2394,8 @@ static ArrowErrorCode ArrowArraySetStorageType(struct ArrowArray* array, case NANOARROW_TYPE_HALF_FLOAT: case NANOARROW_TYPE_FLOAT: case NANOARROW_TYPE_DOUBLE: + case NANOARROW_TYPE_DECIMAL32: + case NANOARROW_TYPE_DECIMAL64: case NANOARROW_TYPE_DECIMAL128: case NANOARROW_TYPE_DECIMAL256: case NANOARROW_TYPE_INTERVAL_MONTHS: @@ -2254,6 +2413,8 @@ static ArrowErrorCode ArrowArraySetStorageType(struct ArrowArray* array, case NANOARROW_TYPE_LARGE_STRING: case NANOARROW_TYPE_BINARY: case NANOARROW_TYPE_LARGE_BINARY: + case NANOARROW_TYPE_LIST_VIEW: + case NANOARROW_TYPE_LARGE_LIST_VIEW: array->n_buffers = 3; break; @@ -2300,6 +2461,7 @@ ArrowErrorCode ArrowArrayInitFromType(struct ArrowArray* array, private_data->n_variadic_buffers = 0; private_data->variadic_buffers = NULL; private_data->variadic_buffer_sizes = NULL; + private_data->list_view_offset = 0; array->private_data = private_data; array->buffers = (const void**)(private_data->buffer_data); @@ -2831,6 +2993,8 @@ void ArrowArrayViewSetLength(struct ArrowArrayView* array_view, int64_t length) continue; case NANOARROW_BUFFER_TYPE_TYPE_ID: case NANOARROW_BUFFER_TYPE_UNION_OFFSET: + case NANOARROW_BUFFER_TYPE_VIEW_OFFSET: + case NANOARROW_BUFFER_TYPE_SIZE: array_view->buffer_views[i].size_bytes = element_size_bytes * length; continue; case NANOARROW_BUFFER_TYPE_VARIADIC_DATA: @@ -2987,12 +3151,19 @@ static int ArrowArrayViewValidateMinimal(struct ArrowArrayView* array_view, min_buffer_size_bytes = _ArrowBytesForBits(offset_plus_length); break; + case NANOARROW_BUFFER_TYPE_SIZE: + min_buffer_size_bytes = element_size_bytes * offset_plus_length; + break; case NANOARROW_BUFFER_TYPE_DATA_OFFSET: // Probably don't want/need to rely on the producer to have allocated an // offsets buffer of length 1 for a zero-size array min_buffer_size_bytes = (offset_plus_length != 0) * element_size_bytes * (offset_plus_length + 1); break; + case NANOARROW_BUFFER_TYPE_VIEW_OFFSET: + min_buffer_size_bytes = + (offset_plus_length != 0) * element_size_bytes * offset_plus_length; + break; case NANOARROW_BUFFER_TYPE_DATA: min_buffer_size_bytes = _ArrowRoundUpToMultipleOf8(array_view->layout.element_size_bits[i] * @@ -3029,6 +3200,8 @@ static int ArrowArrayViewValidateMinimal(struct ArrowArrayView* array_view, case NANOARROW_TYPE_LARGE_LIST: case NANOARROW_TYPE_FIXED_SIZE_LIST: case NANOARROW_TYPE_MAP: + case NANOARROW_TYPE_LIST_VIEW: + case NANOARROW_TYPE_LARGE_LIST_VIEW: if (array_view->n_children != 1) { ArrowErrorSet(error, "Expected 1 child of %s array but found %" PRId64 " child arrays", @@ -3308,10 +3481,11 @@ static int ArrowArrayViewValidateDefault(struct ArrowArrayView* array_view, if (array_view->children[0]->length < last_offset) { ArrowErrorSet(error, - "Expected child of large list array to have length >= %" PRId64 + "Expected child of %s array to have length >= %" PRId64 " but found array " "with length %" PRId64, - last_offset, array_view->children[0]->length); + ArrowTypeString(array_view->storage_type), last_offset, + array_view->children[0]->length); return EINVAL; } } @@ -3554,12 +3728,53 @@ static int ArrowArrayViewValidateFull(struct ArrowArrayView* array_view, } } + if (array_view->storage_type == NANOARROW_TYPE_LIST_VIEW || + array_view->storage_type == NANOARROW_TYPE_LARGE_LIST_VIEW) { + int64_t child_len = array_view->children[0]->length; + + struct ArrowBufferView offsets, sizes; + offsets.data.data = array_view->buffer_views[1].data.data; + sizes.data.data = array_view->buffer_views[2].data.data; + + for (int64_t i = array_view->offset; i < array_view->length + array_view->offset; + i++) { + int64_t offset, size; + if (array_view->storage_type == NANOARROW_TYPE_LIST_VIEW) { + offset = offsets.data.as_int32[i]; + size = sizes.data.as_int32[i]; + } else { + offset = offsets.data.as_int64[i]; + size = sizes.data.as_int64[i]; + } + + if (offset < 0) { + ArrowErrorSet(error, "Invalid negative offset %" PRId64 " at index %" PRId64, + offset, i); + return EINVAL; + } + + if (size < 0) { + ArrowErrorSet(error, "Invalid negative size %" PRId64 " at index %" PRId64, size, + i); + return EINVAL; + } + + if ((offset + size) > child_len) { + ArrowErrorSet(error, + "Offset: %" PRId64 " + size: %" PRId64 " at index: %" PRId64 + " exceeds length of child view: %" PRId64, + offset, size, i, child_len); + return EINVAL; + } + } + } + // Recurse for children for (int64_t i = 0; i < array_view->n_children; i++) { NANOARROW_RETURN_NOT_OK(ArrowArrayViewValidateFull(array_view->children[i], error)); } - // Dictionary valiation not implemented + // Dictionary validation not implemented if (array_view->dictionary != NULL) { NANOARROW_RETURN_NOT_OK(ArrowArrayViewValidateFull(array_view->dictionary, error)); // TODO: validate the indices diff --git a/src/oracledb/impl/arrow/nanoarrow/nanoarrow.h b/src/oracledb/impl/arrow/nanoarrow/nanoarrow.h index 0738957..d0b955f 100644 --- a/src/oracledb/impl/arrow/nanoarrow/nanoarrow.h +++ b/src/oracledb/impl/arrow/nanoarrow/nanoarrow.h @@ -15,13 +15,13 @@ // specific language governing permissions and limitations // under the License. -#ifndef NANOARROW_BUILD_ID_H_INCLUDED -#define NANOARROW_BUILD_ID_H_INCLUDED +#ifndef NANOARROW_CONFIG_H_INCLUDED +#define NANOARROW_CONFIG_H_INCLUDED #define NANOARROW_VERSION_MAJOR 0 -#define NANOARROW_VERSION_MINOR 6 +#define NANOARROW_VERSION_MINOR 7 #define NANOARROW_VERSION_PATCH 0 -#define NANOARROW_VERSION "0.6.0" +#define NANOARROW_VERSION "0.7.0" #define NANOARROW_VERSION_INT \ (NANOARROW_VERSION_MAJOR * 10000 + NANOARROW_VERSION_MINOR * 100 + \ @@ -29,6 +29,13 @@ #define NANOARROW_NAMESPACE PythonPkg +#if !defined(NANOARROW_CXX_NAMESPACE) +#define NANOARROW_CXX_NAMESPACE nanoarrow +#endif + +#define NANOARROW_CXX_NAMESPACE_BEGIN namespace NANOARROW_CXX_NAMESPACE { +#define NANOARROW_CXX_NAMESPACE_END } + #endif // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file @@ -181,14 +188,14 @@ struct ArrowArrayStream { NANOARROW_RETURN_NOT_OK((x_ <= max_) ? NANOARROW_OK : EINVAL) #if defined(NANOARROW_DEBUG) -#define _NANOARROW_RETURN_NOT_OK_WITH_ERROR_IMPL(NAME, EXPR, ERROR_PTR_EXPR, EXPR_STR) \ - do { \ - const int NAME = (EXPR); \ - if (NAME) { \ - ArrowErrorSet((ERROR_PTR_EXPR), "%s failed with errno %d(%s)\n* %s:%d", EXPR_STR, \ - NAME, strerror(NAME), __FILE__, __LINE__); \ - return NAME; \ - } \ +#define _NANOARROW_RETURN_NOT_OK_WITH_ERROR_IMPL(NAME, EXPR, ERROR_PTR_EXPR, EXPR_STR) \ + do { \ + const int NAME = (EXPR); \ + if (NAME) { \ + ArrowErrorSet((ERROR_PTR_EXPR), "%s failed with errno %d\n* %s:%d", EXPR_STR, \ + NAME, __FILE__, __LINE__); \ + return NAME; \ + } \ } while (0) #else #define _NANOARROW_RETURN_NOT_OK_WITH_ERROR_IMPL(NAME, EXPR, ERROR_PTR_EXPR, EXPR_STR) \ @@ -485,7 +492,11 @@ enum ArrowType { NANOARROW_TYPE_INTERVAL_MONTH_DAY_NANO, NANOARROW_TYPE_RUN_END_ENCODED, NANOARROW_TYPE_BINARY_VIEW, - NANOARROW_TYPE_STRING_VIEW + NANOARROW_TYPE_STRING_VIEW, + NANOARROW_TYPE_DECIMAL32, + NANOARROW_TYPE_DECIMAL64, + NANOARROW_TYPE_LIST_VIEW, + NANOARROW_TYPE_LARGE_LIST_VIEW, }; /// \brief Get a string value of an enum ArrowType value @@ -542,6 +553,10 @@ static inline const char* ArrowTypeString(enum ArrowType type) { return "interval_months"; case NANOARROW_TYPE_INTERVAL_DAY_TIME: return "interval_day_time"; + case NANOARROW_TYPE_DECIMAL32: + return "decimal32"; + case NANOARROW_TYPE_DECIMAL64: + return "decimal64"; case NANOARROW_TYPE_DECIMAL128: return "decimal128"; case NANOARROW_TYPE_DECIMAL256: @@ -578,6 +593,10 @@ static inline const char* ArrowTypeString(enum ArrowType type) { return "binary_view"; case NANOARROW_TYPE_STRING_VIEW: return "string_view"; + case NANOARROW_TYPE_LIST_VIEW: + return "list_view"; + case NANOARROW_TYPE_LARGE_LIST_VIEW: + return "large_list_view"; default: return NULL; } @@ -656,7 +675,9 @@ enum ArrowBufferType { NANOARROW_BUFFER_TYPE_DATA_OFFSET, NANOARROW_BUFFER_TYPE_DATA, NANOARROW_BUFFER_TYPE_VARIADIC_DATA, - NANOARROW_BUFFER_TYPE_VARIADIC_SIZE + NANOARROW_BUFFER_TYPE_VARIADIC_SIZE, + NANOARROW_BUFFER_TYPE_VIEW_OFFSET, + NANOARROW_BUFFER_TYPE_SIZE, }; /// \brief The maximum number of fixed buffers in an ArrowArrayView or ArrowLayout @@ -890,6 +911,9 @@ struct ArrowArrayPrivateData { // Size of each variadic buffer in bytes int64_t* variadic_buffer_sizes; + + // The current offset used to build list views + int64_t list_view_offset; }; /// \brief A representation of an interval. @@ -922,7 +946,8 @@ static inline void ArrowIntervalInit(struct ArrowInterval* interval, /// values set using ArrowDecimalSetInt(), ArrowDecimalSetBytes128(), /// or ArrowDecimalSetBytes256(). struct ArrowDecimal { - /// \brief An array of 64-bit integers of n_words length defined in native-endian order + /// \brief An array of 64-bit integers of n_words length defined in native-endian order. + /// For a 32-bit decimal value, index 0 will be a 32-bit integer value. uint64_t words[4]; /// \brief The number of significant digits this decimal number can represent @@ -931,7 +956,8 @@ struct ArrowDecimal { /// \brief The number of digits after the decimal point. This can be negative. int32_t scale; - /// \brief The number of words in the words array + /// \brief The number of 64-bit words in the words array. For the special case of a + /// 32-bit decimal value, this will be 0. int n_words; /// \brief Cached value used by the implementation @@ -948,13 +974,14 @@ static inline void ArrowDecimalInit(struct ArrowDecimal* decimal, int32_t bitwid memset(decimal->words, 0, sizeof(decimal->words)); decimal->precision = precision; decimal->scale = scale; + // n_words will be 0 for bitwidth == 32 decimal->n_words = (int)(bitwidth / 8 / sizeof(uint64_t)); if (_ArrowIsLittleEndian()) { decimal->low_word_index = 0; - decimal->high_word_index = decimal->n_words - 1; + decimal->high_word_index = decimal->n_words > 0 ? decimal->n_words - 1 : 0; } else { - decimal->low_word_index = decimal->n_words - 1; + decimal->low_word_index = decimal->n_words > 0 ? decimal->n_words - 1 : 0; decimal->high_word_index = 0; } } @@ -965,6 +992,12 @@ static inline void ArrowDecimalInit(struct ArrowDecimal* decimal, int32_t bitwid /// within the signed 64-bit integer range (A precision less than or equal /// to 18 is sufficiently small). static inline int64_t ArrowDecimalGetIntUnsafe(const struct ArrowDecimal* decimal) { + if (decimal->n_words == 0) { + int32_t value; + memcpy(&value, decimal->words, sizeof(int32_t)); + return value; + } + return (int64_t)decimal->words[decimal->low_word_index]; } @@ -972,18 +1005,32 @@ static inline int64_t ArrowDecimalGetIntUnsafe(const struct ArrowDecimal* decima /// \ingroup nanoarrow-utils static inline void ArrowDecimalGetBytes(const struct ArrowDecimal* decimal, uint8_t* out) { - memcpy(out, decimal->words, decimal->n_words * sizeof(uint64_t)); + if (decimal->n_words == 0) { + memcpy(out, decimal->words, sizeof(int32_t)); + } else { + memcpy(out, decimal->words, decimal->n_words * sizeof(uint64_t)); + } } /// \brief Returns 1 if the value represented by decimal is >= 0 or -1 otherwise /// \ingroup nanoarrow-utils static inline int64_t ArrowDecimalSign(const struct ArrowDecimal* decimal) { - return 1 | ((int64_t)(decimal->words[decimal->high_word_index]) >> 63); + if (decimal->n_words == 0) { + return ArrowDecimalGetIntUnsafe(decimal) >= 0 ? 1 : -1; + } else { + return 1 | ((int64_t)(decimal->words[decimal->high_word_index]) >> 63); + } } /// \brief Sets the integer value of this decimal /// \ingroup nanoarrow-utils static inline void ArrowDecimalSetInt(struct ArrowDecimal* decimal, int64_t value) { + if (decimal->n_words == 0) { + int32_t value32 = (int32_t)value; + memcpy(decimal->words, &value32, sizeof(int32_t)); + return; + } + if (value < 0) { memset(decimal->words, 0xff, decimal->n_words * sizeof(uint64_t)); } else { @@ -996,6 +1043,14 @@ static inline void ArrowDecimalSetInt(struct ArrowDecimal* decimal, int64_t valu /// \brief Negate the value of this decimal in place /// \ingroup nanoarrow-utils static inline void ArrowDecimalNegate(struct ArrowDecimal* decimal) { + if (decimal->n_words == 0) { + int32_t value; + memcpy(&value, decimal->words, sizeof(int32_t)); + value = -value; + memcpy(decimal->words, &value, sizeof(int32_t)); + return; + } + uint64_t carry = 1; if (decimal->low_word_index == 0) { @@ -1019,7 +1074,11 @@ static inline void ArrowDecimalNegate(struct ArrowDecimal* decimal) { /// \ingroup nanoarrow-utils static inline void ArrowDecimalSetBytes(struct ArrowDecimal* decimal, const uint8_t* value) { - memcpy(decimal->words, value, decimal->n_words * sizeof(uint64_t)); + if (decimal->n_words == 0) { + memcpy(decimal->words, value, sizeof(int32_t)); + } else { + memcpy(decimal->words, value, decimal->n_words * sizeof(uint64_t)); + } } #ifdef __cplusplus @@ -1079,6 +1138,8 @@ static inline void ArrowDecimalSetBytes(struct ArrowDecimal* decimal, #define ArrowDecimalSetDigits NANOARROW_SYMBOL(NANOARROW_NAMESPACE, ArrowDecimalSetDigits) #define ArrowDecimalAppendDigitsToBuffer \ NANOARROW_SYMBOL(NANOARROW_NAMESPACE, ArrowDecimalAppendDigitsToBuffer) +#define ArrowDecimalAppendStringToBuffer \ + NANOARROW_SYMBOL(NANOARROW_NAMESPACE, ArrowDecimalAppendStringToBuffer) #define ArrowSchemaInit NANOARROW_SYMBOL(NANOARROW_NAMESPACE, ArrowSchemaInit) #define ArrowSchemaInitFromType \ NANOARROW_SYMBOL(NANOARROW_NAMESPACE, ArrowSchemaInitFromType) @@ -1168,6 +1229,20 @@ static inline void ArrowDecimalSetBytes(struct ArrowDecimal* decimal, #endif +#if (defined _WIN32 || defined __CYGWIN__) && defined(NANOARROW_BUILD_DLL) +#if defined(NANOARROW_EXPORT_DLL) +#define NANOARROW_DLL __declspec(dllexport) +#else +#define NANOARROW_DLL __declspec(dllimport) +#endif // defined(NANOARROW_EXPORT_DLL) +#elif !defined(NANOARROW_DLL) +#if defined(__GNUC__) && __GNUC__ >= 4 +#define NANOARROW_DLL __attribute__((visibility("default"))) +#else +#define NANOARROW_DLL +#endif // __GNUC__ >= 4 +#endif + #ifdef __cplusplus extern "C" { #endif @@ -1191,19 +1266,19 @@ extern "C" { /// @{ /// \brief Allocate like malloc() -void* ArrowMalloc(int64_t size); +NANOARROW_DLL void* ArrowMalloc(int64_t size); /// \brief Reallocate like realloc() -void* ArrowRealloc(void* ptr, int64_t size); +NANOARROW_DLL void* ArrowRealloc(void* ptr, int64_t size); /// \brief Free a pointer allocated using ArrowMalloc() or ArrowRealloc(). -void ArrowFree(void* ptr); +NANOARROW_DLL void ArrowFree(void* ptr); /// \brief Return the default allocator /// /// The default allocator uses ArrowMalloc(), ArrowRealloc(), and /// ArrowFree(). -struct ArrowBufferAllocator ArrowBufferAllocatorDefault(void); +NANOARROW_DLL struct ArrowBufferAllocator ArrowBufferAllocatorDefault(void); /// \brief Create a custom deallocator /// @@ -1211,8 +1286,8 @@ struct ArrowBufferAllocator ArrowBufferAllocatorDefault(void); /// attach a custom deallocator to an ArrowBuffer. This may be used to /// avoid copying an existing buffer that was not allocated using the /// infrastructure provided here (e.g., by an R or Python object). -struct ArrowBufferAllocator ArrowBufferDeallocator(ArrowBufferDeallocatorCallback, - void* private_data); +NANOARROW_DLL struct ArrowBufferAllocator ArrowBufferDeallocator( + ArrowBufferDeallocatorCallback, void* private_data); /// @} @@ -1292,8 +1367,8 @@ static inline void ArrowArrayStreamRelease(struct ArrowArrayStream* array_stream /// \brief Set the contents of an error using printf syntax. /// /// If error is NULL, this function does nothing and returns NANOARROW_OK. -NANOARROW_CHECK_PRINTF_ATTRIBUTE int ArrowErrorSet(struct ArrowError* error, - const char* fmt, ...); +NANOARROW_DLL NANOARROW_CHECK_PRINTF_ATTRIBUTE int ArrowErrorSet(struct ArrowError* error, + const char* fmt, ...); /// @} @@ -1302,24 +1377,29 @@ NANOARROW_CHECK_PRINTF_ATTRIBUTE int ArrowErrorSet(struct ArrowError* error, /// @{ /// \brief Return a version string in the form "major.minor.patch" -const char* ArrowNanoarrowVersion(void); +NANOARROW_DLL const char* ArrowNanoarrowVersion(void); /// \brief Return an integer that can be used to compare versions sequentially -int ArrowNanoarrowVersionInt(void); +NANOARROW_DLL int ArrowNanoarrowVersionInt(void); /// \brief Initialize a description of buffer arrangements from a storage type -void ArrowLayoutInit(struct ArrowLayout* layout, enum ArrowType storage_type); +NANOARROW_DLL void ArrowLayoutInit(struct ArrowLayout* layout, + enum ArrowType storage_type); /// \brief Create a string view from a null-terminated string static inline struct ArrowStringView ArrowCharView(const char* value); /// \brief Sets the integer value of an ArrowDecimal from a string -ArrowErrorCode ArrowDecimalSetDigits(struct ArrowDecimal* decimal, - struct ArrowStringView value); +NANOARROW_DLL ArrowErrorCode ArrowDecimalSetDigits(struct ArrowDecimal* decimal, + struct ArrowStringView value); /// \brief Get the integer value of an ArrowDecimal as string -ArrowErrorCode ArrowDecimalAppendDigitsToBuffer(const struct ArrowDecimal* decimal, - struct ArrowBuffer* buffer); +NANOARROW_DLL ArrowErrorCode ArrowDecimalAppendDigitsToBuffer( + const struct ArrowDecimal* decimal, struct ArrowBuffer* buffer); + +/// \brief Get the decimal value of an ArrowDecimal as a string +NANOARROW_DLL ArrowErrorCode ArrowDecimalAppendStringToBuffer( + const struct ArrowDecimal* decimal, struct ArrowBuffer* buffer); /// \brief Get the half float value of a float static inline uint16_t ArrowFloatToHalfFloat(float value); @@ -1348,7 +1428,7 @@ static inline int64_t ArrowResolveChunk64(int64_t index, const int64_t* offsets, /// Initializes the fields and release callback of schema_out. Caller /// is responsible for calling the schema->release callback if /// NANOARROW_OK is returned. -void ArrowSchemaInit(struct ArrowSchema* schema); +NANOARROW_DLL void ArrowSchemaInit(struct ArrowSchema* schema); /// \brief Initialize an ArrowSchema from an ArrowType /// @@ -1356,7 +1436,8 @@ void ArrowSchemaInit(struct ArrowSchema* schema); /// ArrowSchemaSetType() for the common case of constructing an /// unparameterized type. The caller is responsible for calling the schema->release /// callback if NANOARROW_OK is returned. -ArrowErrorCode ArrowSchemaInitFromType(struct ArrowSchema* schema, enum ArrowType type); +NANOARROW_DLL ArrowErrorCode ArrowSchemaInitFromType(struct ArrowSchema* schema, + enum ArrowType type); /// \brief Get a human-readable summary of a Schema /// @@ -1364,8 +1445,8 @@ ArrowErrorCode ArrowSchemaInitFromType(struct ArrowSchema* schema, enum ArrowTyp /// and returns the number of characters required for the output if /// n were sufficiently large. If recursive is non-zero, the result will /// also include children. -int64_t ArrowSchemaToString(const struct ArrowSchema* schema, char* out, int64_t n, - char recursive); +NANOARROW_DLL int64_t ArrowSchemaToString(const struct ArrowSchema* schema, char* out, + int64_t n, char recursive); /// \brief Set the format field of a schema from an ArrowType /// @@ -1375,14 +1456,16 @@ int64_t ArrowSchemaToString(const struct ArrowSchema* schema, char* out, int64_t /// allocated, initialized, and named; however, the caller must /// ArrowSchemaSetType() on the preinitialized children. Schema must have been initialized /// using ArrowSchemaInit() or ArrowSchemaDeepCopy(). -ArrowErrorCode ArrowSchemaSetType(struct ArrowSchema* schema, enum ArrowType type); +NANOARROW_DLL ArrowErrorCode ArrowSchemaSetType(struct ArrowSchema* schema, + enum ArrowType type); /// \brief Set the format field and initialize children of a struct schema /// /// The specified number of children are initialized; however, the caller is responsible /// for calling ArrowSchemaSetType() and ArrowSchemaSetName() on each child. /// Schema must have been initialized using ArrowSchemaInit() or ArrowSchemaDeepCopy(). -ArrowErrorCode ArrowSchemaSetTypeStruct(struct ArrowSchema* schema, int64_t n_children); +NANOARROW_DLL ArrowErrorCode ArrowSchemaSetTypeStruct(struct ArrowSchema* schema, + int64_t n_children); /// \brief Set the format field of a fixed-size schema /// @@ -1392,17 +1475,20 @@ ArrowErrorCode ArrowSchemaSetTypeStruct(struct ArrowSchema* schema, int64_t n_ch /// allocated, initialized, and named; however, the caller must /// ArrowSchemaSetType() the first child. Schema must have been initialized using /// ArrowSchemaInit() or ArrowSchemaDeepCopy(). -ArrowErrorCode ArrowSchemaSetTypeFixedSize(struct ArrowSchema* schema, - enum ArrowType type, int32_t fixed_size); +NANOARROW_DLL ArrowErrorCode ArrowSchemaSetTypeFixedSize(struct ArrowSchema* schema, + enum ArrowType type, + int32_t fixed_size); /// \brief Set the format field of a decimal schema /// /// Returns EINVAL for scale <= 0 or for type that is not -/// NANOARROW_TYPE_DECIMAL128 or NANOARROW_TYPE_DECIMAL256. Schema must have been -/// initialized using ArrowSchemaInit() or ArrowSchemaDeepCopy(). -ArrowErrorCode ArrowSchemaSetTypeDecimal(struct ArrowSchema* schema, enum ArrowType type, - int32_t decimal_precision, - int32_t decimal_scale); +/// NANOARROW_TYPE_DECIMAL32, NANOARROW_TYPE_DECIMAL64, NANOARROW_TYPE_DECIMAL128 or +/// NANOARROW_TYPE_DECIMAL256. Schema must have been initialized using +/// ArrowSchemaInit() or ArrowSchemaDeepCopy(). +NANOARROW_DLL ArrowErrorCode ArrowSchemaSetTypeDecimal(struct ArrowSchema* schema, + enum ArrowType type, + int32_t decimal_precision, + int32_t decimal_scale); /// \brief Set the format field of a run-end encoded schema /// @@ -1412,8 +1498,8 @@ ArrowErrorCode ArrowSchemaSetTypeDecimal(struct ArrowSchema* schema, enum ArrowT /// The caller must call `ArrowSchemaSetTypeXXX(schema->children[1])` to /// set the value type. Note that when building arrays using the `ArrowArrayAppendXXX()` /// functions, the run-end encoded array's logical length must be updated manually. -ArrowErrorCode ArrowSchemaSetTypeRunEndEncoded(struct ArrowSchema* schema, - enum ArrowType run_end_type); +NANOARROW_DLL ArrowErrorCode ArrowSchemaSetTypeRunEndEncoded(struct ArrowSchema* schema, + enum ArrowType run_end_type); /// \brief Set the format field of a time, timestamp, or duration schema /// @@ -1422,55 +1508,60 @@ ArrowErrorCode ArrowSchemaSetTypeRunEndEncoded(struct ArrowSchema* schema, /// NANOARROW_TYPE_TIMESTAMP, or NANOARROW_TYPE_DURATION. The /// timezone parameter must be NULL for a non-timestamp type. Schema must have been /// initialized using ArrowSchemaInit() or ArrowSchemaDeepCopy(). -ArrowErrorCode ArrowSchemaSetTypeDateTime(struct ArrowSchema* schema, enum ArrowType type, - enum ArrowTimeUnit time_unit, - const char* timezone); +NANOARROW_DLL ArrowErrorCode ArrowSchemaSetTypeDateTime(struct ArrowSchema* schema, + enum ArrowType type, + enum ArrowTimeUnit time_unit, + const char* timezone); /// \brief Set the format field of a union schema /// /// Returns EINVAL for a type that is not NANOARROW_TYPE_DENSE_UNION /// or NANOARROW_TYPE_SPARSE_UNION. The specified number of children are /// allocated, and initialized. -ArrowErrorCode ArrowSchemaSetTypeUnion(struct ArrowSchema* schema, enum ArrowType type, - int64_t n_children); +NANOARROW_DLL ArrowErrorCode ArrowSchemaSetTypeUnion(struct ArrowSchema* schema, + enum ArrowType type, + int64_t n_children); /// \brief Make a (recursive) copy of a schema /// /// Allocates and copies fields of schema into schema_out. -ArrowErrorCode ArrowSchemaDeepCopy(const struct ArrowSchema* schema, - struct ArrowSchema* schema_out); +NANOARROW_DLL ArrowErrorCode ArrowSchemaDeepCopy(const struct ArrowSchema* schema, + struct ArrowSchema* schema_out); /// \brief Copy format into schema->format /// /// schema must have been allocated using ArrowSchemaInitFromType() or /// ArrowSchemaDeepCopy(). -ArrowErrorCode ArrowSchemaSetFormat(struct ArrowSchema* schema, const char* format); +NANOARROW_DLL ArrowErrorCode ArrowSchemaSetFormat(struct ArrowSchema* schema, + const char* format); /// \brief Copy name into schema->name /// /// schema must have been allocated using ArrowSchemaInitFromType() or /// ArrowSchemaDeepCopy(). -ArrowErrorCode ArrowSchemaSetName(struct ArrowSchema* schema, const char* name); +NANOARROW_DLL ArrowErrorCode ArrowSchemaSetName(struct ArrowSchema* schema, + const char* name); /// \brief Copy metadata into schema->metadata /// /// schema must have been allocated using ArrowSchemaInitFromType() or /// ArrowSchemaDeepCopy. -ArrowErrorCode ArrowSchemaSetMetadata(struct ArrowSchema* schema, const char* metadata); +NANOARROW_DLL ArrowErrorCode ArrowSchemaSetMetadata(struct ArrowSchema* schema, + const char* metadata); /// \brief Allocate the schema->children array /// /// Includes the memory for each child struct ArrowSchema. /// schema must have been allocated using ArrowSchemaInitFromType() or /// ArrowSchemaDeepCopy(). -ArrowErrorCode ArrowSchemaAllocateChildren(struct ArrowSchema* schema, - int64_t n_children); +NANOARROW_DLL ArrowErrorCode ArrowSchemaAllocateChildren(struct ArrowSchema* schema, + int64_t n_children); /// \brief Allocate the schema->dictionary member /// /// schema must have been allocated using ArrowSchemaInitFromType() or /// ArrowSchemaDeepCopy(). -ArrowErrorCode ArrowSchemaAllocateDictionary(struct ArrowSchema* schema); +NANOARROW_DLL ArrowErrorCode ArrowSchemaAllocateDictionary(struct ArrowSchema* schema); /// @} @@ -1494,49 +1585,51 @@ struct ArrowMetadataReader { }; /// \brief Initialize an ArrowMetadataReader -ArrowErrorCode ArrowMetadataReaderInit(struct ArrowMetadataReader* reader, - const char* metadata); +NANOARROW_DLL ArrowErrorCode ArrowMetadataReaderInit(struct ArrowMetadataReader* reader, + const char* metadata); /// \brief Read the next key/value pair from an ArrowMetadataReader -ArrowErrorCode ArrowMetadataReaderRead(struct ArrowMetadataReader* reader, - struct ArrowStringView* key_out, - struct ArrowStringView* value_out); +NANOARROW_DLL ArrowErrorCode ArrowMetadataReaderRead(struct ArrowMetadataReader* reader, + struct ArrowStringView* key_out, + struct ArrowStringView* value_out); /// \brief The number of bytes in in a key/value metadata string -int64_t ArrowMetadataSizeOf(const char* metadata); +NANOARROW_DLL int64_t ArrowMetadataSizeOf(const char* metadata); /// \brief Check for a key in schema metadata -char ArrowMetadataHasKey(const char* metadata, struct ArrowStringView key); +NANOARROW_DLL char ArrowMetadataHasKey(const char* metadata, struct ArrowStringView key); /// \brief Extract a value from schema metadata /// /// If key does not exist in metadata, value_out is unmodified -ArrowErrorCode ArrowMetadataGetValue(const char* metadata, struct ArrowStringView key, - struct ArrowStringView* value_out); +NANOARROW_DLL ArrowErrorCode ArrowMetadataGetValue(const char* metadata, + struct ArrowStringView key, + struct ArrowStringView* value_out); /// \brief Initialize a builder for schema metadata from key/value pairs /// /// metadata can be an existing metadata string or NULL to initialize /// an empty metadata string. -ArrowErrorCode ArrowMetadataBuilderInit(struct ArrowBuffer* buffer, const char* metadata); +NANOARROW_DLL ArrowErrorCode ArrowMetadataBuilderInit(struct ArrowBuffer* buffer, + const char* metadata); /// \brief Append a key/value pair to a buffer containing serialized metadata -ArrowErrorCode ArrowMetadataBuilderAppend(struct ArrowBuffer* buffer, - struct ArrowStringView key, - struct ArrowStringView value); +NANOARROW_DLL ArrowErrorCode ArrowMetadataBuilderAppend(struct ArrowBuffer* buffer, + struct ArrowStringView key, + struct ArrowStringView value); /// \brief Set a key/value pair to a buffer containing serialized metadata /// /// Ensures that the only entry for key in the metadata is set to value. /// This function maintains the existing position of (the first instance of) /// key if present in the data. -ArrowErrorCode ArrowMetadataBuilderSet(struct ArrowBuffer* buffer, - struct ArrowStringView key, - struct ArrowStringView value); +NANOARROW_DLL ArrowErrorCode ArrowMetadataBuilderSet(struct ArrowBuffer* buffer, + struct ArrowStringView key, + struct ArrowStringView value); /// \brief Remove a key from a buffer containing serialized metadata -ArrowErrorCode ArrowMetadataBuilderRemove(struct ArrowBuffer* buffer, - struct ArrowStringView key); +NANOARROW_DLL ArrowErrorCode ArrowMetadataBuilderRemove(struct ArrowBuffer* buffer, + struct ArrowStringView key); /// @} @@ -1634,9 +1727,9 @@ struct ArrowSchemaView { }; /// \brief Initialize an ArrowSchemaView -ArrowErrorCode ArrowSchemaViewInit(struct ArrowSchemaView* schema_view, - const struct ArrowSchema* schema, - struct ArrowError* error); +NANOARROW_DLL ArrowErrorCode ArrowSchemaViewInit(struct ArrowSchemaView* schema_view, + const struct ArrowSchema* schema, + struct ArrowError* error); /// @} @@ -1852,24 +1945,24 @@ static inline void ArrowBitmapReset(struct ArrowBitmap* bitmap); /// Initializes the fields and release callback of array. Caller /// is responsible for calling the array->release callback if /// NANOARROW_OK is returned. -ArrowErrorCode ArrowArrayInitFromType(struct ArrowArray* array, - enum ArrowType storage_type); +NANOARROW_DLL ArrowErrorCode ArrowArrayInitFromType(struct ArrowArray* array, + enum ArrowType storage_type); /// \brief Initialize the contents of an ArrowArray from an ArrowSchema /// /// Caller is responsible for calling the array->release callback if /// NANOARROW_OK is returned. -ArrowErrorCode ArrowArrayInitFromSchema(struct ArrowArray* array, - const struct ArrowSchema* schema, - struct ArrowError* error); +NANOARROW_DLL ArrowErrorCode ArrowArrayInitFromSchema(struct ArrowArray* array, + const struct ArrowSchema* schema, + struct ArrowError* error); /// \brief Initialize the contents of an ArrowArray from an ArrowArrayView /// /// Caller is responsible for calling the array->release callback if /// NANOARROW_OK is returned. -ArrowErrorCode ArrowArrayInitFromArrayView(struct ArrowArray* array, - const struct ArrowArrayView* array_view, - struct ArrowError* error); +NANOARROW_DLL ArrowErrorCode ArrowArrayInitFromArrayView( + struct ArrowArray* array, const struct ArrowArrayView* array_view, + struct ArrowError* error); /// \brief Allocate the array->children array /// @@ -1877,7 +1970,8 @@ ArrowErrorCode ArrowArrayInitFromArrayView(struct ArrowArray* array, /// whose members are marked as released and may be subsequently initialized /// with ArrowArrayInitFromType() or moved from an existing ArrowArray. /// schema must have been allocated using ArrowArrayInitFromType(). -ArrowErrorCode ArrowArrayAllocateChildren(struct ArrowArray* array, int64_t n_children); +NANOARROW_DLL ArrowErrorCode ArrowArrayAllocateChildren(struct ArrowArray* array, + int64_t n_children); /// \brief Allocate the array->dictionary member /// @@ -1885,18 +1979,19 @@ ArrowErrorCode ArrowArrayAllocateChildren(struct ArrowArray* array, int64_t n_ch /// is marked as released and may be subsequently initialized /// with ArrowArrayInitFromType() or moved from an existing ArrowArray. /// array must have been allocated using ArrowArrayInitFromType() -ArrowErrorCode ArrowArrayAllocateDictionary(struct ArrowArray* array); +NANOARROW_DLL ArrowErrorCode ArrowArrayAllocateDictionary(struct ArrowArray* array); /// \brief Set the validity bitmap of an ArrowArray /// /// array must have been allocated using ArrowArrayInitFromType() -void ArrowArraySetValidityBitmap(struct ArrowArray* array, struct ArrowBitmap* bitmap); +NANOARROW_DLL void ArrowArraySetValidityBitmap(struct ArrowArray* array, + struct ArrowBitmap* bitmap); /// \brief Set a buffer of an ArrowArray /// /// array must have been allocated using ArrowArrayInitFromType() -ArrowErrorCode ArrowArraySetBuffer(struct ArrowArray* array, int64_t i, - struct ArrowBuffer* buffer); +NANOARROW_DLL ArrowErrorCode ArrowArraySetBuffer(struct ArrowArray* array, int64_t i, + struct ArrowBuffer* buffer); /// \brief Get the validity bitmap of an ArrowArray /// @@ -1922,8 +2017,8 @@ static inline ArrowErrorCode ArrowArrayStartAppending(struct ArrowArray* array); /// child array sizes for non-fixed-size arrays), recursively reserve space for /// additional elements. This is useful for reducing the number of reallocations /// that occur using the item-wise appenders. -ArrowErrorCode ArrowArrayReserve(struct ArrowArray* array, - int64_t additional_size_elements); +NANOARROW_DLL ArrowErrorCode ArrowArrayReserve(struct ArrowArray* array, + int64_t additional_size_elements); /// \brief Append a null value to an array static inline ArrowErrorCode ArrowArrayAppendNull(struct ArrowArray* array, int64_t n); @@ -2021,8 +2116,8 @@ static inline ArrowErrorCode ArrowArrayShrinkToFit(struct ArrowArray* array); /// into array->buffers and checks the actual size of the buffers /// against the expected size based on the final length. /// array must have been allocated using ArrowArrayInitFromType() -ArrowErrorCode ArrowArrayFinishBuildingDefault(struct ArrowArray* array, - struct ArrowError* error); +NANOARROW_DLL ArrowErrorCode ArrowArrayFinishBuildingDefault(struct ArrowArray* array, + struct ArrowError* error); /// \brief Finish building an ArrowArray with explicit validation /// @@ -2031,9 +2126,9 @@ ArrowErrorCode ArrowArrayFinishBuildingDefault(struct ArrowArray* array, /// buffer data access is not possible or more validation (i.e., /// NANOARROW_VALIDATION_LEVEL_FULL) if buffer content was obtained from an untrusted or /// corruptible source. -ArrowErrorCode ArrowArrayFinishBuilding(struct ArrowArray* array, - enum ArrowValidationLevel validation_level, - struct ArrowError* error); +NANOARROW_DLL ArrowErrorCode ArrowArrayFinishBuilding( + struct ArrowArray* array, enum ArrowValidationLevel validation_level, + struct ArrowError* error); /// @} @@ -2044,8 +2139,8 @@ ArrowErrorCode ArrowArrayFinishBuilding(struct ArrowArray* array, /// @{ /// \brief Initialize the contents of an ArrowArrayView -void ArrowArrayViewInitFromType(struct ArrowArrayView* array_view, - enum ArrowType storage_type); +NANOARROW_DLL void ArrowArrayViewInitFromType(struct ArrowArrayView* array_view, + enum ArrowType storage_type); /// \brief Move an ArrowArrayView /// @@ -2055,32 +2150,34 @@ static inline void ArrowArrayViewMove(struct ArrowArrayView* src, struct ArrowArrayView* dst); /// \brief Initialize the contents of an ArrowArrayView from an ArrowSchema -ArrowErrorCode ArrowArrayViewInitFromSchema(struct ArrowArrayView* array_view, - const struct ArrowSchema* schema, - struct ArrowError* error); +NANOARROW_DLL ArrowErrorCode +ArrowArrayViewInitFromSchema(struct ArrowArrayView* array_view, + const struct ArrowSchema* schema, struct ArrowError* error); /// \brief Allocate the array_view->children array /// /// Includes the memory for each child struct ArrowArrayView -ArrowErrorCode ArrowArrayViewAllocateChildren(struct ArrowArrayView* array_view, - int64_t n_children); +NANOARROW_DLL ArrowErrorCode +ArrowArrayViewAllocateChildren(struct ArrowArrayView* array_view, int64_t n_children); /// \brief Allocate array_view->dictionary -ArrowErrorCode ArrowArrayViewAllocateDictionary(struct ArrowArrayView* array_view); +NANOARROW_DLL ArrowErrorCode +ArrowArrayViewAllocateDictionary(struct ArrowArrayView* array_view); /// \brief Set data-independent buffer sizes from length -void ArrowArrayViewSetLength(struct ArrowArrayView* array_view, int64_t length); +NANOARROW_DLL void ArrowArrayViewSetLength(struct ArrowArrayView* array_view, + int64_t length); /// \brief Set buffer sizes and data pointers from an ArrowArray -ArrowErrorCode ArrowArrayViewSetArray(struct ArrowArrayView* array_view, - const struct ArrowArray* array, - struct ArrowError* error); +NANOARROW_DLL ArrowErrorCode ArrowArrayViewSetArray(struct ArrowArrayView* array_view, + const struct ArrowArray* array, + struct ArrowError* error); /// \brief Set buffer sizes and data pointers from an ArrowArray except for those /// that require dereferencing buffer content. -ArrowErrorCode ArrowArrayViewSetArrayMinimal(struct ArrowArrayView* array_view, - const struct ArrowArray* array, - struct ArrowError* error); +NANOARROW_DLL ArrowErrorCode +ArrowArrayViewSetArrayMinimal(struct ArrowArrayView* array_view, + const struct ArrowArray* array, struct ArrowError* error); /// \brief Get the number of buffers /// @@ -2132,9 +2229,9 @@ static inline int64_t ArrowArrayViewGetBufferElementSizeBits( /// and sizes otherwise, you may wish to perform checks at a different level. See /// documentation for ArrowValidationLevel for the details of checks performed /// at each level. -ArrowErrorCode ArrowArrayViewValidate(struct ArrowArrayView* array_view, - enum ArrowValidationLevel validation_level, - struct ArrowError* error); +NANOARROW_DLL ArrowErrorCode ArrowArrayViewValidate( + struct ArrowArrayView* array_view, enum ArrowValidationLevel validation_level, + struct ArrowError* error); /// \brief Compare two ArrowArrayView objects for equality /// @@ -2144,13 +2241,13 @@ ArrowErrorCode ArrowArrayViewValidate(struct ArrowArrayView* array_view, /// error if error is non-NULL. /// /// Returns NANOARROW_OK if the comparison completed successfully. -ArrowErrorCode ArrowArrayViewCompare(const struct ArrowArrayView* actual, - const struct ArrowArrayView* expected, - enum ArrowCompareLevel level, int* out, - struct ArrowError* reason); +NANOARROW_DLL ArrowErrorCode ArrowArrayViewCompare(const struct ArrowArrayView* actual, + const struct ArrowArrayView* expected, + enum ArrowCompareLevel level, int* out, + struct ArrowError* reason); /// \brief Reset the contents of an ArrowArrayView and frees resources -void ArrowArrayViewReset(struct ArrowArrayView* array_view); +NANOARROW_DLL void ArrowArrayViewReset(struct ArrowArrayView* array_view); /// \brief Check for a null element in an ArrowArrayView static inline int8_t ArrowArrayViewIsNull(const struct ArrowArrayView* array_view, @@ -2229,8 +2326,8 @@ static inline void ArrowArrayViewGetDecimalUnsafe(const struct ArrowArrayView* a /// This function moves the ownership of schema to the array_stream. If /// this function returns NANOARROW_OK, the caller is responsible for /// releasing the ArrowArrayStream. -ArrowErrorCode ArrowBasicArrayStreamInit(struct ArrowArrayStream* array_stream, - struct ArrowSchema* schema, int64_t n_arrays); +NANOARROW_DLL ArrowErrorCode ArrowBasicArrayStreamInit( + struct ArrowArrayStream* array_stream, struct ArrowSchema* schema, int64_t n_arrays); /// \brief Set the ith ArrowArray in this ArrowArrayStream. /// @@ -2239,16 +2336,16 @@ ArrowErrorCode ArrowBasicArrayStreamInit(struct ArrowArrayStream* array_stream, /// be greater than zero and less than the value of n_arrays passed in /// ArrowBasicArrayStreamInit(). Callers are not required to fill all /// n_arrays members (i.e., n_arrays is a maximum bound). -void ArrowBasicArrayStreamSetArray(struct ArrowArrayStream* array_stream, int64_t i, - struct ArrowArray* array); +NANOARROW_DLL void ArrowBasicArrayStreamSetArray(struct ArrowArrayStream* array_stream, + int64_t i, struct ArrowArray* array); /// \brief Validate the contents of this ArrowArrayStream /// /// array_stream must have been initialized with ArrowBasicArrayStreamInit(). /// This function uses ArrowArrayStreamInitFromSchema() and ArrowArrayStreamSetArray() /// to validate the contents of the arrays. -ArrowErrorCode ArrowBasicArrayStreamValidate(const struct ArrowArrayStream* array_stream, - struct ArrowError* error); +NANOARROW_DLL ArrowErrorCode ArrowBasicArrayStreamValidate( + const struct ArrowArrayStream* array_stream, struct ArrowError* error); /// @} @@ -2893,6 +2990,9 @@ static inline void ArrowBitmapAppendInt8Unsafe(struct ArrowBitmap* bitmap, return; } + NANOARROW_DCHECK(bitmap->buffer.data != NULL); + NANOARROW_DCHECK(values != NULL); + const int8_t* values_cursor = values; int64_t n_remaining = n_values; int64_t out_i_cursor = bitmap->size_bits; @@ -2940,6 +3040,9 @@ static inline void ArrowBitmapAppendInt32Unsafe(struct ArrowBitmap* bitmap, return; } + NANOARROW_DCHECK(bitmap->buffer.data != NULL); + NANOARROW_DCHECK(values != NULL); + const int32_t* values_cursor = values; int64_t n_remaining = n_values; int64_t out_i_cursor = bitmap->size_bits; @@ -3283,6 +3386,9 @@ static inline ArrowErrorCode _ArrowArrayAppendEmptyInternal(struct ArrowArray* a case NANOARROW_BUFFER_TYPE_VARIADIC_SIZE: case NANOARROW_BUFFER_TYPE_VALIDITY: continue; + case NANOARROW_BUFFER_TYPE_SIZE: + NANOARROW_RETURN_NOT_OK(ArrowBufferAppendFill(buffer, 0, size_bytes * n)); + continue; case NANOARROW_BUFFER_TYPE_DATA_OFFSET: // Append the current value at the end of the offset buffer for each element NANOARROW_RETURN_NOT_OK(ArrowBufferReserve(buffer, size_bytes * n)); @@ -3303,7 +3409,10 @@ static inline ArrowErrorCode _ArrowArrayAppendEmptyInternal(struct ArrowArray* a NANOARROW_RETURN_NOT_OK(_ArrowArrayAppendBits(array, i, 0, n)); } continue; - + case NANOARROW_BUFFER_TYPE_VIEW_OFFSET: + NANOARROW_RETURN_NOT_OK(ArrowBufferReserve(buffer, size_bytes * n)); + NANOARROW_RETURN_NOT_OK(ArrowBufferAppendFill(buffer, 0, size_bytes * n)); + continue; case NANOARROW_BUFFER_TYPE_TYPE_ID: case NANOARROW_BUFFER_TYPE_UNION_OFFSET: // These cases return above @@ -3693,6 +3802,22 @@ static inline ArrowErrorCode ArrowArrayAppendDecimal(struct ArrowArray* array, struct ArrowBuffer* data_buffer = ArrowArrayBuffer(array, 1); switch (private_data->storage_type) { + case NANOARROW_TYPE_DECIMAL32: + if (value->n_words != 0) { + return EINVAL; + } else { + NANOARROW_RETURN_NOT_OK( + ArrowBufferAppend(data_buffer, value->words, sizeof(uint32_t))); + break; + } + case NANOARROW_TYPE_DECIMAL64: + if (value->n_words != 1) { + return EINVAL; + } else { + NANOARROW_RETURN_NOT_OK( + ArrowBufferAppend(data_buffer, value->words, sizeof(uint64_t))); + break; + } case NANOARROW_TYPE_DECIMAL128: if (value->n_words != 2) { return EINVAL; @@ -3734,6 +3859,7 @@ static inline ArrowErrorCode ArrowArrayFinishElement(struct ArrowArray* array) { if (child_length > INT32_MAX) { return EOVERFLOW; } + NANOARROW_RETURN_NOT_OK( ArrowBufferAppendInt32(ArrowArrayBuffer(array, 1), (int32_t)child_length)); break; @@ -3749,6 +3875,31 @@ static inline ArrowErrorCode ArrowArrayFinishElement(struct ArrowArray* array) { return EINVAL; } break; + case NANOARROW_TYPE_LIST_VIEW: { + child_length = array->children[0]->length; + if (child_length > INT32_MAX) { + return EOVERFLOW; + } + + const int32_t last_valid_offset = (int32_t)private_data->list_view_offset; + NANOARROW_RETURN_NOT_OK( + ArrowBufferAppendInt32(ArrowArrayBuffer(array, 1), last_valid_offset)); + NANOARROW_RETURN_NOT_OK(ArrowBufferAppendInt32( + ArrowArrayBuffer(array, 2), (int32_t)child_length - last_valid_offset)); + private_data->list_view_offset = child_length; + break; + } + case NANOARROW_TYPE_LARGE_LIST_VIEW: { + child_length = array->children[0]->length; + const int64_t last_valid_offset = private_data->list_view_offset; + NANOARROW_RETURN_NOT_OK( + ArrowBufferAppendInt64(ArrowArrayBuffer(array, 1), last_valid_offset)); + NANOARROW_RETURN_NOT_OK(ArrowBufferAppendInt64(ArrowArrayBuffer(array, 2), + child_length - last_valid_offset)); + private_data->list_view_offset = child_length; + break; + } + case NANOARROW_TYPE_STRUCT: for (int64_t i = 0; i < array->n_children; i++) { child_length = array->children[i]->length; @@ -4023,8 +4174,10 @@ static inline int64_t ArrowArrayViewListChildOffset( const struct ArrowArrayView* array_view, int64_t i) { switch (array_view->storage_type) { case NANOARROW_TYPE_LIST: + case NANOARROW_TYPE_LIST_VIEW: return array_view->buffer_views[1].data.as_int32[i]; case NANOARROW_TYPE_LARGE_LIST: + case NANOARROW_TYPE_LARGE_LIST_VIEW: return array_view->buffer_views[1].data.as_int64[i]; default: return -1; @@ -4161,7 +4314,7 @@ static inline struct ArrowStringView ArrowArrayViewGetStringUnsafe( case NANOARROW_TYPE_BINARY: view.data = data_view + offsets_view->data.as_int32[i]; view.size_bytes = - offsets_view->data.as_int32[i + 1] - offsets_view->data.as_int32[i]; + (int64_t)offsets_view->data.as_int32[i + 1] - offsets_view->data.as_int32[i]; break; case NANOARROW_TYPE_LARGE_STRING: case NANOARROW_TYPE_LARGE_BINARY: @@ -4201,7 +4354,7 @@ static inline struct ArrowBufferView ArrowArrayViewGetBytesUnsafe( case NANOARROW_TYPE_STRING: case NANOARROW_TYPE_BINARY: view.size_bytes = - offsets_view->data.as_int32[i + 1] - offsets_view->data.as_int32[i]; + (int64_t)offsets_view->data.as_int32[i + 1] - offsets_view->data.as_int32[i]; view.data.as_uint8 = data_view + offsets_view->data.as_int32[i]; break; case NANOARROW_TYPE_LARGE_STRING: @@ -4231,23 +4384,25 @@ static inline struct ArrowBufferView ArrowArrayViewGetBytesUnsafe( static inline void ArrowArrayViewGetIntervalUnsafe( const struct ArrowArrayView* array_view, int64_t i, struct ArrowInterval* out) { const uint8_t* data_view = array_view->buffer_views[1].data.as_uint8; + const int64_t offset = array_view->offset; + const int64_t index = offset + i; switch (array_view->storage_type) { case NANOARROW_TYPE_INTERVAL_MONTHS: { const size_t size = sizeof(int32_t); - memcpy(&out->months, data_view + i * size, sizeof(int32_t)); + memcpy(&out->months, data_view + index * size, sizeof(int32_t)); break; } case NANOARROW_TYPE_INTERVAL_DAY_TIME: { const size_t size = sizeof(int32_t) + sizeof(int32_t); - memcpy(&out->days, data_view + i * size, sizeof(int32_t)); - memcpy(&out->ms, data_view + i * size + 4, sizeof(int32_t)); + memcpy(&out->days, data_view + index * size, sizeof(int32_t)); + memcpy(&out->ms, data_view + index * size + 4, sizeof(int32_t)); break; } case NANOARROW_TYPE_INTERVAL_MONTH_DAY_NANO: { const size_t size = sizeof(int32_t) + sizeof(int32_t) + sizeof(int64_t); - memcpy(&out->months, data_view + i * size, sizeof(int32_t)); - memcpy(&out->days, data_view + i * size + 4, sizeof(int32_t)); - memcpy(&out->ns, data_view + i * size + 8, sizeof(int64_t)); + memcpy(&out->months, data_view + index * size, sizeof(int32_t)); + memcpy(&out->days, data_view + index * size + 4, sizeof(int32_t)); + memcpy(&out->ns, data_view + index * size + 8, sizeof(int64_t)); break; } default: @@ -4260,6 +4415,12 @@ static inline void ArrowArrayViewGetDecimalUnsafe(const struct ArrowArrayView* a i += array_view->offset; const uint8_t* data_view = array_view->buffer_views[1].data.as_uint8; switch (array_view->storage_type) { + case NANOARROW_TYPE_DECIMAL32: + ArrowDecimalSetBytes(out, data_view + (i * 4)); + break; + case NANOARROW_TYPE_DECIMAL64: + ArrowDecimalSetBytes(out, data_view + (i * 8)); + break; case NANOARROW_TYPE_DECIMAL128: ArrowDecimalSetBytes(out, data_view + (i * 16)); break; From ff47fe91a5a347116c267359caeadbfef2ea9fdc Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:50:59 -0600 Subject: [PATCH 11/17] Further refactoring to simplify code and set stage for further enhancements. --- src/oracledb/arrow_impl.pxd | 7 +- src/oracledb/impl/arrow/array.pyx | 184 ++++++++++++++------------ src/oracledb/impl/base/converters.pyx | 2 +- src/oracledb/impl/base/var.pyx | 3 +- 4 files changed, 108 insertions(+), 88 deletions(-) diff --git a/src/oracledb/arrow_impl.pxd b/src/oracledb/arrow_impl.pxd index bbb84cc..27b7bc3 100644 --- a/src/oracledb/arrow_impl.pxd +++ b/src/oracledb/arrow_impl.pxd @@ -84,11 +84,12 @@ cdef class ArrowArrayImpl: str name ArrowType arrow_type ArrowTimeUnit time_unit - double factor + int time_factor ArrowArray *arrow_array ArrowSchema *arrow_schema ArrowType child_arrow_type + cdef int _set_time_unit(self, ArrowTimeUnit time_unit) except -1 cdef int append_bytes(self, void* ptr, int64_t num_bytes) except -1 cdef int append_decimal(self, void* ptr, int64_t num_bytes) except -1 cdef int append_double(self, double value) except -1 @@ -101,6 +102,10 @@ cdef class ArrowArrayImpl: array.array values) except -1 cdef int append_vector(self, array.array value) except -1 cdef int finish_building(self) except -1 + cdef int populate_from_metadata(self, ArrowType arrow_type, str name, + int8_t precision, int8_t scale, + ArrowTimeUnit time_unit, + ArrowType child_arrow_type) except -1 cdef class DataFrameImpl: diff --git a/src/oracledb/impl/arrow/array.pyx b/src/oracledb/impl/arrow/array.pyx index 311d6ec..8dbee66 100644 --- a/src/oracledb/impl/arrow/array.pyx +++ b/src/oracledb/impl/arrow/array.pyx @@ -30,93 +30,11 @@ cdef class ArrowArrayImpl: - def __cinit__(self, ArrowType arrow_type, str name, int8_t precision, - int8_t scale, ArrowTimeUnit time_unit, - ArrowType child_arrow_type): - cdef ArrowType storage_type = arrow_type - self.arrow_type = arrow_type - self.child_arrow_type = child_arrow_type - self.time_unit = time_unit - self.name = name + def __cinit__(self): self.arrow_array = \ - cpython.PyMem_Malloc(sizeof(ArrowArray)) - if arrow_type == NANOARROW_TYPE_TIMESTAMP: - storage_type = NANOARROW_TYPE_INT64 - if time_unit == NANOARROW_TIME_UNIT_MILLI: - self.factor = 1e3 - elif time_unit == NANOARROW_TIME_UNIT_MICRO: - self.factor = 1e6 - elif time_unit == NANOARROW_TIME_UNIT_NANO: - self.factor = 1e9 - else: - self.factor = 1 - + cpython.PyMem_Calloc(1, sizeof(ArrowArray)) self.arrow_schema = \ - cpython.PyMem_Malloc(sizeof(ArrowSchema)) - if arrow_type == NANOARROW_TYPE_DECIMAL128: - self.precision = precision - self.scale = scale - ArrowSchemaInit(self.arrow_schema) - _check_nanoarrow( - ArrowSchemaSetTypeDecimal( - self.arrow_schema, - arrow_type, - precision, - scale - ) - ) - elif arrow_type == NANOARROW_TYPE_STRUCT: - # Currently struct is used for Sparse vector only - build_arrow_schema_for_sparse_vector(self.arrow_schema, - child_arrow_type) - else: - _check_nanoarrow( - ArrowSchemaInitFromType( - self.arrow_schema, - storage_type - ) - ) - if arrow_type == NANOARROW_TYPE_TIMESTAMP: - _check_nanoarrow( - ArrowSchemaSetTypeDateTime( - self.arrow_schema, - arrow_type, - time_unit, - NULL - ) - ) - if arrow_type == NANOARROW_TYPE_LIST: - # Set the schema for child using child_arrow_type - _check_nanoarrow( - ArrowSchemaSetType( - self.arrow_schema.children[0], - child_arrow_type - ) - ) - _check_nanoarrow( - ArrowArrayInitFromSchema( - self.arrow_array, - self.arrow_schema, - NULL - ) - ) - elif arrow_type == NANOARROW_TYPE_STRUCT: - _check_nanoarrow( - ArrowArrayInitFromSchema( - self.arrow_array, - self.arrow_schema, - NULL - ) - ) - else: # primitive type array init - _check_nanoarrow( - ArrowArrayInitFromType( - self.arrow_array, - storage_type - ) - ) - _check_nanoarrow(ArrowArrayStartAppending(self.arrow_array)) - _check_nanoarrow(ArrowSchemaSetName(self.arrow_schema, name.encode())) + cpython.PyMem_Calloc(1, sizeof(ArrowSchema)) def __dealloc__(self): if self.arrow_array != NULL: @@ -128,6 +46,20 @@ cdef class ArrowArrayImpl: ArrowSchemaRelease(self.arrow_schema) cpython.PyMem_Free(self.arrow_schema) + cdef int _set_time_unit(self, ArrowTimeUnit time_unit) except -1: + """ + Sets the time unit and the corresponding factor. + """ + self.time_unit = time_unit + if time_unit == NANOARROW_TIME_UNIT_MILLI: + self.time_factor = 1_000 + elif time_unit == NANOARROW_TIME_UNIT_MICRO: + self.time_factor = 1_000_000 + elif time_unit == NANOARROW_TIME_UNIT_NANO: + self.time_factor = 1_000_000_000 + else: + self.time_factor = 1 + cdef int append_bytes(self, void* ptr, int64_t num_bytes) except -1: """ Append a value of type bytes to the array. @@ -318,6 +250,88 @@ cdef class ArrowArrayImpl: _check_nanoarrow(ArrowArrayFinishBuildingDefault(self.arrow_array, NULL)) + cdef int populate_from_metadata(self, ArrowType arrow_type, str name, + int8_t precision, int8_t scale, + ArrowTimeUnit time_unit, + ArrowType child_arrow_type) except -1: + """ + Populate the array from the supplied metadata. + """ + cdef ArrowType storage_type = arrow_type + self.arrow_type = arrow_type + self._set_time_unit(time_unit) + self.name = name + self.child_arrow_type = child_arrow_type + if arrow_type == NANOARROW_TYPE_TIMESTAMP: + storage_type = NANOARROW_TYPE_INT64 + + _check_nanoarrow(ArrowArrayInitFromType(self.arrow_array, + storage_type)) + if arrow_type == NANOARROW_TYPE_DECIMAL128: + self.precision = precision + self.scale = scale + ArrowSchemaInit(self.arrow_schema) + _check_nanoarrow( + ArrowSchemaSetTypeDecimal( + self.arrow_schema, + arrow_type, + precision, + scale + ) + ) + elif arrow_type == NANOARROW_TYPE_STRUCT: + # Currently struct is used for Sparse vector only + build_arrow_schema_for_sparse_vector(self.arrow_schema, + child_arrow_type) + else: + _check_nanoarrow( + ArrowSchemaInitFromType( + self.arrow_schema, + storage_type + ) + ) + if arrow_type == NANOARROW_TYPE_TIMESTAMP: + _check_nanoarrow( + ArrowSchemaSetTypeDateTime( + self.arrow_schema, + arrow_type, + time_unit, + NULL + ) + ) + if arrow_type == NANOARROW_TYPE_LIST: + # Set the schema for child using child_arrow_type + _check_nanoarrow( + ArrowSchemaSetType( + self.arrow_schema.children[0], + child_arrow_type + ) + ) + _check_nanoarrow( + ArrowArrayInitFromSchema( + self.arrow_array, + self.arrow_schema, + NULL + ) + ) + elif arrow_type == NANOARROW_TYPE_STRUCT: + _check_nanoarrow( + ArrowArrayInitFromSchema( + self.arrow_array, + self.arrow_schema, + NULL + ) + ) + else: # primitive type array init + _check_nanoarrow( + ArrowArrayInitFromType( + self.arrow_array, + storage_type + ) + ) + _check_nanoarrow(ArrowArrayStartAppending(self.arrow_array)) + _check_nanoarrow(ArrowSchemaSetName(self.arrow_schema, name.encode())) + def get_array_capsule(self): """ Internal method for getting a PyCapsule pointer to the array. diff --git a/src/oracledb/impl/base/converters.pyx b/src/oracledb/impl/base/converters.pyx index e8382af..dbda323 100644 --- a/src/oracledb/impl/base/converters.pyx +++ b/src/oracledb/impl/base/converters.pyx @@ -59,7 +59,7 @@ cdef int convert_date_to_arrow_timestamp(ArrowArrayImpl arrow_array, int64_t ts dt = convert_date_to_python(buffer) td = dt - EPOCH_DATE - ts = int(cydatetime.total_seconds(td) * arrow_array.factor) + ts = int(cydatetime.total_seconds(td) * arrow_array.time_factor) arrow_array.append_int64(ts) diff --git a/src/oracledb/impl/base/var.pyx b/src/oracledb/impl/base/var.pyx index 1d39820..e3ff171 100644 --- a/src/oracledb/impl/base/var.pyx +++ b/src/oracledb/impl/base/var.pyx @@ -280,7 +280,8 @@ cdef class BaseVarImpl: else: errors._raise_err(errors.ERR_ARROW_UNSUPPORTED_VECTOR_FORMAT) - self._arrow_array = ArrowArrayImpl( + self._arrow_array = ArrowArrayImpl.__new__(ArrowArrayImpl) + self._arrow_array.populate_from_metadata( arrow_type=self.metadata._arrow_type, name=self.metadata.name, precision=self.metadata.precision, From edae70440ba24d0db929374c2db1d59964cae741 Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:52:53 -0600 Subject: [PATCH 12/17] Added support for the ArrowArrayStream PyCapsule interface. --- doc/src/release_notes.rst | 2 + samples/dataframe_pandas.py | 12 +-- samples/dataframe_pandas_async.py | 12 +-- samples/dataframe_parquet_write.py | 4 +- samples/dataframe_polars.py | 5 +- samples/dataframe_pyarrow.py | 4 +- src/oracledb/__init__.py | 1 + src/oracledb/arrow_array.py | 8 ++ src/oracledb/arrow_impl.pxd | 10 +++ src/oracledb/dataframe.py | 32 ++++++-- src/oracledb/errors.py | 5 ++ src/oracledb/impl/arrow/array.pyx | 67 +++++++++++++++ src/oracledb/impl/arrow/dataframe.pyx | 112 ++++++++++++++++++++++++++ src/oracledb/impl/arrow/utils.pyx | 21 ++++- src/oracledb/utils.py | 19 ++++- tests/test_8000_dataframe.py | 83 ++++--------------- tests/test_8100_dataframe_async.py | 45 ++--------- 17 files changed, 301 insertions(+), 141 deletions(-) diff --git a/doc/src/release_notes.rst b/doc/src/release_notes.rst index 75de4f0..9316427 100644 --- a/doc/src/release_notes.rst +++ b/doc/src/release_notes.rst @@ -35,6 +35,8 @@ Common Changes #) Changes to :ref:`data frame ` support: + - Added internal support for the ArrowArrayStream PyCapsule interface to + simplify :ref:`OracleDataFrame ` use. - Remove use of the DataFrame Interchange Protocol in :ref:`OracleDataFrames `. - Documentation on methods and attributes on the ``DataFrame`` and diff --git a/samples/dataframe_pandas.py b/samples/dataframe_pandas.py index 229fbf2..ccf1fe9 100644 --- a/samples/dataframe_pandas.py +++ b/samples/dataframe_pandas.py @@ -60,9 +60,7 @@ odf = connection.fetch_df_all(statement=sql, arraysize=100) # Get a Pandas DataFrame from the data -df = pyarrow.Table.from_arrays( - odf.column_arrays(), names=odf.column_names() -).to_pandas() +df = pyarrow.table(odf).to_pandas() # Perform various Pandas operations on the DataFrame @@ -93,9 +91,7 @@ # behavior on the sample table. sql = "select id, name from SampleQueryTab order by id" for odf in connection.fetch_df_batches(statement=sql, size=10): - df_b = pyarrow.Table.from_arrays( - odf.column_arrays(), names=odf.column_names() - ).to_pandas() + df_b = pyarrow.table(odf).to_pandas() print(f"Appending {df_b.shape[0]} rows") df = pandas.concat([df, df_b], ignore_index=True) @@ -137,9 +133,7 @@ odf = connection.fetch_df_all(statement=sql, arraysize=100) # Get a Pandas DataFrame from the data -df = pyarrow.Table.from_arrays( - odf.column_arrays(), names=odf.column_names() -).to_pandas() +df = pyarrow.table(odf).to_pandas() # Perform various Pandas operations on the DataFrame diff --git a/samples/dataframe_pandas_async.py b/samples/dataframe_pandas_async.py index b7e49b8..25271fd 100644 --- a/samples/dataframe_pandas_async.py +++ b/samples/dataframe_pandas_async.py @@ -64,9 +64,7 @@ async def main(): odf = await connection.fetch_df_all(statement=SQL, arraysize=100) # Get a Pandas DataFrame from the data - df = pyarrow.Table.from_arrays( - odf.column_arrays(), names=odf.column_names() - ).to_pandas() + df = pyarrow.table(odf).to_pandas() # Perform various Pandas operations on the DataFrame @@ -96,9 +94,7 @@ async def main(): # Tune 'size' for your data set. Here it is small to show the batch fetch # behavior on the sample table. async for odf in connection.fetch_df_batches(statement=SQL, size=10): - df_b = pyarrow.Table.from_arrays( - odf.column_arrays(), names=odf.column_names() - ).to_pandas() + df_b = pyarrow.table(odf).to_pandas() print(f"Appending {df_b.shape[0]} rows") df = pandas.concat([df, df_b], ignore_index=True) @@ -141,9 +137,7 @@ async def main(): odf = await connection.fetch_df_all(statement=sql, arraysize=100) # Get a Pandas DataFrame from the data - df = pyarrow.Table.from_arrays( - odf.column_arrays(), names=odf.column_names() - ).to_pandas() + df = pyarrow.table(odf).to_pandas() # Perform various Pandas operations on the DataFrame diff --git a/samples/dataframe_parquet_write.py b/samples/dataframe_parquet_write.py index 02a7d93..7a02385 100644 --- a/samples/dataframe_parquet_write.py +++ b/samples/dataframe_parquet_write.py @@ -61,9 +61,7 @@ for odf in connection.fetch_df_batches(statement=SQL, size=FETCH_BATCH_SIZE): - pyarrow_table = pyarrow.Table.from_arrays( - arrays=odf.column_arrays(), names=odf.column_names() - ) + pyarrow_table = pyarrow.table(odf) if not pqwriter: pqwriter = pq.ParquetWriter(PARQUET_FILE_NAME, pyarrow_table.schema) diff --git a/samples/dataframe_polars.py b/samples/dataframe_polars.py index 7b91ced..9416af0 100644 --- a/samples/dataframe_polars.py +++ b/samples/dataframe_polars.py @@ -57,10 +57,7 @@ odf = connection.fetch_df_all(statement=SQL1, arraysize=100) # Convert to a Polars DataFrame -pyarrow_table = pyarrow.Table.from_arrays( - odf.column_arrays(), names=odf.column_names() -) -p = polars.from_arrow(pyarrow_table) +p = polars.from_arrow(odf) print(type(p)) # diff --git a/samples/dataframe_pyarrow.py b/samples/dataframe_pyarrow.py index d666f62..8ce20a4 100644 --- a/samples/dataframe_pyarrow.py +++ b/samples/dataframe_pyarrow.py @@ -56,9 +56,7 @@ odf = connection.fetch_df_all(statement=SQL1, arraysize=100) # Create a PyArrow table -pyarrow_table = pyarrow.Table.from_arrays( - arrays=odf.column_arrays(), names=odf.column_names() -) +pyarrow_table = pyarrow.table(odf) print("Type:") print(type(pyarrow_table)) # diff --git a/src/oracledb/__init__.py b/src/oracledb/__init__.py index ab3608f..42e7e85 100644 --- a/src/oracledb/__init__.py +++ b/src/oracledb/__init__.py @@ -287,6 +287,7 @@ from .utils import ( enable_thin_mode as enable_thin_mode, + from_arrow as from_arrow, register_params_hook as register_params_hook, register_password_type as register_password_type, register_protocol as register_protocol, diff --git a/src/oracledb/arrow_array.py b/src/oracledb/arrow_array.py index d1afeec..14356ce 100644 --- a/src/oracledb/arrow_array.py +++ b/src/oracledb/arrow_array.py @@ -29,6 +29,8 @@ # array data to other data frame libraries. # ----------------------------------------------------------------------------- +from .arrow_impl import ArrowArrayImpl + from . import errors @@ -51,6 +53,12 @@ def __repr__(self): def __str__(self): return self.__repr__() + @classmethod + def _from_arrow(cls, obj): + array = cls.__new__(cls) + array._impl = ArrowArrayImpl.from_arrow_array(obj) + return array + @classmethod def _from_impl(cls, impl): array = cls.__new__(cls) diff --git a/src/oracledb/arrow_impl.pxd b/src/oracledb/arrow_impl.pxd index 27b7bc3..c905c15 100644 --- a/src/oracledb/arrow_impl.pxd +++ b/src/oracledb/arrow_impl.pxd @@ -46,10 +46,18 @@ cdef extern from "nanoarrow.h": ArrowArray** children const void** buffers void (*release)(ArrowArray*) + void *private_data cdef struct ArrowSchema: + const char *format; + const char *name; + const char *metadata; + int64_t flags + int64_t n_children ArrowSchema** children + ArrowSchema* dictionary void (*release)(ArrowSchema*) + void *private_data cpdef enum ArrowType: NANOARROW_TYPE_BOOL @@ -102,6 +110,8 @@ cdef class ArrowArrayImpl: array.array values) except -1 cdef int append_vector(self, array.array value) except -1 cdef int finish_building(self) except -1 + cdef int populate_from_array(self, ArrowSchema* schema, + ArrowArray* array) except -1 cdef int populate_from_metadata(self, ArrowType arrow_type, str name, int8_t precision, int8_t scale, ArrowTimeUnit time_unit, diff --git a/src/oracledb/dataframe.py b/src/oracledb/dataframe.py index 90fea89..c263073 100644 --- a/src/oracledb/dataframe.py +++ b/src/oracledb/dataframe.py @@ -32,6 +32,7 @@ from typing import List from .arrow_array import ArrowArray +from .arrow_impl import DataFrameImpl from . import errors @@ -41,16 +42,37 @@ class DataFrame: def __init__(self): errors._raise_err(errors.ERR_INTERNAL_CREATION_REQUIRED) + @classmethod + def _from_arrow(cls, obj): + df = cls.__new__(cls) + df._initialize(DataFrameImpl.from_arrow_stream(obj)) + return df + @classmethod def _from_impl(cls, impl): df = cls.__new__(cls) - df._impl = impl - df._arrays = [ArrowArray._from_impl(a) for a in impl.get_arrays()] - df._arrays_by_name = {} - for array in df._arrays: - df._arrays_by_name[array.name] = array + df._initialize(impl) return df + def _initialize(self, impl): + """ + Initializes the object given the implementation. + """ + self._impl = impl + self._arrays = [ArrowArray._from_impl(a) for a in impl.get_arrays()] + self._arrays_by_name = {} + for array in self._arrays: + self._arrays_by_name[array.name] = array + + def __arrow_c_stream__(self, requested_schema=None): + """ + Returns the ArrowArrayStream PyCapsule which allows direct conversion + to foreign data frames that support this interface. + """ + if requested_schema is not None: + raise NotImplementedError("requested_schema") + return self._impl.get_stream_capsule() + def column_arrays(self) -> List: """ Returns a list of the Arrow arrays corresponding to each column in the diff --git a/src/oracledb/errors.py b/src/oracledb/errors.py index 3f1f15b..b4bd976 100644 --- a/src/oracledb/errors.py +++ b/src/oracledb/errors.py @@ -322,6 +322,7 @@ def _raise_not_supported(feature: str) -> None: ERR_INVALID_NETWORK_NAME = 3029 ERR_ARROW_UNSUPPORTED_DATA_TYPE = 3030 ERR_ARROW_UNSUPPORTED_VECTOR_FORMAT = 3031 +ERR_ARROW_UNSUPPORTED_DATA_FORMAT = 3032 # error numbers that result in DatabaseError ERR_TNS_ENTRY_NOT_FOUND = 4000 @@ -900,6 +901,10 @@ def _raise_not_supported(feature: str) -> None: "Apache Arrow format does not support sparse vectors with flexible " "dimensions" ), + ERR_ARROW_UNSUPPORTED_DATA_FORMAT: ( + 'conversion from Arrow format "{schema_format}" to Oracle Database ' + "is not supported" + ), ERR_ARROW_UNSUPPORTED_DATA_TYPE: ( "conversion from Oracle Database type {db_type_name} to Apache " "Arrow format is not supported" diff --git a/src/oracledb/impl/arrow/array.pyx b/src/oracledb/impl/arrow/array.pyx index 8dbee66..2d4527b 100644 --- a/src/oracledb/impl/arrow/array.pyx +++ b/src/oracledb/impl/arrow/array.pyx @@ -250,6 +250,73 @@ cdef class ArrowArrayImpl: _check_nanoarrow(ArrowArrayFinishBuildingDefault(self.arrow_array, NULL)) + @classmethod + def from_arrow_array(cls, obj): + """ + Create an ArrowArrayImpl instance by extracting the information an + object implementing the PyCapsule Arrow array interface. + """ + cdef: + ArrowArrayImpl array_impl + ArrowSchema *arrow_schema + ArrowArray *arrow_array + schema_capsule, array_capsule = obj.__arrow_c_array__() + arrow_schema = cpython.PyCapsule_GetPointer( + schema_capsule, "arrow_schema" + ) + arrow_array = cpython.PyCapsule_GetPointer( + array_capsule, "arrow_array" + ) + array_impl = ArrowArrayImpl.__new__(ArrowArrayImpl) + array_impl.populate_from_array(arrow_schema, arrow_array) + return array_impl + + cdef int populate_from_array(self, ArrowSchema* schema, + ArrowArray* array) except -1: + """ + Populate the array from another array. + """ + cdef str schema_format + ArrowSchemaMove(schema, self.arrow_schema) + ArrowArrayMove(array, self.arrow_array) + schema_format = schema.format.decode() + self.name = schema.name.decode() + if schema_format == "u": + self.arrow_type = NANOARROW_TYPE_STRING + elif schema_format == "U": + self.arrow_type = NANOARROW_TYPE_LARGE_STRING + elif schema_format == "z": + self.arrow_type = NANOARROW_TYPE_BINARY + elif schema_format == "Z": + self.arrow_type = NANOARROW_TYPE_LARGE_BINARY + elif schema_format == "g": + self.arrow_type = NANOARROW_TYPE_DOUBLE + elif schema_format == "f": + self.arrow_type = NANOARROW_TYPE_FLOAT + elif schema_format == "l": + self.arrow_type = NANOARROW_TYPE_INT64 + elif schema_format == "tss:": + self.arrow_type = NANOARROW_TYPE_TIMESTAMP + self._set_time_unit(NANOARROW_TIME_UNIT_SECOND) + elif schema_format == "tsm:": + self.arrow_type = NANOARROW_TYPE_TIMESTAMP + self._set_time_unit(NANOARROW_TIME_UNIT_MILLI) + elif schema_format == "tsu:": + self.arrow_type = NANOARROW_TYPE_TIMESTAMP + self._set_time_unit(NANOARROW_TIME_UNIT_MICRO) + elif schema_format == "tsn:": + self.arrow_type = NANOARROW_TYPE_TIMESTAMP + self._set_time_unit(NANOARROW_TIME_UNIT_NANO) + elif schema_format.startswith("d:"): + self.arrow_type = NANOARROW_TYPE_DECIMAL128 + self.precision, self.scale = \ + [int(s) for s in schema_format[2:].split(",")] + elif schema_format == "b": + self.arrow_type = NANOARROW_TYPE_BOOL + else: + errors._raise_err(errors.ERR_ARROW_UNSUPPORTED_DATA_FORMAT, + schema_format=schema_format) + cdef int populate_from_metadata(self, ArrowType arrow_type, str name, int8_t precision, int8_t scale, ArrowTimeUnit time_unit, diff --git a/src/oracledb/impl/arrow/dataframe.pyx b/src/oracledb/impl/arrow/dataframe.pyx index 8074617..7a4f3ce 100644 --- a/src/oracledb/impl/arrow/dataframe.pyx +++ b/src/oracledb/impl/arrow/dataframe.pyx @@ -30,9 +30,121 @@ cdef class DataFrameImpl: + @classmethod + def from_arrow_stream(cls, obj): + """ + Extract Arrow arrays from an object implementing the PyCapsule arrow + stream interface. + """ + cdef: + ArrowArrayStream *arrow_stream + ArrowSchema arrow_schema + ArrowArray arrow_array + DataFrameImpl df_impl + ArrowArrayImpl array + ssize_t i + df_impl = DataFrameImpl.__new__(DataFrameImpl) + df_impl.arrays = [] + capsule = obj.__arrow_c_stream__() + arrow_stream = cpython.PyCapsule_GetPointer( + capsule, "arrow_array_stream" + ) + _check_nanoarrow(arrow_stream.get_schema(arrow_stream, &arrow_schema)) + _check_nanoarrow(arrow_stream.get_next(arrow_stream, &arrow_array)) + for i in range(arrow_schema.n_children): + array = ArrowArrayImpl.__new__(ArrowArrayImpl) + array.populate_from_array(arrow_schema.children[i], + arrow_array.children[i]) + df_impl.arrays.append(array) + _check_nanoarrow(arrow_stream.get_next(arrow_stream, &arrow_array)) + if arrow_array.release != NULL: + raise NotImplementedError("multiple chunks not supported") + ArrowArrayStreamRelease(arrow_stream) + return df_impl + def get_arrays(self): """ Internal method for getting the list of arrays associated with the data frame. """ return self.arrays + + def get_stream_capsule(self): + """ + Internal method for getting a PyCapsule pointer to a stream that + encapsulates the arrays found in the data frame. + """ + cdef: + ArrowArrayImpl array_impl + ArrowArrayStream *stream + int64_t i, num_arrays + ArrowSchema schema + ArrowArray array + + # initialization + stream = NULL + array.release = NULL + schema.release = NULL + num_arrays = len(self.arrays) + + try: + + # create schema/array encompassing all of the arrays + _check_nanoarrow( + ArrowSchemaInitFromType(&schema, NANOARROW_TYPE_STRUCT) + ) + _check_nanoarrow(ArrowSchemaAllocateChildren(&schema, num_arrays)) + _check_nanoarrow( + ArrowArrayInitFromType(&array, NANOARROW_TYPE_STRUCT) + ) + _check_nanoarrow(ArrowArrayAllocateChildren(&array, num_arrays)) + for i, array_impl in enumerate(self.arrays): + array.length = array_impl.arrow_array.length + copy_arrow_array( + array_impl, array_impl.arrow_array, array.children[i] + ) + _check_nanoarrow( + ArrowSchemaDeepCopy( + array_impl.arrow_schema, schema.children[i] + ) + ) + + # create stream and populate it + stream = \ + cpython.PyMem_Calloc(1, sizeof(ArrowArrayStream)) + _check_nanoarrow( + ArrowBasicArrayStreamInit(stream, &schema, num_arrays) + ) + ArrowBasicArrayStreamSetArray(stream, 0, &array) + + except: + if schema.release: + ArrowSchemaRelease(&schema) + if array.release: + ArrowArrayRelease(&array) + if stream != NULL: + if stream.release: + ArrowArrayStreamRelease(stream) + cpython.PyMem_Free(stream) + raise + + # create and return capsule + return cpython.PyCapsule_New( + stream, + "arrow_array_stream", + &pycapsule_array_stream_deleter + ) + + +cdef void pycapsule_array_stream_deleter(object stream_capsule) noexcept: + """ + Called when the PyCapsule pointer is no longer required and performs the + necessary cleanup. + """ + cdef ArrowArrayStream* stream + stream = cpython.PyCapsule_GetPointer( + stream_capsule, 'arrow_array_stream' + ) + if stream.release != NULL: + ArrowArrayStreamRelease(stream) + cpython.PyMem_Free(stream) diff --git a/src/oracledb/impl/arrow/utils.pyx b/src/oracledb/impl/arrow/utils.pyx index bb3cbf7..8a2e32c 100644 --- a/src/oracledb/impl/arrow/utils.pyx +++ b/src/oracledb/impl/arrow/utils.pyx @@ -34,6 +34,11 @@ cdef extern from "nanoarrow.c": ctypedef void (*ArrowBufferDeallocatorCallback) + cdef struct ArrowArrayStream: + int (*get_schema)(ArrowArrayStream *, ArrowSchema * out) + int (*get_next)(ArrowArrayStream * stream, ArrowArray * out) + void (*release)(ArrowArrayStream*) + cdef struct ArrowBufferAllocator: void *private_data @@ -85,13 +90,20 @@ cdef extern from "nanoarrow.c": ArrowError *error) ArrowErrorCode ArrowArrayInitFromType(ArrowArray* array, ArrowType storage_type) + void ArrowArrayMove(ArrowArray* src, ArrowArray* dst) void ArrowArrayRelease(ArrowArray *array) ArrowErrorCode ArrowArrayReserve(ArrowArray* array, int64_t additional_size_elements) ArrowErrorCode ArrowArrayStartAppending(ArrowArray* array) + void ArrowArrayStreamRelease(ArrowArrayStream *array_stream) ArrowBitmap* ArrowArrayValidityBitmap(ArrowArray* array) ArrowErrorCode ArrowArrayViewInitFromArray(ArrowArrayView* array_view, ArrowArray* array) + ArrowErrorCode ArrowBasicArrayStreamInit(ArrowArrayStream* array_stream, + ArrowSchema* schema, + int64_t n_arrays) + void ArrowBasicArrayStreamSetArray(ArrowArrayStream* array_stream, + int64_t i, ArrowArray* array) int8_t ArrowBitGet(const uint8_t* bits, int64_t i) ArrowBufferAllocator ArrowBufferDeallocator(ArrowBufferDeallocatorCallback, void *private_data) @@ -100,10 +112,13 @@ cdef extern from "nanoarrow.c": void ArrowDecimalSetBytes(ArrowDecimal *decimal, const uint8_t* value) ArrowErrorCode ArrowDecimalSetDigits(ArrowDecimal* decimal, ArrowStringView value) + ArrowErrorCode ArrowSchemaAllocateChildren(ArrowSchema* schema, + int64_t n_children) ArrowErrorCode ArrowSchemaDeepCopy(const ArrowSchema *schema, ArrowSchema *schema_out) void ArrowSchemaInit(ArrowSchema* schema) ArrowErrorCode ArrowSchemaInitFromType(ArrowSchema* schema, ArrowType type) + void ArrowSchemaMove(ArrowSchema* src, ArrowSchema* dst) void ArrowSchemaRelease(ArrowSchema *schema) ArrowErrorCode ArrowSchemaSetName(ArrowSchema* schema, const char* name) ArrowErrorCode ArrowSchemaSetType(ArrowSchema * schema, ArrowType type) @@ -222,6 +237,7 @@ cdef int copy_arrow_array(ArrowArrayImpl array_impl, """ cdef: ArrowBuffer *dest_buffer + ArrowBuffer *src_buffer ssize_t i _check_nanoarrow( ArrowArrayInitFromType( @@ -242,8 +258,9 @@ cdef int copy_arrow_array(ArrowArrayImpl array_impl, for i in range(src.n_buffers): if src.buffers[i] != NULL: dest_buffer = ArrowArrayBuffer(dest, i) - dest_buffer.data = src.buffers[i] - dest_buffer.size_bytes = 0 + src_buffer = ArrowArrayBuffer(src, i) + dest_buffer.data = src_buffer.data + dest_buffer.size_bytes = src_buffer.size_bytes dest_buffer.allocator = ArrowBufferDeallocator( arrow_buffer_dealloc_callback, array_impl diff --git a/src/oracledb/utils.py b/src/oracledb/utils.py index 239cdc5..e58613b 100644 --- a/src/oracledb/utils.py +++ b/src/oracledb/utils.py @@ -28,7 +28,10 @@ # Contains utility classes and methods. # ----------------------------------------------------------------------------- -from typing import Callable, Union +from typing import Any, Callable, Union + +from .arrow_array import ArrowArray +from .dataframe import DataFrame from . import base_impl from . import driver_mode @@ -53,6 +56,20 @@ def enable_thin_mode(): pass +def from_arrow(obj: Any) -> Union[DataFrame, ArrowArray]: + """ + Uses the Arrow PyCapsule interface to return either a DataFrame or + ArrowArray object, depending on what interface is supported by the object + that is supplied to the function. + """ + if hasattr(obj, "__arrow_c_stream__"): + return DataFrame._from_arrow(obj) + elif hasattr(obj, "__arrow_c_array__"): + return ArrowArray._from_arrow(obj) + msg = "object must implement the PyCapsule stream or array interfaces" + raise ValueError(msg) + + def params_initer(f): """ Decorator function which is used on the ConnectParams and PoolParams diff --git a/tests/test_8000_dataframe.py b/tests/test_8000_dataframe.py index ab034b1..568aac3 100644 --- a/tests/test_8000_dataframe.py +++ b/tests/test_8000_dataframe.py @@ -243,7 +243,7 @@ def __check_interop(self): Checks to see if the pyarrow and pandas modules are available. """ if not HAS_INTEROP: - self.skipTest("missing pandas or pyarrow modules") + self.skipTest("missing numpy, pandas or pyarrow modules") def __convert_date(self, value): """ @@ -395,10 +395,7 @@ def __validate_df(self, ora_df, data): """ raw_df = self.__convert_to_df(data) raw_data = self.__get_data_from_df(raw_df) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, raw_data) @@ -531,10 +528,7 @@ def test_8019(self): ora_df = self.conn.fetch_df_all( "select to_clob('test_8023') from dual" ) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) @@ -545,10 +539,7 @@ def test_8020(self): ora_df = self.conn.fetch_df_all( "select to_blob(utl_raw.cast_to_raw('test_8024')) from dual" ) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) @@ -559,10 +550,7 @@ def test_8021(self): ora_df = self.conn.fetch_df_all( "select utl_raw.cast_to_raw('test_8025') from dual" ) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) @@ -584,10 +572,7 @@ def test_8022(self): select true """ ) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) @@ -626,10 +611,7 @@ def test_8023(self): (None,), (None,), ] - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) @@ -657,12 +639,7 @@ def test_8024(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - # number of children for a nested list = 1 - self.assertEqual(fetched_tab.schema.types[0].num_fields, 1) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_vectors_supported() @@ -682,11 +659,7 @@ def test_8025(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - self.assertEqual(fetched_tab.schema.types[0].num_fields, 1) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_vectors_supported() @@ -706,11 +679,7 @@ def test_8026(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - self.assertEqual(fetched_tab.schema.types[0].num_fields, 1) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_vectors_supported() @@ -730,11 +699,7 @@ def test_8027(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - self.assertEqual(fetched_tab.schema.types[0].num_fields, 1) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_vectors_supported() @@ -757,11 +722,7 @@ def test_8028(self): ) self.assertEqual(ora_df.num_rows(), 3) self.assertEqual(ora_df.num_columns(), 1) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - self.assertEqual(fetched_tab.schema.types[0].num_fields, 1) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_vectors_supported() @@ -811,11 +772,7 @@ def test_8029(self): ) self.assertEqual(ora_df.num_rows(), 12) self.assertEqual(ora_df.num_columns(), 1) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - self.assertEqual(fetched_tab.schema.types[0].num_fields, 1) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_sparse_vectors_supported() @@ -857,12 +814,7 @@ def test_8030(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - # number of children for a struct = 3 (num_dimensions, indices, values) - self.assertEqual(fetched_tab.schema.types[0].num_fields, 3) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_sparse_vectors_supported() @@ -904,12 +856,7 @@ def test_8031(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - # number of children for a struct = 3 (num_dimensions, indices, values) - self.assertEqual(fetched_tab.schema.types[0].num_fields, 3) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_vectors_supported() diff --git a/tests/test_8100_dataframe_async.py b/tests/test_8100_dataframe_async.py index 2592ac1..9679e83 100644 --- a/tests/test_8100_dataframe_async.py +++ b/tests/test_8100_dataframe_async.py @@ -401,10 +401,7 @@ def __validate_df(self, ora_df, data): """ raw_df = self.__convert_to_df(data) raw_data = self.__get_data_from_df(raw_df) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, raw_data) @@ -518,10 +515,7 @@ async def test_8117(self): self.__check_interop() with test_env.DefaultsContextManager("fetch_decimals", True): ora_df = await self.conn.fetch_df_all("select 1.0 from dual") - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) @@ -532,10 +526,7 @@ async def test_8118(self): ora_df = await self.conn.fetch_df_all( "select to_clob('test_8023') from dual" ) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) @@ -546,10 +537,7 @@ async def test_8119(self): ora_df = await self.conn.fetch_df_all( "select to_blob(utl_raw.cast_to_raw('test_8024')) from dual" ) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) @@ -571,10 +559,7 @@ async def test_8120(self): select true """ ) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) @@ -595,13 +580,7 @@ async def test_8121(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - - # number of children for a nested list = 1 - self.assertEqual(fetched_tab.schema.types[0].num_fields, 1) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) @test_env.skip_unless_sparse_vectors_supported() @@ -643,12 +622,7 @@ async def test_8122(self): ) self.assertEqual(ora_df.num_rows(), 2) self.assertEqual(ora_df.num_columns(), 1) - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - # number of children for a struct = 3 (num_dimensions, indices, values) - self.assertEqual(fetched_tab.schema.types[0].num_fields, 3) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() self.assertEqual(data, self.__get_data_from_df(fetched_df)) async def test_8123(self): @@ -686,10 +660,7 @@ async def test_8123(self): (None,), (None,), ] - fetched_tab = pyarrow.Table.from_arrays( - ora_df.column_arrays(), names=ora_df.column_names() - ) - fetched_df = fetched_tab.to_pandas() + fetched_df = pyarrow.table(ora_df).to_pandas() fetched_data = self.__get_data_from_df(fetched_df) self.assertEqual(fetched_data, data) From 2a2f2ac47d05ec9b6db490e22860fff16eefa691 Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:53:27 -0600 Subject: [PATCH 13/17] Fixed bug with execution of a PL/SQL block containing at least one output bind variable immediately following a query that returned multiple duplicate rows. --- doc/src/release_notes.rst | 3 +++ src/oracledb/impl/thin/messages/base.pyx | 2 +- tests/test_4300_cursor_other.py | 13 +++++++++++++ tests/test_6300_cursor_other_async.py | 15 +++++++++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/doc/src/release_notes.rst b/doc/src/release_notes.rst index 9316427..e69dbb5 100644 --- a/doc/src/release_notes.rst +++ b/doc/src/release_notes.rst @@ -26,6 +26,9 @@ Thin Mode Changes value of the attribute :attr:`DeqOptions.deliverymode`. #) Fixed bug with detection of when a connection has been closed by the database without notification. +#) Fixed bug with execution of a PL/SQL block containing at least one output + bind variable immediately following a query that returned multiple + duplicate rows. Thick Mode Changes ++++++++++++++++++ diff --git a/src/oracledb/impl/thin/messages/base.pyx b/src/oracledb/impl/thin/messages/base.pyx index 1b9a074..d56a429 100644 --- a/src/oracledb/impl/thin/messages/base.pyx +++ b/src/oracledb/impl/thin/messages/base.pyx @@ -806,7 +806,7 @@ cdef class MessageWithData(Message): # retain last raw value when not fetching Arrow (for handling # duplicate rows) - if not self.cursor_impl.fetching_arrow: + if self.in_fetch and not self.cursor_impl.fetching_arrow: var_impl._last_raw_value = \ var_impl._values[self.cursor_impl._last_row_index] diff --git a/tests/test_4300_cursor_other.py b/tests/test_4300_cursor_other.py index 71a9faa..0091fbe 100644 --- a/tests/test_4300_cursor_other.py +++ b/tests/test_4300_cursor_other.py @@ -997,6 +997,19 @@ def test_4369(self): cursor = conn.cursor() self.assertEqual(cursor.rowcount, -1) + def test_4370(self): + "4370 - execute PL/SQL with out vars after query with duplicate data" + self.cursor.execute("truncate table TestTempTable") + self.cursor.executemany( + "insert into TestTempTable (IntCol, StringCol1) values (:1, :2)", + [(i + 1, "test_4370") for i in range(20)], + ) + self.conn.commit() + self.cursor.execute("select IntCol, StringCol1 from TestTempTable") + var = self.cursor.var(int) + self.cursor.execute("begin :1 := 4370; end;", [var]) + self.assertEqual(var.getvalue(), 4370) + if __name__ == "__main__": test_env.run_test_cases() diff --git a/tests/test_6300_cursor_other_async.py b/tests/test_6300_cursor_other_async.py index d2667f2..fb88793 100644 --- a/tests/test_6300_cursor_other_async.py +++ b/tests/test_6300_cursor_other_async.py @@ -913,6 +913,21 @@ async def test_6353(self): cursor = conn.cursor() self.assertEqual(cursor.rowcount, -1) + async def test_6354(self): + "6354 - execute PL/SQL with out vars after query with duplicate data" + await self.cursor.execute("truncate table TestTempTable") + await self.cursor.executemany( + "insert into TestTempTable (IntCol, StringCol1) values (:1, :2)", + [(i + 1, "test_4370") for i in range(20)], + ) + await self.conn.commit() + await self.cursor.execute( + "select IntCol, StringCol1 from TestTempTable" + ) + var = self.cursor.var(int) + await self.cursor.execute("begin :1 := 4370; end;", [var]) + self.assertEqual(var.getvalue(), 4370) + if __name__ == "__main__": test_env.run_test_cases() From 69353c2748e4ace11f2bfb314f56bf337314880d Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:53:58 -0600 Subject: [PATCH 14/17] Update third party licenses. --- THIRD_PARTY_LICENSES.txt | 10996 ------------------------------------- 1 file changed, 10996 deletions(-) diff --git a/THIRD_PARTY_LICENSES.txt b/THIRD_PARTY_LICENSES.txt index 15d4426..0f8f1a9 100644 --- a/THIRD_PARTY_LICENSES.txt +++ b/THIRD_PARTY_LICENSES.txt @@ -710,33 +710,6 @@ under the License. ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -Python dataframe interchange protocol - -MIT License - -Copyright (c) 2020 Consortium for Python Data API Standards contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- - Microsoft Authentication Library (MSAL) for Python The MIT License (MIT) @@ -1484,10972 +1457,3 @@ Copyright 2019 Kenneth Reitz ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- - -Pandas license - -BSD 3-Clause License - -Copyright (c) 2008-2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team -All rights reserved. - -Copyright (c) 2011-2023, Open source contributors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* 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. - -* Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -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 COPYRIGHT HOLDER 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. - - ----- Dependency licenses - -numpy - -package_name: numpy -license_type: BSD License -license_text: -Copyright (c) 2005-2024, NumPy Developers. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * 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. - - * Neither the name of the NumPy Developers nor the names of any - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - ----- ------------------------------------------------------------------------------------ -LICENSES_bundled.txt ------------------------------------------------------------------------------------ - -The NumPy repository and source distributions bundle several libraries that are -compatibly licensed. We list these here. - -Name: lapack-lite -Files: numpy/linalg/lapack_lite/* -License: BSD-3-Clause - Copyright (c) 1992-2013 The University of Tennessee and The University - of Tennessee Research Foundation. All rights - reserved. -Copyright (c) 2000-2013 The University of California Berkeley. All - rights reserved. -Copyright (c) 2006-2013 The University of Colorado Denver. All rights - reserved. - -$COPYRIGHT$ - -Additional copyrights may follow - -$HEADER$ - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -- Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer listed - in this license in the documentation and/or other materials - provided with the distribution. - -- Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -The copyright holders provide no reassurances that the source code -provided does not infringe any patent, copyright, or any other -intellectual property rights of third parties. The copyright holders -disclaim any liability to any recipient for claims brought against -recipient by any third party for infringement of that parties -intellectual property rights. - -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 COPYRIGHT -OWNER 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. - ----------------------------------------------------------------------------- -Name: dragon4 -Files: numpy/_core/src/multiarray/dragon4.c -License: MIT - /* - * Copyright (c) 2014 Ryan Juckett - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -/* - * This file contains a modified version of Ryan Juckett's Dragon4 - * implementation, obtained from https://www.ryanjuckett.com, - * which has been ported from C++ to C and which has - * modifications specific to printing floats in numpy. - * - * Ryan Juckett's original code was under the Zlib license; he gave numpy - * permission to include it under the MIT license instead. - */ - - ----------------------------------------------------------------------------- -Name: libdivide -Files: numpy/_core/include/numpy/libdivide/* -License: Zlib - zlib License - ------------ - - Copyright (C) 2010 - 2019 ridiculous_fish, - Copyright (C) 2016 - 2019 Kim Walisch, - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - ----------------------------------------------------------------------------- -Note that the following files are vendored in the repository and sdist but not -installed in built numpy packages: - -Name: Meson -Files: vendored-meson/meson/* -License: Apache 2.0 - -# Copyright 2016 The Meson development team - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ----------------------------------------------------------------------------- -Name: spin -Files: .spin/cmds.py -License: BSD-3 - BSD 3-Clause License - -Copyright (c) 2021--2022, Scientific Python project -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 following disclaimer. - -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 name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------------------------------- -LICENSES_bundled in different directories: ------------------------------------------------------------------------------------ - -The NumPy repository and source distributions bundle several libraries that are -compatibly licensed. We list these here. - -Name: SPLITMIX64 -Files: /numpy/blob/numpy/random/src/splitmix64/* -License: Sebastiano Vigna © 2005–2019 NumPy Developers, Licensed under the 3-clause BSD License. -For details, see /numpy/blob/numpy/random/src/splitmix64/LICENSE.md - -Name: SFC64 -Files: /numpy/blob/numpy/random/src/sfc64/* -License: MIT -For details, see /numpy/blob/numpy/random/src/sfc64/LICENSE.md - -Name: PHILOX -Files: /numpy/blob/numpy/random/src/philox/* -License: D. E. Shaw Research -For license text, see /numpy/blob/numpy/random/src/philox/LICENSE.md - -Name: PCG64 -Files: /numpy/blob/numpy/random/src/pcg64/* -License: MIT -For license text, see/numpy/blob/numpy/random/src/pcg64/LICENSE.md - -Name: MT19937 -Files: /numpy/blob/numpy/random/src/mt19937/* -License: MIT -For license text, see/numpy/blob/numpy/random/src/mt19937/LICENSE.md - -Name: Julia -Files: /numpy/blob/numpy/random/src/distributions/* -License: Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors -For license text, see/numpy/blob/numpy/random/src/distributions/LICENSE.md - -Name: Random -Files: /numpy/blob/numpy/random/* -License: dual-licensed under the The University of Illinois/NCSA Open Source License (NCSA) and The 3-Clause BSD License -For license text, see/numpy/blob/numpy/random/LICENSE.md - -Name: numpy.core.ma -Files: /numpy/blob/numpy/ma/* -License: University of Georgia and Pierre G.F. Gerard-Marchant -For license text, see /numpy/blob/numpy/ma/LICENSE - ---------------- RECURSIVE LICENSE Mentioned in LICENSES_bundled in different directories (list above) -------------------- -------------------------------------------------------------------------------------------------------------------------------------- - -Name: SPLITMIX64 - -Written in 2015 by Sebastiano Vigna (vigna@acm.org) - -To the extent possible under law, the author has dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. - -See http://creativecommons.org/publicdomain/zero/1.0/. - -------------------------------------------------------------------------------------------------------------------------------------- - -Name: SFC64 - -© 2005–2019 NumPy Developers, Licensed under the 3-clause BSD License. - -The MIT License - -Adapted from a C++ implementation of Chris Doty-Humphrey's SFC PRNG. - -https://gist.github.com/imneme/f1f7821f07cf76504a97f6537c818083 - -Copyright (c) 2018 Melissa E. O'Neill - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------------------------------------------------------------------- -Name: PHILOX - -Copyright 2010-2012, D. E. Shaw Research. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. - - - 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. - - - Neither the name of D. E. Shaw Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -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 COPYRIGHT OWNER 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. - -------------------------------------------------------------------------------------------------------------------------------------- -Name: PCG64 - -The MIT License - -PCG Random Number Generation for C. - -Copyright 2014 Melissa O'Neill oneill@pcg-random.org - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------------------------------------------------------------------- - -Name: MT19937 - -Copyright (c) 2003-2005, Jean-Sebastien Roy (js@jeannot.org) - -The rk_random and rk_seed functions algorithms and the original design of the Mersenne Twister RNG: - -Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - - 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. - - - The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission. - -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 COPYRIGHT OWNER 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. - -Original algorithm for the implementation of rk_interval function from Richard J. Wagner's implementation of the Mersenne Twister RNG, optimised by Magnus Jonsson. - -Constants used in the rk_double implementation by Isaku Wada. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------------------------------------------------------------------- - -Name: Julia - -The ziggurat methods were derived from Julia. - -Copyright (c) 2009-2019: Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors: - -https://github.com/JuliaLang/julia/contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------------------------------------------------------------------- - -Name: Random - -NCSA Open Source License - -Copyright (c) 2019 Kevin Sheppard. All rights reserved. - -Developed by: Kevin Sheppard (kevin.sheppard@economics.ox.ac.uk, kevin.k.sheppard@gmail.com) http://www.kevinsheppard.com - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers. - -Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution. - -Neither the names of Kevin Sheppard, nor the names of any contributors may be used to endorse or promote products derived from this Software without specific prior written permission. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. - -3-Clause BSD License - -Copyright (c) 2019 Kevin Sheppard. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - - 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. - - - Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -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 COPYRIGHT HOLDER 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. - -Components - -Many parts of this module have been derived from original sources, often the algorithm's designer. Component licenses are located with the component code. - -------------------------------------------------------------------------------------------------------------------------------------- - -Name: numpy.core.ma - -Copyright (c) 2006, University of Georgia and Pierre G.F. Gerard-Marchant -All rights reserved. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of the University of Georgia nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS 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. - ------------------------------------------------------------------------------------ - - -This distribution of NumPy also bundles the following software: - -Name: OpenBLAS -Files: numpy/.dylibs/libscipy_openblas*.so -Description: bundled as a dynamically linked library -Availability: https://github.com/OpenMathLib/OpenBLAS/ -License: BSD-3-Clause - Copyright (c) 2011-2014, The OpenBLAS Project - 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 following disclaimer. - - 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 name of the OpenBLAS project nor the names of - its contributors may be used to endorse or promote products - derived from this software without specific prior written - permission. - - 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 COPYRIGHT OWNER 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. - - -Name: LAPACK -Files: numpy/.dylibs/libscipy_openblas*.so -Description: bundled in OpenBLAS -Availability: https://github.com/OpenMathLib/OpenBLAS/ -License: BSD-3-Clause-Attribution - Copyright (c) 1992-2013 The University of Tennessee and The University - of Tennessee Research Foundation. All rights - reserved. - Copyright (c) 2000-2013 The University of California Berkeley. All - rights reserved. - Copyright (c) 2006-2013 The University of Colorado Denver. All rights - reserved. - - $COPYRIGHT$ - - Additional copyrights may follow - - $HEADER$ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer listed - in this license in the documentation and/or other materials - provided with the distribution. - - - Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - The copyright holders provide no reassurances that the source code - provided does not infringe any patent, copyright, or any other - intellectual property rights of third parties. The copyright holders - disclaim any liability to any recipient for claims brought against - recipient by any third party for infringement of that parties - intellectual property rights. - - 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 COPYRIGHT - OWNER 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. - - -Name: libquadmath -Files: numpy/.dylibs/libquadmath*.so -License: LGPL-2.1-or-later - - GCC Quad-Precision Math Library - Copyright (C) 2010-2019 Free Software Foundation, Inc. - Written by Francois-Xavier Coudert - - This file is part of the libquadmath library. - Libquadmath is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - Libquadmath is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html -———————————————————————————————————————————————————————————————————————————————————— ----- -python-dateutil - -Copyright 2017- Paul Ganssle -Copyright 2017- dateutil contributors (see AUTHORS file) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -The above license applies to all contributions after 2017-12-01, as well as -all contributions that have been re-licensed (see AUTHORS file for the list of -contributors who have re-licensed their code). - -The full text of the Apache License here: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - --------------------------------------------------------------------------------- -dateutil - Extensions to the standard Python datetime module. - -Copyright (c) 2003-2011 - Gustavo Niemeyer -Copyright (c) 2012-2014 - Tomi Pieviläinen -Copyright (c) 2014-2016 - Yaron de Leeuw -Copyright (c) 2015- - Paul Ganssle -Copyright (c) 2015- - dateutil contributors (see AUTHORS file) - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * 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. - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -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 COPYRIGHT OWNER 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. - -The above BSD License Applies to all code, even that also covered by Apache 2.0. ----- - -six - -Copyright (c) 2010-2020 Benjamin Peterson - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----- - -pytz - -Copyright (c) 2003-2019 Stuart Bishop - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. ----- - -tzdata - -Apache Software License 2.0 - -Copyright (c) 2020, Paul Ganssle (Google) - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. ----- - -Vendored dependencies ---------------------- - -Pyperclip - BSD license -======================= - -Copyright (c) 2010, Albert Sweigart -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of the pyperclip nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY Albert Sweigart "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 Albert Sweigart 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. -===================================================================================== - -klib - -The MIT License - -Copyright (c) 2008- Attractive Chaos - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. ----- - -SAS7BDAT - MIT License -======================= - -Copyright (c) 2015 Jared Hobbs - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- - -PyArrow - -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --------------------------------------------------------------------------------- - -src/arrow/util (some portions): Apache 2.0, and 3-clause BSD - -Some portions of this module are derived from code in the Chromium project, -copyright (c) Google inc and (c) The Chromium Authors and licensed under the -Apache 2.0 License or the under the 3-clause BSD license: - - Copyright (c) 2013 The Chromium Authors. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - 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 COPYRIGHT - OWNER 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. - --------------------------------------------------------------------------------- - -This project includes code from Daniel Lemire's FrameOfReference project. - -https://github.com/lemire/FrameOfReference/blob/6ccaf9e97160f9a3b299e23a8ef739e711ef0c71/src/bpacking.cpp -https://github.com/lemire/FrameOfReference/blob/146948b6058a976bc7767262ad3a2ce201486b93/scripts/turbopacking64.py - -Copyright: 2013 Daniel Lemire -Home page: http://lemire.me/en/ -Project page: https://github.com/lemire/FrameOfReference -License: Apache License Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 - --------------------------------------------------------------------------------- - -This project includes code from the TensorFlow project - -Copyright 2015 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - --------------------------------------------------------------------------------- - -This project includes code from the NumPy project. - -https://github.com/numpy/numpy/blob/e1f191c46f2eebd6cb892a4bfe14d9dd43a06c4e/numpy/core/src/multiarray/multiarraymodule.c#L2910 - -https://github.com/numpy/numpy/blob/68fd82271b9ea5a9e50d4e761061dfcca851382a/numpy/core/src/multiarray/datetime.c - -Copyright (c) 2005-2017, NumPy Developers. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * 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. - - * Neither the name of the NumPy Developers nor the names of any - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - --------------------------------------------------------------------------------- - -This project includes code from the Boost project - -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - --------------------------------------------------------------------------------- - -This project includes code from the FlatBuffers project - -Copyright 2014 Google Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - --------------------------------------------------------------------------------- - -This project includes code from the tslib project - -Copyright 2015 Microsoft Corporation. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - --------------------------------------------------------------------------------- - -This project includes code from the jemalloc project - -https://github.com/jemalloc/jemalloc - -Copyright (C) 2002-2017 Jason Evans . -All rights reserved. -Copyright (C) 2007-2012 Mozilla Foundation. All rights reserved. -Copyright (C) 2009-2017 Facebook, Inc. 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(s), - this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice(s), - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``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 COPYRIGHT HOLDER(S) 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. --------------------------------------------------------------------------------- - -This project includes code from the Go project, BSD 3-clause license + PATENTS -weak patent termination clause -(https://github.com/golang/go/blob/master/PATENTS). - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - --------------------------------------------------------------------------------- - -This project includes code from the hs2client - -https://github.com/cloudera/hs2client - -Copyright 2016 Cloudera Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - --------------------------------------------------------------------------------- - -The script ci/scripts/util_wait_for_it.sh has the following license - -Copyright (c) 2016 Giles Hall - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --------------------------------------------------------------------------------- - -The script r/configure has the following license (MIT) - -Copyright (c) 2017, Jeroen Ooms and Jim Hester - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --------------------------------------------------------------------------------- - -cpp/src/arrow/util/logging.cc, cpp/src/arrow/util/logging.h and -cpp/src/arrow/util/logging-test.cc are adapted from -Ray Project (https://github.com/ray-project/ray) (Apache 2.0). - -Copyright (c) 2016 Ray Project (https://github.com/ray-project/ray) - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - --------------------------------------------------------------------------------- -The files cpp/src/arrow/vendored/datetime/date.h, cpp/src/arrow/vendored/datetime/tz.h, -cpp/src/arrow/vendored/datetime/tz_private.h, cpp/src/arrow/vendored/datetime/ios.h, -cpp/src/arrow/vendored/datetime/ios.mm, -cpp/src/arrow/vendored/datetime/tz.cpp are adapted from -Howard Hinnant's date library (https://github.com/HowardHinnant/date) -It is licensed under MIT license. - -The MIT License (MIT) -Copyright (c) 2015, 2016, 2017 Howard Hinnant -Copyright (c) 2016 Adrian Colomitchi -Copyright (c) 2017 Florian Dang -Copyright (c) 2017 Paul Thompson -Copyright (c) 2018 Tomasz Kamiński - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --------------------------------------------------------------------------------- - -The file cpp/src/arrow/util/utf8.h includes code adapted from the page - https://bjoern.hoehrmann.de/utf-8/decoder/dfa/ -with the following license (MIT) - -Copyright (c) 2008-2009 Bjoern Hoehrmann - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --------------------------------------------------------------------------------- - -The files in cpp/src/arrow/vendored/xxhash/ have the following license -(BSD 2-Clause License) - -xxHash Library -Copyright (c) 2012-2014, Yann Collet -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* 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. - -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 COPYRIGHT HOLDER 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. - -You can contact the author at : -- xxHash homepage: http://www.xxhash.com -- xxHash source repository : https://github.com/Cyan4973/xxHash - --------------------------------------------------------------------------------- - -The files in cpp/src/arrow/vendored/double-conversion/ have the following license -(BSD 3-Clause License) - -Copyright 2006-2011, the V8 project authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - --------------------------------------------------------------------------------- - -The files in cpp/src/arrow/vendored/uriparser/ have the following license -(BSD 3-Clause License) - -uriparser - RFC 3986 URI parsing library - -Copyright (C) 2007, Weijia Song -Copyright (C) 2007, Sebastian Pipping -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * 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. - - * Neither the name of the nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior written - permission. - -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 -COPYRIGHT OWNER 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. - --------------------------------------------------------------------------------- - -The files under dev/tasks/conda-recipes have the following license - -BSD 3-clause license -Copyright (c) 2015-2018, conda-forge -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 following disclaimer. - -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 name of the copyright holder nor the names of its contributors - may be used to endorse or promote products derived from this software without - specific prior written permission. - -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 COPYRIGHT HOLDER 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. - --------------------------------------------------------------------------------- - -The files in cpp/src/arrow/vendored/utfcpp/ have the following license - -Copyright 2006-2018 Nemanja Trifunovic - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - --------------------------------------------------------------------------------- - -This project includes code from Apache Kudu. - - * cpp/cmake_modules/CompilerInfo.cmake is based on Kudu's cmake_modules/CompilerInfo.cmake - -Copyright: 2016 The Apache Software Foundation. -Home page: https://kudu.apache.org/ -License: http://www.apache.org/licenses/LICENSE-2.0 - --------------------------------------------------------------------------------- - -This project includes code from Apache Impala (incubating), formerly -Impala. The Impala code and rights were donated to the ASF as part of the -Incubator process after the initial code imports into Apache Parquet. - -Copyright: 2012 Cloudera, Inc. -Copyright: 2016 The Apache Software Foundation. -Home page: http://impala.apache.org/ -License: http://www.apache.org/licenses/LICENSE-2.0 - --------------------------------------------------------------------------------- - -This project includes code from Apache Aurora. - -* dev/release/{release,changelog,release-candidate} are based on the scripts from - Apache Aurora - -Copyright: 2016 The Apache Software Foundation. -Home page: https://aurora.apache.org/ -License: http://www.apache.org/licenses/LICENSE-2.0 - --------------------------------------------------------------------------------- - -This project includes code from the Google styleguide. - -* cpp/build-support/cpplint.py is based on the scripts from the Google styleguide. - -Copyright: 2009 Google Inc. All rights reserved. -Homepage: https://github.com/google/styleguide -License: 3-clause BSD - --------------------------------------------------------------------------------- - -This project includes code from Snappy. - -* cpp/cmake_modules/{SnappyCMakeLists.txt,SnappyConfig.h} are based on code - from Google's Snappy project. - -Copyright: 2009 Google Inc. All rights reserved. -Homepage: https://github.com/google/snappy -License: 3-clause BSD - --------------------------------------------------------------------------------- - -This project includes code from the manylinux project. - -* python/manylinux1/scripts/{build_python.sh,python-tag-abi-tag.py, - requirements.txt} are based on code from the manylinux project. - -Copyright: 2016 manylinux -Homepage: https://github.com/pypa/manylinux -License: The MIT License (MIT) - --------------------------------------------------------------------------------- - -This project includes code from the cymove project: - -* python/pyarrow/includes/common.pxd includes code from the cymove project - -The MIT License (MIT) -Copyright (c) 2019 Omer Ozarslan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -OR OTHER DEALINGS IN THE SOFTWARE. - --------------------------------------------------------------------------------- - -The projects includes code from the Ursabot project under the dev/archery -directory. - -License: BSD 2-Clause - -Copyright 2019 RStudio, Inc. - -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 following disclaimer. - -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. - -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 COPYRIGHT HOLDER 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. - --------------------------------------------------------------------------------- - -This project include code from mingw-w64. - -* cpp/src/arrow/util/cpu-info.cc has a polyfill for mingw-w64 < 5 - -Copyright (c) 2009 - 2013 by the mingw-w64 project -Homepage: https://mingw-w64.org -License: Zope Public License (ZPL) Version 2.1. - ---------------------------------------------------------------------------------- - -This project include code from Google's Asylo project. - -* cpp/src/arrow/result.h is based on status_or.h - -Copyright (c) Copyright 2017 Asylo authors -Homepage: https://asylo.dev/ -License: Apache 2.0 - --------------------------------------------------------------------------------- - -This project includes code from Google's protobuf project - -* cpp/src/arrow/result.h ARROW_ASSIGN_OR_RAISE is based off ASSIGN_OR_RETURN -* cpp/src/arrow/util/bit_stream_utils.h contains code from wire_format_lite.h - -Copyright 2008 Google Inc. All rights reserved. -Homepage: https://developers.google.com/protocol-buffers/ -License: - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. - --------------------------------------------------------------------------------- - -3rdparty dependency LLVM is statically linked in certain binary distributions. -Additionally some sections of source code have been derived from sources in LLVM -and have been clearly labeled as such. LLVM has the following license: - -============================================================================== -The LLVM Project is under the Apache License v2.0 with LLVM Exceptions: -============================================================================== - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - ----- LLVM Exceptions to the Apache 2.0 License ---- - -As an exception, if, as a result of your compiling your source code, portions -of this Software are embedded into an Object form of such source code, you -may redistribute such embedded portions in such Object form without complying -with the conditions of Sections 4(a), 4(b) and 4(d) of the License. - -In addition, if you combine or link compiled forms of this Software with -software that is licensed under the GPLv2 ("Combined Software") and if a -court of competent jurisdiction determines that the patent provision (Section -3), the indemnity provision (Section 9) or other Section of the License -conflicts with the conditions of the GPLv2, you may retroactively and -prospectively choose to deem waived or otherwise exclude such Section(s) of -the License, but only in their entirety and only with respect to the Combined -Software. - -============================================================================== -Software from third parties included in the LLVM Project: -============================================================================== -The LLVM Project contains third party software which is under different license -terms. All such code will be identified clearly using at least one of two -mechanisms: -1) It will be in a separate directory tree with its own `LICENSE.txt` or - `LICENSE` file at the top containing the specific license and restrictions - which apply to that software, or -2) It will contain specific license and restriction terms at the top of every - file. - --------------------------------------------------------------------------------- - -3rdparty dependency gRPC is statically linked in certain binary -distributions, like the python wheels. gRPC has the following license: - -Copyright 2014 gRPC authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - --------------------------------------------------------------------------------- - -3rdparty dependency Apache Thrift is statically linked in certain binary -distributions, like the python wheels. Apache Thrift has the following license: - -Apache Thrift -Copyright (C) 2006 - 2019, The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - --------------------------------------------------------------------------------- - -3rdparty dependency Apache ORC is statically linked in certain binary -distributions, like the python wheels. Apache ORC has the following license: - -Apache ORC -Copyright 2013-2019 The Apache Software Foundation - -This product includes software developed by The Apache Software -Foundation (http://www.apache.org/). - -This product includes software developed by Hewlett-Packard: -(c) Copyright [2014-2015] Hewlett-Packard Development Company, L.P - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - --------------------------------------------------------------------------------- - -3rdparty dependency zstd is statically linked in certain binary -distributions, like the python wheels. ZSTD has the following license: - -BSD License - -For Zstandard software - -Copyright (c) 2016-present, Facebook, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * 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. - - * Neither the name Facebook nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -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 COPYRIGHT HOLDER 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. - --------------------------------------------------------------------------------- - -3rdparty dependency lz4 is statically linked in certain binary -distributions, like the python wheels. lz4 has the following license: - -LZ4 Library -Copyright (c) 2011-2016, Yann Collet -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* 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. - -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 COPYRIGHT HOLDER 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. - --------------------------------------------------------------------------------- - -3rdparty dependency Brotli is statically linked in certain binary -distributions, like the python wheels. Brotli has the following license: - -Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - --------------------------------------------------------------------------------- - -3rdparty dependency rapidjson is statically linked in certain binary -distributions, like the python wheels. rapidjson and its dependencies have the -following licenses: - -Tencent is pleased to support the open source community by making RapidJSON -available. - -Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. -All rights reserved. - -If you have downloaded a copy of the RapidJSON binary from Tencent, please note -that the RapidJSON binary is licensed under the MIT License. -If you have downloaded a copy of the RapidJSON source code from Tencent, please -note that RapidJSON source code is licensed under the MIT License, except for -the third-party components listed below which are subject to different license -terms. Your integration of RapidJSON into your own projects may require -compliance with the MIT License, as well as the other licenses applicable to -the third-party components included within RapidJSON. To avoid the problematic -JSON license in your own projects, it's sufficient to exclude the -bin/jsonchecker/ directory, as it's the only code under the JSON license. -A copy of the MIT License is included in this file. - -Other dependencies and licenses: - - Open Source Software Licensed Under the BSD License: - -------------------------------------------------------------------- - - The msinttypes r29 - Copyright (c) 2006-2013 Alexander Chemeris - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * 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. - * Neither the name of copyright holder nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 AND 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. - - Terms of the MIT License: - -------------------------------------------------------------------- - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - --------------------------------------------------------------------------------- - -3rdparty dependency snappy is statically linked in certain binary -distributions, like the python wheels. snappy has the following license: - -Copyright 2011, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - -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 COPYRIGHT -OWNER 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. - - -Some of the benchmark data in testdata/ is licensed differently: - - - fireworks.jpeg is Copyright 2013 Steinar H. Gunderson, and - is licensed under the Creative Commons Attribution 3.0 license - (CC-BY-3.0). See https://creativecommons.org/licenses/by/3.0/ - for more information. - - - kppkn.gtb is taken from the Gaviota chess tablebase set, and - is licensed under the MIT License. See - https://sites.google.com/site/gaviotachessengine/Home/endgame-tablebases-1 - for more information. - - - paper-100k.pdf is an excerpt (bytes 92160 to 194560) from the paper - “Combinatorial Modeling of Chromatin Features Quantitatively Predicts DNA - Replication Timing in _Drosophila_” by Federico Comoglio and Renato Paro, - which is licensed under the CC-BY license. See - http://www.ploscompbiol.org/static/license for more ifnormation. - - - alice29.txt, asyoulik.txt, plrabn12.txt and lcet10.txt are from Project - Gutenberg. The first three have expired copyrights and are in the public - domain; the latter does not have expired copyright, but is still in the - public domain according to the license information - (http://www.gutenberg.org/ebooks/53). - --------------------------------------------------------------------------------- - -3rdparty dependency gflags is statically linked in certain binary -distributions, like the python wheels. gflags has the following license: - -Copyright (c) 2006, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - --------------------------------------------------------------------------------- - -3rdparty dependency glog is statically linked in certain binary -distributions, like the python wheels. glog has the following license: - -Copyright (c) 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - - -A function gettimeofday in utilities.cc is based on - -http://www.google.com/codesearch/p?hl=en#dR3YEbitojA/COPYING&q=GetSystemTimeAsFileTime%20license:bsd - -The license of this code is: - -Copyright (c) 2003-2008, Jouni Malinen and contributors -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 following disclaimer. - -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 name(s) of the above-listed copyright holder(s) nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - --------------------------------------------------------------------------------- - -3rdparty dependency re2 is statically linked in certain binary -distributions, like the python wheels. re2 has the following license: - -Copyright (c) 2009 The RE2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - --------------------------------------------------------------------------------- - -3rdparty dependency c-ares is statically linked in certain binary -distributions, like the python wheels. c-ares has the following license: - -# c-ares license - -Copyright (c) 2007 - 2018, Daniel Stenberg with many contributors, see AUTHORS -file. - -Copyright 1998 by the Massachusetts Institute of Technology. - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, provided that -the above copyright notice appear in all copies and that both that copyright -notice and this permission notice appear in supporting documentation, and that -the name of M.I.T. not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior permission. -M.I.T. makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - --------------------------------------------------------------------------------- - -3rdparty dependency zlib is redistributed as a dynamically linked shared -library in certain binary distributions, like the python wheels. In the future -this will likely change to static linkage. zlib has the following license: - -zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.11, January 15th, 2017 - - Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - --------------------------------------------------------------------------------- - -3rdparty dependency openssl is redistributed as a dynamically linked shared -library in certain binary distributions, like the python wheels. openssl -preceding version 3 has the following license: - - LICENSE ISSUES - ============== - - The OpenSSL toolkit stays under a double license, i.e. both the conditions of - the OpenSSL License and the original SSLeay license apply to the toolkit. - See below for the actual license texts. - - OpenSSL License - --------------- - -/* ==================================================================== - * Copyright (c) 1998-2019 The OpenSSL Project. 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 following disclaimer. - * - * 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. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED 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 OpenSSL PROJECT OR - * ITS 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. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - - Original SSLeay License - ----------------------- - -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * 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 copyright - * notice, this list of conditions and the following disclaimer. - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - --------------------------------------------------------------------------------- - -This project includes code from the rtools-backports project. - -* ci/scripts/PKGBUILD and ci/scripts/r_windows_build.sh are based on code - from the rtools-backports project. - -Copyright: Copyright (c) 2013 - 2019, Алексей and Jeroen Ooms. -All rights reserved. -Homepage: https://github.com/r-windows/rtools-backports -License: 3-clause BSD - --------------------------------------------------------------------------------- - -Some code from pandas has been adapted for the pyarrow codebase. pandas is -available under the 3-clause BSD license, which follows: - -pandas license -============== - -Copyright (c) 2011-2012, Lambda Foundry, Inc. and PyData Development Team -All rights reserved. - -Copyright (c) 2008-2011 AQR Capital Management, LLC -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * 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. - - * Neither the name of the copyright holder nor the names of any - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER 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 COPYRIGHT -OWNER 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. - --------------------------------------------------------------------------------- - -Some bits from DyND, in particular aspects of the build system, have been -adapted from libdynd and dynd-python under the terms of the BSD 2-clause -license - -The BSD 2-Clause License - - Copyright (C) 2011-12, Dynamic NDArray Developers - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * 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. - - 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 COPYRIGHT - OWNER 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. - -Dynamic NDArray Developers list: - - * Mark Wiebe - * Continuum Analytics - --------------------------------------------------------------------------------- - -Some source code from Ibis (https://github.com/cloudera/ibis) has been adapted -for PyArrow. Ibis is released under the Apache License, Version 2.0. - --------------------------------------------------------------------------------- - -dev/tasks/homebrew-formulae/apache-arrow.rb has the following license: - -BSD 2-Clause License - -Copyright (c) 2009-present, Homebrew contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* 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. - -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 COPYRIGHT HOLDER 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. - ----------------------------------------------------------------------- - -cpp/src/arrow/vendored/base64.cpp has the following license - -ZLIB License - -Copyright (C) 2004-2017 René Nyffenegger - -This source code is provided 'as-is', without any express or implied -warranty. In no event will the author be held liable for any damages arising -from the use of this software. - -Permission is granted to anyone to use this software for any purpose, including -commercial applications, and to alter it and redistribute it freely, subject to -the following restrictions: - -1. The origin of this source code must not be misrepresented; you must not - claim that you wrote the original source code. If you use this source code - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original source code. - -3. This notice may not be removed or altered from any source distribution. - -René Nyffenegger rene.nyffenegger@adp-gmbh.ch - --------------------------------------------------------------------------------- - -This project includes code from Folly. - - * cpp/src/arrow/vendored/ProducerConsumerQueue.h - -is based on Folly's - - * folly/Portability.h - * folly/lang/Align.h - * folly/ProducerConsumerQueue.h - -Copyright: Copyright (c) Facebook, Inc. and its affiliates. -Home page: https://github.com/facebook/folly -License: http://www.apache.org/licenses/LICENSE-2.0 - --------------------------------------------------------------------------------- - -The file cpp/src/arrow/vendored/musl/strptime.c has the following license - -Copyright © 2005-2020 Rich Felker, et al. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------------------------------------------------------------------------- - -The file cpp/cmake_modules/BuildUtils.cmake contains code from - -https://gist.github.com/cristianadam/ef920342939a89fae3e8a85ca9459b49 - -which is made available under the MIT license - -Copyright (c) 2019 Cristian Adam - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --------------------------------------------------------------------------------- - -The files in cpp/src/arrow/vendored/portable-snippets/ contain code from - -https://github.com/nemequ/portable-snippets - -and have the following copyright notice: - -Each source file contains a preamble explaining the license situation -for that file, which takes priority over this file. With the -exception of some code pulled in from other repositories (such as -µnit, an MIT-licensed project which is used for testing), the code is -public domain, released using the CC0 1.0 Universal dedication (*). - -(*) https://creativecommons.org/publicdomain/zero/1.0/legalcode - --------------------------------------------------------------------------------- - -The files in cpp/src/arrow/vendored/fast_float/ contain code from - -https://github.com/lemire/fast_float - -which is made available under the Apache License 2.0. - --------------------------------------------------------------------------------- - -The file python/pyarrow/vendored/docscrape.py contains code from - -https://github.com/numpy/numpydoc/ - -which is made available under the BSD 2-clause license. - --------------------------------------------------------------------------------- - -The file python/pyarrow/vendored/version.py contains code from - -https://github.com/pypa/packaging/ - -which is made available under both the Apache license v2.0 and the -BSD 2-clause license. - --------------------------------------------------------------------------------- - -The files in cpp/src/arrow/vendored/pcg contain code from - -https://github.com/imneme/pcg-cpp - -and have the following copyright notice: - -Copyright 2014-2019 Melissa O'Neill , - and the PCG Project contributors. - -SPDX-License-Identifier: (Apache-2.0 OR MIT) - -Licensed under the Apache License, Version 2.0 (provided in -LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0) -or under the MIT license (provided in LICENSE-MIT.txt and at -http://opensource.org/licenses/MIT), at your option. This file may not -be copied, modified, or distributed except according to those terms. - -Distributed on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, either -express or implied. See your chosen license for details. - --------------------------------------------------------------------------------- -r/R/dplyr-count-tally.R (some portions) - -Some portions of this file are derived from code from - -https://github.com/tidyverse/dplyr/ - -which is made available under the MIT license - -Copyright (c) 2013-2019 RStudio and others. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the “Software”), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --------------------------------------------------------------------------------- - -The file src/arrow/util/io_util.cc contains code from the CPython project -which is made available under the Python Software Foundation License Version 2. - --------------------------------------------------------------------------------- - -3rdparty dependency opentelemetry-cpp is statically linked in certain binary -distributions. opentelemetry-cpp is made available under the Apache License 2.0. - -Copyright The OpenTelemetry Authors -SPDX-License-Identifier: Apache-2.0 - --------------------------------------------------------------------------------- - -ci/conan/ is based on code from Conan Package and Dependency Manager. - -Copyright (c) 2019 Conan.io - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --------------------------------------------------------------------------------- - -3rdparty dependency UCX is redistributed as a dynamically linked shared -library in certain binary distributions. UCX has the following license: - -Copyright (c) 2014-2015 UT-Battelle, LLC. All rights reserved. -Copyright (C) 2014-2020 Mellanox Technologies Ltd. All rights reserved. -Copyright (C) 2014-2015 The University of Houston System. All rights reserved. -Copyright (C) 2015 The University of Tennessee and The University - of Tennessee Research Foundation. All rights reserved. -Copyright (C) 2016-2020 ARM Ltd. All rights reserved. -Copyright (c) 2016 Los Alamos National Security, LLC. All rights reserved. -Copyright (C) 2016-2020 Advanced Micro Devices, Inc. All rights reserved. -Copyright (C) 2019 UChicago Argonne, LLC. All rights reserved. -Copyright (c) 2018-2020 NVIDIA CORPORATION. All rights reserved. -Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved. -Copyright (C) 2016-2020 Stony Brook University. 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 following disclaimer. -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 name of the copyright holder nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 COPYRIGHT -HOLDER 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. - --------------------------------------------------------------------------------- - -The file dev/tasks/r/github.packages.yml contains code from - -https://github.com/ursa-labs/arrow-r-nightly - -which is made available under the Apache License 2.0. - --------------------------------------------------------------------------------- -.github/actions/sync-nightlies/action.yml (some portions) - -Some portions of this file are derived from code from - -https://github.com/JoshPiper/rsync-docker - -which is made available under the MIT license - -Copyright (c) 2020 Joshua Piper - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --------------------------------------------------------------------------------- -.github/actions/sync-nightlies/action.yml (some portions) - -Some portions of this file are derived from code from - -https://github.com/burnett01/rsync-deployments - -which is made available under the MIT license - -Copyright (c) 2019-2022 Contention -Copyright (c) 2019-2022 Burnett01 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --------------------------------------------------------------------------------- -java/vector/src/main/java/org/apache/arrow/vector/util/IntObjectHashMap.java -java/vector/src/main/java/org/apache/arrow/vector/util/IntObjectMap.java - -These file are derived from code from Netty, which is made available under the -Apache License 2.0. - -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- - -Polars - -Copyright (c) 2020 Ritchie Vink -Some portions Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- - -NumPy - -Copyright: NumPy Developers -License: BSD 3-Clause - - ./.spin/LICENSE - -BSD 3-Clause License - -Copyright (c) 2021--2022, Scientific Python project -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 following disclaimer. - -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 name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -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 COPYRIGHT HOLDER 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. - --------------- Separator -------------- - - ./LICENSE.txt - -Copyright (c) 2005-2024, NumPy Developers. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * 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. - - * Neither the name of the NumPy Developers nor the names of any - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - --------------- Separator -------------- - - ./LICENSES_bundled.txt - -The NumPy repository and source distributions bundle several libraries that are -compatibly licensed. We list these here. - -Name: lapack-lite -Files: numpy/linalg/lapack_lite/* -License: BSD-3-Clause - For details, see numpy/linalg/lapack_lite/LICENSE.txt - -Name: dragon4 -Files: numpy/_core/src/multiarray/dragon4.c -License: MIT - For license text, see numpy/_core/src/multiarray/dragon4.c - -Name: libdivide -Files: numpy/_core/include/numpy/libdivide/* -License: Zlib - For license text, see numpy/_core/include/numpy/libdivide/LICENSE.txt - - -Note that the following files are vendored in the repository and sdist but not -installed in built numpy packages: - -Name: Meson -Files: vendored-meson/meson/* -License: Apache 2.0 - For license text, see vendored-meson/meson/COPYING - -Name: spin -Files: .spin/cmds.py -License: BSD-3 - For license text, see .spin/LICENSE - -Name: tempita -Files: numpy/_build_utils/tempita/* -License: MIT - For details, see numpy/_build_utils/tempita/LICENCE.txt - --------------- Separator -------------- - - ./numpy/_build_utils/tempita/LICENSE.txt - -Copyright (c) 2008 Ian Bicking and Contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------- Separator -------------- - - ./numpy/_core/include/numpy/libdivide/LICENSE.txt - - zlib License - ------------ - - Copyright (C) 2010 - 2019 ridiculous_fish, - Copyright (C) 2016 - 2019 Kim Walisch, - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - --------------- Separator -------------- - - ./numpy/core/src/multiarray/dragon4.c - -/* - * Copyright (c) 2014 Ryan Juckett - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ --------------- Separator -------------- - - ./numpy/core/src/multiarray/dragon4.c - -MIT ( same as top-level ) --------------- Separator -------------- - - ./numpy/linalg/lapack_lite/LICENSE.txt - -Copyright (c) 1992-2013 The University of Tennessee and The University - of Tennessee Research Foundation. All rights - reserved. -Copyright (c) 2000-2013 The University of California Berkeley. All - rights reserved. -Copyright (c) 2006-2013 The University of Colorado Denver. All rights - reserved. - -$COPYRIGHT$ - -Additional copyrights may follow - -$HEADER$ - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -- Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer listed - in this license in the documentation and/or other materials - provided with the distribution. - -- Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -The copyright holders provide no reassurances that the source code -provided does not infringe any patent, copyright, or any other -intellectual property rights of third parties. The copyright holders -disclaim any liability to any recipient for claims brought against -recipient by any third party for infringement of that parties -intellectual property rights. - -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 COPYRIGHT -OWNER 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. - --------------- Separator -------------- - - ./numpy/ma/LICENSE - -* Copyright (c) 2006, University of Georgia and Pierre G.F. Gerard-Marchant -* All rights reserved. -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * 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. -* * Neither the name of the University of Georgia nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE REGENTS 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. - --------------- Separator -------------- - - ./numpy/random/LICENSE.md - -**This software is dual-licensed under the The University of Illinois/NCSA -Open Source License (NCSA) and The 3-Clause BSD License** - -# NCSA Open Source License -**Copyright (c) 2019 Kevin Sheppard. All rights reserved.** - -Developed by: Kevin Sheppard (, -) -[http://www.kevinsheppard.com](http://www.kevinsheppard.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal with -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimers. - -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimers in the documentation and/or -other materials provided with the distribution. - -Neither the names of Kevin Sheppard, nor the names of any contributors may be -used to endorse or promote products derived from this Software without specific -prior written permission. - -**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH -THE SOFTWARE.** - - -# 3-Clause BSD License -**Copyright (c) 2019 Kevin Sheppard. 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 following disclaimer. - -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 name of the copyright holder nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -**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 COPYRIGHT HOLDER 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.** - -# Components - -Many parts of this module have been derived from original sources, -often the algorithm's designer. Component licenses are located with -the component code. - --------------- Separator -------------- - - ./numpy/random/src/distributions/LICENSE.md - -## NumPy - -Copyright (c) 2005-2017, NumPy Developers. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* 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. - -* Neither the name of the NumPy Developers nor the names of any - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - - -## Julia - -The ziggurat methods were derived from Julia. - -Copyright (c) 2009-2019: Jeff Bezanson, Stefan Karpinski, Viral B. Shah, -and other contributors: - -https://github.com/JuliaLang/julia/contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------- Separator -------------- - - ./numpy/random/src/mt19937/LICENSE.md - -# MT19937 - -Copyright (c) 2003-2005, Jean-Sebastien Roy (js@jeannot.org) - -The rk_random and rk_seed functions algorithms and the original design of -the Mersenne Twister RNG: - - Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, - 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 following disclaimer. - - 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. The names of its contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -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 COPYRIGHT OWNER -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. - -Original algorithm for the implementation of rk_interval function from -Richard J. Wagner's implementation of the Mersenne Twister RNG, optimised by -Magnus Jonsson. - -Constants used in the rk_double implementation by Isaku Wada. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------- Separator -------------- - - ./numpy/random/src/pcg64/LICENSE.md - -# PCG64 - -## The MIT License - -PCG Random Number Generation for C. - -Copyright 2014 Melissa O'Neill - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------- Separator -------------- - - ./numpy/random/src/philox/LICENSE.md - -# PHILOX - -Copyright 2010-2012, D. E. Shaw Research. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions, and the following disclaimer. - -* 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. - -* Neither the name of D. E. Shaw Research nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - --------------- Separator -------------- - - ./numpy/random/src/sfc64/LICENSE.md - -# SFC64 - -## The MIT License - -Adapted from a C++ implementation of Chris Doty-Humphrey's SFC PRNG. - -https://gist.github.com/imneme/f1f7821f07cf76504a97f6537c818083 - -Copyright (c) 2018 Melissa E. O'Neill - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - --------------- Separator -------------- - - ./numpy/random/src/splitmix64/LICENSE.md - -# SPLITMIX64 - -Written in 2015 by Sebastiano Vigna (vigna@acm.org) - -To the extent possible under law, the author has dedicated all copyright -and related and neighboring rights to this software to the public domain -worldwide. This software is distributed without any warranty. - -See . - --------------- Separator -------------- - - ./vendored-meson/meson/COPYING - - Apache License - Version 2.0, January 2004 - https://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --------------- Separator -------------- - - -This binary distribution of NumPy also bundles the following software: - - -Name: OpenBLAS -Files: .libs/libopenb*.so -Description: bundled as a dynamically linked library -Availability: https://github.com/xianyi/OpenBLAS/ -License: 3-clause BSD - Copyright (c) 2011-2014, The OpenBLAS Project - 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 following disclaimer. - - 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 name of the OpenBLAS project nor the names of - its contributors may be used to endorse or promote products - derived from this software without specific prior written - permission. - - 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 COPYRIGHT OWNER 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. --------------- Separator -------------- - -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- - -PyTorch - -Third-party public licences / copyright notices -################################################ - -From PyTorch: - -Copyright (c) 2016- Facebook, Inc (Adam Paszke) -Copyright (c) 2014- Facebook, Inc (Soumith Chintala) -Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert) -Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu) -Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu) -Copyright (c) 2011-2013 NYU (Clement Farabet) -Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston) -Copyright (c) 2006 Idiap Research Institute (Samy Bengio) -Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz) - -From Caffe2: - -Copyright (c) 2016-present, Facebook Inc. All rights reserved. - -All contributions by Facebook: -Copyright (c) 2016 Facebook Inc. - -All contributions by Google: -Copyright (c) 2015 Google Inc. -All rights reserved. - -All contributions by Yangqing Jia: -Copyright (c) 2015 Yangqing Jia -All rights reserved. - -All contributions by Kakao Brain: -Copyright 2019-2020 Kakao Brain - -All contributions by Cruise LLC: -Copyright (c) 2022 Cruise LLC. -All rights reserved. - -All contributions from Caffe: -Copyright(c) 2013, 2014, 2015, the respective contributors -All rights reserved. - -All other contributions: -Copyright(c) 2015, 2016 the respective contributors -All rights reserved. - -Caffe2 uses a copyright model similar to Caffe: each contributor holds -copyright over their contributions to Caffe2. The project versioning records -all such contribution and copyright details. If a contributor wants to further -mark their specific copyright on a particular contribution, they should -indicate their copyright solely in the commit message of the change when it is -committed. - -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 following disclaimer. - -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 Facebook, Deepmind Technologies, NYU, NEC Laboratories America - and IDIAP Research Institute nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - -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 COPYRIGHT OWNER 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. - -======================================================================= -Software under third_party -======================================================================= -Software libraries under third_party are provided as github submodule -links, and their content is not part of the Caffe2 codebase. Their -licences can be found under the respective software repositories. - -======================================================================= -Earlier BSD License -======================================================================= -Early development of Caffe2 in 2015 and early 2016 is licensed under the -BSD license. The license is attached below: - -All contributions by Facebook: -Copyright (c) 2016 Facebook Inc. - -All contributions by Google: -Copyright (c) 2015 Google Inc. -All rights reserved. - -All contributions by Yangqing Jia: -Copyright (c) 2015 Yangqing Jia -All rights reserved. - -All contributions by Kakao Brain: -Copyright 2019-2020 Kakao Brain - -All other contributions: -Copyright(c) 2015, 2016 the respective contributors -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 following disclaimer. -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. - -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 COPYRIGHT OWNER 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. - - -======================================================================= -Caffe's BSD License -======================================================================= -Some parts of the caffe2 code is derived from the original Caffe code, which is -created by Yangqing Jia and is now a BSD-licensed open-source project. The Caffe -license is as follows: - -COPYRIGHT - -All contributions by the University of California: -Copyright (c) 2014, The Regents of the University of California (Regents) -All rights reserved. - -All other contributions: -Copyright (c) 2014, the respective contributors -All rights reserved. - -Caffe uses a shared copyright model: each contributor holds copyright over -their contributions to Caffe. The project versioning records all such -contribution and copyright details. If a contributor wants to further mark -their specific copyright on a particular contribution, they should indicate -their copyright solely in the commit message of the change when it is -committed. - -LICENSE - -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 following disclaimer. -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. - -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 COPYRIGHT OWNER 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. - -CONTRIBUTION AGREEMENT - -By contributing to the BVLC/caffe repository through pull-request, comment, -or otherwise, the contributor releases their content to the -license and copyright terms herein. - -======================================================================= -Caffe2's Apache License -======================================================================= - -This repo contains Caffe2 code, which was previously licensed under -Apache License Version 2.0: - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - -======================================================================= -Cephes's 3-Clause BSD License -======================================================================= - -Code derived from implementations in the Cephes Math Library should mention -its derivation and reference the following license: - - 3-Clause BSD License for the Cephes Math Library - Copyright (c) 2018, Steven Moshier - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * 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. - - * Neither the name of the nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - 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 Steven Moshier 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. - - -======================================================================= -SciPy's 3-Clause BSD License -======================================================================= - -Code derived from implementations in SciPy should mention its derivation -and reference the following license: - - Copyright (c) 2001-2002 Enthought, Inc. 2003-2019, SciPy Developers. - 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 following disclaimer. - - 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 name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - 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 COPYRIGHT - OWNER 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. - -======================================================================= -Boost's 1.0 Software License -======================================================================= - -Code derived from implementations in Boost 1.0 should mention its -derivation and reference the following license: - - Boost Software License - Version 1.0 - August 17th, 2003 - - Permission is hereby granted, free of charge, to any person or organization - obtaining a copy of the software and accompanying documentation covered by - this license (the "Software") to use, reproduce, display, distribute, - execute, and transmit the Software, and to prepare derivative works of the - Software, and to permit third-parties to whom the Software is furnished to - do so, all subject to the following: - - The copyright notices in the Software and this entire statement, including - the above license grant, this restriction and the following disclaimer, - must be included in all copies of the Software, in whole or in part, and - all derivative works of the Software, unless such copies or derivative - works are solely in the form of machine-executable object code generated by - a source language processor. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT - SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE - FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -======================================================================= -PILLOW-SIMD Software License -======================================================================= - -Code derived from implementations in PILLOW-SIMD should mention its derivation -and reference the following license: - - The Python Imaging Library (PIL) is - - Copyright © 1997-2011 by Secret Labs AB - Copyright © 1995-2011 by Fredrik Lundh - - Pillow is the friendly PIL fork. It is - - Copyright © 2010-2022 by Alex Clark and contributors - - Like PIL, Pillow is licensed under the open source HPND License: - - By obtaining, using, and/or copying this software and/or its associated - documentation, you agree that you have read, understood, and will comply - with the following terms and conditions: - - Permission to use, copy, modify, and distribute this software and its - associated documentation for any purpose and without fee is hereby granted, - provided that the above copyright notice appears in all copies, and that - both that copyright notice and this permission notice appear in supporting - documentation, and that the name of Secret Labs AB or the author not be - used in advertising or publicity pertaining to distribution of the software - without specific, written prior permission. - - SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. - IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR ANY SPECIAL, - INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - - - - -Fourth-party public licences / copyright notices -################################################ - - -Name: DCGM -License: Apache-2.0 -Files: third_party/kineto/libkineto/third_party/dynolog/third_party/DCGM - -Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ---------------------------------------------------------- - -Name: FP16 -License: MIT -Files: third_party/FP16 - -The MIT License (MIT) - -Copyright (c) 2017 Facebook Inc. -Copyright (c) 2017 Georgia Institute of Technology -Copyright 2019 Google LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------------------------- - -Name: FXdiv -License: MIT -Files: third_party/FXdiv - -The MIT License (MIT) - -Copyright (c) 2017 Facebook Inc. -Copyright (c) 2016-2017 Marat Dukhan - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------------------------- - -Name: NNPACK -License: BSD-2-Clause -Files: third_party/NNPACK - -Copyright (c) 2017 Facebook Inc. -Copyright (c) 2015-2017, Georgia Institute of Technology -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* 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. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: VulkanMemoryAllocator -License: MIT -Files: third_party/VulkanMemoryAllocator - -Copyright (c) 2017-2022 Advanced Micro Devices, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ---------------------------------------------------------- - -Name: XNNPACK -License: BSD-3-Clause -Files: third_party/XNNPACK - -BSD License - -For XNNPACK software - -Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. -Copyright 2019 Google LLC - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * 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. - - * Neither the name Facebook nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: benchmark -License: Apache-2.0 -Files: third_party/benchmark, - third_party/onnx/third_party/benchmark, - third_party/onnx-tensorrt/third_party/onnx/third_party/benchmark, - third_party/protobuf/third_party/benchmark, - third_party/opentelemetry-cpp/third_party/benchmark - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------- - -Name: boost-vcpkg-helpers -License: MIT -Files: third_party/opentelemetry-cpp/tools/vcpkg/ports/boost-vcpkg-helpers - -Copyright (c) Microsoft Corporation - -All rights reserved. - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---------------------------------------------------------- - -Name: cJSON -License: MIT -Files: third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/examples/rest/cJSON - -Copyright (c) 2009-2017 Dave Gamble and cJSON contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ---------------------------------------------------------- - -Name: catch2 -License: BSL-1.0 -Files: third_party/opentelemetry-cpp/third_party/opentracing-cpp/3rd_party/include/opentracing/catch2 - -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - ---------------------------------------------------------- - -Name: clog -License: BSD-2-Clause -Files: third_party/cpuinfo/deps/clog - -Copyright (C) 2018 Marat Dukhan -Copyright (c) 2017-2018 Facebook Inc. -Copyright (c) 2017 Georgia Institute of Technology - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* 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. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: colorama -License: BSD-3-Clause -Files: third_party/kineto/libkineto/third_party/dynolog/third_party/DCGM/testing/python3/libs_3rdparty/colorama - -Copyright (c) 2010 Jonathan Hartley - -Released under the New BSD license (reproduced below), or alternatively you may -use this software under any OSI approved open source license such as those at -http://opensource.org/licenses/alphabetical - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* 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. - -* Neither the name(s) of the copyright holders, nor those of its contributors - may be used to endorse or promote products derived from this software without - specific prior written permission. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: cpp-httplib -License: MIT -Files: third_party/cpp-httplib - -The MIT License (MIT) - -Copyright (c) 2017 yhirose - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---------------------------------------------------------- - -Name: cpplint -License: BSD-3-Clause -Files: third_party/kineto/libkineto/third_party/dynolog/third_party/json/third_party/cpplint, - third_party/nlohmann/tools/cpplint - -cpplint.py and its corresponding unit tests are Copyright (C) 2009 Google Inc. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - ---------------------------------------------------------- - -Name: cpr -License: MIT -Files: third_party/kineto/libkineto/third_party/dynolog/third_party/cpr - -This license applies to everything except the contents of the "test" -directory and its subdirectories. - -MIT License - -Copyright (c) 2017-2021 Huu Nguyen -Copyright (c) 2022 libcpr and many other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---------------------------------------------------------- - -Name: cpuinfo -License: BSD-2-Clause -Files: third_party/cpuinfo, - third_party/fbgemm/third_party/cpuinfo - -Copyright (c) 2019 Google LLC -Copyright (c) 2017-2018 Facebook Inc. -Copyright (C) 2012-2017 Georgia Institute of Technology -Copyright (C) 2010-2012 Marat Dukhan - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* 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. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: cudnn_frontend -License: MIT -Files: third_party/cudnn_frontend - -/* - * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - ---------------------------------------------------------- - -Name: cutlass -License: BSD-3-Clause -Files: third_party/cutlass, - third_party/fbgemm/third_party/cutlass - -Copyright (c) 2017 - 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -SPDX-License-Identifier: BSD-3-Clause - -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 following disclaimer. - -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 name of the copyright holder nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: dart -License: Apache-2.0 -Files: third_party/flatbuffers/dart - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------- - -Name: duktape-1.5.2 -License: MIT -Files: third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/third_party/duktape-1.5.2 - -=============== -Duktape license -=============== - -(http://opensource.org/licenses/MIT) - -Copyright (c) 2013-2016 by Duktape authors (see AUTHORS.rst) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ---------------------------------------------------------- - -Name: duktape-1.8.0 -License: MIT -Files: third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/src/third_party/duktape-1.8.0 - -=============== -Duktape license -=============== - -(http://opensource.org/licenses/MIT) - -Copyright (c) 2013-2017 by Duktape authors (see AUTHORS.rst) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ---------------------------------------------------------- - -Name: dynolog -License: MIT -Files: third_party/kineto/libkineto/third_party/dynolog - -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---------------------------------------------------------- - -Name: eigen -License: BSD-3-Clause -Files: third_party/eigen - -/* - Copyright (c) 2011, Intel Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * 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. - * Neither the name of Intel Corporation nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - 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 COPYRIGHT OWNER 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. -*/ - ---------------------------------------------------------- - -Name: etw -License: MIT -Files: third_party/opentelemetry-cpp/exporters/etw/include/opentelemetry/exporters/etw - -TraceLogging Dynamic for Windows - -Copyright (c) Microsoft Corporation. All rights reserved. - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---------------------------------------------------------- - -Name: expected -License: MIT -Files: third_party/opentelemetry-cpp/third_party/opentracing-cpp/3rd_party/include/opentracing/expected - -The MIT License (MIT) - -Copyright (c) 2015 Martin Moene -Copyright (c) 2015 Microsoft Corporation. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---------------------------------------------------------- - -Name: fbgemm -License: BSD-3-Clause -Files: third_party/fbgemm - -BSD License - -For FBGEMM software - -Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * 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. - - * Neither the name Facebook nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: ffnvcodec -License: MIT with exception -Files: third_party/opentelemetry-cpp/tools/vcpkg/ports/ffnvcodec - -GNU LESSER GENERAL PUBLIC LICENSE -Version 2.1, February 1999 - -Copyright (C) 1991, 1999 Free Software Foundation, Inc. -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] -Preamble -The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. - -This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. - -When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. - -To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. - -For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. - -We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. - -To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. - -Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. - -Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. - -When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. - -We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. - -For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. - -In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. - -Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. - -The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. - -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". - -A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. - -The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) - -"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. - -Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. - -1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. - -You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - -a) The modified work must itself be a software library. -b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. -c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. -d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. -(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. - -3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. - -Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. - -This option is useful when you wish to copy part of the code of the Library into a program that is not a library. - -4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. - -If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. - -5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. - -However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. - -When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. - -If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) - -Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. - -6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. - -You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: - -a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) -b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. -c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. -d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. -e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. -For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. - -It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. - -7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: - -a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. -b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. -8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. - -9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. - -10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. - -11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. - -This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - -12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. - -13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. - -14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - -NO WARRANTY - -15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -END OF TERMS AND CONDITIONS -How to Apply These Terms to Your New Libraries -If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). - -To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - -one line to give the library's name and an idea of what it does. -Copyright (C) year name of author - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in -the library `Frob' (a library for tweaking knobs) written -by James Random Hacker. - -signature of Ty Coon, 1 April 1990 -Ty Coon, President of Vice -That's all there is to it! - ---------------------------------------------------------- - -Name: flatbuffers -License: Apache-2.0 -Files: third_party/flatbuffers - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------- - -Name: fmt -License: MIT with exception -Files: third_party/fmt - -Copyright (c) 2012 - present, Victor Zverovich and {fmt} contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---- Optional exception to the license --- - -As an exception, if, as a result of your compiling your source code, portions -of this Software are embedded into a machine-executable object form of such -source code, you may redistribute such embedded portions in such object form -without including the above copyright and permission notices. - ---------------------------------------------------------- - -Name: foxi -License: MIT -Files: third_party/foxi - -MIT License - -Copyright (c) 2019 Lu Fang - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---------------------------------------------------------- - -Name: gemmlowp -License: Apache-2.0 -Files: third_party/gemmlowp/gemmlowp - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------- - -Name: generator -License: Apache-2.0 -Files: third_party/fbgemm/third_party/googletest/googlemock/scripts/generator, - third_party/googletest/googlemock/scripts/generator, - third_party/kineto/libkineto/third_party/googletest/googlemock/scripts/generator, - third_party/protobuf/third_party/googletest/googlemock/scripts/generator, - third_party/tensorpipe/third_party/googletest/googlemock/scripts/generator, - third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/googletest/googlemock/scripts/generator - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [2007] Neal Norwitz - Portions Copyright [2007] Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------- - -Name: gettimeofday -License: Apache-2.0 -Files: third_party/opentelemetry-cpp/tools/vcpkg/ports/gettimeofday - -/* - * Copied from PostgreSQL source: - * http://doxygen.postgresql.org/gettimeofday_8c_source.html - * - */ - -/* - * gettimeofday.c - * Win32 gettimeofday() replacement - * - * src/port/gettimeofday.c - * - * Copyright (c) 2003 SRA, Inc. - * Copyright (c) 2003 SKC, Inc. - * - * Permission to use, copy, modify, and distribute this software and - * its documentation for any purpose, without fee, and without a - * written agreement is hereby granted, provided that the above - * copyright notice and this paragraph and the following two - * paragraphs appear in all copies. - * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, - * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING - * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS - * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS - * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, - * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - */ - ---------------------------------------------------------- - -Name: gloo -License: BSD-3-Clause -Files: third_party/gloo - -BSD License - -For Gloo software - -Copyright (c) 2017-present, Facebook, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * 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. - - * Neither the name Facebook nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: googlemock -License: BSD-3-Clause -Files: third_party/fbgemm/third_party/googletest/googlemock, - third_party/kineto/libkineto/third_party/googletest/googlemock, - third_party/protobuf/third_party/googletest/googlemock, - third_party/tensorpipe/third_party/googletest/googlemock - -Copyright 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - ---------------------------------------------------------- - -Name: googletest -License: BSD-3-Clause -Files: third_party/fbgemm/third_party/googletest, - third_party/fbgemm/third_party/googletest/googletest, - third_party/googletest, - third_party/kineto/libkineto/third_party/dynolog/third_party/googletest, - third_party/kineto/libkineto/third_party/googletest, - third_party/kineto/libkineto/third_party/googletest/googletest, - third_party/protobuf/third_party/googletest, - third_party/protobuf/third_party/googletest/googletest, - third_party/tensorpipe/third_party/googletest, - third_party/tensorpipe/third_party/googletest/googletest, - third_party/opentelemetry-cpp/third_party/googletest, - third_party/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/googletest - -Copyright 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - ---------------------------------------------------------- - -Name: gtest -License: BSD-3-Clause -Files: third_party/ideep/mkl-dnn/tests/gtests/gtest - -Copyright 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - ---------------------------------------------------------- - -Name: hipify_torch -License: MIT -Files: third_party/fbgemm/third_party/hipify_torch - -MIT License - -Copyright (c) 2017 AMD Compute Libraries - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---------------------------------------------------------- - -Name: hungarian -License: Apache-2.0 -Files: third_party/opentelemetry-cpp/tools/vcpkg/ports/hungarian - -/******************************************************************** - ******************************************************************** - ** - ** libhungarian by Cyrill Stachniss, 2004 - ** - ** - ** Solving the Minimum Assignment Problem using the - ** Hungarian Method. - ** - ** ** This file may be freely copied and distributed! ** - ** - ** Parts of the used code was originally provided by the - ** "Stanford GraphGase", but I made changes to this code. - ** As asked by the copyright node of the "Stanford GraphGase", - ** I hereby proclaim that this file are *NOT* part of the - ** "Stanford GraphGase" distrubition! - ** - ** This file is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied - ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - ** PURPOSE. - ** - ******************************************************************** - ********************************************************************/ - ---------------------------------------------------------- - -Name: ideep -License: MIT -Files: third_party/ideep - -Copyright (c) 2018 Intel Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ---------------------------------------------------------- - -Name: irrlicht -License: MIT -Files: third_party/opentelemetry-cpp/tools/vcpkg/ports/irrlicht - -The Irrlicht Engine License -=========================== - -Copyright (C) 2002-2015 Nikolaus Gebhardt - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgement in the product documentation would be - appreciated but is not required. -2. Altered source versions must be clearly marked as such, and must not be - misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - ---------------------------------------------------------- - -Name: json -License: MIT -Files: third_party/nlohmann/json - -MIT License - -Copyright (c) 2013-2022 Niels Lohmann - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---------------------------------------------------------- - -Name: kineto -License: BSD-3-Clause -Files: third_party/kineto - -BSD License - -For Kineto software - -Copyright (c) Meta Platforms, Inc. and affiliates. - -All contributions by Microsoft: -Copyright (c) Microsoft Corporation. (The Azure AI Platform team) - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * 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. - - * Neither the name Meta nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: libnop -License: Apache-2.0 -Files: third_party/tensorpipe/third_party/libnop - -Copyright 2017 The Native Object Protocols Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ---------------------------------------------------------- - -Name: libstemmer -License: BSD-3-Clause -Files: third_party/opentelemetry-cpp/tools/vcpkg/ports/libstemmer - -Snowball - License -Except where explicitly noted, all the software given out on this Snowball site is covered by the 3-clause BSD License: - -Copyright (c) 2001, Dr Martin Porter, -Copyright (c) 2002, Richard Boulton. -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 following disclaimer. - -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 name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -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 COPYRIGHT HOLDER 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. -Essentially, all this means is that you can do what you like with the code, except claim another Copyright for it, or claim that it is issued under a different license. The software is also issued without warranties, which means that if anyone suffers through its use, they cannot come back and sue you. You also have to alert anyone to whom you give the Snowball software to the fact that it is covered by the BSD license. - -We have not bothered to insert the licensing arrangement into the text of the Snowball software. - ---------------------------------------------------------- - -Name: libuv -License: MIT -Files: third_party/tensorpipe/third_party/libuv - -libuv is licensed for use as follows: - -==== -Copyright (c) 2015-present libuv project contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -==== - -This license applies to parts of libuv originating from the -https://github.com/joyent/libuv repository: - -==== - -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - -==== - -This license applies to all parts of libuv that are not externally -maintained libraries. - -The externally maintained libraries used by libuv are: - - - tree.h (from FreeBSD), copyright Niels Provos. Two clause BSD license. - - - inet_pton and inet_ntop implementations, contained in src/inet.c, are - copyright the Internet Systems Consortium, Inc., and licensed under the ISC - license. - - - stdint-msvc2008.h (from msinttypes), copyright Alexander Chemeris. Three - clause BSD license. - - - pthread-fixes.c, copyright Google Inc. and Sony Mobile Communications AB. - Three clause BSD license. - - - android-ifaddrs.h, android-ifaddrs.c, copyright Berkeley Software Design - Inc, Kenneth MacKay and Emergya (Cloud4all, FP7/2007-2013, grant agreement - n° 289016). Three clause BSD license. - ---------------------------------------------------------- - -Name: miniz-2.1.0 -License: MIT -Files: third_party/miniz-2.1.0 - -Copyright 2013-2014 RAD Game Tools and Valve Software -Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC - -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ---------------------------------------------------------- - -Name: mimalloc -License: MIT -Files: third_party/mimalloc - -MIT License - -Copyright (c) 2018-2021 Microsoft Corporation, Daan Leijen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---------------------------------------------------------- - -Name: mkl-dnn -License: Apache-2.0 -Files: third_party/ideep/mkl-dnn - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - ============================================================================ - - Copyright 2016-2023 Intel Corporation - Copyright 2018 YANDEX LLC - Copyright 2019-2023 FUJITSU LIMITED - Copyright 2020-2023 Arm Ltd. and affiliates - Copyright 2020-2022 Codeplay Software Limited - Copyright 2021 Alanna Tempest - Copyright 2022-2023 IBM Corporation - Copyright 2023 KNS Group LLC (YADRO) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - This distribution includes third party software ("third party programs"). - This third party software, even if included with the distribution of - the Intel software, may be governed by separate license terms, including - without limitation, third party license terms, other Intel software license - terms, and open source software license terms. These separate license terms - govern your use of the third party programs as set forth in the - "THIRD-PARTY-PROGRAMS" file. - ---------------------------------------------------------- - -Name: ms-gsl -License: MIT -Files: third_party/opentelemetry-cpp/third_party/ms-gsl - -Copyright (c) 2015 Microsoft Corporation. All rights reserved. - -This code is licensed under the MIT License (MIT). - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ---------------------------------------------------------- - -Name: nccl -License: BSD-3-Clause -Files: third_party/nccl/nccl - - - Copyright (c) 2015-2020, NVIDIA CORPORATION. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of NVIDIA CORPORATION, Lawrence Berkeley National - Laboratory, the U.S. Department of Energy, nor the names of their - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 COPYRIGHT OWNER 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. - - The U.S. Department of Energy funded the development of this software - under subcontract 7078610 with Lawrence Berkeley National Laboratory. - - -This code also includes files from the NVIDIA Tools Extension SDK project. - -See: - - https://github.com/NVIDIA/NVTX - -for more information and license details. - ---------------------------------------------------------- - -Name: onnx -License: Apache-2.0 -Files: third_party/onnx - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------- - -Name: OpenBLAS -License: 3-clause BSD -Files: .libs/libopenb*.so - -Copyright (c) 2011-2014, The OpenBLAS Project -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 following disclaimer. - - 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 name of the OpenBLAS project nor the names of - its contributors may be used to endorse or promote products - derived from this software without specific prior written - permission. - -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 COPYRIGHT OWNER 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. - - ---------------------------------------------------------- - -Name: opentelemetry-cpp -License: Apache-2.0 -Files: third_party/opentelemetry-cpp - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------- - -Name: opentelemetry-proto -License: Apache-2.0 -Files: third_party/opentelemetry-cpp/third_party/opentelemetry-proto - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------- - -Name: opentracing-cpp -License: Apache-2.0 -Files: third_party/opentelemetry-cpp/third_party/opentracing-cpp - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright The OpenTracing Authors - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------- - -Name: pdcurses -License: Apache-2.0 -Files: third_party/opentelemetry-cpp/tools/vcpkg/ports/pdcurses - -The core package is in the public domain, but small portions of PDCurses are subject to copyright under various licenses. - -The win32 files are released to the public domain. - -If you use PDCurses in an application, an acknowledgement would be appreciated, but is not mandatory. If you make corrections or enhancements to PDCurses, please forward them to the current maintainer for the benefit of other users. - -This software is provided AS IS with NO WARRANTY whatsoever. - ---------------------------------------------------------- - -Name: pfs -License: Apache-2.0 -Files: third_party/kineto/libkineto/third_party/dynolog/third_party/pfs - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2020-present Daniel Trugman - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------- - -Name: physac -License: MIT -Files: third_party/opentelemetry-cpp/tools/vcpkg/ports/physac - -MIT License - -Copyright (c) 2022 Víctor Fisac - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---------------------------------------------------------- - -Name: pocketfft -License: BSD-3-Clause -Files: third_party/pocketfft - -Copyright (C) 2010-2018 Max-Planck-Society -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -* 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. -* Neither the name of the copyright holder nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: pqp -License: Apache-2.0 -Files: third_party/opentelemetry-cpp/tools/vcpkg/ports/pqp - -Copyright 1999 University of North Carolina at Chapel Hill. -All rights reserved. - -Permission to use, copy, modify, and distribute this software and its -documentation for educational, research, and non-profit purposes, without fee, -and without a written agreement is hereby granted, provided that the above -copyright notice and the following three paragraphs appear in all copies. - -IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE LIABLE TO -ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, -INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS -DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL HAS -BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL SPECIFICALLY DISCLAIMS ANY -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED -HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT -CHAPEL HILL HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, -ENHANCEMENTS, OR MODIFICATIONS. - -The authors may be contacted via: - -US Mail: Eric Larsen, Stefan Gottschalk - Department of Computer Science - Sitterson Hall, CB #3175 - University of North Carolina - Chapel Hill, NC 27599-3175 - -Phone: (919) 962-1749 - -Email: geom@cs.unc.edu - ---------------------------------------------------------- - -Name: prometheus-cpp -License: MIT -Files: third_party/opentelemetry-cpp/third_party/prometheus-cpp - -MIT License - -Copyright (c) 2016-2021 Jupp Mueller -Copyright (c) 2017-2022 Gregor Jasny - -And many contributors, see -https://github.com/jupp0r/prometheus-cpp/graphs/contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---------------------------------------------------------- - -Name: protobuf -License: BSD-3-Clause -Files: third_party/protobuf - -Copyright 2008 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 COPYRIGHT -OWNER 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. - -Code generated by the Protocol Buffer compiler is owned by the owner -of the input file used when generating it. This code is not -standalone and requires a support library to be linked with it. This -support library is itself covered by the above license. - ---------------------------------------------------------- - -Name: psimd -License: MIT -Files: third_party/psimd - -The MIT License (MIT) - -Copyright (c) 2017 Facebook Inc. -Copyright (c) 2014-2017 Georgia Institute of Technology -Copyright 2019 Google LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------------------------- - -Name: pthreadpool -License: BSD-2-Clause -Files: third_party/pthreadpool - -Copyright 2019 Google LLC -Copyright (c) 2017 Facebook Inc. -Copyright (c) 2015-2017 Georgia Institute of Technology -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* 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. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: pybind11 -License: BSD-3-Clause -Files: third_party/onnx/third_party/pybind11, - third_party/onnx-tensorrt/third_party/onnx/third_party/pybind11, - third_party/pybind11, - third_party/tensorpipe/third_party/pybind11 - -Copyright (c) 2016 Wenzel Jakob , 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 following disclaimer. - -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 name of the copyright holder nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -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 COPYRIGHT HOLDER 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. - -Please also refer to the file .github/CONTRIBUTING.md, which clarifies licensing of -external contributions to this project including patches, pull requests, etc. - ---------------------------------------------------------- - -Name: python -License: BSD-3-Clause -Files: third_party/cutlass/python - -Copyright (c) 2017 - 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -SPDX-License-Identifier: BSD-3-Clause - -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 following disclaimer. - -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 name of the copyright holder nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: python-peachpy -License: BSD-2-Clause -Files: third_party/python-peachpy - -============================== -PeachPy license (2-clause BSD) -============================== - -Copyright (c) 2017, Facebook Inc. -Copyright (c) 2013-2017, Georgia Institute of Technology -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 following disclaimer. - -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. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: sigslot -License: Apache-2.0 -Files: third_party/opentelemetry-cpp/tools/vcpkg/ports/sigslot - -License -The sigslot library has been placed in the public domain. This means that you are free to use it however you like. - -The author takes no responsibility or liability of any kind for any use that you may make of this library. - -If you screw up, it's your fault. - -If the library screws up, you got it for free, so you should have tested it better - it's still your responsibility. - ---------------------------------------------------------- - -Name: sleef -License: BSL-1.0 -Files: third_party/sleef - For details, see: third_party/sleef/LICENSE.txt - -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - ---------------------------------------------------------- - -Name: swift -License: Apache-2.0 -Files: third_party/flatbuffers/swift - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---------------------------------------------------------- - -Name: tb_plugin -License: BSD-3-Clause -Files: third_party/kineto/tb_plugin - -BSD License - -For Kineto software - -Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. - -All contributions by Microsoft: -Copyright (c) Microsoft Corporation. (The Azure AI Platform team) - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * 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. - - * Neither the name Facebook nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: tensorflow-common -License: MIT -Files: third_party/opentelemetry-cpp/tools/vcpkg/ports/tensorflow-common - -Copyright (c) Microsoft Corporation - -All rights reserved. - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---------------------------------------------------------- - -Name: tensorpipe -License: BSD-3-Clause -Files: third_party/tensorpipe - -BSD License - -For TensorPipe software - -Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * 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. - - * Neither the name Meta nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: test -License: MIT with exception -Files: third_party/kineto/libkineto/third_party/dynolog/third_party/cpr/test - -This license applies to everything inside this directory and all -subdirectories. - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. - ---------------------------------------------------------- - -Name: variant -License: BSD-3-Clause -Files: third_party/opentelemetry-cpp/third_party/opentracing-cpp/3rd_party/include/opentracing/variant - -Copyright (c) MapBox -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -- 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. -- Neither the name "MapBox" nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - -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 COPYRIGHT HOLDER 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. - ---------------------------------------------------------- - -Name: vcpkg -License: MIT -Files: third_party/opentelemetry-cpp/tools/vcpkg - -MIT License - -Copyright (c) Microsoft Corporation - -Permission is hereby granted, free of charge, to any person obtaining a copy of this -software and associated documentation files (the "Software"), to deal in the Software -without restriction, including without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be included in all copies -or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------------------------- - -Name: vulkan -License: Apache-2.0 with exception -Files: third_party/opentelemetry-cpp/tools/vcpkg/ports/vulkan - -/* -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - - -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and -You must cause any modified files to carry prominent notices stating that You changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. -You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -=============================================================================================================================================== - -/Copyright (C) 2012 LunarG, Inc. -//All rights reserved. -// -//Redistribution and use in source and binary forms, with or without -//modification, are permitted provided that the following conditions -//are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// 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. -// -// Neither the name of LunarG Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -//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 -//COPYRIGHT HOLDERS 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. - -=============================================================================================================================================== - -#============================================================================= -# Copyright 2007-2009 Kitware, Inc. -# Copyright 2007-2008 Miguel A. Figueroa-Villanueva -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright_cmake.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distributed this file outside of CMake, substitute the full -# License text for the above reference.) - - -============================================================================================================================================== - -// -// Copyright (C) 2015-2018 Google, Inc. -// Copyright (C) -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// 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. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// 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 -// COPYRIGHT HOLDERS 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. -// - -========================================================================================================================================== - -Note: This license has also been called the "New BSD License" or "Modified BSD License". See also the 2-clause BSD License. -Copyright -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 following disclaimer. -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 name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -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 COPYRIGHT HOLDER 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. - - -========================================================================================================================================== - -/* -* xxHash - Fast Hash algorithm -* Copyright (C) 2012-2016, Yann Collet -* -* BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are -* met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * 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. -* -* 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 COPYRIGHT -* OWNER 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. -* -* You can contact the author at : -* - xxHash homepage: http://www.xxhash.com -* - xxHash source repository : https://github.com/Cyan4973/xxHash -*/ - - -=========================================================================================================================================== - -# Copyright (C) 2018 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 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. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# 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 -# COPYRIGHT HOLDERS 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. - -========================================================================================================================================== - -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison implementation for Yacc-like parsers in C -Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains -part or all of the Bison parser skeleton and distribute that work -under terms of your choice, so long as that work isn't itself a -parser generator using the skeleton or a modified version thereof -as a parser skeleton. Alternatively, if you modify or redistribute -the parser skeleton itself, you may (at your option) remove this -special exception, which will cause the skeleton and the resulting -Bison output files to be licensed under the GNU General Public -License without this special exception. -This special exception was added by the Free Software Foundation in -version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by -simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid -infringing on user name space. This should be done even for local -variables, as they might otherwise be expanded by user macros. -There are some unavoidable exceptions within include files to -define necessary library symbols; they are noted "INFRINGES ON -USER NAME SPACE" below. */ - -============================================================================================================================================== - -copyright : [ -Copyright (c) 2017 The Khronos Group Inc., -, -Permission is hereby granted, free of charge, to any person obtaining a copy, -of this software and/or associated documentation files (the \Materials\"),", -to deal in the Materials without restriction, including without limitation, -the rights to use, copy, modify, merge, publish, distribute, sublicense,, -and/or sell copies of the Materials, and to permit persons to whom the, -Materials are furnished to do so, subject to the following conditions:, -, -The above copyright notice and this permission notice shall be included in, -all copies or substantial portions of the Materials., -, -MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS, -STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND, -HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ , -, -THE MATERIALS ARE PROVIDED \AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS", -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL, -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER, -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING, -FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS, -IN THE MATERIALS. - -============================================================================================================================================= - -CMake - Cross Platform Makefile Generator -Copyright 2000-2009 Kitware, Inc., Insight Software Consortium -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -* Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -* 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. - -* Neither the names of Kitware, Inc., the Insight Software Consortium, -nor the names of their contributors may be used to endorse or promote -products derived from this software without specific prior written -permission. - -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 COPYRIGHT -HOLDER 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. - ------------------------------------------------------------------------------- - -The above copyright and license notice applies to distributions of -CMake in source and binary form. Some source files contain additional -notices of original copyright by their contributors; see each source -for details. Third-party software packages supplied with CMake under -compatible licenses provide their own copyright notices documented in -corresponding subdirectories. - ------------------------------------------------------------------------------- - -CMake was initially developed by Kitware with the following sponsorship: - -* National Library of Medicine at the National Institutes of Health -as part of the Insight Segmentation and Registration Toolkit (ITK). - -* US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel -Visualization Initiative. - -* National Alliance for Medical Image Computing (NAMIC) is funded by the -National Institutes of Health through the NIH Roadmap for Medical Research, -Grant U54 EB005149. - -* Kitware, Inc. - -======================================================================================================================================== - -The authors of this software are Rob Pike and Ken Thompson. -* Copyright (c) 2002 by Lucent Technologies. -* Permission to use, copy, modify, and distribute this software for any -* purpose without fee is hereby granted, provided that this entire notice -* is included in all copies of any software which is or includes a copy -* or modification of this software and in all copies of the supporting -* documentation for such software. -* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED -* WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY -* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY -* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - - -======================================================================================================================================== - -Copyright (c) 2015-2018 Baldur Karlsson - -Copyright (c) 2014 Crytek - -Copyright (c) 1998-2018 Third party code and tools - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -========================================================================================================================================= - -/* -Copyright (c) 2009 Dave Gamble -Copyright (c) 2015-2016 The Khronos Group Inc. -Copyright (c) 2015-2016 Valve Corporation -Copyright (c) 2015-2016 LunarG, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -=========================================================================================================================================== - -Copyright (c) 2005 - 2017 G-Truc Creation - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - - -========================================================================================================================================== - -/* -The JsonCpp library's source code, including accompanying documentation, -tests and demonstration applications, are licensed under the following -conditions... -The author (Baptiste Lepilleur) explicitly disclaims copyright in all -jurisdictions which recognize such a disclaimer. In such jurisdictions, -this software is released into the Public Domain. -In jurisdictions which do not recognize Public Domain property (e.g. Germany as of -2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is -released under the terms of the MIT License (see below). -In jurisdictions which recognize Public Domain property, the user of this -software may choose to accept it either as 1) Public Domain, 2) under the -conditions of the MIT License (see below), or 3) under the terms of dual -Public Domain/MIT License conditions described here, as they choose. -The MIT License is about as close to Public Domain as a license can get, and is -described in clear, concise terms at: -http://en.wikipedia.org/wiki/MIT_License - -The full text of the MIT License follows: - -Copyright (c) 2007-2010 Baptiste Lepilleur -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -========================================================================================================================================== - -/** -* `murmurhash.h' - murmurhash -* -* copyright (c) 2014 joseph werle -* Copyright (c) 2015-2016 The Khronos Group Inc. -* Copyright (c) 2015-2016 Valve Corporation -* Copyright (c) 2015-2016 LunarG, Inc. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and/or associated documentation files (the "Materials"), to -* deal in the Materials without restriction, including without limitation the -* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -* sell copies of the Materials, and to permit persons to whom the Materials are -* furnished to do so, subject to the following conditions: -* -* The above copyright notice(s) and this permission notice shall be included in -* all copies or substantial portions of the Materials. -* -* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE -* USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -========================================================================================================================================= - -Licenced as X11: http://www.kryogenix.org/code/browser/licence.html -This basically means: do what you want with it. - -========================================================================================================================================= - -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/common.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - - -========================================================================================================================================== - -// LICENSE -// -// This software is in the public domain. Where that dedication is not -// recognized, you are granted a perpetual, irrevocable license to copy, -// distribute, and modify this file as you see fit. -// - -========================================================================================================================================== - -Simple DirectMedia Layer -Copyright (C) 1997-2018 Sam Lantinga - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not -claim that you wrote the original software. If you use this software -in a product, an acknowledgment in the product documentation would be -appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - -========================================================================================================================================= - -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -NVIDIA Software), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ - -================================================================================================================================================== - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - - -================================================================================================================================================== - -GNU LESSER GENERAL PUBLIC LICENSE -Version 3, 29 June 2007 - -Copyright (C) 2007 Free Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - -This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. - -0. Additional Definitions. - -As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. - -"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. - -An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. - -A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". - -The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. - -The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. - -1. Exception to Section 3 of the GNU GPL. - -You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. - -2. Conveying Modified Versions. - -If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: - -a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or -b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. -3. Object Code Incorporating Material from Library Header Files. - -The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: - -a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. -b) Accompany the object code with a copy of the GNU GPL and this license document. -4. Combined Works. - -You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: - -a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. -b) Accompany the Combined Work with a copy of the GNU GPL and this license document. -c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. -d) Do one of the following: -0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. -1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. -e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) -5. Combined Libraries. - -You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: - -a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. -b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. -6. Revised Versions of the GNU Lesser General Public License. - -The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. - -If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. - -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- From 35b82f6b3d668f20e33155776b313a18a3a5acaa Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:54:17 -0600 Subject: [PATCH 15/17] Fix code comments. --- src/oracledb/connection.py | 8 ++++---- utils/templates/connection.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/oracledb/connection.py b/src/oracledb/connection.py index bd696a1..31053a5 100644 --- a/src/oracledb/connection.py +++ b/src/oracledb/connection.py @@ -812,7 +812,7 @@ def fetch_df_all( arraysize: Optional[int] = None, ): """ - Fetch all data as OracleDataFrame. + Fetch all data as an instance of DataFrame. """ cursor = self.cursor() cursor._impl.fetching_arrow = True @@ -829,7 +829,7 @@ def fetch_df_batches( size: Optional[int] = None, ): """ - Fetch data in batches. Each batch is an OracleDataFrame + Fetch data in batches. Each batch is an instance of DataFrame """ cursor = self.cursor() cursor._impl.fetching_arrow = True @@ -1837,7 +1837,7 @@ async def fetch_df_all( arraysize: Optional[int] = None, ): """ - Fetch all data as OracleDataFrame. + Fetch all data as an instance of DataFrame. """ cursor = self.cursor() cursor._impl.fetching_arrow = True @@ -1854,7 +1854,7 @@ async def fetch_df_batches( size: Optional[int] = None, ): """ - Fetch data in batches. Each batch is an OracleDataFrame + Fetch data in batches. Each batch is an instance of DataFrame """ cursor = self.cursor() cursor._impl.fetching_arrow = True diff --git a/utils/templates/connection.py b/utils/templates/connection.py index fd2599c..f137f3b 100644 --- a/utils/templates/connection.py +++ b/utils/templates/connection.py @@ -810,7 +810,7 @@ def fetch_df_all( arraysize: Optional[int] = None, ): """ - Fetch all data as OracleDataFrame. + Fetch all data as an instance of DataFrame. """ cursor = self.cursor() cursor._impl.fetching_arrow = True @@ -827,7 +827,7 @@ def fetch_df_batches( size: Optional[int] = None, ): """ - Fetch data in batches. Each batch is an OracleDataFrame + Fetch data in batches. Each batch is an instance of DataFrame """ cursor = self.cursor() cursor._impl.fetching_arrow = True @@ -1583,7 +1583,7 @@ async def fetch_df_all( arraysize: Optional[int] = None, ): """ - Fetch all data as OracleDataFrame. + Fetch all data as an instance of DataFrame. """ cursor = self.cursor() cursor._impl.fetching_arrow = True @@ -1600,7 +1600,7 @@ async def fetch_df_batches( size: Optional[int] = None, ): """ - Fetch data in batches. Each batch is an OracleDataFrame + Fetch data in batches. Each batch is an instance of DataFrame """ cursor = self.cursor() cursor._impl.fetching_arrow = True From 6885890dabc9a658bea2e95c7a256d0eb0b116aa Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:54:32 -0600 Subject: [PATCH 16/17] Ensure that the GIL is held when releasing references to ArrowArray objects when exported Arrow buffers are released by the consumer. In some circumstances this could cause a segfault. --- doc/src/release_notes.rst | 3 +++ src/oracledb/impl/arrow/utils.pyx | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/src/release_notes.rst b/doc/src/release_notes.rst index e69dbb5..940a709 100644 --- a/doc/src/release_notes.rst +++ b/doc/src/release_notes.rst @@ -46,6 +46,9 @@ Common Changes ``ArrowArray`` objects are now available in Python plugins such as those found in VS Code - Upgraded Arrow C Data (nanoarrow) API version to 0.7.0 + - Ensure that the GIL is held when releasing references to ``ArrowArray`` + objects when exported Arrow buffers are released by the consumer. In + some circumstances this could cause a segfault. Note the data frame support in python-oracledb 3.3 is a pre-release, and may change in a future version diff --git a/src/oracledb/impl/arrow/utils.pyx b/src/oracledb/impl/arrow/utils.pyx index 8a2e32c..4e572b2 100644 --- a/src/oracledb/impl/arrow/utils.pyx +++ b/src/oracledb/impl/arrow/utils.pyx @@ -219,7 +219,8 @@ cdef int append_uint32_array(ArrowArray *arrow_array, cdef void arrow_buffer_dealloc_callback(ArrowBufferAllocator *allocator, - uint8_t *ptr, int64_t size): + uint8_t *ptr, + int64_t size) noexcept with gil: """ ArrowBufferDeallocatorCallback for an ArrowBuffer borrowed from an Arrow array. From 600feca1beffc3b13423e18671bb001c9a33b6e6 Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Fri, 11 Jul 2025 11:54:57 -0600 Subject: [PATCH 17/17] Fixed regression resulting in cursor leak (#513). --- doc/src/release_notes.rst | 4 ++++ src/oracledb/impl/thick/var.pyx | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/src/release_notes.rst b/doc/src/release_notes.rst index 940a709..b063392 100644 --- a/doc/src/release_notes.rst +++ b/doc/src/release_notes.rst @@ -33,6 +33,10 @@ Thin Mode Changes Thick Mode Changes ++++++++++++++++++ +#) Fixed regression resulting in cursor leak + (`issue 513 `__). + + Common Changes ++++++++++++++ diff --git a/src/oracledb/impl/thick/var.pyx b/src/oracledb/impl/thick/var.pyx index ab0475b..d5d95ae 100644 --- a/src/oracledb/impl/thick/var.pyx +++ b/src/oracledb/impl/thick/var.pyx @@ -120,8 +120,12 @@ cdef class ThickVarImpl(BaseVarImpl): ThickCursorImpl cursor_impl object cursor cursor = self._values[pos] - if cursor is None: - cursor = self._conn.cursor() + if cursor is not None: + cursor_impl = cursor._impl + if cursor_impl._handle == dbvalue.asStmt: + cursor_impl._fixup_ref_cursor = True + return cursor + cursor = self._conn.cursor() cursor_impl = cursor._impl if dpiStmt_addRef(dbvalue.asStmt) < 0: _raise_from_odpi()