astropy/astropy — pull request #2343 by eteq (2014-05-01 01:25:23+00:00)
Title: Deprecate functional cosmology interface

This is triggered by discussion in #2304. There seems to be building consensus to do away with the functional interface in favor of e.g. ``WMAP9.luminosity_distance(...)`` and similar OO-approaches.

The rest is my response to the comment in #2304 by @nhmc that begins with "I started a pull request to mirror the methods as functions, and my inner developer protested too much":

I would also be fine (perhaps happy?) with seeing the functional interface go away, but I also see @nhmc's point that this may well annoy users who we never hear from.

A "third-road" option: Deprecate in 0.4, and in the next verson (1.0, an LTS), leave the functions in, but no longer publicly expose them (e.g., just remove ``from .funcs import *`` from ``astropy/cosmology/__init__.py``). In the deprecation message, be sure to end with "in future releases, the functional interface will not be supported, but will remain in `astropy.cosmology.func`" or similar. Then people can keep using their old code with just a trivial change from ``from astropy.cosmologyimport whatever`` to ``from astropy.cosmology.func import whatever``, but they've been warned that they really shouldn't be doing that.