You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2023/07/24 21:23:07 UTC

[GitHub] [airflow] potiuk commented on a diff in pull request #32767: Move all k8S classes to cncf.kubernetes provider

potiuk commented on code in PR #32767:
URL: https://github.com/apache/airflow/pull/32767#discussion_r1272772460


##########
airflow/kubernetes/pre_2_7_compatibility/__init__.py:
##########
@@ -15,24 +14,17 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-"""
-This module is deprecated.
-Please use :mod:`kubernetes.client.models` for `V1ResourceRequirements` and `Port`.
-"""
 from __future__ import annotations
 
+# All the classes in this module should only be kept for backwards-compatibility reasons.
+# old cncf.kubernetes providers will use those in their frozen version for pre-2.7.0 release
 import warnings
 
-from airflow.exceptions import RemovedInAirflow3Warning
-
-# flake8: noqa
-
-with warnings.catch_warnings():
-    warnings.simplefilter("ignore", RemovedInAirflow3Warning)
-    from airflow.providers.cncf.kubernetes.backcompat.pod import Port, Resources
-
 warnings.warn(
-    "This module is deprecated. Please use `kubernetes.client.models` for `V1ResourceRequirements` and `Port`.",
-    RemovedInAirflow3Warning,
+    "This module is deprecated. The `cncf.kubernetes` provider before version 2.7.0 use this module or you"

Review Comment:
   Yeah. I could not decide whether to use Airflow or k8s version here. I made it consistently `pre-7.4.0`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org