acm-udayton / acm-udayton/ACM-Meeting-Records

[BUG] Resolve LegacyAPIWarning with the Query.get() method

未關閉
#153 0 則留言 0 個 reaction 已指派 1 人 已被 @crossmant1 認領 在 GitHub 檢視
bug
主要語言
Python
星號
7
分支
2
平均合併
4 天 23 小時
30 天內合併 PR
2

描述

## Location of the Bug
* **File/Feature:** Appears in multiple files: `test_admin.py`, `main.py`, `mfa.py`, `test_mfa.py`.
* **Version:** V1.9

## Description of the Bug
When running tests, we get these warnings: `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: 2.0) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)`

## Steps to Reproduce
1. Go to the test tube icon in VS Code
2. Click on play button to run tests
3. Once the tests complete, look in the terminal to see the error
You can also do `uv run pytest` in the terminal to see these results as well.

## Intended Functionality
There should be no warnings displayed in the terminal.

---

## Acceptance Criteria & Solution Requirements
*To close this issue, the following must be met:*
- [ ] 1. Application runs as expected (bug is resolved without breaking existing features).
- [ ] 2. Code quality metrics are maintained, and linting has been considered in development.
- [ ] 3. Testing metrics are maintained, and tests have been updated/added wherever relevant during development.
- [ ] 4. Documentation has been updated to reflect the changes made during development.
- [ ] 5. Any other requirements that are specific to this issue.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。