Giter Club home page Giter Club logo

Comments (4)

stratakis avatar stratakis commented on July 21, 2024 1

The deprecation warning leaks to other packages down the stack though which utilize colcon-core.

More specifically by testing the latest setuptools version on Fedora, colcon-ros and colcon-notification fails due to colcon-core's pkg_resources import.

from colcon-core.

cottsay avatar cottsay commented on July 21, 2024

I've been toying with solutions here.

One challenge is that we have functions in colcon-core public API which return pkg_resources classes. This was probably not a great design decision. The corresponding classes in importlib.metadata are not similar enough to be drop-in replacements, so I think we'll need to introduce some sort of wrapper class that looks like the pkg_resources classes.

from colcon-core.

mikepurvis avatar mikepurvis commented on July 21, 2024

Thanks for beginning to think about a way forward here—we're hitting these warnings when testing colcon plugins on Python 3.10 (in Nix). This is how to silence the warnings in pytest, but unfortunately you can't specify the actual package doing the importing, so it's a bit of a blunt instrument:

[tool.pytest.ini_options]
filterwarnings = [
  # This is transitively imported by colcon-core.
  "ignore::DeprecationWarning:pkg_resources",
]

A further complexifier is that the replacement functionality in importlib isn't available in Python 3.8, so either the old implementation must also be retained as long as Ubuntu Focal is a target, or else a dependency must be introduced on a pypi package supplying backports of the new functionality, eg:

from colcon-core.

cottsay avatar cottsay commented on July 21, 2024

a dependency must be introduced on a pypi package supplying backports of the new functionality

It seems that python3-importlib-metadata is available for Focal as a deb. It is my intent to declare a dependency on that package conditionally on the interpreter version.

As far as I can tell, it does mean dropping debs for Bionic which reached EOL this past May.

from colcon-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.