Coder Social home page Coder Social logo

Parsing of version failed about pippel HOT 4 CLOSED

Sarcasm avatar Sarcasm commented on June 21, 2024
Parsing of version failed

from pippel.

Comments (4)

brotzeit avatar brotzeit commented on June 21, 2024

Thanks for the feedback. I must admit, I have replaced string= with version< without looking into the version formats. It seemed to work so I didn't give it any further thoughts #5. Are there any alternatives to version< or do I have to write a function, that compares the python version strings ?

from pippel.

Sarcasm avatar Sarcasm commented on June 21, 2024

I haven't given much thoughts but I think you could try to let-bind version-regexp-alist with the pip format of pep 440.

TBH, I don't know why/where it is used in pippel but I think parsing versions is a hard problem.
So, if you don't absolutely need it, don't do it, if you need it, try to give a best effort implementation, and when people complains you can add a new test case.
One nice thing about a version comparison function, is that it is easy to unit test. 👍

If you make a script that fetch a bunch of version from the python package archive and make sure the parsing works for all of them, then it's a good first step, the occasional bug can be fixed when it happens.

from pippel.

brotzeit avatar brotzeit commented on June 21, 2024

Thanks for the advice. I do appreciate that. For now I will exclude version strings with letters from comparison by version<, so it should at least work for installed versions, that are older than the latest version.

But I will try if I can write a working python version string parser. This is a good opportunity to write my first unit test.

from pippel.

arifer612 avatar arifer612 commented on June 21, 2024

Closed since this issue seems to be handled in (764c8e)

from pippel.

Related Issues (15)

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.