Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Fix Python 3.11 issue for pprint_include/exclude_names
  • Loading branch information
taldcroft committed Sep 12, 2022
commit 1185382ab86e8add9860aedad2b697971324c75b
4 changes: 2 additions & 2 deletions astropy/table/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -2680,7 +2680,7 @@ def remove_columns(self, names):
This gives the same as using remove_column.
'''
for name in self._set_of_names_in_colnames(names):
self.columns.pop(name)
del self.columns[name]

def _convert_string_dtype(self, in_kind, out_kind, encode_decode_func):
"""
Expand Down Expand Up @@ -2781,7 +2781,7 @@ def keep_columns(self, names):
names = self._set_of_names_in_colnames(names)
for colname in self.colnames:
if colname not in names:
self.columns.pop(colname)
del self.columns[colname]

def rename_column(self, name, new_name):
'''
Expand Down
3 changes: 3 additions & 0 deletions docs/changes/table/13639.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix a Python 3.11 compatibility issue. Ensure that when removing a table column
that the ``pprint_include_names`` or ``pprint_exclude_names`` attributes get
updated correctly.