ENH catch deprecation warnings in __repr__ and __string__