Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve issue in filter/validate deprecation path #3368

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

jsiirola
Copy link
Member

Fixes # .

Summary/Motivation:

@emma58 pointed out a bug in the Set filter/validate deprecation path where Scalar sets with dim=2 would silently not call filter correctly (as the deprecation path required the filter function to raise an exception or return false when called with the new syntax. This PR resolves the error and adds a test for this scenario.

In addition, @mfripp pointed out on SO that we were being rather rude deprecating an old syntax in the same release that we added support for the new API. This PR silences the deprecation warning for the (common) case where filter / validate was being used on a Scalar Set.

Changes proposed in this PR:

  • fix filter/validate deprecation path for ScalarSets
  • add a test for the edge case that motivated this PR
  • Silence (for now) the deprecation warning for scalar sets.

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@blnicho blnicho self-requested a review September 24, 2024 18:51
@mrmundt mrmundt requested a review from emma58 October 8, 2024 18:53
Copy link
Contributor

@emma58 emma58 left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this! :)

@blnicho blnicho merged commit dc72d1d into Pyomo:main Oct 16, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants