Skip to content
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

SQLA migration: tests: some of the tests are barfing up some warnings #533

Closed
justcool393 opened this issue Feb 19, 2023 · 0 comments · Fixed by #534
Closed

SQLA migration: tests: some of the tests are barfing up some warnings #533

justcool393 opened this issue Feb 19, 2023 · 0 comments · Fixed by #534
Assignees

Comments

@justcool393
Copy link
Collaborator

tests pass currently... but should be fixed and any other instances should be looked for elsewhere in the codebase.
ref #487

files/tests/test_basic.py: 7 warnings
files/tests/test_child_comment_counts.py: 81 warnings
files/tests/test_no_content.py: 7 warnings
  /service/files/helpers/wrappers.py:28: LegacyAPIWarning: The Query.get() method is considered legacy as of the 1.x series of SQLAlchemy and becomes a legacy construct in 2.0. The method is now available as Session.get() (deprecated since: 1.4) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
    v = g.db.query(User).get(id)

files/tests/test_basic.py: 1 warning
files/tests/test_child_comment_counts.py: 28 warnings
  /service/files/classes/comment.py:202: LegacyAPIWarning: The Query.get() method is considered legacy as of the 1.x series of SQLAlchemy and becomes a legacy construct in 2.0. The method is now available as Session.get() (deprecated since: 1.4) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
    else: return g.db.query(Comment).get(self.parent_comment_id)

files/tests/test_child_comment_counts.py::test_submission_comment_count
  /service/files/routes/admin.py:281: LegacyAPIWarning: The Query.get() method is considered legacy as of the 1.x series of SQLAlchemy and becomes a legacy construct in 2.0. The method is now available as Session.get() (deprecated since: 1.4) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
    c = g.db.query(Comment).get(comment_id)

files/tests/test_child_comment_counts.py: 20 warnings
files/tests/test_seed_db.py: 26 warnings
  /service/files/helpers/comments.py:144: RemovedIn20Warning: The "columns" argument to Select.with_only_columns(), when referring to a sequence of items, is now passed as a series of positional elements, rather than as a list.  (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
    .with_only_columns([
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant