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


##########
task-sdk/src/airflow/sdk/timezone.py:
##########
@@ -0,0 +1,49 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+from __future__ import annotations

Review Comment:
   Question is -> do we want to  (eventually) automate it as well eventually in 
all distributions including the shared libraries, and how. It would be great 
for example that when shared library is included in a few distributions, we do 
not have to remember about exposing newly added public methods everywhere where 
the library is included.
   
   I see  several options:
   
   1) document the pattern in the "shared" approach documentation and let 
people do it manually (prone to having different set of public stuff in 
different distributions)
   
   2) autamatically expose everything (that's a bit against the comment below - 
probably we do not want to expose everything
   
   3) define some conventions in shared libraries to say "this is public, this 
is not" and generate those facades automatically based on that in pre-commit.
   
   4) add this code to `__init__.py` of the shared library and have pre-commit 
that copies it to all libraries where it is used and replaces the import.
   
   WDYT?
   
   



-- 
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