Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 242336 - dev-python/psycopg 2.0.10 stabilization
Summary: dev-python/psycopg 2.0.10 stabilization
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-16 13:07 UTC by Nathan
Modified: 2009-05-01 18:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan 2008-10-16 13:07:16 UTC
I've been using psycopg 2.0.6, 2.0.7, and 2.0.8 as soon as each respective version was released upstream (I filed the bump requests for 2.0.7 and 2.0.8).  I use it in different ways across nearly two dozen Gentoo servers (a mixture of x86 and amd64, nearly evenly split) at my workplace.  I have experienced no problems other than upstream bugs (many of which have been fixed in .7 and .8).

Please stabilize the most recent version of psycopg as standard Gentoo procedure allows (I am not a Gentoo dev).  2.0.2 has many significant bugs which makes it unusable in a lot of non-trivial usage cases.
Comment 1 John McFarlane 2008-10-18 07:39:47 UTC
On my box 2.0.7 runs great, but 2.0.8 does not import properly:

jmcfarlane@monster # python
Python 2.5.2 (r252:60911, Sep 12 2008, 02:04:02) 
[GCC 4.1.2 (Gentoo 4.1.2 p1.1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psycopg2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.5/site-packages/psycopg2/__init__.py", line 60, in <module>
    from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: /usr/lib64/python2.5/site-packages/psycopg2/_psycopg.so: undefined symbol: lo_create
>>>

I'm not yet certain if this is a problem local to me or not.  Here's my system info in case anyone recognizes the problem:

jmcfarlane@monster # emerge --info
Portage 2.1.4.5 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r7 x86_64 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
Timestamp of tree: Sat, 18 Oct 2008 06:15:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r14, 2.5.2-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
Comment 2 Nathan 2008-10-18 21:34:35 UTC
John, I received the following response on the psycopg2 mailing list.  What version of libpq do you have?

I've asked Federico if there's a minimum version of libpq supported.  We could then update the dependency info in the ebuild...

~ Nathan

from	Federico Di Gregorio <fog@initd.org>
to	psycopg@lists.initd.org
date	Sat, Oct 18, 2008 at 2:19 PM
subject	Re: [Psycopg] Fwd: [Bug 242336] Stabilization request for psycopg 2.0.[6|7|8]
mailing list	psycopg.lists.initd.org Filter messages from this mailing list
mailed-by	lists.initd.org
	
Il giorno sab, 18/10/2008 alle 13.53 -0600, Nathan ha scritto:
> Anyone have any idea why John (below) would get that error trying to
> import psycopg2 (2.0.8?)   This is an obstacle for getting 2.0.8
> marked stable on Gentoo.

His libpq is old and does not have lo_create.

federico

Comment 3 John McFarlane 2008-10-18 23:11:22 UTC
Nathan,

Thanks for the hard work.  I'm running: dev-db/libpq-8.0.15

If I can help you test/do anything please let me know.
Comment 4 Nathan 2008-10-20 02:39:08 UTC
Ok, so according to the author, psycopg >=2.0.7 depends on >=libpq-8.1, while versions 2.0.0 thru 2.0.6 depend on >=libpq-8.0.

That would explain why you're seeing a problem while I am not--I am running libpq-8.2.

That dependency info should be trivial to add to the ebuild.  If no one else adds it, I'll try to get to it tomorrow when I'm not so tired and submit the updated ebuild to this bug.

~ Nathan

On Sun, Oct 19, 2008 at 6:22 AM, Federico Di Gregorio <fog@initd.org> wrote:
> Il giorno sab, 18/10/2008 alle 20.20 -0600, Nathan ha scritto:
>> 2008/10/18 Federico Di Gregorio <fog@initd.org>:
>> >> >
>> >> > John states he is using libpq-8.0.15
>> >>
>> >> A littlebit old. I don't know exactly when lo_create was added but I
>> >> suppose in 8.1 or even 8.2.
>> >
>> > Just checked. It is 8.1.
>> >
>> > federico
>>
>> So, then, psycopg 2.0.x depends on >= libpq 8.1.0?
>
> psycopg2 depends on libpq 8.0.x but psycopg2 2.0.7 introduced support
> for large objects and depends on libpq 8.1.x.
>
> federico
Comment 5 Domen Kožar 2008-10-24 15:29:28 UTC
Does libpq-8.1 work with postgresql-8.0.15 that is the current stable in portage?

(In reply to comment #4)
> Ok, so according to the author, psycopg >=2.0.7 depends on >=libpq-8.1, while
> versions 2.0.0 thru 2.0.6 depend on >=libpq-8.0.
> 
> That would explain why you're seeing a problem while I am not--I am running
> libpq-8.2.
> 
> That dependency info should be trivial to add to the ebuild.  If no one else
> adds it, I'll try to get to it tomorrow when I'm not so tired and submit the
> updated ebuild to this bug.
> 
> ~ Nathan
> 
> On Sun, Oct 19, 2008 at 6:22 AM, Federico Di Gregorio <fog@initd.org> wrote:
> > Il giorno sab, 18/10/2008 alle 20.20 -0600, Nathan ha scritto:
> >> 2008/10/18 Federico Di Gregorio <fog@initd.org>:
> >> >> >
> >> >> > John states he is using libpq-8.0.15
> >> >>
> >> >> A littlebit old. I don't know exactly when lo_create was added but I
> >> >> suppose in 8.1 or even 8.2.
> >> >
> >> > Just checked. It is 8.1.
> >> >
> >> > federico
> >>
> >> So, then, psycopg 2.0.x depends on >= libpq 8.1.0?
> >
> > psycopg2 depends on libpq 8.0.x but psycopg2 2.0.7 introduced support
> > for large objects and depends on libpq 8.1.x.
> >
> > federico
> 

Comment 6 Nathan 2009-04-21 16:37:27 UTC
[Okay, I got slammed by stuff at work for several months.  I'm back now.]

Please add the 2.0.10 ebuild (release notes[2] at the bottom of this comment).

The 2.0.9 ebuild works fine for .10 as long as you include my one-line dependency patch[1] below.

2.0.10 depends on >=dev-db/libpq-8.1, which is still marked unstable even though it came out in 2005 and is extremely stable.  So I asked for postgresql/libpq 8.1+ to be stabilized in bug #183764 and bug #230817.  As soon as those are marked stable, please mark psycopg 2.0.10 stable.


[1] The patch:

--- psycopg-2.0.9.ebuild	2009-03-29 11:32:00.000000000 -0600
+++ psycopg-2.0.10.ebuild	2009-04-21 09:35:13.000000000 -0600
@@ -17,6 +17,7 @@
 IUSE="debug doc examples mxdatetime"
 
 DEPEND="virtual/postgresql-base
+	>=dev-db/libpq-8.1
 	mxdatetime? ( dev-python/egenix-mx-base )"
 RDEPEND="${DEPEND}"


[2] RELEASE NOTES for psycopg 2.0.10

The signed release is available at the usual place:

http://initd.org/pub/software/psycopg/psycopg2-2.0.10.tar.gz
http://initd.org/pub/software/psycopg/psycopg2-2.0.10.tar.gz.asc

And here is the excerpt from the NEWS file:

What's new in psycopg 2.0.10
---------------------------

* New features:
 - A specialized type-caster that can parse time zones with seconds is
   now available. Note that after enabling it (see extras.py) "wrong"
   time zones will be parsed without raising an exception but the
   result will be rounded.
 - DictCursor can be used as a named cursor.
 - DictRow now implements more dict methods.
 - The connection object now expose PostgreSQL server version as the
   .server_version attribute and the protocol version used as
   .protocol_version.
 - The connection object has a .get_parameter_status() methods that
   can be used to obtain useful information from the server.

* Bug fixes:
 - None is now correctly always adapted to NULL.
 - Two double memory free errors provoked by multithreading and
   garbage collection are now fixed.
 - Fixed usage of internal Python code in the notice processor; this
   should fix segfaults when receiving a lot of notices in
   multithreaded programs.
 - Should build again on MSVC and Solaris.
 - Should build with development versions of PostgreSQL (ones with
   -devel version string.)
 - Fixed some tests that failed even when psycopg was righ

Federico Di Gregorio    http://people.initd.org/fog
Comment 7 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-04-21 16:47:14 UTC
(In reply to comment #6)
> as those are marked stable, please mark psycopg 2.0.10 stable.

That would require it to be added to the tree first.
Comment 8 Nathan 2009-04-21 16:53:39 UTC
That is a valid point.  Please add psycopg-2.0.10 to the tree [same as 2.0.9 with my patch from comment #6].
Comment 9 Patrick Lauer gentoo-dev 2009-04-23 08:50:32 UTC
+  23 Apr 2009; Patrick Lauer <patrick@gentoo.org> +psycopg-2.0.10.ebuild:
+  Bump to 2.0.10. Fixes first part of #242336. Postgres dep changed to >=8.1
+  due to upstream changes.

So there's the new version. 
Comment 10 Nathan 2009-04-23 22:29:18 UTC
(In reply to comment #9)
> +  23 Apr 2009; Patrick Lauer <patrick@gentoo.org> +psycopg-2.0.10.ebuild:
> +  Bump to 2.0.10. Fixes first part of #242336. Postgres dep changed to >=8.1
> +  due to upstream changes.
> 
> So there's the new version. 
> 

Great!  FYI, the dep changed in psycopg 2.0.7, which is why 2.0.[7|8|9] ebuilds never got stabilized AFAIK -- the dep never got added to them.
Comment 11 Patrick Lauer gentoo-dev 2009-04-25 11:30:18 UTC
Changing summary as that's what we want to do now. Still a bit fresh, so let's give it a week or two until stabilization.
Comment 12 Nathan 2009-04-25 19:59:00 UTC
Very wise.  In fact, I've experienced some regressions in 2.0.10 in the "extras" module (which I actually use), so I've personally reverted to 2.0.9.  I've reported the bugs and they've fixed them for a pending 2.0.11 release.
Comment 13 Patrick Lauer gentoo-dev 2009-05-01 18:13:12 UTC
Ok, so let's wait on 2.0.11. 
Closing bug for now.