From 7ca96c7fd29ab88bf9d88cba524765c247bfada3 Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Tue, 6 Jan 2026 09:31:14 -0500 Subject: [PATCH] GP-6288: Updating PyGhidra README and version --- Ghidra/Features/PyGhidra/src/main/py/README.md | 7 +++++++ .../Features/PyGhidra/src/main/py/src/pyghidra/__init__.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Ghidra/Features/PyGhidra/src/main/py/README.md b/Ghidra/Features/PyGhidra/src/main/py/README.md index ed42b65a94..72ee7b0929 100644 --- a/Ghidra/Features/PyGhidra/src/main/py/README.md +++ b/Ghidra/Features/PyGhidra/src/main/py/README.md @@ -567,6 +567,13 @@ import pdb # imports Python's pdb import pdb_ # imports Ghidra's pdb ``` ## Change History +__3.1.0__ +* PyGhidra will now, by default, restore `sys.modules` to its prior state after a PyGhidra script is + run (or the interactive interpreter is reset) so the next time a script is run, it freshly loads + all of its imported modules again. This default behavior can be disabled by setting the + `pyghidra.sys.modules.restore.disable` Java system property to `true`, which can be done in the + `support/launch.properties` file. + __3.0.2__ * Fixed an issue that prevented [`pyghidra.analysis_properties()`](#pyghidraanalysis_properties) from having access to all of the analysis properties. diff --git a/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/__init__.py b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/__init__.py index bcc7a0a26e..7d6bfe7e41 100644 --- a/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/__init__.py +++ b/Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/__init__.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. ## -__version__ = "3.0.2" +__version__ = "3.1.0" # stub for documentation and typing # this is mostly to hide the function parameter