From ef13d804e78ad0f0add86fc9a616a5fcb61db4c5 Mon Sep 17 00:00:00 2001 From: tonjo Date: Tue, 16 Apr 2024 13:11:33 +0200 Subject: [PATCH 1/3] Fixed validation for postgresql+psycopg2 Fixed validation for postgresql+psycopg2 --- redbeanpython/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redbeanpython/config.py b/redbeanpython/config.py index 6c8e5d7..fbbdb24 100644 --- a/redbeanpython/config.py +++ b/redbeanpython/config.py @@ -43,9 +43,9 @@ def migrations_directory(self) -> str: def _validate_dsn(self): dsn_driver = self.dsn.split(":")[0] - if dsn_driver not in ["sqlite", "mysql+pymysql", "postgresql+psycopg"]: + if dsn_driver not in ["sqlite", "mysql+pymysql", "postgresql+psycopg", "postgresql+psycopg2"]: raise ConfigurationError( - f"Unsupported driver: {dsn_driver}. Supported: 'sqlite', 'mysql+pymysql', 'postgresql+psycopg'" + f"Unsupported driver: {dsn_driver}. Supported: 'sqlite', 'mysql+pymysql', 'postgresql+psycopg', 'postgresql+psycopg2'" ) def _validate_directory(self): From 68ff17f00432cef93916b57d5a839967132e566e Mon Sep 17 00:00:00 2001 From: Antonio Mignolli Date: Wed, 17 Apr 2024 11:41:07 +0200 Subject: [PATCH 2/3] psycogp2 support --- .vscode/settings.json | 7 +++++++ tests/run_compatibility_tests.py | 1 + 2 files changed, 8 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..4e71205 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "workbench.colorCustomizations": { + "activityBar.background": "#442520", + "titleBar.activeBackground": "#5F342D", + "titleBar.activeForeground": "#FCF9F9" + } +} diff --git a/tests/run_compatibility_tests.py b/tests/run_compatibility_tests.py index 643866c..3a08909 100644 --- a/tests/run_compatibility_tests.py +++ b/tests/run_compatibility_tests.py @@ -19,6 +19,7 @@ "legacy (2022)": [ "SQLAlchemy==2.0.0", "psycopg==3.0.18", + "psycopg2==2.9.9", "PyMySQL==1.0.2", "alembic==1.8.0", ], From c712427e7ca12db18b473c321fabc95da1910c4a Mon Sep 17 00:00:00 2001 From: Antonio Mignolli Date: Wed, 17 Apr 2024 15:09:24 +0200 Subject: [PATCH 3/3] Remove .vscode files --- .vscode/settings.json | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 4e71205..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "workbench.colorCustomizations": { - "activityBar.background": "#442520", - "titleBar.activeBackground": "#5F342D", - "titleBar.activeForeground": "#FCF9F9" - } -}