Giter Site home page Giter Site logo

move to python3 about mtt HOT 9 CLOSED

beardeddog avatar beardeddog commented on September 3, 2024
move to python3

from mtt.

Comments (9)

noahv avatar noahv commented on September 3, 2024

Just curious why is this needed?

Can we just let the user decide which python to use? I am using pyenv to point to python3 when I need a more recent version of python.

If we want to change the default for all users on a given cluster then there is a utility called update-alternatives that will modify the soft links.

[Wed Oct 23 12:56:50 noah@uan1:~] ls -l /usr/bin/ |grep python lrwxrwxrwx 1 root root 9 Aug 7 10:01 python -> python2.7

from mtt.

jsquyres avatar jsquyres commented on September 3, 2024

This might be a good reason: https://pythonclock.org/

from mtt.

beardeddog avatar beardeddog commented on September 3, 2024

I've been told

/usr/bin/python has been removed in SLES 15 SP1, and only /usr/bin/python3
is available by-default:
https://www.suse.com/releasenotes/x86_64/SUSE-SLES/15-SP1/#Packages.Modules

so you can rely on python being set

pyenv works great for development, I use it to, not sure how it maps in production where I land processes that are being run by others or by root or by cron ...

the real question is "what is keeping us on python2?"

from mtt.

noahv avatar noahv commented on September 3, 2024

I am not aware of any outstanding issues that are keeping us on python2.

Can we wait until we run a cycle on our Intel SLES15.1 cluster using python3 before making the change?

I do see /usr/bin/python installed from the python-base from sles_15.1_updates which seems to contradict the release notes you mentioned. Not sure about that one!

[Wed Oct 23 13:21:22 noah@uan1:sles_15.1_updates] zypper wp /usr/bin/python
Command 'what-provides' is replaced by 'search --provides --match-exact'.
See 'help search' for all available options.
Loading repository data...
Reading installed packages...

S | Name        | Summary                         | Type
--+-------------+---------------------------------+--------
i | python-base | Python Interpreter base package | package

[Wed Oct 23 13:22:49 noah@uan1:sles_15.1_updates] zypper search -s python-base
Loading repository data...
Reading installed packages...

S | Name        | Type    | Version       | Arch   | Repository
--+-------------+---------+---------------+--------+------------------
i | python-base | package | 2.7.14-7.17.1 | x86_64 | sles_15.1_updates

[Wed Oct 23 13:21:52 noah@uan1:sles_15.1_updates] sudo zypper install -d --force python-base
Loading repository data...
Reading installed packages...
Forcing installation of 'python-base-2.7.14-7.17.1.x86_64' from repository 'sles_15.1_updates'.
Resolving package dependencies...

The following package is going to be reinstalled:
  python-base

The following package has no support information from its vendor:
  python-base

1 package to reinstall.
Overall download size: 0 B. Already cached: 5.6 MiB. Download only.
Continue? [y/n/v/...? shows all options] (y): y
In cache python-base-2.7.14-7.17.1.x86_64.rpm                                                                                                   (1/1),   5.6 MiB ( 23.2 MiB unpacked)

[Wed Oct 23 13:22:06 noah@uan1:sles_15.1_updates] rpm -qpl /var/cache/zypp/packages/sles_15.1_updates/python-base-2.7.14-7.17.1.x86_64.rpm
warning: /var/cache/zypp/packages/sles_15.1_updates/python-base-2.7.14-7.17.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 39db7c82: NOKEY
/etc/rpm/macros.python2
/usr/bin/pydoc
/usr/bin/python

from mtt.

beardeddog avatar beardeddog commented on September 3, 2024

@hppritcha @jjhursey any concerns with moving to pymtt to python3 ?

from mtt.

jjhursey avatar jjhursey commented on September 3, 2024

No objection from me, but I'm not actively using this part of the tool. I think moving to python3 is generally where we want to be.

from mtt.

hppritcha avatar hppritcha commented on September 3, 2024

@beardeddog no. I only use python3 when using MTT. However, I am definitely not using all modules so may not be detecting some python2ishness.

from mtt.

hppritcha avatar hppritcha commented on September 3, 2024

@beardeddog can this be closed now since #886 was merged into master?

from mtt.

beardeddog avatar beardeddog commented on September 3, 2024

yes, closing

from mtt.

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.