Skip to content

Conversation

@opotowsky
Copy link
Member

What is the change? Why is it being made?

BRB

SCR Information

Change Type: trivial

One-Sentence Rationale: The ruamel.yaml project released a new version with updated API and changed dependencies that we need to conform to.

One-line Impact on Requirements: NA


Checklist

@opotowsky opotowsky added the low priority Style points and non-features label Jan 5, 2026
Comment on lines 525 to 527
RoundTripLoader.max_depth = None
loader = RoundTripLoader if roundTrip else CLoader
return super().load(stream, Loader=loader)
Copy link
Member Author

@opotowsky opotowsky Jan 5, 2026

Choose a reason for hiding this comment

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

we do not have a need for CLoader. we only ever use load with typ="safe" or "typ=rt". speed isn't a concern for these 1 off yaml loading events...we aren't doing thousands of these

I think if we drop the CLoader thing and clean up this method, we sidestep the entire issue with the deprecation of max_depth attribute for RTLoader class

Copy link
Member Author

Choose a reason for hiding this comment

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

@john-science whatcha think about a mini cleanup job here, and then we can 1. unpin ruamel.yaml and 2. likely drop the clib dep, which appears to be a dep ruamel.yaml dropped

Copy link
Member

Choose a reason for hiding this comment

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

for these 1 off yaml loading events...we aren't doing thousands of these

Aren't we doing exactly that, in the unit tests? In ARMI and in the big packages with lots of tests downstream?

Honest question. How big a hit are we talking?

likely drop the clib dep

I thought that was the goal here, but the pyproject.toml doesn't have that change yet. I would love to lose the depenendency though. For sure.

Copy link
Member Author

Choose a reason for hiding this comment

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

that's a great question. let me get this PR running with that change and we can compare runtime for ARMI CI as well as downstream.

@opotowsky opotowsky requested a review from john-science January 5, 2026 22:49
pyproject.toml Outdated
Comment on lines 44 to 45
"ruamel.yaml.clib ; python_version >= '3.11.0'", # C-based core of ruamel below
"ruamel.yaml.clib<=0.2.7 ; python_version < '3.11.0'", # C-based core of ruamel below
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"ruamel.yaml.clib ; python_version >= '3.11.0'", # C-based core of ruamel below
"ruamel.yaml.clib<=0.2.7 ; python_version < '3.11.0'", # C-based core of ruamel below

Copy link
Member

Choose a reason for hiding this comment

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

Is this the goal?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea -- Let me spend a few minutes on this! I dropped th ball yesterday. Maybe It'll be all for nothing but won't know until we try

@opotowsky opotowsky linked an issue Jan 6, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

low priority Style points and non-features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle issues with ruamel-yaml version pin

3 participants