Skip to content

CI: Try with sqlalchemy warnings #50580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 16 commits into from
Closed

Conversation

phofl
Copy link
Member

@phofl phofl commented Jan 5, 2023

@phofl phofl marked this pull request as draft January 5, 2023 08:39
@mroeschke
Copy link
Member

Thanks. Would the goal be to fully address #50558?

@phofl
Copy link
Member Author

phofl commented Jan 5, 2023

Not sure if the con.begin() will fix everything. If yes, then this should cover the issue.

@phofl
Copy link
Member Author

phofl commented Jan 5, 2023

cc @mroeschke I am optimistic that this will do it (hopefully :))

Do we want to keep the warnings active on main as well till we can test against alchemy 2.0 or should I remove the env variable again?

@phofl phofl marked this pull request as ready for review January 5, 2023 21:10
@mroeschke
Copy link
Member

I'm okay keeping the sqlalchemy warnings active on main (should hopefully aspire for sqlalchemy 2.0 compatibility so keeping these active will hopefully help)

@phofl
Copy link
Member Author

phofl commented Jan 5, 2023

CircleCI is green, this is a good sign :)

cc @MarcoGorelli

@@ -879,11 +893,11 @@ def load_test_data_and_sql(self):
create_and_load_iris_view(self.conn)

def test_read_sql_view(self):
iris_frame = sql.read_sql_query("SELECT * FROM iris_view", self.conn)
iris_frame = sql.read_sql_query(self.text("SELECT * FROM iris_view"), self.conn)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something that we actually need to fix in read_sql_query itself?

str is one of the accepted values for the sql parameter.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you open an issue about this? I would prefer pushing this to the user, because otherwise we would have to deal with SQLite without alchemy vs cases with alchemy

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just got a question about something, but the rest looks good, thanks so much for doing this!

did you manage to run these sqlalchemy tests locally BTW?

Comment on lines 2442 to 2444
@pytest.mark.skip(reason="sorted on strings and integers")
def test_read_sql_parameter(self):
self._read_sql_iris_parameter()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some weird sort going on on the parameters to that query. They contain integers and strings which causes an error

@phofl
Copy link
Member Author

phofl commented Jan 6, 2023

The lite tests yes, I don’t have MySQL or Postgres set up locally…

phofl added 4 commits January 6, 2023 12:04
# Conflicts:
#	ci/deps/actions-310.yaml
#	ci/deps/actions-38-downstream_compat.yaml
#	ci/deps/actions-38.yaml
#	ci/deps/actions-39.yaml
#	ci/deps/circle-38-arm64.yaml
#	environment.yml
#	requirements-dev.txt
@jbrockmendel jbrockmendel added IO SQL to_sql, read_sql, read_sql_query CI Continuous Integration labels Jan 6, 2023
@jbrockmendel
Copy link
Member

i think ive got postgres running on my server. would it help if i test this branch there?

@phofl
Copy link
Member Author

phofl commented Jan 6, 2023

I am leaning towards not fixing the auto commit problems now, since @cdcadman mentioned that he has a branch tackling these. The text problems are all fixed.

But generally speaking, help is welcome here :)

@cdcadman
Copy link
Contributor

cdcadman commented Jan 6, 2023

@phofl , my branch needed some modifications due to 1.4.46 warnings, and I fixed it. I don't mind if you use anything from that branch here: #48576 .

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2023

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Feb 8, 2023
@phofl phofl closed this Feb 8, 2023
@phofl phofl deleted the ci_sqlalchemy branch February 9, 2023 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration IO SQL to_sql, read_sql, read_sql_query Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants