Skip to content
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 psycopg2 dependency problem (temporary) #707

Merged
merged 1 commit into from Jul 21, 2021

Conversation

ramirezfranciscof
Copy link
Member

@ramirezfranciscof ramirezfranciscof commented Jul 21, 2021

A recent patch release of psycopg2 v2.8 has broken (at least) the continuous
integration tests suite. This was fixed in aiida-core v1.6.x but not (yet?)
backported to previous versions that are currently supported by this plugin.
This pin can be removed once a higher version of aiida-core is supported
or once psycopg2 has released a fix for these problems.

Copy link
Contributor

@sphuber sphuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ramirezfranciscof . Please provide a detailed commit message why this is introduced and when it can and should be removed.

setup.json Outdated
@@ -93,6 +93,7 @@
]
},
"install_requires": [
"psycopg2-binary~=2.8.3",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since all we really care about here is just an upper limit it is better to do just that. There is no need to also set a lower limit and can only introduce further problems.

Suggested change
"psycopg2-binary~=2.8.3",
"psycopg2-binary<2.9",

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the thing is that from what I understand, the problem was actually with a patch release of psycopg. See here, we did the following change:

- psycopg2-binary>=2.8.3,~=2.8
+ psycopg2-binary~=2.8.3

I don't know why we required >=2.8.3, but I understand ~=2.8 means that the problematic version was one of 2.8 patches, no?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope it was due to the new 2.9 release. The ~2.8 is identical to ==2.*,>=2.8, i.e., all versions of 2.x but at least 2.8. See here for details. So ~-2.8.3 indirectly fixes the problem because it implicitly says ==2.8.* which is equivalent to <2.9.

@ramirezfranciscof ramirezfranciscof changed the title Fix psycopg2 dependence (temporary) Fix psycopg2 dependency problem (temporary) Jul 21, 2021
@ramirezfranciscof
Copy link
Member Author

Please provide a detailed commit message why this is introduced and when it can and should be removed.

I edited the OP to add the message, I can also open an issue to leave as a reminder (this is what we did in aiida-core).

A recent release of `psycopg2 v2.9` has broken (at least) the
continuous integration tests suite. This was already fixed in
`aiida-core v1.6.x` but not (yet?) backported to previous versions
that are currently supported by this plugin.

This pin can be removed once a higher version of `aiida-core` is
supported or once `psycopg2` has released a fix for these problems.
@ramirezfranciscof
Copy link
Member Author

@sphuber ah, shoot, I misremembered how the symbols of the dependency specifications worked, sorry. I now changed the ~=2.8.3 to the preferred <2.9 and added the description directly in the commit message.

@sphuber sphuber merged commit 1b50690 into aiidateam:develop Jul 21, 2021
@ramirezfranciscof ramirezfranciscof deleted the tempfix branch July 21, 2021 13:30
bastonero pushed a commit to bastonero/aiida-quantumespresso that referenced this pull request Dec 20, 2021
A recent release of `psycopg2 v2.9` has broken (at least) the
continuous integration tests suite. This was already fixed in
`aiida-core v1.6.x` but not (yet?) backported to the last version
that support Python 3.6 which is still supported by this plugin.

This pin can be removed once a higher version of `aiida-core` is
supported or once `psycopg2` has released a fix for these problems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants