I am a junior web developer (django) and have been contracted to migrate code to python 3. Is migrating easy? Is it due able within 3-ish months for a beginner?
Depends on if you do a thorough job or not. You don’t just go in “convert” code. You have to make sure it works correctly in all scenarios. I’ve seen this break multiple times in many places already.
If you have some good testing in place, running 2to3 on your projects should be good enough along with some mild cleanup after. Relative imports and python byte types are going to be your main problem I imagine. https://docs.python.org/2/library/2to3.html This shouldn’t result in any massive rewrites though in my experience so far
thanks, hearing that makes me a little less anxious
import migrate migrate.initiate()
dude trying to put me out a job?
Try to add pyenv + pipenv / poetry for reproducibility. Use type hint (>3.7) if you think it is useful for complex function: def divide(x: int, y: int) -> double: # ....
It depends a huge amount on: How large a codebase Test quality Deployment strategy What libraries you're using
Spend a significant amount of time making sure test coverage is good before doing the flip. If you have 100% test coverage and passing, you can blindly run a converter, run the tests, and you're good in one day. If you have 50% coverage, you can only be sure that half of the system didn't break after converting.
Due able
T_T
Depends on the libraries they have imported and some syntactical differences.. but it's 'due able'
my hopes is that i do not have to rewrite large portions of code and can just copy and paste. I do believe all the libraries are really old, but we will have to see.
Just a heads up as English might not be your first language, it’s spelt doable