From 3780f379005ede212044ce874f81b8649c1a6215 Mon Sep 17 00:00:00 2001 From: cbcrespo Date: Tue, 9 Jun 2026 12:02:20 +0100 Subject: [PATCH 1/2] Add deprecation warning for pvlib.irradiance.king --- pvlib/irradiance.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index 50f02426de..fa4c47de42 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -16,7 +16,7 @@ from pvlib import atmosphere, solarposition, tools import pvlib # used to avoid dni name collision in complete_irradiance -from pvlib._deprecation import pvlibDeprecationWarning +from pvlib._deprecation import deprecated, pvlibDeprecationWarning import warnings @@ -984,7 +984,12 @@ def reindl(surface_tilt, surface_azimuth, dhi, dni, ghi, dni_extra, return sky_diffuse - +@deprecated( + since="0.16.0", + removal="", + name="pvlib.irradiance.king", + alternative="other diffuse transposition models in pvlib.irradiance", +) def king(surface_tilt, dhi, ghi, solar_zenith): ''' Determine diffuse irradiance from the sky on a tilted surface using From 2ea46167638bf84d879063b0f268b826ed3df11b Mon Sep 17 00:00:00 2001 From: cbcrespo Date: Mon, 15 Jun 2026 10:49:25 +0100 Subject: [PATCH 2/2] Correct deprecation version --- pvlib/irradiance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py index fa4c47de42..8e71bc9810 100644 --- a/pvlib/irradiance.py +++ b/pvlib/irradiance.py @@ -984,8 +984,9 @@ def reindl(surface_tilt, surface_azimuth, dhi, dni, ghi, dni_extra, return sky_diffuse + @deprecated( - since="0.16.0", + since="0.15.2", removal="", name="pvlib.irradiance.king", alternative="other diffuse transposition models in pvlib.irradiance",