Skip to content

Conversation

@amoghrajesh
Copy link
Contributor

universal_pathlib releases a 0.3.0 version and that added pathlib_abc==0.5.1 in it, which introduced stricter type checking on Path objects.

The original code was calling is_relative_to() incorrectly on Path objects leading to error:

  Using airflow version from current sources

  providers/common/io/src/airflow/providers/common/io/xcom/backend.py:105: error: Argument 1 to "is_relative_to" of "PurePath" has incompatible type "ObjectStoragePath"; expected "PurePath"  [arg-type]
                  if not Path.is_relative_to(ObjectStoragePath(data), p):
                                             ^~~~~~~~~~~~~~~~~~~~~~~
  providers/common/io/src/airflow/providers/common/io/xcom/backend.py:105: error: Argument 2 to "is_relative_to" of "PurePath" has incompatible type "ObjectStoragePath"; expected "str | PathLike[str]" 
  [arg-type]
                  if not Path.is_relative_to(ObjectStoragePath(data), p):
                                                                      ^
  Found 2 errors in 1 file (checked 3984 source files)

I have changed to call it as an instance method on the ObjectStoragePath object itself.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@amoghrajesh amoghrajesh merged commit 180ec47 into apache:main Sep 30, 2025
78 checks passed
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 1, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 2, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 3, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 4, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 5, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 5, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 7, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 8, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 9, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 10, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 11, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 12, 2025
dabla pushed a commit to dabla/airflow that referenced this pull request Oct 12, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 14, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 15, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 17, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants