This is an automated email from the ASF dual-hosted git repository.
Lee-W pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 8c733e4b12e Export FanOutMapper and wait policies from
airflow.partition_mappers (#69309)
8c733e4b12e is described below
commit 8c733e4b12e0b2aee384eb642e4fe7598628c34e
Author: Wei Lee <[email protected]>
AuthorDate: Tue Jul 7 12:12:53 2026 +0800
Export FanOutMapper and wait policies from airflow.partition_mappers
(#69309)
---
.../src/airflow/partition_mappers/__init__.py | 5 ++++
.../tests/unit/partition_mappers/test_init.py | 30 ++++++++++++++++++++++
2 files changed, 35 insertions(+)
diff --git a/airflow-core/src/airflow/partition_mappers/__init__.py
b/airflow-core/src/airflow/partition_mappers/__init__.py
index f7806038707..fe2157ee98c 100644
--- a/airflow-core/src/airflow/partition_mappers/__init__.py
+++ b/airflow-core/src/airflow/partition_mappers/__init__.py
@@ -23,6 +23,7 @@ from airflow.partition_mappers.fixed_key import FixedKeyMapper
from airflow.partition_mappers.identity import IdentityMapper
from airflow.partition_mappers.product import ProductMapper
from airflow.partition_mappers.temporal import (
+ FanOutMapper,
StartOfDayMapper,
StartOfHourMapper,
StartOfMonthMapper,
@@ -30,6 +31,7 @@ from airflow.partition_mappers.temporal import (
StartOfWeekMapper,
StartOfYearMapper,
)
+from airflow.partition_mappers.wait_policy import MinimumCount, WaitForAll
from airflow.partition_mappers.window import (
DayWindow,
HourWindow,
@@ -45,9 +47,11 @@ __all__ = [
"AllowedKeyMapper",
"ChainMapper",
"DayWindow",
+ "FanOutMapper",
"FixedKeyMapper",
"HourWindow",
"IdentityMapper",
+ "MinimumCount",
"MonthWindow",
"PartitionMapper",
"ProductMapper",
@@ -60,6 +64,7 @@ __all__ = [
"StartOfQuarterMapper",
"StartOfWeekMapper",
"StartOfYearMapper",
+ "WaitForAll",
"WeekWindow",
"Window",
"YearWindow",
diff --git a/airflow-core/tests/unit/partition_mappers/test_init.py
b/airflow-core/tests/unit/partition_mappers/test_init.py
new file mode 100644
index 00000000000..e7579ec6eec
--- /dev/null
+++ b/airflow-core/tests/unit/partition_mappers/test_init.py
@@ -0,0 +1,30 @@
+# 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
+
+import airflow.partition_mappers
+import airflow.sdk
+
+
+def test_package_root_exports_match_sdk():
+ """Every partition-mapper symbol exported from airflow.sdk must also be
exported from the core package root."""
+ sdk_names = {
+ name
+ for name, module in airflow.sdk.__lazy_imports.items()
+ if module.startswith(".definitions.partition_mappers")
+ }
+ assert sdk_names == set(airflow.partition_mappers.__all__)