-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
Confusing entries in PyPI and at official website about psycopg #1632
Comments
Hi there 👋
The error was to call the Psycopg 2.0 Python module Fast forward several years, this convention is not employed anymore: even when there is a non-backward-compatible change, nowadays package names don't change. I didn't want to create There was a conversation about the topic a couple of years ago, when I proposed to use the naked
I know, for a newcomer is confusing, for 3 to 5 seconds, then you move on with your life. The benefit of not having the major number in the package name are more important than the little confusion. A major number in the package name is a convention used by almost no package (I count 4 in the top 100 PyPI packages as of right now).
The choice of having the binary package as an extra is a decision made after having tested several other options since 2017 and after considering the possibilities offered by Python packages metadata and the problem in which the users of the packages have incurred (see the bug tracker).
Every complex problem has a simple, and wrong, solution. 😛
You are right: we should dare updating that page. Psycopg2 is still the most used version of the package and several other libraries weren't ready for the interaction with Psycopg 3. But things are changing: Psycopg 3 is now used by several big depending libraries (Django, SQLAlchemy) and is the best choice for newer ones (FastAPI). The project is mature enough that we can stop considering psycopg2 the present and Psycopg 3 the future: it's probably time to consider psycopg2 the past and Psycopg 3 the present, and we should update that page accordingly. |
@pythonaddict thank you again for your feedback regarding the 2 vs. 3 status. The point of view of someone fresh is useful. I have reorganised a few pages of the website, especially the features, which now offer a 2-to-3 comparison, and the install. If you have other feedback about what would help a newcomer to find their way, it would be welcome to know. Cheers! |
@dvarrazzo Thanks, I'm glad that I helped. Another confusion is at PyPI. There are 2 entries at pyPI:
And at neither of the entries they mention about each other. So, it is confusing too. One may be confused which version to choose. I think at psycopg2's "Project description" page at PyPI, there should be some info at the top about psycopg3, something like this: "There's a better and improved version of psycopg2: psycopg 3. Please visit this link for more information" And at psycopg3's "Project description" page at PyPI, at the top there should be something like this: "This is the latest version of psycopg. For the legacy version psycopg2, please visit this link." |
Yes, that sounds a good idea, thank you. I will try and mention something in that direction in the readme that is rendered on pypi (but it will have to wait for the next release to be published there unfortunately). |
When you search "psycopg" in PyPI search bar, you see many results. Top 2 results are:
Both packages are written by same authors.
Even though psycopg 3.1.12 is named "pyscopg" at PyPI, it points to the 3rd version of psycopg. So, "psycopg" represents the 3rd and the newer version. But there is also "psycopg2", it points to the 2nd version.
But when you say "psycopg2", one thinks that it's newer than "psycopg". But actually psycopg is the newer and more improved version of psycopg2.
And when you want to install "psycopg3", you have to type pip install "psycopg[binary]", which is also weird. Why not just type pip install pyscopg or pip install pyscopg3?
Another confusion is at https://www.psycopg.org/. This is official pyscopg website:
On the home page, Latest Articles section, it says:
So, the official website is informing people about the psycopg 3. One thinks psycopg 3 is the latest version that the development team is currently working on. However, at "Install" section at home page menu bar , it says:
It tells you about the installation of "psycopg2" (the 2nd version of the library". It doesn't mention anything about how to install psycopg 3. So, one thinks that the official website wants you to install psycopg 2, not pyscopg 3!
I hope these confusions are eliminated.
The text was updated successfully, but these errors were encountered: