-
Notifications
You must be signed in to change notification settings - Fork 518
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
Change from %r to %s for NumPy 2.0 compatibility #3353
Change from %r to %s for NumPy 2.0 compatibility #3353
Conversation
Thanks, @orthorhombic ! Could you do me a favor and add a small test that ensures the right behavior is happening? Tests for the NL writer can be found in: https://github.com/Pyomo/pyomo/tree/main/pyomo/repn/tests/ampl <- most likely the If you need help, let us know. |
@orthorhombic: Thank you for catching & resolving this! This is an important catch / fix ... I took the liberty of resolving a merge conflict and adding a test so that we can get this reviewed and merged for the next release (tomorrow!!). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, pending successful tests.
Sorry I'm just catching up on messages here. Thanks for the quick turnaround, and that this could make it into the next release! If anything comes up, I can take a look a bit later. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3353 +/- ##
=======================================
Coverage 88.59% 88.60%
=======================================
Files 874 874
Lines 99124 99124
=======================================
+ Hits 87822 87831 +9
+ Misses 11302 11293 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Fixes #3352
Summary/Motivation:
This changes %r to %s in the nl_writer for NumPy 2.0 compatibility. I believe this was missed in #3292
Changes proposed in this PR:
const = 'n%r\n'
gets changed toconst = 'n%s\n'
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: