Skip to content

fix(#123): add sqla matrix in poetry environment - #124

Merged
indiVar0508 merged 2 commits into
masterfrom
fix_123
Jan 9, 2024
Merged

indiVar0508 merged 2 commits into
masterfrom
fix_123

Conversation

@indiVar0508

Copy link
Copy Markdown
Contributor

earlier sqlalchemy was being installed in pip environment but tests were running in poetry environment, so tests were not checked with sqlalchemy 1.4
Added sqlalchemy values from matrix in poetry environment. updated a testcase where connection.commit was being done, this is expected in sqla>=2.0 but in sqla<2 .execute does commit as well so added that in try, except block

@indiVar0508 indiVar0508 linked an issue Jan 5, 2024 that may be closed by this pull request
@coveralls

coveralls commented Jan 5, 2024 •

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 7457184598

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+3.7%) to 97.405%

Totals Coverage Status
Change from base Build 7207361402: 3.7%
Covered Lines: 5115
Relevant Lines: 5170

💛 - Coveralls

Comment thread tests/builders/test_table_builder.py Outdated
self.connection.commit()
try:
self.connection.commit()
except AttributeError: # sqla < 1.4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This comment is confusing.
The first line says sqla<1.4
But second line talks about sqla<2.0

Could you clearly explain what happens in which version

@AbdealiLoKo AbdealiLoKo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved but would be best to add a better comment in first commit

earlier sqlalchemy was being installed in pip environment but
tests were running in poetry environment, so tests were not checked
with sqlalchemy 1.4
Added sqlalchemy values from matrix in poetry environment.
updated a testcase where connection.commit was being done, this
is expected in sqla>=2.0 but in sqla<2 .execute does commit as
well so added that in try, except block
in sqlalchemy tests we are getting 2 warnings
- backref_cascade is removed from sqla2.0 and association proxy
  test was using that so removed it
- declarative_base is supposed to be imported from sqla.orm

added future=True in session & added sqla_20_warn=1 in ci test
job
@indiVar0508

Copy link
Copy Markdown
Contributor Author

Updated comment in first commit,
merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI pipeline not testing against sqla 1.4

3 participants