Stupac
Stupac

Reputation: 781

When Python is Updated Will I Have to Update My Program?

I'm working on my first Python-based program. I would like it to be as maintenance free in the future as possible and I was wondering if this could be a problem as Python is updated. I'm using 2.7.2 currently, but when 3 becomes standard what could happen to my program? Will it likely stop working on a system installed with Python 3 and will it be impractical to have the user install an older version of Python? I assume 2.7.2 won't be maintained indefinitely, and I wouldn't think newer versions of Python would run my program successfully. Sorry if this seems like a newb question; I'm used to working with compiled languages.

Not to stray too far off topic, but would it be better to use Lua in this case?

Upvotes: 2

Views: 105

Answers (2)

ThiefMaster
ThiefMaster

Reputation: 318508

It will take a very, very long time until Python2 will die.

Python2 code will most likely require modifications to run with Python3 (there's the 2to3 tool to help with migrating though), but with all the libs out there which are for python2 it will take years until py2 dies - so you don't really have to care about it right now. Besides that, I believe as long as enough people are using Python2, a version will be kept up to date with fixes.

Upvotes: 2

Kylotan
Kylotan

Reputation: 18449

Will it stop working - that depends on how the program is being run. If the system has both versions installed and you ask to run against Python 2, then it'll continue to work. If you don't explicitly ask to run against a certain version, and it's not there, then it'll probably fail.

Lua offers you no solutions here - if you rely on a system-installed Lua and that Lua becomes incompatible in the future, you're stuck. Think of your scripting language as a dynamic library - if the user has the right version, they're ok, and if not, they don't, just like with C/C++ apps.

If you're deploying to Unix-like platforms, I expect they will support Python 2 for at least another 5 years, maybe 10.

If you're deploying to a Windows platform, you usually package up the relevant version of Python as part of your app.

So the problem is unlikely to be as significant as you fear.

Upvotes: 2

Related Questions