Giter VIP home page Giter VIP logo

Comments (9)

chu11 avatar chu11 commented on September 26, 2024 1

I think we're trying to avoid adding a new dependency.

True, we don't need it today. I guess I was thinking longer out we would. But we can leave that for another time.

from flux-core.

chu11 avatar chu11 commented on September 26, 2024

i guess packaging is not a native python lib/module? extra?

>python3.6
Python 3.6.8 (default, May 31 2023, 10:28:59) 
[GCC 8.5.0 20210514 (Red Hat 8.5.0-18)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import packaging
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'packaging'
>>> import distutils
>>> 

from flux-core.

chu11 avatar chu11 commented on September 26, 2024

yup, looks like that was the issue. will poke admins to install (ahem) "packaging".

from flux-core.

grondo avatar grondo commented on September 26, 2024

Sorry, this was my bad. I assumed packaging was in the standard library because it is the suggested replacement for distutils.version in PEP 0632. Apparently they thought it was OK because everyone can just pip anyway so what's the big deal.

We should avoid adding this new requesite package and instead find a way to do the simple version compare within the standard library (or just do something by hand)

from flux-core.

grondo avatar grondo commented on September 26, 2024

Looking around it seems like every fix for deprecated distutils.version pulls in packaging.version, even though it isn't in the standard library. So I guess soon the packaging module will be installed everywhere, but since that isn't the case now, the best solution might be to just copy distutils StrictVersion implementation into am_check_pymod.m4. 🤷

from flux-core.

chu11 avatar chu11 commented on September 26, 2024

just a reminder todo to add python3-packaging (or appropriate package name for distro) to the scripts/install scripts.

from flux-core.

grondo avatar grondo commented on September 26, 2024

I think we're trying to avoid adding a new dependency. However, the best I came up with so far is to try distutils and fall back to packaging if it can't be imported (basically Python == 3.12). I'm guessing in Python 3.12 everyone will need to have packaging installed so this will be a non-issue? (and I'm not sure there's a distro with Python 3.12 yet, so this is all academic!? 😧

from flux-core.

grondo avatar grondo commented on September 26, 2024

Ah, yeah good point

from flux-core.

grondo avatar grondo commented on September 26, 2024

fixed by #5459

from flux-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.