alexandermalyga opened a new issue, #27081:
URL: https://github.com/apache/airflow/issues/27081
### Apache Airflow version
2.4.1
### What happened
When initialising an operator with multiple inheritance, an exception is
raised:
`airflow.exceptions.AirflowException: missing keyword argument ...`
This only happens when multiple parent classes share an attribute name in
their `__init__` method.
### What you think should happen instead
Multiple inheritance with shared attribute names in the parent classes
should work as expected in Python.
### How to reproduce
Run this python script:
```
from airflow.models import BaseOperator
class A(BaseOperator):
def __init__(self, *, value: str, **kwargs):
super().__init__(**kwargs)
class B(BaseOperator):
def __init__(self, *, value: str, **kwargs):
super().__init__(**kwargs)
class C(A, B):
def __init__(self, *, value: str, **kwargs):
super().__init__(value=value, **kwargs)
C(task_id="test", value="value")
```
### Operating System
macOS 12.6
### Versions of Apache Airflow Providers
_No response_
### Deployment
Docker-Compose
### Deployment details
_No response_
### Anything else
The issue seems to be somehow caused by the @apply_defaults decorator and
signature caching, but I'm not very familiar with it.
Related:
-
https://stackoverflow.com/questions/54529660/airflow-apply-defaults-decorator-reports-argument-is-required
- https://lists.apache.org/thread/kwfdk17t8gfrv6fbwoc041sr8thgt4p3
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]