Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pygmt/_show_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def show_versions(file: TextIO | None = sys.stdout) -> None:
lines.extend([f" {key}: {val}" for key, val in sys_info.items()])
lines.append("Dependency information:")
lines.extend([f" {key}: {val}" for key, val in dep_version.items()])
lines.append("GMT library information:")
lines.append("GMT information:")
lines.extend([f" {key}: {val}" for key, val in _get_clib_info().items()])

if warnmsg := _check_ghostscript_version(dep_version["ghostscript"]):
Expand Down
4 changes: 2 additions & 2 deletions pygmt/clib/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ def info(self) -> dict[str, str]:
"""
if not hasattr(self, "_info"):
self._info = {
"version": self.get_default("API_VERSION"),
"version": self.get_default("API_BIN_VERSION"),

@seisman seisman Aug 10, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm. Someone may likely use Session.info("version") to check the current GMT library version, so this looks like a breaking change.

Maybe keep the Session.info() dictionary unchanged, but only change the output only of pygmt.show_versions? I.e., manipulate the dictionary in _get_clib_info().

# "api version": self.get_default("API_VERSION"),
"padding": self.get_default("API_PAD"),
# API_BINDIR points to the directory of the Python interpreter
# "binary dir": self.get_default("API_BINDIR"),
Expand All @@ -209,7 +210,6 @@ def info(self) -> dict[str, str]:
"cores": self.get_default("API_CORES"),
"grid layout": self.get_default("API_GRID_LAYOUT"),
"image layout": self.get_default("API_IMAGE_LAYOUT"),
"binary version": self.get_default("API_BIN_VERSION"),
}
return self._info

Expand Down
Loading