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

Methods from some dependencies appear to be outdated when using python 3.13 #231

Open
jarbesfeld opened this issue Jan 22, 2025 · 0 comments
Assignees
Labels
bug Something isn't working priority:medium Medium priority

Comments

@jarbesfeld
Copy link
Contributor

jarbesfeld commented Jan 22, 2025

Describe the bug

Tests are passing when running pytest, but methods from several dependencies appear to be outdated when using this version of python. For example, my stack trace looks like:

================================================================================== warnings summary ===================================================================================
venv/lib/python3.13/site-packages/yoyo/migrations.py:34
  /Users/rsjxa001/fusion_project/fusor/venv/lib/python3.13/site-packages/yoyo/migrations.py:34: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

venv/lib/python3.13/site-packages/pkg_resources/__init__.py:3142
  /Users/rsjxa001/fusion_project/fusor/venv/lib/python3.13/site-packages/pkg_resources/__init__.py:3142: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

tests/test_fusor.py: 226 warnings
tests/test_translators.py: 718 warnings
  /Users/rsjxa001/fusion_project/fusor/venv/lib/python3.13/site-packages/botocore/auth.py:424: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    datetime_now = datetime.datetime.utcnow()

tests/test_fusor.py::test_transcript_segment_element
  /Users/rsjxa001/fusion_project/fusor/venv/lib/python3.13/site-packages/pytest_asyncio/plugin.py:867: DeprecationWarning: The event_loop fixture provided by pytest-asyncio has been redefined in
  /Users/rsjxa001/fusion_project/fusor/tests/conftest.py:34
  Replacing the event_loop fixture with a custom implementation is deprecated
  and will lead to errors in the future.
  If you want to request an asyncio event loop with a scope other than function
  scope, use the "loop_scope" argument to the asyncio mark when marking the tests.
  If you want to return different types of event loops, use the event_loop_policy
  fixture.
  
    warnings.warn(

tests/test_fusor.py: 979 warnings
tests/test_nomenclature.py: 187 warnings
tests/test_tools.py: 18 warnings
tests/test_translators.py: 2022 warnings
  /Users/rsjxa001/fusion_project/fusor/venv/lib/python3.13/site-packages/biocommons/seqrepo/seqaliasdb/seqaliasdb.py:150: DeprecationWarning: The default timestamp converter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes
    return translate_alias_records(dict(r) for r in cursor)

tests/test_fusor.py::test_functional_domain
  /Users/rsjxa001/fusion_project/fusor/venv/lib/python3.13/site-packages/biocommons/seqrepo/fastadir/fastadir.py:221: DeprecationWarning: The default timestamp converter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes
    val = cursor.fetchone()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform darwin, python 3.13.1-final-0 ----------
Name                                Stmts   Miss  Cover   Missing
-----------------------------------------------------------------
src/fusor/__init__.py                   8      2    75%   12-13
src/fusor/examples/__init__.py         24      0   100%
src/fusor/exceptions.py                 2      0   100%
src/fusor/fusion_caller_models.py      98      0   100%
src/fusor/fusor.py                    203     19    91%   112-113, 121-122, 155-156, 269-274, 280, 288, 456, 496, 505-508, 550, 627
src/fusor/models.py                   274      6    98%   266-267, 560-561, 651-652
src/fusor/nomenclature.py              98     11    89%   50-51, 57, 60, 89, 117-118, 120-121, 134, 178
src/fusor/tools.py                     41     17    59%   39, 72-90, 104
src/fusor/translator.py               192     33    83%   84, 86, 88, 104, 109, 117, 178-180, 203, 229, 267, 329, 387, 451, 456, 460, 554, 579, 609-640, 661, 708
-----------------------------------------------------------------
TOTAL                                 940     88    91%

I'm not sure if we should be updating the versions of these dependencies?

Steps to reproduce

Run pytest tests

Expected behavior

I did not expect to see these deprecation warnings

Current behavior

See stack trace above

Acceptance Criteria

The deprecation warnings are no longer reported

Possible reason(s)

No response

Suggested fix

No response

Branch, commit, and/or version

branch: issue-227

Screenshots

No response

Environment details

Mac, OS 15.1.1

Additional details

No response

Contribution

Yes, I can create a PR for this fix.

@jarbesfeld jarbesfeld added bug Something isn't working priority:medium Medium priority labels Jan 22, 2025
@jarbesfeld jarbesfeld self-assigned this Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:medium Medium priority
Projects
None yet
Development

No branches or pull requests

1 participant