buhln opened a new issue, #57346:
URL: https://github.com/apache/airflow/issues/57346
### Apache Airflow version
3.1.0
### If "Other Airflow 2/3 version" selected, which one?
_No response_
### What happened?
If the structlog package version > 25.4.0 is installed the import of
airflow.sdk does not work.
```
>>> import airflow.sdk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/home/xxxxxxx/miniconda3/envs/airflow/lib/python3.12/site-packages/airflow/__init__.py",
line 79, in <module>
settings.initialize()
File
"/home/xxxxxxx/miniconda3/envs/airflow/lib/python3.12/site-packages/airflow/settings.py",
line 698, in initialize
LOGGING_CLASS_PATH = configure_logging()
^^^^^^^^^^^^^^^^^^^
File
"/home/xxxxxxx/miniconda3/envs/airflow/lib/python3.12/site-packages/airflow/logging_config.py",
line 88, in configure_logging
from airflow._shared.logging import configure_logging, init_log_folder,
translate_config_values
File
"/home/xxxxxxx/miniconda3/envs/airflow/lib/python3.12/site-packages/airflow/_shared/logging/__init__.py",
line 27, in <module>
from .structlog import configure_logging, init_log_file, init_log_folder
File
"/home/xxxxxxx/miniconda3/envs/airflow/lib/python3.12/site-packages/airflow/_shared/logging/structlog.py",
line 38, in <module>
from .percent_formatter import PercentFormatRender
File
"/home/xxxxxxx/miniconda3/envs/airflow/lib/python3.12/site-packages/airflow/_shared/logging/percent_formatter.py",
line 29, in <module>
from structlog.dev import ConsoleRenderer, Styles
ImportError: cannot import name 'Styles' from 'structlog.dev'
(/home/xxxxxxx/miniconda3/envs/airflow/lib/python3.12/site-packages/structlog/dev.py)
```
### What you think should happen instead?
Import should work for structlog 25.5.0 as it does for version 25.4.0.
### How to reproduce
Install Airflow with `pip install apache-airflow==3.1.0`, open REPL and try
`import airflow.sdk`.
### Operating System
Ubuntu 22.04.5 LTS
### Versions of Apache Airflow Providers
_No response_
### Deployment
Virtualenv installation
### Deployment details
Python 3.12.11
### Anything else?
_No response_
### Are you willing to submit PR?
- [ ] 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]