Giter Site home page Giter Site logo

Comments (10)

sbidoul avatar sbidoul commented on June 17, 2024 2

@pradyunsg I could create such a test in #12709. Feel free to pick it.

from pip.

hmc-cs-mdrissi avatar hmc-cs-mdrissi commented on June 17, 2024 1

pkg_resources comes from setuptools and this is key related issue, pypa/setuptools#3586.

The pip new packaging version may have made this more likely issue then before although I think fix probably should be in setuptools still.

from pip.

edgarrmondragon avatar edgarrmondragon commented on June 17, 2024

Probably relevant (cc @hmc-cs-mdrissi):

I strongly suspect that error is related to hyphen/underscore normalization in extra names (mariadb-connector vs mariadb_connector) and pkg_resources vs packaging/pip having inconsistent normalization logic. I'd guess packaging upgrade may have touched extra normalization logic and I've seen inconsistencies across pkg_resources normalization/pip in past elsewhere as well with extras having hyphens.

edit: The last time I looked into this error my initial thought was fix seems best placed in pkg_resources itself and it doing lookups in normalized aware manner.

#12613 (comment)

from pip.

pradyunsg avatar pradyunsg commented on June 17, 2024

Preparing metadata (setup.py) ... done

Huh, it looks like you have some global configuration instructing pip to not use PEP 517 style isolated builds and there's some statefulness involved as well.

The pip new packaging version may have made this more likely issue then before although I think fix probably should be in setuptools still.

Nah, setuptools isn't implicated here: we deal with the fact that pkg_resources isn't PEP 685 compliant yet via 5cc540b and related commits.

from pip.

pradyunsg avatar pradyunsg commented on June 17, 2024

@edgarrmondragon Could you also run with -vvv in addition to --debug? It might be easier to post the output to https://gist.github.com/new and link to that.

from pip.

edgarrmondragon avatar edgarrmondragon commented on June 17, 2024

@edgarrmondragon Could you also run with -vvv in addition to --debug? It might be easier to post the output to https://gist.github.com/new and link to that.

@pradyunsg I've added the --debug -vvv output as files to the original comment. Let me know if a gist is still preferable.

from pip.

sbidoul avatar sbidoul commented on June 17, 2024

This seems to arise out of some inconsistency in setuptools which generates Provides-Extra: mariadb-connector in PKG-INFO but mariadb_connector in requires.txt. And pkg_resources.safe_extra() is not converting one to the other as it preserves -. So 5cc540b is probably not doing what you think it does, @pradyunsg ?

from pip.

pradyunsg avatar pradyunsg commented on June 17, 2024

Can we build a test for this failure? I've tried to reproduce this and been unsuccessful thus far.

from pip.

pradyunsg avatar pradyunsg commented on June 17, 2024

OK, managed to reproduce it by using the sdist!

@sbidoul Thanks for that pointer! It turns out, the mapping that pkg_resources uses internally (for _dep_map) is based on requires.txt and the logic was loading the extra names from the METADATA file -- we can use an attribute on the Distribution object to get the keys of that mapping so that we aren't coupled/fragile against this failure now; or in the future.

from pip.

pradyunsg avatar pradyunsg commented on June 17, 2024

Ah, I see 77533d8 (#12709) now! I'll add that into my PR.

from pip.

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.