Bug 2440570
| Summary: | libmodulemd-2.15.2-6.fc45 FTBFS: Python tests fail: TypeError: property '%s' can only be set in constructor | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Karolina Surma <ksurma> |
| Component: | libmodulemd | Assignee: | Petr Pisar <ppisar> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 44 | CC: | ksurma, mhroncok, nphilipp, ppisar, rpm-software-management, sgallagh |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libmodulemd-2.15.2-7.fc45 libmodulemd-2.15.2-7.fc44 | Doc Type: | --- |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2026-03-12 00:15:02 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2384424, 2412434, 2433833 | ||
This failure is unrelated to Python 3.15. This is triggered by upgrading python3-gobject-base from 0:3.55.2-1.fc44 to 0:3.54.5-5.fc44. This modulemd Python code:
cat /tmp/test.py
#!/usr/bin/python3
import gi
gi.require_version("Modulemd", "2.0")
from gi.repository import Modulemd
object = Modulemd.Defaults.new(Modulemd.DefaultsVersionEnum.LATEST, "foo")
object.props.module_name = "bar"
behaves differently. Before:
$ /tmp/test.py
/tmp/test.py:8: Warning: g_object_set_is_valid_property: construct property "module-name" for object 'ModulemdDefaultsV1' can't be set after construction
object.props.module_name = "bar"
After:
$ /tmp/test.py
Traceback (most recent call last):
File "/tmp/test.py", line 8, in <module>
object.props.module_name = "bar"
^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: property 'module-name' can only be set in constructor
The module_name property is defined:
properties[PROP_MODULE_NAME] = g_param_spec_string (
"module-name",
"Module Name",
"The name of the module to which these defaults apply.",
DEF_DEFAULT_NAME_STRING,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
It seems the new gobject respects G_PARAM_CONSTRUCT_ONLY on Python level, while before it was caught by glib.
The failure is triggered with this pygobject change:
commit 3b6e4804de4f26cfb9472666f18f44ac731d874c
Author: Sam Spilsbury <smspillaz>
Date: Mon Dec 28 19:50:59 2020 -0500
gi: Factor out pygi_set_property_gvalue_from_property_info
Also harmoinze the checks in pygi_set_property_value with
those from the old PyGObject code.
pygi_set_property_value will first try to set properties using
the introspection data (if the GObject had some GITypeInfo
associated with it), otherwise if the object was dynamically
created, we fall back to being able to set a more limited
set of properties.
FEDORA-2026-d627eba042 (libmodulemd-2.15.2-7.fc44) has been submitted as an update to Fedora 44. https://bodhi.fedoraproject.org/updates/FEDORA-2026-d627eba042 FEDORA-2026-d627eba042 has been pushed to the Fedora 44 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-d627eba042` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-d627eba042 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2026-d627eba042 (libmodulemd-2.15.2-7.fc44) has been pushed to the Fedora 44 stable repository. If problem still persists, please make note of it in this bug report. |
libmodulemd fails to build with Python 3.15.0a6. ERROR: test_get_name (__main__.TestProfile.test_get_name) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/libmodulemd-2.15.2-build/modulemd-2.15.2/redhat-linux-build/../modulemd/tests/ModulemdTests/profile.py", line 97, in test_get_name self.assertProcessFailure(_set_props_name, p, "notadrill") ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/libmodulemd-2.15.2-build/modulemd-2.15.2/modulemd/tests/ModulemdTests/base.py", line 60, in assertProcessFailure callable(*args) ~~~~~~~~^^^^^^^ File "/builddir/build/BUILD/libmodulemd-2.15.2-build/modulemd-2.15.2/redhat-linux-build/../modulemd/tests/ModulemdTests/profile.py", line 40, in _set_props_name modulemd_profile.props.name = value ^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: property 'name' can only be set in constructor ---------------------------------------------------------------------- Ran 5 tests in 0.100s FAILED (errors=1) F.. ====================================================================== FAIL: test_get_name (__main__.TestProfile.test_get_name) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/libmodulemd-2.15.2-build/modulemd-2.15.2/redhat-linux-build/../modulemd/tests/ModulemdTests/profile.py", line 97, in test_get_name self.assertProcessFailure(_set_props_name, p, "notadrill") ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/libmodulemd-2.15.2-build/modulemd-2.15.2/modulemd/tests/ModulemdTests/base.py", line 65, in assertProcessFailure raise AssertionError("Child process was not aborted") AssertionError: Child process was not aborted ---------------------------------------------------------------------- Ran 5 tests in 0.123s https://docs.python.org/3.15/whatsnew/3.15.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10144362-libmodulemd/ For all our attempts to build libmodulemd with Python 3.15, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/libmodulemd/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.15: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/ Let us know here if you have any questions. Python 3.15 is planned to be included in Fedora 45. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.