xBis7 commented on code in PR #63932:
URL: https://github.com/apache/airflow/pull/63932#discussion_r3011350713


##########
airflow-core/src/airflow/stats.py:
##########
@@ -15,17 +15,16 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-"""Deprecated module - Stats moved to airflow.observability.stats but we have 
to retain compat."""
+"""Deprecated module - stats moved to airflow.observability.stats."""
 
 from __future__ import annotations
 
 import warnings
 
-from airflow.sdk.observability.stats import Stats as Stats

Review Comment:
   @potiuk In case anyone imported
   
   ```python
   from airflow.stats import Stats
   ```
   
   he would get a warning that `Stats` has been moved and that
   
   ```python
   from airflow.observability.stats import Stats
   ```
   
   should be used instead.
   
   But we only maintain `Stats` as a shim to be used in providers. We don't 
want to encourage using it in core or sdk. I don't think anyone in core will 
try to import
   
   ```python
   from airflow import stats
   ```
   
   to get the deprecation warning to use
   
   ```python
   from airflow.observability import stats
   ```
   
   These are all new imports. So, I'm wondering whether this file should be 
removed entirely.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to