- Package:
- src:bernhard
- Source:
- src:bernhard
- Submitter:
- Gianfranco Costamagna
- Date:
- 2024-02-29 09:54:03 UTC
- Severity:
- normal
- Tags:
Hello, your package is tied to a specific protobuf version, but doesn't declare any explicit dependency on it
Now, the package fails to load due to pb.py not being rebuilt.
python3 -c "import bernhard"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3/dist-packages/bernhard/__init__.py", line 20, in <module>
from . import pb
File "/usr/lib/python3/dist-packages/bernhard/pb.py", line 36, in <module>
_descriptor.FieldDescriptor(
File "/usr/lib/python3/dist-packages/google/protobuf/descriptor.py", line 560, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors should not be created directly, but only retrieved from their parent.
Please have a look.
(not change rebuilding works as workaround, but I think we should make sure the package is not used with a wrong
protobuf version)
G.
The package seems to require the same protobuf version as it was compiled with, but the dependency is only indirectly through python3-protobuf. cu Adrian
Hi,
the problem in #1031716/#1028371 is as follows:
1. python3-protobuf and protobuf-compiler are both built from
src:protobuf
2. packages using python3-protobuf (e.g. python3-bernhard) ship files
that were generated with protobuf-compiler during their build
(e.g. /usr/lib/python3/dist-packages/bernhard/pb.py )
3. The generated files in python3-protobuf rdeps like python3-bernhard
might not work with python3-protobuf from a different major release
of src:protobuf
The manual solution for packages like python3-bernhard would be
Build-Depends: protobuf-compiler (>= 3.21), protobuf-compiler (<< 3.22),
python3-protobuf (>= 3.21), python3-protobuf (<< 3.22),
Depends: python3-protobuf (>= 3.21), python3-protobuf (<< 3.22),
Creating an own debhelper addon similar to dh_numpy3 would work for
automatically creating such dependencies, but is there any way for
python3-protobuf to inject such versioned runtime dependencies into
python3:Depends that does not require every rdep to manually add
addon usage?
Thanks
Adrian
Hi Adrian (2023.03.07_10:09:35_+0000) They are consulted when translating Python .dist-info/.egg-info requires into Debian dependencies. You can see a (more complex) example in cffi: https://salsa.debian.org/python-team/packages/python-cffi/-/blob/master/debian/gen-backend-versions.py SR
We believe that the bug you reported is fixed in the latest version of
bernhard, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1028371@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Andreas Tille <tille@debian.org> (supplier of updated bernhard package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Thu, 29 Feb 2024 09:49:07 +0100
Source: bernhard
Architecture: source
Version: 0.2.6-4
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Changed-By: Andreas Tille <tille@debian.org>
Closes: 1028371
Changes:
bernhard (0.2.6-4) unstable; urgency=medium
.
* Team upload.
.
[ Debian Janitor ]
* Bump debhelper from old 12 to 13.
* Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
Repository-Browse.
.
[ Andreas Tille ]
* Real team maintenance in DPT (with permission in
https://lists.debian.org/debian-python/2024/02/msg00072.html)
* Standards-Version: 4.6.2 (routine-update)
* Build-Depends: s/dh-python/dh-sequence-python3/ (routine-update)
* Rules-Requires-Root: no (routine-update)
* watch file standard 4 (routine-update)
* Fix homepage
* Force same version of python3-protobuf which was used to build the
package (Note: The real problem with protobuf is more complex as can
be read in the bug log of #1031716 but for the moment this solves the
installation issue of python3-bernhard.)
Closes: #1028371
Checksums-Sha1:
782dbc5580c30ce4d8d4fbac9e1ca4e8391469d6 2081 bernhard_0.2.6-4.dsc
bd9f6102f3c75c49918c0a01222a6fcd9df1b17c 3112 bernhard_0.2.6-4.debian.tar.xz
2590c61749b4d7e68bdc748657f40c3ae0fef019 7353 bernhard_0.2.6-4_amd64.buildinfo
Checksums-Sha256:
4cb92af94228ed7727ff85ae8a3dd27db1894f0b3baf7f55cf077caab2e97f00 2081 bernhard_0.2.6-4.dsc
338cc6bf706f547777066629153cefe79dbce0735b82747b11db97260eebe327 3112 bernhard_0.2.6-4.debian.tar.xz
02a8cc8bc135dbe297cd4e5f389f8e0667538b3422e39fe15c8cedecdb3ae993 7353 bernhard_0.2.6-4_amd64.buildinfo
Files:
47d4a4cd2563e860cc3b73d0c8df39cd 2081 python optional bernhard_0.2.6-4.dsc
5443c156b2038ec00f1ad94f1a38f51c 3112 python optional bernhard_0.2.6-4.debian.tar.xz
e266022fce374edfafcbb0509627d7c1 7353 python optional bernhard_0.2.6-4_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJFBAEBCgAvFiEE8fAHMgoDVUHwpmPKV4oElNHGRtEFAmXgRaMRHHRpbGxlQGRl
Ymlhbi5vcmcACgkQV4oElNHGRtGKNA/+JHpJRr/o/uZvo/bomJRkDw37TvFvZfa1
HTdTbYFVPGvaz1USNFaLjTTCsay6/qqPVeZFv/2ouh4FBvuWvxzosh9PTTpmJS9D
BGUR0PX7VeIvxr45qFMM12N/WF1Xml9jd+aRF4cbmhTljedlKR3kQhBRodjWCEzg
Bg54/bq5pGHU2UPtkre0NoH5/1r3lPnrGQOkI9kqP0OM5nV7RcFvqWKtHUXmhJKP
tQMk0eNkEKfXDUi9EnHWckZzjSuRt+TM0DG0nVjpigZDY+ECxjeD/u0YLpeErA4d
gDagmYG2jTAZpqZ+ZTzSDMcDR68Qg0ncK15yOPN6BcA1Gu1ctuqXHkAVT+pGAXIO
G8E6Mf2xZgFAdhfhwdmQk62TawRXvm+aKD+P2dNZEJswL0uAwKtVrqKpqGeD94iZ
vrn3E/3HT01xhyICvTESJBMcsrqjkJzfo13xzSCnGK9b5/5B3NKAw7f6mI3yCVim
c+sms190i2yQqTWiT8nKvgohVSNjyd4nF19Jt7BXm1xXoRzrL0GnlrwjuStezmyQ
6VzTEdEvJUjaH3wHLL32YY6etHub3OafIQC2IYHi+gb8Tv7RWJWFELQv6mkzZwlc
7GAd9+4BIEycq4xeDVDkeORSouDFruxFy5xlTdZUb+xM09TvYwaWWIvvavCVEo6N
ZIP3Z2rAXlg=
=RzHj
-----END PGP SIGNATURE-----