Skip to content

Deprecate resdata.util.test and set to remove in version 7.#1138

Merged
eivindjahren merged 4 commits into
mainfrom
deprecate
Apr 20, 2026
Merged

Deprecate resdata.util.test and set to remove in version 7.#1138
eivindjahren merged 4 commits into
mainfrom
deprecate

Conversation

@eivindjahren
Copy link
Copy Markdown
Collaborator

@eivindjahren eivindjahren commented Apr 20, 2026

In order to fix TestArea, it would be much simpler to apply some breaking changes: #1121 . We therefore deprecate resdata.util.tests which no one should really use, as all of its functionality is also in pytest/unittest, except potentially for SummaryMock which is not that great.

Note that since pytest errors on deprecation warnings at collect time, it was necessary to copy in the parts of resdata.util.test that was used by the tests straight away.

@eivindjahren eivindjahren self-assigned this Apr 20, 2026
@eivindjahren eivindjahren moved this to Ready for Review in SCOUT Apr 20, 2026
@eivindjahren eivindjahren force-pushed the deprecate branch 5 times, most recently from 8af6ec4 to 6e1dee1 Compare April 20, 2026 06:23
Also changes the deprecation message from plain warning to
type warning.

Note that some deprecation messages were not
updated as there is no plan to remove in version 7.

Also, monkey_the_camel methods now display deprecation warnings.
@eivindjahren eivindjahren force-pushed the deprecate branch 6 times, most recently from 276add5 to b45867a Compare April 20, 2026 07:34
Because pytest does not like deprecation warnings at collect time,
it was necessary to copy the classes into tests straight away.
Copy link
Copy Markdown
Contributor

@oyvindeide oyvindeide left a comment

Choose a reason for hiding this comment

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

LGTM!

@github-project-automation github-project-automation Bot moved this from Ready for Review to Reviewed in SCOUT Apr 20, 2026
@eivindjahren eivindjahren merged commit fcf473a into main Apr 20, 2026
13 checks passed
@eivindjahren eivindjahren deleted the deprecate branch April 20, 2026 11:31
@github-project-automation github-project-automation Bot moved this from Reviewed to Done in SCOUT Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants