Microsoft’s popular integrated development environment (IDE) Visual Studio is utilized by lots of developers all over the globe. The company recently released Visual Studio 2022, which contains a bunch of UI enhancements for Windows and Mac, performance improvements, and more. Interestingly, the Redmond tech giant is also changing the way that it bundles Python with each release of the IDE, something that it has described in more detail in its recent blog post.
Traditionally, each new release of Visual Studio targets a specific version of Python. For example, Visual Studio 2019 came with Python 3.7 whereas Visual Studio 2022 supports Python 3.9 as the default. However, the release cadence for Python is a bit tricky because new versions are released annually but binary Windows installers are typically available for 18 months after release. This means that under the current lifecycle, if Visual Studio 2022’s life extends past 18 months, it will be bundling an outdated version of Python (Python 3.9).
Microsoft has now changed its Python bundling strategy to tackle this problem. From now on, new Visual Studio versions will target the most recent broadly adopted version of Python. In essence, this indicates that when Visual Studio 2022 is updated sometime in the near future, new releases of the IDE may bundle Python 3.10 or newer, depending upon which version is “broadly adopted”.
That said, older versions of Python workloads will not be updated to support newer versions. Microsoft will explicitly mark these outdated versions of Python as “Out of Support” during Visual Studio setup, but will not remove or add new versions to that install.
Microsoft has explained its reasoning as follows:
- We want to mark old versions as “out of support” and not select them by default to make it clear that these versions of Python are effectively past their end of life and may have security vulnerabilities;
- At the same time, we don’t want to remove them, as customers may still need them; code is often updated to support new versions slowly if at all, and in many cases the security issues that may exist are edge cases that may not be relevant; customers should use their own judgement about the risks involved in continuing to use old versions of Python;
- With the exception of adding Python 3.9 installer to Visual Studio 2019, we don’t want to add installers for new versions of Python that may not be fully supported by the Python workload; you can use newer versions of Python to run your older code in most cases with no issues, but we want to avoid giving the impression that changes to the Python language are fully supported by older versions of Visual Studio when they are not;
- In most cases, you can simply install a newer version of Python from https://python.org or the Windows store and use your existing Python code unchanged; the number of breaking changes between Python versions is small and typically in edge cases.
Visual Studio 2019 comes with Python 3.9, but that will be marked as Out of Support next year as well once it reaches the end of its lifecycle. Microsoft has emphasized that this change to its bundling strategy will make it easier to reconcile the delta between the broadly available version of Python and Visual Studio’s Python language server, Pylance.