-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix validation for postgresql+psycopg2 #5
base: main
Are you sure you want to change the base?
Conversation
Fixed validation for postgresql+psycopg2
Fixed validation for postgresql+psycopg2
Hello, You can extend:
Currently such tests failed If code will be adjusted, and those tests will be fulfilled then pull request can be merged. Thanks in advance :) |
Sorry, I included .vscode/settings by mistake. |
@@ -19,6 +19,7 @@ | |||
"legacy (2022)": [ | |||
"SQLAlchemy==2.0.0", | |||
"psycopg==3.0.18", | |||
"psycopg2==2.9.9", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortanatelly it will not be enough
It will fulfill tests but not because it works.
In fact works because is already psycopg installed in base file
if you remove psycopg
you will observe crash.
You can check the way I suggested:
PACKAGES_VERSIONS = {
(...)
"psycopg2 (2024)": [
"SQLAlchemy==2.0.0",
"psycopg2==2.9.9",
"PyMySQL==1.0.2",
"alembic==1.8.0",
"psycopg==None",
],
}
(...)
for package_version, packages in PACKAGES_VERSIONS.items():
install_dependencies_command = ""
for package in packages:
if package.endswith("==None"):
install_dependencies_command += f"poetry remove {package.split('==')[0]} &&"
else:
install_dependencies_command += f"poetry add {package} &&"
then you will observe failure, as psycopg2 is not used in such case.
It will need a little more work to make it stable.
Fix validation for postgresql+psycopg2