Change deprecated decorator to display warning in doc string

As discussed in #461.