This tool is far from accurate, but it’s good enough to achieve our main goal here: assessing how much work remains before you can make the final switch to Python 3. You can facilitate the process by running “caniusepython3” on your “requirements.txt” (create one with “pip freeze > requirements.txt” if you don’t have one). As a rule of thumb, we suggest updating to the latest release of each dependency to be on the safe side.Ĭhecking each dependency one by one can be time-consuming in larger projects. Most of your packages are likely already compatible or only require an update to a newer version. Regardless, at this point, it’s best to concentrate on the easy wins. That’s because certain packages may have already dropped Python 2. In some cases, all you’ll need to do is update a dependency to a newer version in others, you’ll have to make sure the update is the latest version, compatible with both Python 2 and 3. It’s not uncommon for projects to accumulate dependencies that are no longer maintained and consequently lack Python 3 support. Your application is already on the way to reach full Python 3 compatibility, but the issue of its dependencies still remains. Introducing QA tools will also improve your standard development workflow.Īll in all, the faster you implement the tools, the better for you. However, it will be much harder to ensure your software keeps running smoothly without them. These quality assurance tools aren’t strictly required for migrating to Python 3. This includes stack trace, which allows you to fix common transition-related bugs in a matter of minutes. d) Error trackingĮrror tracking is yet another tool that can prove really helpful should something slip through the cracks of pre-production testing.Īs an example, Sentry provides you with a comprehensive error report in case of failure. Once again, this is a time-saving measure, especially important if more than one person works on your product. c) Continuous integrationĬontinuous integration brings all your software development efforts together in an automated manner. For a sizable application, even the most basic happy path tests will save you countless hours you would otherwise spend on laborious manual testing and fighting regressions. Tests are pretty essential and unfortunately require a certain time investment, especially at the start, but they’re well worth it. They will provide a welcome boost to your migration efforts. Linters are the easiest to introduce, but that doesn’t mean they have little value. Here are several quality assurance tools that can be immensely helpful when porting to Python 3: a) Linters If you aren’t using any of these, we highly recommend you consider it. Good test coverage, linters, and other tools run under your continuous integration systems are lifesavers whenever you introduce far-reaching changes to your application.
0 Comments
Leave a Reply. |