Обсуждение: Broken python3-psycopg2 for F24 / PG 9.6
Hi, http://yum.postgresql.org/9.6/fedora/fedora-24-x86_64/ contains a python3-psycopg2-2.6.2-1.f24.x86_64.rpm package which is lacking the _psycopg.so file, making the package unusable. None of the other Fedora / PG version combinations I checked appear to have psycopg2 packages so it seems to me that it shouldn't be published for F24 / PG 9.6 either. / Oskari
24.08.2016, 22:55, Oskari Saarenmaa kirjoitti: > http://yum.postgresql.org/9.6/fedora/fedora-24-x86_64/ contains a > python3-psycopg2-2.6.2-1.f24.x86_64.rpm package which is lacking the > _psycopg.so file, making the package unusable. > > None of the other Fedora / PG version combinations I checked appear to > have psycopg2 packages so it seems to me that it shouldn't be published > for F24 / PG 9.6 either. An updated package (python3-psycopg2-2.6.2-2.f24.x86_64) was uploaded recently, it's still broken. Could you please remove it from the repo? It shouldn't be needed by anything afaict. / Oskari
Hi, > Could you please remove it from the repo? It shouldn't be needed by > anything afaict. It is needed by pgadmin4, that is why I pushed that update. Regards, -- Devrim GÜNDÜZ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Вложения
Hi, On Wed, 2016-08-24 at 22:55 +0300, Oskari Saarenmaa wrote: > > http://yum.postgresql.org/9.6/fedora/fedora-24-x86_64/ contains a > python3-psycopg2-2.6.2-1.f24.x86_64.rpm package which is lacking the > _psycopg.so file, making the package unusable. > > None of the other Fedora / PG version combinations I checked appear to > have psycopg2 packages so it seems to me that it shouldn't be published > for F24 / PG 9.6 either. Starting Fedora 24, Python3 support is added to most of the Python packages, that is why you cannot see this subpackage in other distros. This package is under a conditional. Regards, -- Devrim GÜNDÜZ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Вложения
26.09.2016, 13:27, Devrim Gündüz kirjoitti: > On Wed, 2016-08-24 at 22:55 +0300, Oskari Saarenmaa wrote: >> >> http://yum.postgresql.org/9.6/fedora/fedora-24-x86_64/ contains a >> python3-psycopg2-2.6.2-1.f24.x86_64.rpm package which is lacking the >> _psycopg.so file, making the package unusable. >> >> None of the other Fedora / PG version combinations I checked appear to >> have psycopg2 packages so it seems to me that it shouldn't be published >> for F24 / PG 9.6 either. > > Starting Fedora 24, Python3 support is added to most of the Python packages, > that is why you cannot see this subpackage in other distros. This package is > under a conditional. The python3-psycopg2 package is broken and unusable as it is. It's missing the essential _psycopg.so file: >>> import psycopg2 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.5/site-packages/psycopg2/__init__.py", line 50, in <module> from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID ImportError: No module named 'psycopg2._psycopg' Also, Fedora 24 provides python3-psycopg2 2.6.1 by default, do we really need 2.6.2 for pgadmin4? Thanks, Oskari
Hi, On Mon, 2016-09-26 at 23:20 +0300, Oskari Saarenmaa wrote: > The python3-psycopg2 package is broken and unusable as it is. It's > missing the essential _psycopg.so file: > > >>> import psycopg2 > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib64/python3.5/site-packages/psycopg2/__init__.py", line > 50, in <module> > from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID > ImportError: No module named 'psycopg2._psycopg' That is installed with python-psycopg2 package: /usr/lib64/python2.7/site-packages/psycopg2/_psycopg.so When/how do you get this? > Also, Fedora 24 provides python3-psycopg2 2.6.1 by default, You mean upstream Fedora? I don't care about the versions there. :) > do we really need 2.6.2 for pgadmin4? We always keep up2date with releases, but I meant 2.6.2-2 : $ rpm -q --changelog python-psycopg2 * Tue Sep 13 2016 Devrim Gündüz <devrim@gunduz.org> 2.6.2-2 - Move python-debug (PY2 version) package into non-py3 builds. We need this at least for pgadmin4. Cheers, -- Devrim GÜNDÜZ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Вложения
26.09.2016, 23:38, Devrim Gündüz kirjoitti: > On Mon, 2016-09-26 at 23:20 +0300, Oskari Saarenmaa wrote: >> The python3-psycopg2 package is broken and unusable as it is. It's >> missing the essential _psycopg.so file: >> >> >>> import psycopg2 >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> File "/usr/lib64/python3.5/site-packages/psycopg2/__init__.py", line >> 50, in <module> >> from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID >> ImportError: No module named 'psycopg2._psycopg' > > That is installed with python-psycopg2 package: > > /usr/lib64/python2.7/site-packages/psycopg2/_psycopg.so > > When/how do you get this? Python 2 and Python 3 require their own shared libraries. The Python 2 psycopg2 package includes a _psycopg.so file, but the Python 3 package doesn't, try: python3 -c 'import psycopg2' >> Also, Fedora 24 provides python3-psycopg2 2.6.1 by default, > > You mean upstream Fedora? I don't care about the versions there. :) I'd prefer not to replace packages provided by upstream unless it's absolutely necessary, but I guess that's ok if it's the pg yum repo policy. / Oskari
Hi, On Mon, 2016-09-26 at 23:42 +0300, Oskari Saarenmaa wrote: > > When/how do you get this? > > Python 2 and Python 3 require their own shared libraries. The Python 2 > psycopg2 package includes a _psycopg.so file, but the Python 3 package > doesn't, try: python3 -c 'import psycopg2' I'm not a Python guy, so: $ python3 -c 'import psycopg2' $ I did not get any errors, is that ok? I started to think that this is a missing dependency somewhere. Regards, -- Devrim GÜNDÜZ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Вложения
26.09.2016, 23:57, Devrim Gündüz kirjoitti: > On Mon, 2016-09-26 at 23:42 +0300, Oskari Saarenmaa wrote: >>> When/how do you get this? >> >> Python 2 and Python 3 require their own shared libraries. The Python 2 >> psycopg2 package includes a _psycopg.so file, but the Python 3 package >> doesn't, try: python3 -c 'import psycopg2' > > I'm not a Python guy, so: > > $ python3 -c 'import psycopg2' > $ > > I did not get any errors, is that ok? That's weird. The https://yum.postgresql.org/9.6/fedora/fedora-24-x86_64/python3-psycopg2-2.6.2-2.f24.x86_64.rpm package that I'm seeing definitely doesn't contain a _psycopg.so package which is required by psycopg2. Try python3 -c 'from psycopg2 import _psycopg; print(_psycopg)' and run rpm -qf on the reported file. On stock Fedora 24 without PGDG repos I get: $ python3 -c 'from psycopg2 import _psycopg; print(_psycopg)' <module 'psycopg2._psycopg' from '/usr/lib64/python3.5/site-packages/psycopg2/_psycopg.cpython-35m-x86_64-linux-gnu.so'> $ rpm -qf /usr/lib64/python3.5/site-packages/psycopg2/_psycopg.cpython-35m-x86_64-linux-gnu.so python3-psycopg2-2.6.1-5.fc24.x86_64 / Oskari
Hi, On Tue, 2016-09-27 at 00:06 +0300, Oskari Saarenmaa wrote: > That's weird. The > https://yum.postgresql.org/9.6/fedora/fedora-24-x86_64/python3-psycopg2-2.6.2 > -2.f24.x86_64.rpm > package that I'm seeing definitely doesn't contain a _psycopg.so package > which is required by psycopg2. > > Try python3 -c 'from psycopg2 import _psycopg; print(_psycopg)' and run > rpm -qf on the reported file. Can you please install python3-psycopg2-debug from our repo, and try again? 'cause: $ python3 -c 'from psycopg2 import _psycopg; print(_psycopg)' <module 'psycopg2._psycopg' from '/usr/lib64/python3.5/site-packages/psycopg2/_psycopg.cpython-35m-x86_64-linux-gnu.so'> $ rpm -qf /usr/lib64/python3.5/site-packages/psycopg2/_psycopg.cpython-35m-x86_64-linux-gnu.so python3-psycopg2-debug-2.6.2-2.f24.x86_64 It looks RPMs are missing dependency -debug subpackage... Regards, -- Devrim GÜNDÜZ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Вложения
27.09.2016, 00:18, Devrim Gündüz kirjoitti: > On Tue, 2016-09-27 at 00:06 +0300, Oskari Saarenmaa wrote: >> That's weird. The >> https://yum.postgresql.org/9.6/fedora/fedora-24-x86_64/python3-psycopg2-2.6.2 >> -2.f24.x86_64.rpm >> package that I'm seeing definitely doesn't contain a _psycopg.so package >> which is required by psycopg2. >> >> Try python3 -c 'from psycopg2 import _psycopg; print(_psycopg)' and run >> rpm -qf on the reported file. > > > Can you please install python3-psycopg2-debug from our repo, and try again? > 'cause: > > $ python3 -c 'from psycopg2 import _psycopg; print(_psycopg)' > <module 'psycopg2._psycopg' from '/usr/lib64/python3.5/site-packages/psycopg2/_psycopg.cpython-35m-x86_64-linux-gnu.so'> > > $ rpm -qf /usr/lib64/python3.5/site-packages/psycopg2/_psycopg.cpython-35m-x86_64-linux-gnu.so > python3-psycopg2-debug-2.6.2-2.f24.x86_64 > > It looks RPMs are missing dependency -debug subpackage... Ok, installing the -debug package makes it work. Apparently the .so is in the debug package for some reason. It has nothing to do with debug functionality though, it should be moved to the main package. / Oskari
Hi, On Tue, 2016-09-27 at 00:20 +0300, Oskari Saarenmaa wrote: > Ok, installing the -debug package makes it work. Apparently the .so is > in the debug package for some reason. It has nothing to do with debug > functionality though, it should be moved to the main package. That file is generated with python3-debug command, so I think that is the best place to push it, right? Regards, -- Devrim GÜNDÜZ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Вложения
28.09.2016, 13:09, Devrim Gündüz kirjoitti: > On Tue, 2016-09-27 at 00:20 +0300, Oskari Saarenmaa wrote: >> Ok, installing the -debug package makes it work. Apparently the .so is >> in the debug package for some reason. It has nothing to do with debug >> functionality though, it should be moved to the main package. > > That file is generated with python3-debug command, so I think that is the best > place to push it, right? The .so is generated by "setup.py build" and should be included in the main package as it's done in the upstream Fedora package. The main package is unusable without the .so file in it. Currently just enabling the PGDG repo and running "dnf upgrade" on a Fedora 24 system breaks all existing Python 3 applications depending on psycopg2. / Oskari
Hi Oskari, On Wed, 2016-09-28 at 13:15 +0300, Oskari Saarenmaa wrote: > The .so is generated by "setup.py build" and should be included in the > main package as it's done in the upstream Fedora package. The main > package is unusable without the .so file in it. > > Currently just enabling the PGDG repo and running "dnf upgrade" on a > Fedora 24 system breaks all existing Python 3 applications depending on > psycopg2. Ok, I'll take a look at this later tonight. Regards, -- Devrim GÜNDÜZ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Вложения
Hi Oskari, On Wed, 2016-09-28 at 13:15 +0300, Oskari Saarenmaa wrote: > The .so is generated by "setup.py build" and should be included in the > main package as it's done in the upstream Fedora package. The main > package is unusable without the .so file in it. > > Currently just enabling the PGDG repo and running "dnf upgrade" on a > Fedora 24 system breaks all existing Python 3 applications depending on > psycopg2. I think I fixed the issue in spec file -- it seems I missed one file in the main package as you wrote. That caused the breakage. So, pushed new packages (2.6.2-3) to repositories. They will sync in next hour. Thanks for your patience and help. Regards, -- Devrim GÜNDÜZ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR