~olly/yoyo#94: 
DeprecationWarning: pkg_resources is deprecated as an API

Good day, today my CI has caught a potential future bug with yoyo-migrations

The traceback is the following:

    from yoyo import get_backend, read_migrations
../../.local/share/virtualenvs/repository-orm/lib/python3.9/site-packages/yoyo/__init__.py:27:
in <module>
    from yoyo.connections import get_backend
../../.local/share/virtualenvs/repository-orm/lib/python3.9/site-packages/yoyo/connections.py:23:
in <module>
    from yoyo.backends import get_backend_class
../../.local/share/virtualenvs/repository-orm/lib/python3.9/site-packages/yoyo/backends/__init__.py:1:
in <module>
    from yoyo.backends.base import DatabaseBackend
../../.local/share/virtualenvs/repository-orm/lib/python3.9/site-packages/yoyo/backends/base.py:32:
in <module>
    from yoyo import internalmigrations
../../.local/share/virtualenvs/repository-orm/lib/python3.9/site-packages/yoyo/internalmigrations/__init__.py:8:
in <module>
    from . import v2
../../.local/share/virtualenvs/repository-orm/lib/python3.9/site-packages/yoyo/internalmigrations/v2.py:7:
in <module>
    from yoyo.migrations import get_migration_hash
../../.local/share/virtualenvs/repository-orm/lib/python3.9/site-packages/yoyo/migrations.py:34:
in <module>
    import pkg_resources
../../.local/share/virtualenvs/repository-orm/lib/python3.9/site-packages/pkg_resources/__init__.py:121:
in <module>
    warnings.warn("pkg_resources is deprecated as an API",
DeprecationWarning)
E   DeprecationWarning: pkg_resources is deprecated as an API

I've tried to investigate the source of the issue but don't fully understand it. It looks like since setuptools 66.0.0 They removed support for LegacyVersion, I don't understand what does that change have to do with the DeprecationWarning of whether you should do something about it.

Any insights?

Thanks

Status
REPORTED
Submitter
lyz@riseup.net
Assigned to
No-one
Submitted
1 year, 8 months ago
Updated
4 months ago
Labels
No labels applied.

~patrickconnor 4 months ago*

Also seeing this issue after upgrading from setuptools 66.0.0 to 70.0.0 in response to an identified security vulnerability. Any chance a solution will make it into a release soon?

Thanks

Brian Lewis 4 months ago ยท edit

I just hit this also. I'm using Python 3.12.4, and it seems to have come with setuptools 72.1.0 installed.

Register here or Log in to comment, or comment via email.