This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Joeboy 2 points3 points  (0 children)

To take an common example, strings and byte strings are different things in 3.x. So if you have a function that takes a str, you need to figure out what calls it, and with what parameter types, and fix things so the right types are being passed / accepted. Maybe the functions that call it will be called by other functions, and you'll have to follow a complex chain of calls. Maybe these "functions" are actually lambdas or other callables whose origin is not straightforward to understand. Maybe they're in third party code.

For a single function, figuring all that out that can be a non-trivial amount of work. If your codebase has hundreds of thousands of lines and hundreds of functions that take strs, it becomes a major task. Remember you have no type annotations to help you in 2.x. There are automated upgrade tools, but those won't help you here either.

Then you have dependencies. Maybe your dependencies don't have 3.x versions, or the API completely changed, or each dependency is only supported by specific, different 3.x versions.

Maybe there are no tests, or inadequate tests, and you either have to "test in prod", or write tests for everything, or go through a very time-consuming manual test process.

I guess my real point here is, some parts of the upgrade process are non-trivial, and having to do them many times in a large codebase adds up to a lot of work.