Upgrade from Python 2.2.1 to 3.4 -


we have got legacy application runs on python 2.2.1. need upgrade latest version of python (3.4).

i know few details on upgrade:

  1. would direct upgrade of associated files? mean libraries have been used in older code have changed make work in latest version?
  2. how upgrade .py files older newer version?

everywhere talks upgrading 2.6 3 , cover 2.2.1 3. there direct upgrade possible?

to expand on comments, the pyporting docs suggest seven-step process think useful here too:

  1. only worry supporting python 2.7 - easier upgrade 3 if first make sure code runs in latest 2.x branch. if you're lucky, won't require many changes!

  2. make sure have test coverage - crucial major change. if can't sure it's working now, how sure it's working after upgrade?

  3. learn differences between python 2 & 3 - per cdarke's comment, have manual intervention, need know what's changed. in case, may involve learning differences between 2.x versions. can use what's new in python x.x? help.

  4. use modernize or futurize update code - automated tools make code 3.x-ready (the documentation notes can use 2to3 if don't want retain 2.x compatibility).

  5. use pylint make sure don’t regress on python 3 support - pylint give lots of helpful warnings improve code generally.

  6. use caniusepython3 find out of dependencies blocking use of python 3 - ask updates libraries; tool can tell what's 3.x compatible. may need find compatible replacements dependencies; see pypi.

  7. use continuous integration make sure stay compatible python 2 & 3 - whatever versions want support, ci can ensure stay compatible of them modify code.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -