Skip to content

Setuptools v80.9.0 UserWarning: pkg_resources is deprecated as an API #471

@gemygk

Description

@gemygk

With setuptools (setuptools>=80.9), we get a warning when running mikado -h

UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.

More details here - https://setuptools.pypa.io/en/latest/pkg_resources.html

As per the setuptools changelog - https://setuptools.pypa.io/en/stable/history.html, the warning start with setuptools v80.9.0

v80.9.0
26 May 2025

Features
Set a deadline for the removal of pkg_resources later this year (December). ([#3085](https://github.com/pypa/setuptools/issues/3085))

Removed reliance on pkg_resources in test_wheel. ([#3085](https://github.com/pypa/setuptools/issues/3085))

Temporary solution: I am going to pin setuptools as below:

setuptools<80.9

Warning command:

$ mikado -h
/opt/conda/envs/mikado_env/lib/python3.9/site-packages/Mikado/subprograms/configure.py:9: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  from pkg_resources import resource_filename, resource_stream
usage: Mikado [-h] [--version]
              {configure,prepare,serialise,pick,compare,util} ...

Mikado is a program to analyse RNA-Seq data and determine the best transcript
for each locus in accordance to user-specified criteria.

optional arguments:
  -h, --help            show this help message and exit
  --version             Print Mikado current version and exit.

Components:
  {configure,prepare,serialise,pick,compare,util}
                        These are the various components of Mikado:
    configure           This utility guides the user through the process of
                        creating a configuration file for Mikado.
    prepare             Mikado prepare analyses an input GTF file and prepares
                        it for the picking analysis by sorting its transcripts
                        and performing some simple consistency checks.
    serialise           Mikado serialise creates the database used by the pick
                        program. It handles Junction and ORF BED12 files as
                        well as BLAST XML results.
    pick                Mikado pick analyses a sorted GTF/GFF files in order
                        to identify its loci and choose the best transcripts
                        according to user-specified criteria. It is dependent
                        on files produced by the "prepare" and "serialise"
                        components.
    compare             Mikado compare produces a detailed comparison of
                        reference and prediction files. It has been directly
                        inspired by Cufflinks's cuffcompare and ParsEval.
    util                Miscellaneous utilities

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions