Giter Club home page Giter Club logo

Comments (2)

PFCM avatar PFCM commented on June 9, 2024

Hello, thanks for getting in touch.

The additional padding is indeed intentional, although it's not quite ideal. As you've probably noticed the Python versioning specification does have quite a few rules for normalising versions, but it still doesn't quite produce a single canonical form for all equivalent versions: 1.0a1 and 1.0.0a1 are both equivalent in terms of how versions are matched (see here) and are both in their normalised forms.

Padding out to at least three digits is something we do internally so that we have a consistent key by which to refer to a version. This is handy for things like the BigQuery dataset and for our internal databases, but it is certainly confusing. We do have some work in progress to preserve the upstream spellings of the version and present in the BigQuery dataset (potentially the other surfaces too if there's interest). It's complicated slightly by the fact that, for Python, there's not necessarily a single spelling because a single version might have multiple release artifacts (wheels for various platforms, sdists and so on), all of which might have a different way of representing the same version.

With all that in mind, I'm curious to know how exactly his is causing trouble for your tool (because we are looking to improve the situation). For now though if you're using the API, it should normalise the requested versions, so

curl https://api.deps.dev/v3alpha/systems/pypi/packages/verlib/versions/0.1

returns exactly the same response as

curl https://api.deps.dev/v3alpha/systems/pypi/packages/verlib/versions/0.1.0

but both responses will list the versionKey.version as 0.1.0.

from deps.dev.

kenwark avatar kenwark commented on June 9, 2024

Thanks for the detailed explanation. I was testing a big batch query using https://api.deps.dev/v3alpha/versionbatch and failed to check the response to see if the Python packages in question were there but with the added ".0" in the version. It should be fine.

from deps.dev.

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.