acm-udayton / acm-udayton/ACM-Meeting-Records
[BUG] Resolve LegacyAPIWarning with the Query.get() method
- 主要语言
- 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 还没有评估数据。