Treat pandas as an optional dependency (#489)#536
Treat pandas as an optional dependency (#489)#536gs11 wants to merge 1 commit intodatabricks:mainfrom
Conversation
|
Any chance to get this reviewed? |
Thanks! @FBruzzesi I realize this change wasn't pushed properly to my branch. Updated it as well as rebased to resolve the |
|
Hello, I'm just wondering if it's possible to get any movement on this? The large pandas dependency is a blocker for my project. |
88098c7 to
439fbd4
Compare
|
Any chance of getting this reviewed? |
|
Is there any way to accelerate this PR? The underlaying issue was opened almost a year ago, and this PR nearing half a year and the issue is still quite blocking for being able to use databricks-sql-python at all. If there is any way for me to contribute, lmk. |
|
@gs11 it appears that there are conflicts. If I had a guess, it would be the lock file needs to be regenerated. |
src/databricks/sql/client.py
Outdated
| kwargs = {**kwargs, **access_token_kv} | ||
|
|
||
| self.disable_pandas = kwargs.get("_disable_pandas", False) | ||
| self.disable_pandas = False if pandas is None else kwargs.get("_disable_pandas", False) |
There was a problem hiding this comment.
| self.disable_pandas = False if pandas is None else kwargs.get("_disable_pandas", False) | |
| self.disable_pandas = True if pandas is None else kwargs.get("_disable_pandas", False) |
I had that backwards. If panda is not installed, it should be disabled.
|
Pandas is also imported here: |
|
I imagine they would want a warning message similar to the one for pyarrow: databricks-sql-python/src/databricks/sql/client.py Lines 81 to 86 in 4b7df5b |
df0d1ad to
e905f74
Compare
Thanks, updated. |
|
Are there any tests in the CI run without pandas installed? If not, it would be important to add for future stability. |
I can't comment on the effectiveness but there's |
That's helpful. Did you check the CI files to see if there is a test run without optional dependencies installed? |
|
@gs11 Have started the tests to run, will review after the tests have passed |
No, there seems to be a single set of dependencies used for tests. https://github.com/databricks/databricks-sql-python/blob/main/.github/workflows/code-coverage.yml#L52-L62 |
Signed-off-by: Gustav Sinder <gustav.sinder@gmail.com>
|
Fixed the linting error but there are plenty of tests failing on unrelated issues 😕 |
|
@msrathore-db Can you look at this? Looks like some core Os libraries for kerberos are missing in the actions ubuntu images |
|
@jprakash-db @msrathore-db Can this be prioritized? It seems like a no-brainer change, given you already support |
What type of PR is this?
Description
This naive PR changes pandas to be an optional dependency - just like pyarrow.
Tests fail but seemingly due to unrelated things.
How is this tested?
Related Tickets & Documents
#489