Python 3.8 has been released, switch to the new version is now a good time to do?

Python 3.8 was released two weeks before, but now most developers still the main use of Python 3.7.x or older versions. In fact, immediately switch to using Python 3.8 may cause some problems.

Want to know when to switch to Python 3.8? The brief overview of the problem (you may encounter when switching the main switch and Python version below ideas and experiences from a developer ).

1. lack Packages

opencv-pythonIs a very popular package, the download is about 50 million. But, as mentioned in this article, like if you now (October 28, 2019) try to install on Python 3.8 will find it does not work:

$ docker run python:3.8-slim pip install opencv-python
ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none)
ERROR: No matching distribution found for opencv-python

The reason why? If we now visit on PyPI  OpenCV Python-  file page, you will see not available for packages of Python 3.8. Later this problem can be fixed. But now the situation is that in the time shortly after the new major version is released, we will not be able to download many libraries.

Sometimes these problems can be solved simply re-build the library, sometimes it requires some code adjustments. But no matter what the problem is, there are some lag between major versions of Python packages and availability.

The 2.Python error

Python 3.7.0 on June 27, 2018 release, 3.7.1, released in four months after the October 20, 2018, which includes a number of bug fixes . So as usual, there will be a version of Python 3.8 bug fix in the future, but in view of the interval between major versions of 18 months, it will produce a lot of new but the code is not widely used. This means that future versions will have a large number of bug fixes.

3. can not really use the new syntax

Python 3.8 introduced a new syntax, but not yet synchronized to follow up other tools to support the new syntax, such as automatic formatting and code detection tools. Unless the "facilities" have been updated simultaneously, otherwise we will not really use the new syntax.

So when to switch to the use of a major new version of Python?

At least, we need to wait until:

  1. All libraries are specifically support the new version of Python.
  2. All the tools depend explicitly support the new version of Python.

Therefore, it may be after the release of new major version of Python to wait a few months, we could try. If you do not wait, you can wait until the first small version released before attempting to update the situation here is Python 3.8.1.

Guess you like

Origin www.oschina.net/news/110946/when-to-switch-to-python-3-8