Repository: mabel-dev/opteryx

Issue:
🪲 Python 3.9 tests stalling
### Thank you for taking the time to report a problem with Opteryx.
_To help us to respond to your request we ask that you try to provide the below detail about the bug._

**Describe the bug** _A clear and specific description of what the bug is. What the error, incorrect or unexpected behaviour was._


**Expected behaviour** _A clear and concise description of what you expected to happen._


**Sample Code/Statement** _If you can, please submit the SQL statement or Python code snippet, or a representative example using the sample datasets._

~~~sql

~~~

**Additional context** _Add any other context about the problem here, for example what you have done to try to diagnose or workaround the problem._



Discussion:

Resolving patch:
diff --git a/opteryx/__version__.py b/opteryx/__version__.py
--- a/opteryx/__version__.py
+++ b/opteryx/__version__.py
@@ -1,4 +1,4 @@
-__build__ = 477
+__build__ = 482
 
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.


Test patch:
diff --git a/tests/misc/test_documentation.py b/tests/misc/test_documentation.py
--- a/tests/misc/test_documentation.py
+++ b/tests/misc/test_documentation.py
@@ -8,8 +8,10 @@
 sys.path.insert(1, os.path.join(sys.path[0], "../.."))
 
 from tests.tools import download_file
+from tests.tools import is_version, skip_if
 
 
+@skip_if(is_version("3.9"))
 def test_documentation_connect_example():
     import opteryx
 
@@ -24,6 +26,7 @@ def test_documentation_connect_example():
     conn.close()
 
 
+@skip_if(is_version("3.9"))
 def test_readme_1():
     import opteryx
 
@@ -31,6 +34,7 @@ def test_readme_1():
     result.head()
 
 
+@skip_if(is_version("3.9"))
 def test_readme_2():
     import pandas
 
@@ -44,6 +48,7 @@ def test_readme_2():
     aggregated_df.head()
 
 
+@skip_if(is_version("3.9"))
 def test_readme_3():
     import opteryx
 
@@ -57,6 +62,7 @@ def test_readme_3():
     result.head()
 
 
+@skip_if(is_version("3.9"))
 def test_readme_4():
     import opteryx
     from opteryx.connectors import GcpCloudStorageConnector
@@ -68,6 +74,7 @@ def test_readme_4():
     result.head()
 
 
+@skip_if(is_version("3.9"))
 def test_readme_5():
     import opteryx
     from opteryx.connectors import SqlConnector
@@ -90,12 +97,14 @@ def test_readme_5():
     result.head()
 
 
+@skip_if(is_version("3.9"))
 def test_get_started():
     import opteryx
 
     result = opteryx.query("SELECT * FROM $planets;").arrow()
 
 
+@skip_if(is_version("3.9"))
 def test_python_client():
     import opteryx
 
@@ -136,6 +145,7 @@ def test_python_client():
     ).fetchall()
 
 
+@skip_if(is_version("3.9"))
 def test_pandas_integration_input():
     import pandas
 
@@ -155,12 +165,14 @@ def test_pandas_integration_input():
     results = opteryx.query("SELECT * FROM nephews").arrow()
 
 
+@skip_if(is_version("3.9"))
 def test_pandas_integration_output():
     import opteryx
 
     dataframe = opteryx.query("SELECT * FROM $planets").pandas()
 
 
+@skip_if(is_version("3.9"))
 def test_polars_integration_input():
     import polars
 
@@ -180,12 +192,14 @@ def test_polars_integration_input():
     results = opteryx.query("SELECT * FROM nephews").arrow()
 
 
+@skip_if(is_version("3.9"))
 def test_polars_integration_output():
     import opteryx
 
     dataframe = opteryx.query("SELECT * FROM $planets").polars()
 
 
+@skip_if(is_version("3.9"))
 def test_permissions_example():
     import opteryx
 
@@ -200,6 +214,7 @@ def test_permissions_example():
         print("User does not have permission to execute this query")
 
 
+@skip_if(is_version("3.9"))
 def test_role_based_permissions():
     import opteryx
 
@@ -226,6 +241,7 @@ def get_user_permissions(user_roles):
     assert perms == {"Query", "Execute", "Analyze"}
 
 
+@skip_if(is_version("3.9"))
 def test_membership_permissions():
     import opteryx
 
diff --git a/tests/plan_optimization/test_fold_all_constants.py b/tests/plan_optimization/test_fold_all_constants.py
--- a/tests/plan_optimization/test_fold_all_constants.py
+++ b/tests/plan_optimization/test_fold_all_constants.py
@@ -5,8 +5,10 @@
 
 import numpy
 import opteryx
+from tests.tools import is_version, skip_if
 
 
+@skip_if(is_version("3.9"))
 def test_we_dont_fold_random():
 
     SQL = "SELECT random() AS r FROM GENERATE_SERIES(5000) AS g"