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

Reorder definitions to avoid NameError in some situations #3264

Merged
merged 5 commits into from
May 17, 2024

Conversation

jsiirola
Copy link
Member

@jsiirola jsiirola commented May 16, 2024

Fixes #3262

Summary/Motivation:

This reorders some definitions to avoid a NameError reported by users.

Changes proposed in this PR:

  • reorder imports / definitions
  • remove compatibility code needed for Python < 3.8 (no longer supported by Pyomo)
  • [unrelated] resolve deprecated use of pyplot.cm.get_cmap() in community_detection (deprecation path removed in matplotlib 3.9.0)

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
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.

Assuming tests pass, approved. Removes more code than it adds.

@mrmundt mrmundt merged commit 9e102d8 into Pyomo:main May 17, 2024
32 of 33 checks passed
@jsiirola jsiirola deleted the resolve-sympy-tools-import-error branch May 29, 2024 21:14
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.

NameError in pyomo when import pertpy
4 participants