Skip to content

Remove the _suppress_ctypes attribute from Block#3347

Merged
mrmundt merged 1 commit intoPyomo:mainfrom
jsiirola:remove-block-suppress-ctypes
Aug 14, 2024
Merged

Remove the _suppress_ctypes attribute from Block#3347
mrmundt merged 1 commit intoPyomo:mainfrom
jsiirola:remove-block-suppress-ctypes

Conversation

@jsiirola
Copy link
Copy Markdown
Member

Fixes # .

Summary/Motivation:

This PR removes the _suppress_ctypes attribute from Blocks. This was a hack put in 15 years ago to support PySP optimizations. It is not used anywhere in the codebase, or (to our knowledge) in any derived packages. Leaving it in was causing challenges when users were defining custom Block classes

Changes proposed in this PR:

  • Remove the _suppress_ctypes attribute from all BlockData instances

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.

Copy link
Copy Markdown
Contributor

@mrmundt mrmundt left a comment

Choose a reason for hiding this comment

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

I looovveee the removal of unnecessary code.

Copy link
Copy Markdown
Contributor

@Robbybp Robbybp left a comment

Choose a reason for hiding this comment

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

Make it easier to subclass pyomo types!

@mrmundt mrmundt merged commit b5825e9 into Pyomo:main Aug 14, 2024
@jsiirola jsiirola deleted the remove-block-suppress-ctypes branch August 20, 2024 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

3 participants