This is an automated email from the ASF dual-hosted git repository.

potiuk 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 be445d2a69 Fix wrong import for cloud build example (#33137)
be445d2a69 is described below

commit be445d2a69bba9f3806fe6a5363d2b0b6390651e
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sat Aug 5 12:30:16 2023 +0200

    Fix wrong import for cloud build example (#33137)
    
    The import of urlparse in cloud build was importing "future" urlparse
    which is a Python 2 remnant (future library has been used in order
    to make a bridge between Python 2 and Python 3 and provided
    Python 3 - compatible implementation of some stdlib calls that
    could be used in both Puthon 3 and Python 2.
    
    Apparently one of our  of our dependncies stopped pulling future in
    Python 3.11 so it started to fail our main with Python 3.11 because the
    future library is missing there.
    
    This PR switches the import to regular urlparse.
---
 tests/system/providers/google/cloud/cloud_build/example_cloud_build.py  | 2 +-
 .../providers/google/cloud/cloud_build/example_cloud_build_async.py     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/tests/system/providers/google/cloud/cloud_build/example_cloud_build.py 
b/tests/system/providers/google/cloud/cloud_build/example_cloud_build.py
index 0a420b1635..1c14c53e31 100644
--- a/tests/system/providers/google/cloud/cloud_build/example_cloud_build.py
+++ b/tests/system/providers/google/cloud/cloud_build/example_cloud_build.py
@@ -31,9 +31,9 @@ import os
 from datetime import datetime
 from pathlib import Path
 from typing import Any, cast
+from urllib.parse import urlsplit
 
 import yaml
-from future.backports.urllib.parse import urlsplit
 
 from airflow import models
 from airflow.models.baseoperator import chain
diff --git 
a/tests/system/providers/google/cloud/cloud_build/example_cloud_build_async.py 
b/tests/system/providers/google/cloud/cloud_build/example_cloud_build_async.py
index c652bd4aef..42af8c4538 100644
--- 
a/tests/system/providers/google/cloud/cloud_build/example_cloud_build_async.py
+++ 
b/tests/system/providers/google/cloud/cloud_build/example_cloud_build_async.py
@@ -31,9 +31,9 @@ import os
 from datetime import datetime
 from pathlib import Path
 from typing import Any, cast
+from urllib.parse import urlparse
 
 import yaml
-from future.backports.urllib.parse import urlparse
 
 from airflow import models
 from airflow.models.baseoperator import chain

Reply via email to