Merged
Conversation
This rework the yacc() logic to either generate a parse table file, or create a parser from a provided parse table module.
blnicho
reviewed
Feb 11, 2026
Member
blnicho
left a comment
There was a problem hiding this comment.
This is great! I have a few minor comments. I only skimmed yacc.py and lex.py. If there are specific portions of those files I should review in detail let me know.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3840 +/- ##
==========================================
- Coverage 89.66% 89.48% -0.19%
==========================================
Files 902 905 +3
Lines 105609 106462 +853
==========================================
+ Hits 94693 95264 +571
- Misses 10916 11198 +282
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
blnicho
approved these changes
Feb 11, 2026
Member
blnicho
left a comment
There was a problem hiding this comment.
I found a few typos in docstrings. Since these are NFCs we can fix them and merge without waiting for tests to run again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3823
Summary/Motivation:
This removes the external dependency on
plyby bringing it into the codebase as a "third-party library". This resolves #3823 by modifyingplyto disallow loading parse tables from pickle files (additionally, it disallows loading them from arbitrary files). Instead,vacc()only accepts an already-imported parsetable module.This PR moves to a new workflow where we distribute the parsetable as part of the Pyomo codebase, and the DAT parser imports it like any other module. The parse table module is created by running
pyomo/dataportal/parse_datacmds.pyas a script. As a second check to ensure the two files are kept in sync, we srote a sha256 hash ofparse_datacmds.pyin the parse table module, and aDeveloperErroris raised if they differ.The new
pyomo/tplmodule space is excluded from Black, Coverage, and Typos checks, to support the minimal changes to any TPL code.Changes proposed in this PR:
pyomo/tpl/plyplyas an external dependencyLICENSE.mdwith all copyright / license statements for any derived code in Pyomo.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: