Git Product home page Git Product logo

Comments (3)

crbeckle avatar crbeckle commented on June 8, 2024 1

Raising an exception when the regex matching fails is sufficient, we don't need a standalone function to do that. It's different from record validation because when it doesn't match the pattern, the entry point is invalid and it's better to abort.

As in raising an exception in the existing function that is more specific than an AssertionError? That works for me as long as it is more clear what the problem is to the user in the error message. I am imagining something similar to the message printed when a RECORD file is invalid...

"Invalid entry point in {wheel}. Please report to the maintainers of that package so they can fix their project setup. Details: \n{formatted_issues}\n"

... followed by aborting the install. That, of course would be up to users of this library to catch and print / re-throw (i.e. pdm), and the only change here would be the more specific error to be raised.

from installer.

frostming avatar frostming commented on June 8, 2024

Raising an exception when the regex matching fails is sufficient, we don't need a standalone function to do that. It's different from record validation because when it doesn't match the pattern, the entry point is invalid and it's better to abort.

from installer.

tuergeist avatar tuergeist commented on June 8, 2024

I ran into that error after renaming the package. However, assert match AssertionError is nothing a user can work with. I had to read through the code to get what's the problem here.

from installer.

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.