You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Matthew Bowden (Jira)" <ji...@apache.org> on 2019/11/10 22:33:00 UTC

[jira] [Created] (AIRFLOW-5888) Use psycopg2-binary package

Matthew Bowden created AIRFLOW-5888:
---------------------------------------

             Summary: Use psycopg2-binary package
                 Key: AIRFLOW-5888
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5888
             Project: Apache Airflow
          Issue Type: Improvement
          Components: dependencies
    Affects Versions: 1.10.6, 1.10.5, 1.10.4
            Reporter: Matthew Bowden
            Assignee: Matthew Bowden
             Fix For: 1.10.7


This requirement was pinned as of PR 5036, as related to a breaking change with respect to the package namespace. This PR modifies which package to refer to - prior to 2.8 the package was a binary wheel, but with 2.8+ the appropriate installation package is {{psycopg2-binary}}
h3. Explanation:

[Full explanation here|http://initd.org/psycopg/articles/2018/02/08/psycopg-274-released/]
For most of psycopg2's history, they had distributed pre-compiled binaries (or "wheels") which would get installed when you did {{pip install psycopg2}} (rather than compiling the source code upon installation). At some point psycopg2 found that there were some segfault issues that were appearing in the pre-compiled versions. Granted, this could be fixed if you installed by explicitly saying you wanted to compile from source rather than retrieve the binary version, but the psycopg2 devs felt that this would be better addressed by publishing a separate package that was the pre-compiled binary, while keeping the original package as compile-from-source only. The upshot of this is that everyone who was used to installing {{psycopg2}} and getting the pre-compiled binaries was now having to compile the package on install unless they moved over to {{psycopg2-binary}} instead. The packages are effectively the same, only the pre-compiled versions are usually more optimized, run quicker on the systems they're build for, and don't require compilation dependencies to install. So, in accordance with the warning provided by psycopg2 ({{UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead.}}), I've swapping this over to psycopg2-binary.

I've also confirmed that {{psycopg2-binary}} is available from {{2.7.4}} onwards:
$ pip install psycopg2-binary== Collecting psycopg2-binary== ERROR: Could not find a version that satisfies the requirement psycopg2-binary== (from versions: 2.7.4, 2.7.5, 2.7.6, 2.7.6.1, 2.7.7, 2.8, 2.8.1, 2.8.2, 2.8.3, 2.8.4) ERROR: No matching distribution found {color:#d73a49}for{color} psycopg2-binary==



--
This message was sent by Atlassian Jira
(v8.3.4#803005)