Skip to content
Merged
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
6 changes: 3 additions & 3 deletions astropy/io/ascii/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""


import collections
import collections.abc

@bsipocz bsipocz Jul 11, 2018 •

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.

We can't have this for the 2.0.x backport. I'll remove this change from the backport, but anyway, expect that it won't cause any roubles given the last commit of the PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, the warning is filtered for lxml, so should be fine.

import itertools
import operator

Expand Down Expand Up @@ -95,10 +95,10 @@ def sortmore(*args, **kw):
if globalkey is None:
globalkey = lambda *x: 0

if not isinstance(globalkey, collections.Callable):
if not isinstance(globalkey, collections.abc.Callable):
raise ValueError('globalkey needs to be callable')

if isinstance(key, collections.Callable):
if isinstance(key, collections.abc.Callable):
k = lambda x: (globalkey(*x), key(x[0]))
elif isinstance(key, tuple):
key = (k if k else lambda x: 0 for k in key)
Expand Down