diff --git a/cps/gdriveutils.py b/cps/gdriveutils.py index b82f13f1..f50a2f3f 100644 --- a/cps/gdriveutils.py +++ b/cps/gdriveutils.py @@ -174,30 +174,12 @@ class PermissionAdded(Base): return str(self.gdrive_id) -def migrate(): - if not engine.dialect.has_table(engine.connect(), "permissions_added"): - PermissionAdded.__table__.create(bind = engine) - for sql in session.execute(text("select sql from sqlite_master where type='table'")): - if 'CREATE TABLE gdrive_ids' in sql[0]: - currUniqueConstraint = 'UNIQUE (gdrive_id)' - if currUniqueConstraint in sql[0]: - sql=sql[0].replace(currUniqueConstraint, 'UNIQUE (gdrive_id, path)') - sql=sql.replace(GdriveId.__tablename__, GdriveId.__tablename__ + '2') - session.execute(sql) - session.execute(text("INSERT INTO gdrive_ids2 (id, gdrive_id, path) SELECT id, " - "gdrive_id, path FROM gdrive_ids;")) - session.commit() - session.execute(text('DROP TABLE %s' % 'gdrive_ids')) - session.execute(text('ALTER TABLE gdrive_ids2 RENAME to gdrive_ids')) - break - if not os.path.exists(cli_param.gd_path): try: Base.metadata.create_all(engine) except Exception as ex: log.error("Error connect to database: {} - {}".format(cli_param.gd_path, ex)) raise -migrate() def getDrive(drive=None, gauth=None): diff --git a/setup.cfg b/setup.cfg index 5a7bef7b..67d09ae8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -63,10 +63,10 @@ install_requires = [options.extras_require] gdrive = - google-api-python-client>=1.7.11,<2.78.0 + google-api-python-client>=1.7.11,<2.90.0 gevent>20.6.0,<23.0.0 greenlet>=0.4.17,<2.1.0 - httplib2>=0.9.2,<0.22.0 + httplib2>=0.9.2,<0.23.0 oauth2client>=4.0.0,<4.1.4 uritemplate>=3.0.0,<4.2.0 pyasn1-modules>=0.0.8,<0.3.0 @@ -76,7 +76,7 @@ gdrive = rsa>=3.4.2,<4.10.0 gmail = google-auth-oauthlib>=0.4.3,<0.9.0 - google-api-python-client>=1.7.11,<2.78.0 + google-api-python-client>=1.7.11,<2.90.0 goodreads = goodreads>=0.3.2,<0.4.0 python-Levenshtein>=0.12.0,<0.21.0 diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index 334cdf37..b6c10986 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
Start Time: 2023-03-25 19:54:15
+Start Time: 2023-03-26 21:21:07
Stop Time: 2023-03-26 03:41:52
+Stop Time: 2023-03-27 04:13:39
Duration: 5h 46 min
+Duration: 5h 49 min
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_gdrive.py", line 209, in test_convert_email - self.assertEqual(1, task_len) -AssertionError: 1 != 3-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_gdrive.py", line 244, in test_convert_failed_and_email - select.select_by_visible_text('AZW3') - File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/support/select.py", line 134, in select_by_visible_text - raise NoSuchElementException(f"Could not locate element with visible text: {text}") -selenium.common.exceptions.NoSuchElementException: Message: Could not locate element with visible text: AZW3-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_edit_books.py", line 415, in test_edit_language - self.assertEqual('German', values['languages'][1]) -AssertionError: 'German' != '\n German' -- German -+ - German-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 598, in test_edit_language - self.assertEqual('German', values['languages'][1]) -AssertionError: 'German' != '\n German' -- German -+ - German-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 902, in test_watch_metadata - self.assertTrue(button) -AssertionError: False is not true-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_edit_metadata_scholar.py", line 68, in test_load_metadata - self.assertEqual(30, len(results)) -AssertionError: 30 != 0-
Traceback (most recent call last): File "/home/ozzie/Development/calibre-web-test/test/test_thumbnails.py", line 310, in test_sideloaded_book self.assertAlmostEqual(diff(BytesIO(list_cover), BytesIO(old_list_cover), delete_diff_file=True), 0.0, -AssertionError: 0.006465888577653282 != 0.0 within 0.0001 delta (0.006465888577653282 difference)+AssertionError: 0.007374011826953003 != 0.0 within 0.0001 delta (0.007374011826953003 difference) @@ -5222,10 +5103,10 @@ AssertionError: 0.006465888577653282 != 0.0 within 0.0001 delta (0.0064658885776