Improved support for moved/renamed/deprecated modules#3385
Merged
blnicho merged 22 commits intoPyomo:mainfrom Nov 5, 2024
Merged
Improved support for moved/renamed/deprecated modules#3385blnicho merged 22 commits intoPyomo:mainfrom
blnicho merged 22 commits intoPyomo:mainfrom
Conversation
This prevents conflicts with the main Python __future__ when the CWD is pyomo/pyomo
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3385 +/- ##
==========================================
+ Coverage 88.57% 88.58% +0.01%
==========================================
Files 883 879 -4
Lines 100343 100371 +28
==========================================
+ Hits 88882 88918 +36
+ Misses 11461 11453 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
blnicho
approved these changes
Nov 1, 2024
Member
blnicho
left a comment
There was a problem hiding this comment.
I'm excited about this change!
mrmundt
approved these changes
Nov 4, 2024
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 # .
Summary/Motivation:
NOTE: This PR is built on #3382. Please review / merge that PR before looking at this one. If you want to get a head start, you can compare this branch against the doc-reorg branch.
This PR replaces
pyomo.common.deprecation.relocated_module()withpyomo.common.deprecation.moved_module(). The new functionality supports renamed / moved / deprecated modules through a plugin to theimportlibsystem (instead of hackingsys.modules). This:pluginsdirectories intoplugins.pymodules)Changes proposed in this PR:
pyomo.common.deprecation.relocated_module()pyomo.common.deprecation.moved_module().pyomo._archivedirectorypyomo/__future__.py->pyomo.future.pyfrom pyomo.__future__ import ...pyomo/pyomodirectory.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: