Bug 2252071 - buildstream fails to build with Python 3.13: AttributeError: "round_trip_dump()" has been removed
Summary: buildstream fails to build with Python 3.13: AttributeError: "round_trip_dum...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: buildstream
Version: 40
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Christiano Anderson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2291496 (view as bug list)
Depends On:
Blocks: F41FTBFS PYTHON3.13 F41FailsToInstall
TreeView+ depends on / blocked
 
Reported: 2023-11-29 10:27 UTC by Karolina Surma
Modified: 2024-07-02 09:48 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-07-02 09:48:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2023-11-29 10:27:52 UTC
buildstream fails to build with Python 3.13.0a2.

This report is automated and not very verbose, but we'll try to get back here with details.

Example failure:

_________________________ test_custom_transform_source _________________________

cli = <tests.testutils.runcli.Cli object at 0x7f58fe3df2f0>
tmpdir = local('/builddir/build/BUILD/buildstream-1.6.9/tmp/test_custom_transform_source0')
datafiles = local('/builddir/build/BUILD/buildstream-1.6.9/tmp/test_custom_transform_source0')

    @pytest.mark.datafiles(DATA_DIR)
    def test_custom_transform_source(cli, tmpdir, datafiles):
        project = os.path.join(datafiles.dirname, datafiles.basename)
    
        # Set the project_dir alias in project.conf to the path to the tested project
        project_config_path = os.path.join(project, "project.conf")
        project_config = _yaml.load(project_config_path)
        aliases = _yaml.node_get(project_config, dict, "aliases")
        aliases["project_dir"] = "file://{}".format(project)
        _yaml.dump(_yaml.node_sanitize(project_config), project_config_path)
    
        # Ensure we can track
        result = cli.run(project=project, args=[
            'track', 'target.bst'
        ])
>       result.assert_success()

tests/sources/previous_source_access.py:32: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.testutils.runcli.Result object at 0x7f58fe490da0>
fail_message = ''

    def assert_success(self, fail_message=''):
>       assert self.exit_code == 0, fail_message
E       AssertionError: 
E       assert 255 == 0
E        +  where 255 = <tests.testutils.runcli.Result object at 0x7f58fe490da0>.exit_code

tests/testutils/runcli.py:54: AssertionError
----------------------------- Captured stdout call -----------------------------
BuildStream exited with code 255 for invocation:
	bst --no-colors --config /builddir/build/BUILD/buildstream-1.6.9/tmp/test_custom_transform_source0/cache/buildstream.conf --directory /builddir/build/BUILD/buildstream-1.6.9/tmp/test_custom_transform_source0 track target.bst
Program stderr was:
[--:--:--][][] STATUS  Cache usage recomputed: 140B / infinity (0%)
[--:--:--][][] START   Track
[--:--:--][][] START   Loading elements
[00:00:00][][] SUCCESS Loading elements
[--:--:--][][] START   Resolving elements
[00:00:00][][] SUCCESS Resolving elements
[--:--:--][][] START   Resolving cached state
[00:00:00][][] SUCCESS Resolving cached state

BuildStream Version 1.6.9
  Session Start: Friday, 24-11-2023 at 17:45:27
  Project:       foo (/builddir/build/BUILD/buildstream-1.6.9/tmp/test_custom_transform_source0)
  Targets:       
  Cache Usage:   140B / infinity (0%)

User Configuration
  Configuration File:      /builddir/build/BUILD/buildstream-1.6.9/tmp/test_custom_transform_source0/cache/buildstream.conf
  Log Files:               /builddir/build/BUILD/buildstream-1.6.9/tmp/test_custom_transform_source0/cache/logs
  Source Mirrors:          /builddir/build/BUILD/buildstream-1.6.9/tmp/test_custom_transform_source0/cache/sources
  Build Area:              /builddir/build/BUILD/buildstream-1.6.9/tmp/test_custom_transform_source0/cache/build
  Artifact Cache:          /builddir/build/BUILD/buildstream-1.6.9/tmp/test_custom_transform_source0/cache/artifacts
  Strict Build Plan:       Yes
  Maximum Fetch Tasks:     10
  Maximum Build Tasks:     4
  Maximum Push Tasks:      4
  Maximum Network Retries: 2

Loaded Plugins
  Source Plugins
    - foo_transform

Pipeline

===============================================================================
[--:--:--][????????][track:target.bst                    ] START   foo/target/????????-track.9856.log
[00:00:00][????????][track:target.bst                    ] BUG     Track

    An unhandled exception occured:
    
    Traceback (most recent call last):
      File "/builddir/build/BUILDROOT/buildstream-1.6.9-6.fc40.x86_64/usr/lib/python3.13/site-packages/buildstream/_scheduler/jobs/job.py", line 384, in _child_action
        result = self.child_process()
                 ^^^^^^^^^^^^^^^^^^^^
      File "/builddir/build/BUILDROOT/buildstream-1.6.9-6.fc40.x86_64/usr/lib/python3.13/site-packages/buildstream/_scheduler/jobs/elementjob.py", line 88, in child_process
        env_dump = yaml.round_trip_dump(elt_env, default_flow_style=False, allow_unicode=True)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.13/site-packages/ruamel/yaml/main.py", line 1284, in round_trip_dump
        error_deprecation('round_trip_dump', 'dump')
      File "/usr/lib/python3.13/site-packages/ruamel/yaml/main.py", line 1039, in error_deprecation
        raise AttributeError(s, name=None)
    AttributeError: 
    "round_trip_dump()" has been removed, use
    
      yaml = YAML()
      yaml.dump(...)
    
    instead of file "/builddir/build/BUILDROOT/buildstream-1.6.9-6.fc40.x86_64/usr/lib/python3.13/site-packages/buildstream/_scheduler/jobs/elementjob.py", line 88
    
            env_dump = yaml.round_trip_dump(elt_env, default_flow_style=False, allow_unicode=True)
    
    

[00:00:00][][] FAILURE Track

Failure Summary
  target.bst:
    [00:00:00][????????][track:target.bst                    ] BUG     Track

        An unhandled exception occured:
    
        Traceback (most recent call last):
          File "/builddir/build/BUILDROOT/buildstream-1.6.9-6.fc40.x86_64/usr/lib/python3.13/site-packages/buildstream/_scheduler/jobs/job.py", line 384, in _child_action
            result = self.child_process()
                     ^^^^^^^^^^^^^^^^^^^^
          File "/builddir/build/BUILDROOT/buildstream-1.6.9-6.fc40.x86_64/usr/lib/python3.13/site-packages/buildstream/_scheduler/jobs/elementjob.py", line 88, in child_process
            env_dump = yaml.round_trip_dump(elt_env, default_flow_style=False, allow_unicode=True)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/usr/lib/python3.13/site-packages/ruamel/yaml/main.py", line 1284, in round_trip_dump
            error_deprecation('round_trip_dump', 'dump')
          File "/usr/lib/python3.13/site-packages/ruamel/yaml/main.py", line 1039, in error_deprecation
            raise AttributeError(s, name=None)
        AttributeError: 
        "round_trip_dump()" has been removed, use
    
          yaml = YAML()
          yaml.dump(...)
    
        instead of file "/builddir/build/BUILDROOT/buildstream-1.6.9-6.fc40.x86_64/usr/lib/python3.13/site-packages/buildstream/_scheduler/jobs/elementjob.py", line 88
    
                env_dump = yaml.round_trip_dump(elt_env, default_flow_style=False, allow_unicode=True)
    
        

Pipeline Summary
  Total:       0
  Session:     1
  Track Queue: processed 0, skipped 0, failed 1 


= 265 failed, 526 passed, 125 skipped, 22 deselected, 10 xfailed, 10 xpassed, 2 warnings in 327.21s (0:05:27) =

https://docs.python.org/3.13/whatsnew/3.13.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06692086-buildstream/

For all our attempts to build buildstream with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/buildstream/

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.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
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.

Comment 1 Fedora Admin user for bugzilla script actions 2023-12-31 12:06:55 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 2 Fedora Admin user for bugzilla script actions 2024-01-01 00:11:37 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 3 Fedora Admin user for bugzilla script actions 2024-02-10 12:20:05 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 4 Aoife Moloney 2024-02-15 23:06:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.

Comment 5 Karolina Surma 2024-06-12 14:54:48 UTC
*** Bug 2291496 has been marked as a duplicate of this bug. ***

Comment 6 Fedora Fails To Install 2024-06-19 19:57:59 UTC
Hello,

Please note that this comment was generated automatically by https://pagure.io/releng/blob/main/f/scripts/ftbfs-fti/follow-policy.py
If you feel that this output has mistakes, please open an issue at https://pagure.io/releng/

This package fails to install and maintainers are advised to take one of the following actions:

 - Fix this bug and close this bugzilla once the update makes it to the repository.
   (The same script that posted this comment will eventually close this bugzilla
   when the fixed package reaches the repository, so you don't have to worry about it.)

or

 - Move this bug to ASSIGNED if you plan on fixing this, but simply haven't done so yet.

or

 - Orphan the package if you no longer plan to maintain it.


If you do not take one of these actions, the process at https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs will continue.
This package may be orphaned in 7+ weeks.
This is the first reminder (step 3) from the policy.

Don't hesitate to ask for help on https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ if you are unsure how to fix this bug.

Comment 7 Fedora Fails To Install 2024-07-02 09:48:25 UTC
Hello,

Please note that this comment was generated automatically by https://pagure.io/releng/blob/main/f/scripts/ftbfs-fti/follow-policy.py
If you feel that this output has mistakes, please open an issue at https://pagure.io/releng/

All subpackages of a package against which this bug was filled are now installable or removed from Fedora 41.

Thanks for taking care of it!


Note You need to log in before you can comment on or make changes to this bug.