[ 
https://issues.apache.org/jira/browse/AIRFLOW-5888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16971251#comment-16971251
 ] 

ASF subversion and git services commented on AIRFLOW-5888:
----------------------------------------------------------

Commit b401759322d3e315fb23ace6c4ac996f6d1020eb in airflow's branch 
refs/heads/master from Matthew Bowden
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=b401759 ]

[AIRFLOW-5888] Use psycopg2-binary for postgres operations (#6533)



> 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.4, 1.10.5, 1.10.6
>            Reporter: Matthew Bowden
>            Assignee: Matthew Bowden
>            Priority: Major
>             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)

Reply via email to