Commit 0ee67a7
authored
Skip catalog loading for the version command (#3146)
# Rationale for this change
`pyiceberg version` should print the installed PyIceberg version even
when `.pyiceberg.yaml` or catalog-related environment variables are
invalid. CLI group callback eagerly loads the catalog for every
subcommand, so `version` can fail before it prints anything.
This change skips catalog loading for the `version` subcommand and adds
a regression test for that behavior.
## Are these changes tested?
Yes.
- Added `test_version_does_not_load_catalog` in
`tests/cli/test_console.py`
## Are there any user-facing changes?
Yes.
- `pyiceberg version` now prints the version without requiring valid
catalog configuration.1 parent 8691d94 commit 0ee67a7
2 files changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
64 | 76 | | |
65 | 77 | | |
66 | 78 | | |
| |||
0 commit comments