tatiana opened a new issue, #51566:
URL: https://github.com/apache/airflow/issues/51566

   ### Apache Airflow version
   
   3.0.1
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   This DAG is used to run with Airflow 2.9, 2.10 and 2.11:
   
   ```
   from datetime import datetime
   
   from airflow import DAG
   from airflow.datasets import Dataset, DatasetAlias
   
   
   from airflow import DAG, Dataset
   from airflow.models.baseoperator import BaseOperator
   from airflow.utils.context import Context
   
   
   #dataset_alias = DatasetAlias("my_dataset_alias")
   dataset_alias = DatasetAlias('source_rendering_dag__multibyte_run')
   dataset = Dataset("something")
   
   
   class CustomOperator(BaseOperator):
   
       def __init__(self, **kwargs):
           kwargs["outlets"] = [dataset_alias] 
           super().__init__(**kwargs)
   
       def execute(self, context: Context):
           context["outlet_events"][DatasetAlias].add(dataset) 
   
   
   with DAG("example_dataset_alias", start_date=datetime(2023, 4, 20)) as dag:
       do_something = CustomOperator(task_id="do_something")
       do_something
   ```
   
   When trying it with Airflow 3.0.1 and 3.0.2rc1, however, it raises the 
following exception:
   ```
   Timestamp: 2025-06-10, 09:26:26
   
   Traceback (most recent call last):
     File 
"/Users/tati/Code/cosmos-fresh/astronomer-cosmos/venv-af3/lib/python3.10/site-packages/airflow/sdk/definitions/asset/__init__.py",
 line 186, in _validate_non_empty_identifier
       if not _validate_identifier(instance, attribute, value):
     File 
"/Users/tati/Code/cosmos-fresh/astronomer-cosmos/venv-af3/lib/python3.10/site-packages/airflow/sdk/definitions/asset/__init__.py",
 line 181, in _validate_identifier
       raise ValueError(f"{type(instance).__name__} {attribute.name} must only 
consist of ASCII characters")
   ValueError: AssetAlias name must only consist of ASCII characters
   
   
![Image](https://github.com/user-attachments/assets/7eaf554b-3a0a-4230-b729-dc1134ddabe6)
   
   ```
   
   ### What you think should happen instead?
   
   Unless there was a good reason for Airflow DatasetAlias to stop supporting 
non-ASCII characters, I believe we should make Airflow 3 support it, and no 
longer fail when running the example DAG.
   
   ### How to reproduce
   
   Shared above.
   
   ### Operating System
   
   N/A
   
   ### Versions of Apache Airflow Providers
   
   N/A
   
   ### Deployment
   
   Other
   
   ### Deployment details
   
   N/A
   
   ### Anything else?
   
   No
   
   ### 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: commits-unsubscr...@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to