You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from deprecated.sphinx import deprecated
@deprecated(
reason="""Since Python 3.4, you can use the standard function :func:`statistics.mean`.""",
version="2.5.0",
)
def myfun(args):
"""
Foobar.
Blah.
"""
return args
Well the pvlib._deprecation.deprecated has since and removal parameters and inserts that .. deprecated:: directive into the docstring too. But it inserts the directive at the top of the docstring so it applies to the entire function, not a single parameter.
I'm not sure I follow the suggestion though. Are you proposing we make a note in the docstring's description of map_variables that the default value will change in the future?
Sorry, I didn't think it through very well. I guess, this warning for map_variables seems like a maintenance burden, because we'll the deprecation version is hard-coded, so we need a follow up issue to update the warning message after v0.11 I think. It would be nice if there was a boilerplate way to have this somewhat automated, but probably not. It's not that big a deal
#1374 did what we should probably be doing with most deprecations: mention the specific version when the deprecated behavior will change.
pvlib-python/pvlib/iotools/psm3.py
Lines 334 to 340 in 1893b20
Tagging this in the 0.11.0 milestone so we don't forget it.
The text was updated successfully, but these errors were encountered: