Skip to content

Commit

Permalink
Fix astropy pformat_all deprecation
Browse files Browse the repository at this point in the history
Astropy's Table.pformat_all() is now deprecated.   Table.pformat() is an exact replacement as of Astropy v7.
  • Loading branch information
dhirving committed Feb 26, 2025
1 parent bd9e73f commit e814857
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ classifiers = [
]
keywords = ["lsst"]
dependencies = [
"astropy >=4.0",
"astropy >=7.0",
"pyyaml >=5.1",
"sqlalchemy >=1.4",
"click >= 7.0",
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def astropyTablesToStr(tables: list[Table]) -> str:
ret = ""
for table in tables:
ret += "\n"
table.pformat_all()
table.pformat()
ret += "\n"
return ret

Expand Down
4 changes: 2 additions & 2 deletions python/lsst/daf/butler/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ def assertAstropyTablesEqual(
# Assert that they match.
# Recommendation from Astropy Slack is to format the table into
# lines for comparison. We do not compare column data types.
table1 = table.pformat_all()
expected1 = expected.pformat_all()
table1 = table.pformat()
expected1 = expected.pformat()
original_max = self.maxDiff
self.maxDiff = None # This is required to get the full diff.
try:
Expand Down

0 comments on commit e814857

Please sign in to comment.