diff options
Diffstat (limited to 'dev-python/agate-sql')
-rw-r--r-- | dev-python/agate-sql/Manifest | 6 | ||||
-rw-r--r-- | dev-python/agate-sql/agate-sql-0.5.9-r1.ebuild | 40 | ||||
-rw-r--r-- | dev-python/agate-sql/agate-sql-0.5.9.ebuild | 38 | ||||
-rw-r--r-- | dev-python/agate-sql/agate-sql-0.6.0.ebuild | 38 | ||||
-rw-r--r-- | dev-python/agate-sql/files/agate-sql-0.5.9-sqlalchemy.patch | 75 |
5 files changed, 0 insertions, 197 deletions
diff --git a/dev-python/agate-sql/Manifest b/dev-python/agate-sql/Manifest index e8cee6d2ae5f..f6778cec2abe 100644 --- a/dev-python/agate-sql/Manifest +++ b/dev-python/agate-sql/Manifest @@ -1,9 +1,3 @@ -AUX agate-sql-0.5.9-sqlalchemy.patch 3565 BLAKE2B 97b1846e0b825c4fd4ac38e6eb773525be4c6be80b38f05d965177d21bd4744519a75282b90a9d78dc524a3f65a0c34cd9bb2d0a85d5bcea8a76844ed2ba2be8 SHA512 8124f08c2087aabfbe231d353c2eeda290c1bfe33c6f6137cadeabcc144168e8295ad492815fe4143bc64c11ea14a02556a243ac93389bcfaccd8e152cffc025 -DIST agate-sql-0.5.9.tar.gz 15434 BLAKE2B 4825bfc5d0f78e0cd1bf318fe8797bfe03deaff1ffc962e0f082128af9d05afad97b7488d66b76d59411eb5dd889229be1fe05cf5bf55db4084f3451b21440b2 SHA512 482f257bb16e142d9380b9ae7590f50909639729e229271843686d6316ebfba0e77daac47e809b7aad4ef89d6c3810382d0b6817a418406bf73f13e266e5bcca -DIST agate-sql-0.6.0.tar.gz 13942 BLAKE2B c7940274a8625585fa92c81fdd1d2e2f53e76db3b14620e406df7609057482f8641cfcf20a486bf6f8db381362ee367b4dad9b6a7f04909f5cba4c491d01fde9 SHA512 74e90dad3776f817e92ded312cdf87c78754e9a3b5611a681a4a85d7a8357577a9e4dbb70b453c589417990f3f0a04195a8b0076fd03a1e2012b82893208b824 DIST agate-sql-0.7.0.tar.gz 13488 BLAKE2B 1064747f1f2a11f788c0828123ae3532ffd0aa6b32aa423b877e350e35e4231c21e73226920110ad9369b0b583167e47357acf456607e75e0ad9d5027e265c9c SHA512 6a29bcb19cac6e80a6df8ad51c06838fa4c48a1e5b207a55f7ebaf3b7af1afd56fad61c560f4c7a11da24e9460ab0a8ea6d9459309e05ac162f3ddd3737bb868 -EBUILD agate-sql-0.5.9-r1.ebuild 847 BLAKE2B f2f1ff98f2d876353f74d0e563f448425d945b3df5b867ee662dfe6f303df3f55966a9da68a743ffa2a21d502f8fd66717b3f23e54926aaf68a68be6c1411f13 SHA512 2a71717220b7dfac06139526ced91d8c0135da0fdd8119b2b0fd540b2fc7647a6edae828819ff3cd2999da70db0181285634612fd0e02f763b250bee2a678e15 -EBUILD agate-sql-0.5.9.ebuild 786 BLAKE2B 7e090d37390a6b2926198eb6f5fa96941f4ec536bc066e1fffbdddb1bb9edd8b99efd50bb05746c3ca888ffbb34d04c26ccb016c36406d6990e4558a02f3b04e SHA512 6a6a99e9667180cef8c0f7d5ea229d2c1d039978b05dcb7de65c879725743537423a2fb8e98190f88c358089125cd8dd713c49aa55235c13366c06d59f29d71c -EBUILD agate-sql-0.6.0.ebuild 790 BLAKE2B e15cce0203a7e7a23d660c40202752f4c271682f2869b8f3acbd36e8f370a4c996ee4b79025be4a913643a4315f03a850b53e8a7a8d30499fa4b71bb6762289d SHA512 f604bc1e5dd7e9122762a23d4a32219715308917d6b49d5e3b861b65f4a5d914ba9df3fadd22309fedb10fa68349f77093b927937657654624d9334c2894c698 EBUILD agate-sql-0.7.0.ebuild 790 BLAKE2B e15cce0203a7e7a23d660c40202752f4c271682f2869b8f3acbd36e8f370a4c996ee4b79025be4a913643a4315f03a850b53e8a7a8d30499fa4b71bb6762289d SHA512 f604bc1e5dd7e9122762a23d4a32219715308917d6b49d5e3b861b65f4a5d914ba9df3fadd22309fedb10fa68349f77093b927937657654624d9334c2894c698 MISC metadata.xml 638 BLAKE2B aa62813cba6c3eb26352e63e05a9a5e00817049dec03befd4df97c6f7b1a01bc142440813c8ad5a67cdebc0e3cb72a8d272f96a59758547709bca11131092cee SHA512 916aea41b52015c5d57d052fc9908dc711a3e600b585dbb92f604846af9222243b7acddb04042e67567aefc9d7d976a69bbecf10e328691e04ac028dc58c5a08 diff --git a/dev-python/agate-sql/agate-sql-0.5.9-r1.ebuild b/dev-python/agate-sql/agate-sql-0.5.9-r1.ebuild deleted file mode 100644 index b74f616a7459..000000000000 --- a/dev-python/agate-sql/agate-sql-0.5.9-r1.ebuild +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 2021-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYPI_NO_NORMALIZE=1 -PYTHON_COMPAT=( python3_{9..11} ) - -inherit distutils-r1 pypi - -DESCRIPTION="Adds SQL read/write support to agate" -HOMEPAGE=" - https://github.com/wireservice/agate-sql/ - https://pypi.org/project/agate-sql/ -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~arm64-macos ~x64-macos" - -RDEPEND=" - >=dev-python/agate-1.5.0[${PYTHON_USEDEP}] - >=dev-python/sqlalchemy-1.4[${PYTHON_USEDEP}] -" -BDEPEND=" - test? ( - dev-python/greenlet[${PYTHON_USEDEP}] - dev-python/lxml[${PYTHON_USEDEP}] - ) -" - -PATCHES=("${FILESDIR}/agate-sql-0.5.9-sqlalchemy.patch") - -distutils_enable_tests pytest - -EPYTEST_DESELECT=( - # requires crate - tests/test_agatesql.py::TestSQL::test_to_sql_create_statement_with_dialects -) diff --git a/dev-python/agate-sql/agate-sql-0.5.9.ebuild b/dev-python/agate-sql/agate-sql-0.5.9.ebuild deleted file mode 100644 index 7d0761c8198b..000000000000 --- a/dev-python/agate-sql/agate-sql-0.5.9.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2021-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYPI_NO_NORMALIZE=1 -PYTHON_COMPAT=( python3_{9..11} ) - -inherit distutils-r1 pypi - -DESCRIPTION="Adds SQL read/write support to agate" -HOMEPAGE=" - https://github.com/wireservice/agate-sql/ - https://pypi.org/project/agate-sql/ -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~arm64-macos ~x64-macos" - -RDEPEND=" - >=dev-python/agate-1.5.0[${PYTHON_USEDEP}] - <dev-python/sqlalchemy-2[${PYTHON_USEDEP}] -" -BDEPEND=" - test? ( - dev-python/greenlet[${PYTHON_USEDEP}] - dev-python/lxml[${PYTHON_USEDEP}] - ) -" - -distutils_enable_tests pytest - -EPYTEST_DESELECT=( - # requires crate - tests/test_agatesql.py::TestSQL::test_to_sql_create_statement_with_dialects -) diff --git a/dev-python/agate-sql/agate-sql-0.6.0.ebuild b/dev-python/agate-sql/agate-sql-0.6.0.ebuild deleted file mode 100644 index cdbee2639143..000000000000 --- a/dev-python/agate-sql/agate-sql-0.6.0.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2021-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYPI_NO_NORMALIZE=1 -PYTHON_COMPAT=( python3_{10..11} ) - -inherit distutils-r1 pypi - -DESCRIPTION="Adds SQL read/write support to agate" -HOMEPAGE=" - https://github.com/wireservice/agate-sql/ - https://pypi.org/project/agate-sql/ -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~arm64-macos ~x64-macos" - -RDEPEND=" - >=dev-python/agate-1.5.0[${PYTHON_USEDEP}] - >=dev-python/sqlalchemy-1.4[${PYTHON_USEDEP}] -" -BDEPEND=" - test? ( - dev-python/greenlet[${PYTHON_USEDEP}] - dev-python/lxml[${PYTHON_USEDEP}] - ) -" - -distutils_enable_tests pytest - -EPYTEST_DESELECT=( - # requires crate - tests/test_agatesql.py::TestSQL::test_to_sql_create_statement_with_dialects -) diff --git a/dev-python/agate-sql/files/agate-sql-0.5.9-sqlalchemy.patch b/dev-python/agate-sql/files/agate-sql-0.5.9-sqlalchemy.patch deleted file mode 100644 index 46a12ab68c9e..000000000000 --- a/dev-python/agate-sql/files/agate-sql-0.5.9-sqlalchemy.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 90d5b8e220db51465e4dbac8df6e4bd4941c9ba6 Mon Sep 17 00:00:00 2001 -From: Steve Kowalik <steven@wedontsleep.org> -Date: Tue, 26 Sep 2023 11:59:39 +1000 -Subject: [PATCH] Migrate to SQLAlchemy 2 - -https://github.com/wireservice/agate-sql/pull/40 - -Remove the upper bound on SQLAlchemy by converting the code idioms in -use to support both SQLAlchemy 1.4 and SQLAlchemy 2, and only setting a -lower bound SQLAlchemy of >= 1.4. - -Closes #39 - -diff --git a/agatesql/table.py b/agatesql/table.py -index b141937..e4efe91 100644 ---- a/agatesql/table.py -+++ b/agatesql/table.py -@@ -82,2 +82,2 @@ def from_sql(cls, connection_or_string, table_name): -- metadata = MetaData(connection) -- sql_table = Table(table_name, metadata, autoload=True, autoload_with=connection) -+ metadata = MetaData() -+ sql_table = Table(table_name, metadata, autoload_with=connection) -@@ -113 +113 @@ def from_sql(cls, connection_or_string, table_name): -- s = select([sql_table]) -+ s = select(sql_table) -@@ -182 +182 @@ def make_sql_table(table, table_name, dialect=None, db_schema=None, constraints= -- metadata = MetaData(connection) -+ metadata = MetaData() -@@ -276,2 +276,3 @@ def to_sql(self, connection_or_string, table_name, overwrite=False, -- if overwrite: -- sql_table.drop(checkfirst=True) -+ with connection.begin(): -+ if overwrite: -+ sql_table.drop(bind=connection, checkfirst=True) -@@ -279 +280 @@ def to_sql(self, connection_or_string, table_name, overwrite=False, -- sql_table.create(checkfirst=create_if_not_exists) -+ sql_table.create(bind=connection, checkfirst=create_if_not_exists) -@@ -282,13 +283,14 @@ def to_sql(self, connection_or_string, table_name, overwrite=False, -- insert = sql_table.insert() -- for prefix in prefixes: -- insert = insert.prefix_with(prefix) -- if chunk_size is None: -- connection.execute(insert, [dict(zip(self.column_names, row)) for row in self.rows]) -- else: -- number_of_rows = len(self.rows) -- for index in range((number_of_rows - 1) // chunk_size + 1): -- end_index = (index + 1) * chunk_size -- if end_index > number_of_rows: -- end_index = number_of_rows -- connection.execute(insert, [dict(zip(self.column_names, row)) for row in -- self.rows[index * chunk_size:end_index]]) -+ with connection.begin(): -+ insert = sql_table.insert() -+ for prefix in prefixes: -+ insert = insert.prefix_with(prefix) -+ if chunk_size is None: -+ connection.execute(insert, [dict(zip(self.column_names, row)) for row in self.rows]) -+ else: -+ number_of_rows = len(self.rows) -+ for index in range((number_of_rows - 1) // chunk_size + 1): -+ end_index = (index + 1) * chunk_size -+ if end_index > number_of_rows: -+ end_index = number_of_rows -+ connection.execute(insert, [dict(zip(self.column_names, row)) for row in -+ self.rows[index * chunk_size:end_index]]) -@@ -354 +356 @@ def sql_query(self, query, table_name='agate'): -- rows = connection.execute(q) -+ rows = connection.exec_driver_sql(q) -diff --git a/setup.py b/setup.py -index 3905203..7257399 100644 ---- a/setup.py -+++ b/setup.py -@@ -37 +37 @@ setup( -- 'sqlalchemy<2', -+ 'sqlalchemy>=1.4', |