diff --git a/packages/jsii-pacmak/lib/targets/python.ts b/packages/jsii-pacmak/lib/targets/python.ts index e5915a99a1..f06fd7a458 100644 --- a/packages/jsii-pacmak/lib/targets/python.ts +++ b/packages/jsii-pacmak/lib/targets/python.ts @@ -2125,7 +2125,14 @@ class Package { scripts, }; - switch (this.metadata.docs?.stability) { + // Packages w/ a deprecated message may have a non-deprecated stability (e.g: when EoL happens + // for a stable package). We pretend it's deprecated for the purpose of trove classifiers when + // this happens. + switch ( + this.metadata.docs?.deprecated + ? spec.Stability.Deprecated + : this.metadata.docs?.stability + ) { case spec.Stability.Experimental: setupKwargs.classifiers.push('Development Status :: 4 - Beta'); break; diff --git a/packages/jsii/lib/project-info.ts b/packages/jsii/lib/project-info.ts index 2de0ae3f13..ce69463553 100644 --- a/packages/jsii/lib/project-info.ts +++ b/packages/jsii/lib/project-info.ts @@ -484,7 +484,7 @@ function _validateStability( if (!stability && deprecated) { stability = spec.Stability.Deprecated; } else if (deprecated && stability !== spec.Stability.Deprecated) { - throw new Error( + console.warn( `Package is deprecated (${deprecated}), but it's stability is ${stability} and not ${spec.Stability.Deprecated}`, ); }