Pyomo / pyomo

An object-oriented algebraic modeling language in Python for structured optimization problems.
https://www.pyomo.org
Other
1.9k stars 490 forks source link

Update guard for pint import to possibly avoid recursion error #3277

Closed jsiirola closed 1 month ago

jsiirola commented 1 month ago

Might fix #3274

Summary/Motivation:

It is not at all clear how #3274 is generating a recursion error. However, this might resolve the symptom by avoiding reliance on the UnitsContainer.__getattribute__ at the module level in the Viewer tests.

Changes proposed in this PR:

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.