Skip to content

hyperpyyaml: mark broken for ruamel-yaml 0.19#493996

Merged
GaetanLepage merged 1 commit intoNixOS:masterfrom
iynaix:fix-hyperpyyaml
Feb 28, 2026
Merged

hyperpyyaml: mark broken for ruamel-yaml 0.19#493996
GaetanLepage merged 1 commit intoNixOS:masterfrom
iynaix:fix-hyperpyyaml

Conversation

@iynaix
Copy link
Copy Markdown
Contributor

@iynaix iynaix commented Feb 25, 2026

Things done

The build breaks due to ruamel-yaml being updated from 0.18 -> 0.19. I tried doing a pythonRelaxDeps, but that breaks the tests, so I reverted ruamel-yaml to 0.18.

Marking as broken as per speechbrain/HyperPyYAML#32

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@nixpkgs-ci nixpkgs-ci Bot requested a review from GaetanLepage February 25, 2026 12:06
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 6.topic: python Python is a high-level, general-purpose programming language. labels Feb 25, 2026
Comment on lines +36 to +43
# requires ruamel.yaml>=0.17.28,<0.19.0 or tests fail
(ruamel-yaml.overrideAttrs {
src = fetchPypi {
pname = "ruamel.yaml";
version = "0.18.16";
hash = "sha256-puWHUS88mYsiJdaKofNREcKfrRSu1WGibnP6tynsXlo=";
};
})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then let's disable the test.
Mixing different releases of the same package in nixpkgs is discouraged as it can cause mismatches in users' environments.
Is hyperpyyaml fundamentally incompatible with 0.19, or is it just a non-crucial test that fails?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's only a single test in the test suite, and it appears to be fundamentally incompatible:

============================= test session starts ==============================
platform linux -- Python 3.13.12, pytest-9.0.2, pluggy-1.6.0
rootdir: /build/source
collected 1 item

tests/test_hyperyaml.py F                                                [100%]

=================================== FAILURES ===================================
____________________________ test_load_hyperpyyaml _____________________________

tmpdir = local('/build/pytest-of-nixbld/pytest-0/test_load_hyperpyyaml0')

    def test_load_hyperpyyaml(tmpdir):
        from hyperpyyaml import (
            load_hyperpyyaml,
            RefTag,
            Placeholder,
            dump_hyperpyyaml,
        )

        # Basic functionality
        yaml = """
        a: 1
        thing: !new:collections.Counter {}
        """
>       things = load_hyperpyyaml(yaml)
                 ^^^^^^^^^^^^^^^^^^^^^^

tests/test_hyperyaml.py:17:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hyperpyyaml/core.py:189: in load_hyperpyyaml
    hparams = yaml.load(yaml_stream, Loader=loader)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/nix/store/imindlm08wk8n5d0yhmm0ap3gcymqxdk-python3.13-pyyaml-6.0.3/lib/python3.13/site-packages/yaml/__init__.py:81: in load
    return loader.get_single_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^
/nix/store/aw6yr5gcas5hgzg0nm2gmykfihdkj3vv-python3.13-ruamel-yaml-0.19.1/lib/python3.13/site-packages/ruamel/yaml/constructor.py:117: in get_single_data
    node = self.composer.get_single_node()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/nix/store/aw6yr5gcas5hgzg0nm2gmykfihdkj3vv-python3.13-ruamel-yaml-0.19.1/lib/python3.13/site-packages/ruamel/yaml/composer.py:77: in get_single_node
    document = self.compose_document()
               ^^^^^^^^^^^^^^^^^^^^^^^
/nix/store/aw6yr5gcas5hgzg0nm2gmykfihdkj3vv-python3.13-ruamel-yaml-0.19.1/lib/python3.13/site-packages/ruamel/yaml/composer.py:100: in compose_document
    node = self.compose_node(None, None)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ruamel.yaml.loader.Loader object at 0x7ffff6128ec0>, parent = None
index = None

    def compose_node(self, parent: Any, index: Any) -> Any:
        if self.parser.check_event(AliasEvent):
            event = self.parser.get_event()
            alias = event.anchor
            if alias not in self.anchors:
                raise ComposerError(
                    None, None, f'found undefined alias {alias!r}', event.start_mark,
                )
            return self.return_alias(self.anchors[alias])
        self.depth += 1
        event = self.parser.peek_event()
>       if self.loader.max_depth and self.depth > self.loader.max_depth:
           ^^^^^^^^^^^^^^^^^^^^^
E       AttributeError: 'Loader' object has no attribute 'max_depth'

/nix/store/aw6yr5gcas5hgzg0nm2gmykfihdkj3vv-python3.13-ruamel-yaml-0.19.1/lib/python3.13/site-packages/ruamel/yaml/composer.py:121: AttributeError

Copy link
Copy Markdown
Contributor

@bengsparks bengsparks Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

speechbrain/HyperPyYAML#32
Amusing seeing you CC'ed in precisely this PR :D @GaetanLepage

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm everywhere haha!

Ok, now it makes sense that I had an impression of déjà vu on this one...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixing different releases of the same package in nixpkgs is discouraged

Not just discouraged, it's simply not allowed within python3Packages.

Copy link
Copy Markdown
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rather set

meta.broken = lib.versionAtLeast ruamel-yaml.version "0.19";

and link to speechbrain/HyperPyYAML#32

@iynaix iynaix changed the title hyperpyyaml: fix build for ruamel-yaml 0.19 hyperpyyaml: mark broken for ruamel-yaml 0.19 Feb 28, 2026
@iynaix
Copy link
Copy Markdown
Contributor Author

iynaix commented Feb 28, 2026

Well, that's unfortunate. I've marked it as broken as requested.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. labels Feb 28, 2026
@GaetanLepage GaetanLepage added this pull request to the merge queue Feb 28, 2026
@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Feb 28, 2026
Merged via the queue into NixOS:master with commit c0de925 Feb 28, 2026
36 of 38 checks passed
@dotlambda
Copy link
Copy Markdown
Member

Any top-level package, i.e., not in python3Packages, that (transitively) depends on hyperpyyaml should use overrideScope to pin ruamel-yaml to an old version.

@CertainLach CertainLach mentioned this pull request Mar 20, 2026
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants