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

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

Ouverte
#153 0 commentaires 0 réactions 1 personne assignée Réclamée par @crossmant1 Voir sur GitHub
bug
Langage dominant
Python
Étoiles
7
Forks
2
Merge moyen
4 j 23 h
PR mergées (30 j)
2

Description

## 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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.