Backend: fix make test warnings
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python, sqlalchemy
- Domain
- backend, testing-qa
Research direction
Start in app/api/api_v1/endpoints/source_apis.py at line 33 and review the session call identified by the warning. Run tests/endpoints/test_source_apis.py::test_list_source_apis_deduplication and confirm the test passes without the deprecation warning.
Written by the indexing model from the issue text.
Description
tests/endpoints/test_source_apis.py::test_list_source_apis_deduplication
/app/app/api/api_v1/endpoints/source_apis.py:33: DeprecationWarning:
🚨 You probably want to use `session.exec()` instead of `session.execute()`.
This is the original SQLAlchemy `session.execute()` method that returns objects
of type `Row`, and that you have to call `scalars()` to get the model objects.
For example:
```Python
heroes = await session.execute(select(Hero)).scalars().all()
```
instead you could use `exec()`:
```Python
heroes = await session.exec(select(Hero)).all()
```
result = await session.execute(query)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pyronear/pyro-annotator
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
pyronear/pyro-annotator#349 ·
-
type: enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pyronear/pyro-annotator#322 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pyronear/pyro-annotator#271 ·
-
feat(scripts): read-only clone mode — add --skip-source-stage-update to import.py (pull-sequences) Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pyronear/pyro-annotator#152 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
pyronear/pyro-annotator#387 ·
All issues in pyronear/pyro-annotator
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100