docs: Update CPython differences and improve the look of table layouts.

Updated some of the CPython feature differences:
- Updated status of some features.
- Added CSS to fix table widths to 100% and word wrap.
- Specified explicit table column ratios to improve layout appearance.
- Added missing references to anchors.
- Better consistency with use of formatting and case.
pull/6044/merge
Matt Trentini 2022-08-19 01:15:50 +10:00 zatwierdzone przez Damien George
rodzic 2e386bcf76
commit 6b16ce8d38
7 zmienionych plików z 353 dodań i 292 usunięć

Wyświetl plik

@ -166,6 +166,10 @@ html_favicon = 'static/favicon.ico'
# so a file named "default.css" will overwrite the builtin "default.css". # so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['static'] html_static_path = ['static']
# Add a custom CSS file for HTML generation
html_css_files = [
'custom.css',
]
# Add any extra paths that contain custom files (such as robots.txt or # Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied # .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation. # directly to the root of the documentation.

Wyświetl plik

@ -5,55 +5,60 @@ Python 3.5
Below is a list of finalised/accepted PEPs for Python 3.5 grouped into their impact to MicroPython. Below is a list of finalised/accepted PEPs for Python 3.5 grouped into their impact to MicroPython.
+----------------------------------------------------------------------------------------------------------+---------------+ .. table::
| **Extensions to the syntax:** | **Status** | :widths: 30 50 20
+--------------------------------------------------------+-------------------------------------------------+---------------+
| `PEP 448 <https://www.python.org/dev/peps/pep-0448/>`_ | additional unpacking generalizations | Partial |
+--------------------------------------------------------+-------------------------------------------------+---------------+
| `PEP 465 <https://www.python.org/dev/peps/pep-0465/>`_ | a new matrix multiplication operator | Completed |
+--------------------------------------------------------+-------------------------------------------------+---------------+
| `PEP 492 <https://www.python.org/dev/peps/pep-0492/>`_ | coroutines with async and await syntax | Completed |
+--------------------------------------------------------+-------------------------------------------------+---------------+
| **Extensions and changes to runtime:** |
+--------------------------------------------------------+-------------------------------------------------+---------------+
| `PEP 461 <https://www.python.org/dev/peps/pep-0461/>`_ | % formatting for binary strings | Completed |
+--------------------------------------------------------+-------------------------------------------------+---------------+
| `PEP 475 <https://www.python.org/dev/peps/pep-0475/>`_ | retrying system calls that fail with EINTR | Completed |
+--------------------------------------------------------+-------------------------------------------------+---------------+
| `PEP 479 <https://www.python.org/dev/peps/pep-0479/>`_ | change StopIteration handling inside generators | Completed |
+--------------------------------------------------------+-------------------------------------------------+---------------+
| **Standard library changes:** |
+--------------------------------------------------------+-------------------------------------------------+---------------+
| `PEP 471 <https://www.python.org/dev/peps/pep-0471/>`_ | os.scandir() | |
+--------------------------------------------------------+-------------------------------------------------+---------------+
| `PEP 485 <https://www.python.org/dev/peps/pep-0485/>`_ | math.isclose(), a function for testing | Completed |
| | approximate equality | |
+--------------------------------------------------------+-------------------------------------------------+---------------+
| **Miscellaneous changes:** |
+--------------------------------------------------------+-------------------------------------------------+---------------+
| `PEP 441 <https://www.python.org/dev/peps/pep-0441/>`_ | improved Python zip application support | |
+--------------------------------------------------------+-------------------------------------------------+---------------+
| `PEP 486 <https://www.python.org/dev/peps/pep-0486/>`_ | make the Python Launcher aware of virtual | Not relevant |
| | environments | |
+--------------------------------------------------------+-------------------------------------------------+---------------+
| `PEP 484 <https://www.python.org/dev/peps/pep-0484/>`_ | type hints (advisory only) | In Progress |
+--------------------------------------------------------+-------------------------------------------------+---------------+
| `PEP 488 <https://www.python.org/dev/peps/pep-0488/>`_ | elimination of PYO files | Not relevant |
+--------------------------------------------------------+-------------------------------------------------+---------------+
| `PEP 489 <https://www.python.org/dev/peps/pep-0489/>`_ | redesigning extension module loading | |
+--------------------------------------------------------+-------------------------------------------------+---------------+
+--------------------------------------------------------------------------------------------------------------+--------------------+
| **Extensions to the syntax** | **Status** |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| `PEP 448 <https://www.python.org/dev/peps/pep-0448/>`_ | Additional unpacking generalizations | Partial |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| `PEP 465 <https://www.python.org/dev/peps/pep-0465/>`_ | A new matrix multiplication operator | Complete |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| `PEP 492 <https://www.python.org/dev/peps/pep-0492/>`_ | Coroutines with ``async`` and ``await`` syntax | Complete |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| **Extensions and changes to runtime** |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| `PEP 461 <https://www.python.org/dev/peps/pep-0461/>`_ | % formatting for binary strings | Complete |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| `PEP 475 <https://www.python.org/dev/peps/pep-0475/>`_ | Retrying system calls that fail with ``EINTR`` | Complete |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| `PEP 479 <https://www.python.org/dev/peps/pep-0479/>`_ | Change ``StopIteration`` handling inside generators | Complete |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| **Standard library changes** |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| `PEP 471 <https://www.python.org/dev/peps/pep-0471/>`_ | ``os.scandir()`` | |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| `PEP 485 <https://www.python.org/dev/peps/pep-0485/>`_ | ``math.isclose()``, a function for testing | Complete |
| | approximate equality | |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| **Miscellaneous changes** |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| `PEP 441 <https://www.python.org/dev/peps/pep-0441/>`_ | Improved Python zip application support | |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| `PEP 486 <https://www.python.org/dev/peps/pep-0486/>`_ | Make the Python Launcher aware of virtual | Not relevant |
| | environments | |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| `PEP 484 <https://www.python.org/dev/peps/pep-0484/>`_ | Type hints (advisory only) | Complete [#fth]_ |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| `PEP 488 <https://www.python.org/dev/peps/pep-0488/>`_ | Elimination of PYO files | Not relevant |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
| `PEP 489 <https://www.python.org/dev/peps/pep-0489/>`_ | Redesigning extension module loading | |
+--------------------------------------------------------+-----------------------------------------------------+--------------------+
Other Language Changes: Other Language Changes:
+-----------------------------------------------------------------------------------------------------------+---------------+ .. table::
| Added the *namereplace* error handlers. The *backslashreplace* error handlers now work with decoding and | | :widths: 90 10
| translating. | |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| Property docstrings are now writable. This is especially useful for collections.namedtuple() docstrings | | | Added the *namereplace* error handlers. The *backslashreplace* error handlers now work with decoding and | |
+-----------------------------------------------------------------------------------------------------------+---------------+ | translating. | |
| Circular imports involving relative imports are now supported. | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | Property docstrings are now writable. This is especially useful for collections.namedtuple() docstrings | |
+-----------------------------------------------------------------------------------------------------------+---------------+
| Circular imports involving relative imports are now supported. | |
+-----------------------------------------------------------------------------------------------------------+---------------+
New Modules: New Modules:
@ -65,117 +70,124 @@ New Modules:
Changes to built-in modules: Changes to built-in modules:
+-----------------------------------------------------------------------------------------------------------+---------------+ .. table::
| `collections <https://docs.python.org/3/whatsnew/3.5.html#collections>`_ | :widths: 90 10
+-----------------------------------------------------------------------------------------------------------+---------------+
| The *OrderedDict* class is now implemented in C, which makes it 4 to 100 times faster. | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | `collections <https://docs.python.org/3/whatsnew/3.5.html#collections>`_ |
| *OrderedDict.items()* , *OrderedDict.keys()* , *OrderedDict.values()* views now support reversed() | | +-----------------------------------------------------------------------------------------------------------+---------------+
| iteration. | | | The *OrderedDict* class is now implemented in C, which makes it 4 to 100 times faster. | |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| The deque class now defines *index()*, *insert()*, and *copy()*, and supports the + and * operators. | | | *OrderedDict.items()* , *OrderedDict.keys()* , *OrderedDict.values()* views now support reversed() | |
+-----------------------------------------------------------------------------------------------------------+---------------+ | iteration. | |
| Docstrings produced by namedtuple() can now be updated. | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | The deque class now defines *index()*, *insert()*, and *copy()*, and supports the + and * operators. | |
| The UserString class now implements the *__getnewargs__()*, *__rmod__()*, *casefold()*, *format_map()*, | | +-----------------------------------------------------------------------------------------------------------+---------------+
| *isprintable()*, and *maketrans()* methods to match the corresponding methods of str. | | | Docstrings produced by namedtuple() can now be updated. | |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| `heapq <https://docs.python.org/3/whatsnew/3.5.html#heapq>`_ | | The UserString class now implements the *__getnewargs__()*, *__rmod__()*, *casefold()*, *format_map()*, | |
+-----------------------------------------------------------------------------------------------------------+---------------+ | *isprintable()*, and *maketrans()* methods to match the corresponding methods of str. | |
| Element comparison in *merge()* can now be customized by passing a key function in a new optional key | | +-----------------------------------------------------------------------------------------------------------+---------------+
| keyword argument, and a new optional *reverse* keyword argument can be used to reverse element comparison | | | `heapq <https://docs.python.org/3/whatsnew/3.5.html#heapq>`_ |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| `io <https://docs.python.org/3/whatsnew/3.5.html#io>`_ | | Element comparison in *merge()* can now be customized by passing a key function in a new optional key | |
+-----------------------------------------------------------------------------------------------------------+---------------+ | keyword argument, and a new optional *reverse* keyword argument can be used to reverse element comparison | |
| A new *BufferedIOBase.readinto1()* method, that uses at most one call to the underlying raw stream's | | +-----------------------------------------------------------------------------------------------------------+---------------+
| *RawIOBase.read()* or *RawIOBase.readinto()* methods | | | `io <https://docs.python.org/3/whatsnew/3.5.html#io>`_ |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| `json <https://docs.python.org/3/whatsnew/3.5.html#json>`_ | | | A new *BufferedIOBase.readinto1()* method, that uses at most one call to the underlying raw stream's | |
+-----------------------------------------------------------------------------------------------------------+---------------+ | *RawIOBase.read()* or *RawIOBase.readinto()* methods | |
| JSON decoder now raises JSONDecodeError instead of ValueError to provide better context information about | | +-----------------------------------------------------------------------------------------------------------+---------------+
| the error. | | | `json <https://docs.python.org/3/whatsnew/3.5.html#json>`_ | |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| `math <https://docs.python.org/3/whatsnew/3.5.html#math>`_ | | JSON decoder now raises JSONDecodeError instead of ValueError to provide better context information about | |
+-----------------------------------------------------------------------------------------------------------+---------------+ | the error. | |
| Two new constants have been added to the math module: *inf* and *nan*. | Completed | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | `math <https://docs.python.org/3/whatsnew/3.5.html#math>`_ |
| A new function *isclose()* provides a way to test for approximate equality. | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | Two new constants have been added to the math module: *inf* and *nan*. | Complete |
| A new *gcd()* function has been added. The *fractions.gcd()* function is now deprecated. | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | A new function *isclose()* provides a way to test for approximate equality. | |
| `os <https://docs.python.org/3/whatsnew/3.5.html#os>`_ | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | A new *gcd()* function has been added. The *fractions.gcd()* function is now deprecated. | |
| The new *scandir()* function returning an iterator of DirEntry objects has been added. | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | `os <https://docs.python.org/3/whatsnew/3.5.html#os>`_ |
| The *urandom()* function now uses the *getrandom()* syscall on Linux 3.17 or newer, and *getentropy()* on | | +-----------------------------------------------------------------------------------------------------------+---------------+
| OpenBSD 5.6 and newer, removing the need to use /dev/urandom and avoiding failures due to potential file | | | The new *scandir()* function returning an iterator of DirEntry objects has been added. | |
| descriptor exhaustion. | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | The *urandom()* function now uses the *getrandom()* syscall on Linux 3.17 or newer, and *getentropy()* on | |
| New *get_blocking()* and *set_blocking()* functions allow getting and setting a file descriptor's blocking| | | OpenBSD 5.6 and newer, removing the need to use /dev/urandom and avoiding failures due to potential file | |
| mode (O_NONBLOCK.) | | | descriptor exhaustion. | |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| There is a new *os.path.commonpath()* function returning the longest common sub-path of each passed | | | New *get_blocking()* and *set_blocking()* functions allow getting and setting a file descriptor's blocking| |
| pathname | | | mode (O_NONBLOCK.) | |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| `re <https://docs.python.org/3/whatsnew/3.5.html#re>`_ | | | There is a new *os.path.commonpath()* function returning the longest common sub-path of each passed | |
+-----------------------------------------------------------------------------------------------------------+---------------+ | pathname | |
| References and conditional references to groups with fixed length are now allowed in lookbehind assertions| | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | `re <https://docs.python.org/3/whatsnew/3.5.html#re>`_ | |
| The number of capturing groups in regular expressions is no longer limited to 100. | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | References and conditional references to groups with fixed length are now allowed in lookbehind assertions| |
| The *sub()* and *subn()* functions now replace unmatched groups with empty strings instead of raising an | | +-----------------------------------------------------------------------------------------------------------+---------------+
| exception. | | | The number of capturing groups in regular expressions is no longer limited to 100. | |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| The *re.error* exceptions have new attributes, msg, pattern, pos, lineno, and colno, that provide better | | | The *sub()* and *subn()* functions now replace unmatched groups with empty strings instead of raising an | |
| context information about the error | | | exception. | |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| `socket <https://docs.python.org/3/whatsnew/3.5.html#socket>`_ | | The *re.error* exceptions have new attributes, msg, pattern, pos, lineno, and colno, that provide better | |
+-----------------------------------------------------------------------------------------------------------+---------------+ | context information about the error | |
| Functions with timeouts now use a monotonic clock, instead of a system clock. | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | `socket <https://docs.python.org/3/whatsnew/3.5.html#socket>`_ |
| A new *socket.sendfile()* method allows sending a file over a socket by using the high-performance | | +-----------------------------------------------------------------------------------------------------------+---------------+
| *os.sendfile()* function on UNIX, resulting in uploads being from 2 to 3 times faster than when using | | | Functions with timeouts now use a monotonic clock, instead of a system clock. | |
| plain *socket.send()* | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | A new *socket.sendfile()* method allows sending a file over a socket by using the high-performance | |
| The *socket.sendall()* method no longer resets the socket timeout every time bytes are received or sent. | | | *os.sendfile()* function on UNIX, resulting in uploads being from 2 to 3 times faster than when using | |
| The socket timeout is now the maximum total duration to send all data. | | | plain *socket.send()* | |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| The backlog argument of the *socket.listen()* method is now optional. By default it is set to SOMAXCONN or| Completed | | The *socket.sendall()* method no longer resets the socket timeout every time bytes are received or sent. | |
| to 128, whichever is less. | | | The socket timeout is now the maximum total duration to send all data. | |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| `ssl <https://docs.python.org/3/whatsnew/3.5.html#ssl>`_ | | The backlog argument of the *socket.listen()* method is now optional. By default it is set to SOMAXCONN or| Complete |
+-----------------------------------------------------------------------------------------------------------+---------------+ | to 128, whichever is less. | |
| Memory BIO Support | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | `ssl <https://docs.python.org/3/whatsnew/3.5.html#ssl>`_ |
| Application-Layer Protocol Negotiation Support | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | Memory BIO Support | |
| There is a new *SSLSocket.version()* method to query the actual protocol version in use. | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | Application-Layer Protocol Negotiation Support | |
| The SSLSocket class now implements a *SSLSocket.sendfile()* method. | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | There is a new *SSLSocket.version()* method to query the actual protocol version in use. | |
| The *SSLSocket.send()* method now raises either the *ssl.SSLWantReadError* or *ssl.SSLWantWriteError* | | +-----------------------------------------------------------------------------------------------------------+---------------+
| exception on a non-blocking socket if the operation would block. Previously, it would return 0. | | | The SSLSocket class now implements a *SSLSocket.sendfile()* method. | |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| The *cert_time_to_seconds()* function now interprets the input time as UTC and not as local time, per RFC | | | The *SSLSocket.send()* method now raises either the *ssl.SSLWantReadError* or *ssl.SSLWantWriteError* | |
| 5280. Additionally, the return value is always an int. | | | exception on a non-blocking socket if the operation would block. Previously, it would return 0. | |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| New *SSLObject.shared_ciphers()* and *SSLSocket.shared_ciphers()* methods return the list of ciphers sent | | | The *cert_time_to_seconds()* function now interprets the input time as UTC and not as local time, per RFC | |
| by the client during the handshake. | | | 5280. Additionally, the return value is always an int. | |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| The *SSLSocket.do_handshake()*, *SSLSocket.read()*, *SSLSocket.shutdown()*, and *SSLSocket.write()* | | | New *SSLObject.shared_ciphers()* and *SSLSocket.shared_ciphers()* methods return the list of ciphers sent | |
| methods of the SSLSocket class no longer reset the socket timeout every time bytes are received or sent. | | | by the client during the handshake. | |
+-----------------------------------------------------------------------------------------------------------+---------------+ +-----------------------------------------------------------------------------------------------------------+---------------+
| The *match_hostname()* function now supports matching of IP addresses. | | | The *SSLSocket.do_handshake()*, *SSLSocket.read()*, *SSLSocket.shutdown()*, and *SSLSocket.write()* | |
+-----------------------------------------------------------------------------------------------------------+---------------+ | methods of the SSLSocket class no longer reset the socket timeout every time bytes are received or sent. | |
| `sys <https://docs.python.org/3/whatsnew/3.5.html#sys>`_ | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | The *match_hostname()* function now supports matching of IP addresses. | |
| A new *set_coroutine_wrapper()* function allows setting a global hook that will be called whenever a | | +-----------------------------------------------------------------------------------------------------------+---------------+
| coroutine object is created by an async def function. A corresponding *get_coroutine_wrapper()* can be | | | `sys <https://docs.python.org/3/whatsnew/3.5.html#sys>`_ |
| used to obtain a currently set wrapper. | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | A new *set_coroutine_wrapper()* function allows setting a global hook that will be called whenever a | |
| A new *is_finalizing()* function can be used to check if the Python interpreter is shutting down. | | | coroutine object is created by an async def function. A corresponding *get_coroutine_wrapper()* can be | |
+-----------------------------------------------------------------------------------------------------------+---------------+ | used to obtain a currently set wrapper. | |
| `time <https://docs.python.org/3/whatsnew/3.5.html#time>`_ | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | A new *is_finalizing()* function can be used to check if the Python interpreter is shutting down. | |
| The *monotonic()* function is now always available | | +-----------------------------------------------------------------------------------------------------------+---------------+
+-----------------------------------------------------------------------------------------------------------+---------------+ | `time <https://docs.python.org/3/whatsnew/3.5.html#time>`_ |
+-----------------------------------------------------------------------------------------------------------+---------------+
| The *monotonic()* function is now always available | |
+-----------------------------------------------------------------------------------------------------------+---------------+
.. rubric:: Notes
.. [#fth] The MicroPython parser correct ignores all type hints. However, the ``typing`` module is not built-in.

Wyświetl plik

@ -5,53 +5,59 @@ Python 3.6
Python 3.6 beta 1 was released on 12 Sep 2016, and a summary of the new features can be found here: Python 3.6 beta 1 was released on 12 Sep 2016, and a summary of the new features can be found here:
+-----------------------------------------------------------------------------------------------------------+--------------+ .. table::
| **New Syntax Features:** | **Status** | :widths: 30 50 20
+--------------------------------------------------------+--------------------------------------------------+--------------+
| `PEP 498 <https://www.python.org/dev/peps/pep-0498/>`_ | Literal String Formatting | | +-----------------------------------------------------------------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | **New Syntax Features** | **Status** |
| `PEP 515 <https://www.python.org/dev/peps/pep-0515/>`_ | Underscores in Numeric Literals | | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | `PEP 498 <https://www.python.org/dev/peps/pep-0498/>`_ | Literal String Formatting | Complete |
| `PEP 525 <https://www.python.org/dev/peps/pep-0525/>`_ | Asynchronous Generators | | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | `PEP 515 <https://www.python.org/dev/peps/pep-0515/>`_ | Underscores in Numeric Literals | Complete |
| `PEP 526 <https://www.python.org/dev/peps/pep-0526/>`_ | Syntax for Variable Annotations (provisional) | | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | `PEP 525 <https://www.python.org/dev/peps/pep-0525/>`_ | Asynchronous Generators | |
| `PEP 530 <https://www.python.org/dev/peps/pep-0530/>`_ | Asynchronous Comprehensions | | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | `PEP 526 <https://www.python.org/dev/peps/pep-0526/>`_ | Syntax for Variable Annotations (provisional) | Complete |
| **New Built-in Features:** | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | `PEP 530 <https://www.python.org/dev/peps/pep-0530/>`_ | Asynchronous Comprehensions | |
| `PEP 468 <https://www.python.org/dev/peps/pep-0468/>`_ | Preserving the order of *kwargs* in a function | | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | **New Built-in Features** |
| `PEP 487 <https://www.python.org/dev/peps/pep-0487/>`_ | Simpler customization of class creation | | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | `PEP 468 <https://www.python.org/dev/peps/pep-0468/>`_ | Preserving the order of *kwargs* in a function | |
| `PEP 520 <https://www.python.org/dev/peps/pep-0520/>`_ | Preserving Class Attribute Definition Order | | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | `PEP 487 <https://www.python.org/dev/peps/pep-0487/>`_ | Simpler customization of class creation | |
| **Standard Library Changes:** | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | `PEP 520 <https://www.python.org/dev/peps/pep-0520/>`_ | Preserving Class Attribute Definition Order | |
| `PEP 495 <https://www.python.org/dev/peps/pep-0495/>`_ | Local Time Disambiguation | | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | **Standard Library Changes** |
| `PEP 506 <https://www.python.org/dev/peps/pep-0506/>`_ | Adding A Secrets Module To The Standard Library | | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | `PEP 495 <https://www.python.org/dev/peps/pep-0495/>`_ | Local Time Disambiguation | |
| `PEP 519 <https://www.python.org/dev/peps/pep-0519/>`_ | Adding a file system path protocol | | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | `PEP 506 <https://www.python.org/dev/peps/pep-0506/>`_ | Adding A Secrets Module To The Standard Library | |
| **CPython internals:** | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | `PEP 519 <https://www.python.org/dev/peps/pep-0519/>`_ | Adding a file system path protocol | |
| `PEP 509 <https://www.python.org/dev/peps/pep-0509/>`_ | Add a private version to dict | | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | **CPython Internals** |
| `PEP 523 <https://www.python.org/dev/peps/pep-0523/>`_ | Adding a frame evaluation API to CPython | | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | `PEP 509 <https://www.python.org/dev/peps/pep-0509/>`_ | Add a private version to dict | Won't do |
| **Linux/Window Changes** | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | `PEP 523 <https://www.python.org/dev/peps/pep-0523/>`_ | Adding a frame evaluation API to CPython | |
| `PEP 524 <https://www.python.org/dev/peps/pep-0524/>`_ | Make os.urandom() blocking on Linux | | +--------------------------------------------------------+--------------------------------------------------+-----------------+
| | (during system startup) | | | **Linux/Window Changes** |
+--------------------------------------------------------+--------------------------------------------------+--------------+ +--------------------------------------------------------+--------------------------------------------------+-----------------+
| `PEP 528 <https://www.python.org/dev/peps/pep-0528/>`_ | Change Windows console encoding to UTF-8 | | | `PEP 524 <https://www.python.org/dev/peps/pep-0524/>`_ | Make ``os.urandom()`` blocking on Linux | |
+--------------------------------------------------------+--------------------------------------------------+--------------+ | | (during system startup) | |
| `PEP 529 <https://www.python.org/dev/peps/pep-0529/>`_ | Change Windows filesystem encoding to UTF-8 | | +--------------------------------------------------------+--------------------------------------------------+-----------------+
+--------------------------------------------------------+--------------------------------------------------+--------------+ | `PEP 528 <https://www.python.org/dev/peps/pep-0528/>`_ | Change Windows console encoding to UTF-8 | |
+--------------------------------------------------------+--------------------------------------------------+-----------------+
| `PEP 529 <https://www.python.org/dev/peps/pep-0529/>`_ | Change Windows filesystem encoding to UTF-8 | |
+--------------------------------------------------------+--------------------------------------------------+-----------------+
Other Language Changes: Other Language Changes:
.. table::
:widths: 90 10
+-------------------------------------------------------------------------------------------------------------+---------------+ +-------------------------------------------------------------------------------------------------------------+---------------+
| A *global* or *nonlocal* statement must now textually appear before the first use of the affected name in | | | A *global* or *nonlocal* statement must now textually appear before the first use of the affected name in | |
| the same scope. Previously this was a SyntaxWarning. | | | the same scope. Previously this was a SyntaxWarning. | |
@ -71,6 +77,9 @@ Other Language Changes:
Changes to built-in modules: Changes to built-in modules:
.. table::
:widths: 90 10
+--------------------------------------------------------------------------------------------------------------+----------------+ +--------------------------------------------------------------------------------------------------------------+----------------+
| `array <https://docs.python.org/3.6/whatsnew/3.6.html#array>`_ | | | `array <https://docs.python.org/3.6/whatsnew/3.6.html#array>`_ | |
+--------------------------------------------------------------------------------------------------------------+----------------+ +--------------------------------------------------------------------------------------------------------------+----------------+
@ -78,7 +87,7 @@ Changes to built-in modules:
+--------------------------------------------------------------------------------------------------------------+----------------+ +--------------------------------------------------------------------------------------------------------------+----------------+
| `binascii <https://docs.python.org/3.6/whatsnew/3.6.html#binascii>`_ | | | `binascii <https://docs.python.org/3.6/whatsnew/3.6.html#binascii>`_ | |
+--------------------------------------------------------------------------------------------------------------+----------------+ +--------------------------------------------------------------------------------------------------------------+----------------+
| The b2a_base64() function now accepts an optional newline keyword argument to control whether the newline | Completed | | The b2a_base64() function now accepts an optional newline keyword argument to control whether the newline | Complete |
| character is appended to the return value | | | character is appended to the return value | |
+--------------------------------------------------------------------------------------------------------------+----------------+ +--------------------------------------------------------------------------------------------------------------+----------------+
| `cmath <https://docs.python.org/3.6/whatsnew/3.6.html#cmath>`_ | | | `cmath <https://docs.python.org/3.6/whatsnew/3.6.html#cmath>`_ | |
@ -121,7 +130,7 @@ Changes to built-in modules:
+--------------------------------------------------------------------------------------------------------------+----------------+ +--------------------------------------------------------------------------------------------------------------+----------------+
| `math <https://docs.python.org/3.6/whatsnew/3.6.html#math>`_ | | `math <https://docs.python.org/3.6/whatsnew/3.6.html#math>`_ |
+--------------------------------------------------------------------------------------------------------------+----------------+ +--------------------------------------------------------------------------------------------------------------+----------------+
| The new math.tau (τ) constant has been added | Completed | | The new math.tau (τ) constant has been added | Complete |
+--------------------------------------------------------------------------------------------------------------+----------------+ +--------------------------------------------------------------------------------------------------------------+----------------+
| `os <https://docs.python.org/3.6/whatsnew/3.6.html#os>`_ | | `os <https://docs.python.org/3.6/whatsnew/3.6.html#os>`_ |
+--------------------------------------------------------------------------------------------------------------+----------------+ +--------------------------------------------------------------------------------------------------------------+----------------+
@ -136,7 +145,7 @@ Changes to built-in modules:
| `re <https://docs.python.org/3.6/whatsnew/3.6.html#re>`_ | | `re <https://docs.python.org/3.6/whatsnew/3.6.html#re>`_ |
+--------------------------------------------------------------------------------------------------------------+----------------+ +--------------------------------------------------------------------------------------------------------------+----------------+
| Added support of modifier spans in regular expressions. Examples: *'(?i:p)ython'* matches 'python' and | | | Added support of modifier spans in regular expressions. Examples: *'(?i:p)ython'* matches 'python' and | |
| 'Python', but not 'PYTHON'; *'(?i)g(?-i:v)r'* matches *'GvR'* and *'gvr'*, but not *'GVR'* . | | | 'Python', but not 'PYTHON'; *'(?i)g(?-i:v)r'* matches *'GvR'* and *'gvr'*, but not *'GVR'*. | |
+--------------------------------------------------------------------------------------------------------------+----------------+ +--------------------------------------------------------------------------------------------------------------+----------------+
| Match object groups can be accessed by *__getitem__*, which is equivalent to *group()*. So *mo['name']* is | | | Match object groups can be accessed by *__getitem__*, which is equivalent to *group()*. So *mo['name']* is | |
| now equivalent to *mo.group('name')*. | | | now equivalent to *mo.group('name')*. | |

Wyświetl plik

@ -5,72 +5,81 @@ Python 3.7
New Features: New Features:
+--------------------------------------------------------+--------------------------------------------------+----------------+ .. table::
| **Features:** | **Status** | :widths: 20 60 20
+--------------------------------------------------------+--------------------------------------------------+----------------+
| `PEP 538 <https://www.python.org/dev/peps/pep-0538/>`_ | Coercing the legacy C locale to a UTF-8 based | | +--------------------------------------------------------+--------------------------------------------------+--------------------------------------+
| | locale | | | **Feature** | **Status** |
+--------------------------------------------------------+--------------------------------------------------+----------------+ +--------------------------------------------------------+--------------------------------------------------+--------------------------------------+
| `PEP 539 <https://www.python.org/dev/peps/pep-0539/>`_ | A New C-API for Thread-Local Storage in CPython | | | `PEP 538 <https://www.python.org/dev/peps/pep-0538/>`_ | Coercing the legacy C locale to a UTF-8 based | |
+--------------------------------------------------------+--------------------------------------------------+----------------+ | | locale | |
| `PEP 540 <https://www.python.org/dev/peps/pep-0540/>`_ | UTF-8 mode | | +--------------------------------------------------------+--------------------------------------------------+--------------------------------------+
+--------------------------------------------------------+--------------------------------------------------+----------------+ | `PEP 539 <https://www.python.org/dev/peps/pep-0539/>`_ | A New C-API for Thread-Local Storage in CPython | |
| `PEP 552 <https://www.python.org/dev/peps/pep-0552/>`_ | Deterministic pyc | | +--------------------------------------------------------+--------------------------------------------------+--------------------------------------+
+--------------------------------------------------------+--------------------------------------------------+----------------+ | `PEP 540 <https://www.python.org/dev/peps/pep-0540/>`_ | UTF-8 mode | |
| `PEP 553 <https://www.python.org/dev/peps/pep-0553/>`_ | Built-in breakpoint() | | +--------------------------------------------------------+--------------------------------------------------+--------------------------------------+
+--------------------------------------------------------+--------------------------------------------------+----------------+ | `PEP 552 <https://www.python.org/dev/peps/pep-0552/>`_ | Deterministic pyc | |
| `PEP 557 <https://www.python.org/dev/peps/pep-0557/>`_ | Data Classes | | +--------------------------------------------------------+--------------------------------------------------+--------------------------------------+
+--------------------------------------------------------+--------------------------------------------------+----------------+ | `PEP 553 <https://www.python.org/dev/peps/pep-0553/>`_ | Built-in ``breakpoint()`` | |
| `PEP 560 <https://www.python.org/dev/peps/pep-0560/>`_ | Core support for typing module and generic types | | +--------------------------------------------------------+--------------------------------------------------+--------------------------------------+
+--------------------------------------------------------+--------------------------------------------------+----------------+ | `PEP 557 <https://www.python.org/dev/peps/pep-0557/>`_ | Data Classes | |
| `PEP 562 <https://www.python.org/dev/peps/pep-0562/>`_ | Module __getattr__ and __dir__ | Partially done | +--------------------------------------------------------+--------------------------------------------------+--------------------------------------+
+--------------------------------------------------------+--------------------------------------------------+----------------+ | `PEP 560 <https://www.python.org/dev/peps/pep-0560/>`_ | Core support for typing module and generic types | |
| `PEP 563 <https://www.python.org/dev/peps/pep-0563/>`_ | Postponed Evaluation of Annotations | | +--------------------------------------------------------+--------------------------------------------------+--------------------------------------+
+--------------------------------------------------------+--------------------------------------------------+----------------+ | `PEP 562 <https://www.python.org/dev/peps/pep-0562/>`_ | Module ``__getattr__`` and ``__dir__`` | Partial |
| `PEP 564 <https://www.python.org/dev/peps/pep-0564/>`_ | Time functions with nanosecond resolution | | +--------------------------------------------------------+--------------------------------------------------+--------------------------------------+
+--------------------------------------------------------+--------------------------------------------------+----------------+ | `PEP 563 <https://www.python.org/dev/peps/pep-0563/>`_ | Postponed Evaluation of Annotations | |
| `PEP 565 <https://www.python.org/dev/peps/pep-0565/>`_ | Show DeprecationWarning in __main__ | | +--------------------------------------------------------+--------------------------------------------------+--------------------------------------+
+--------------------------------------------------------+--------------------------------------------------+----------------+ | `PEP 564 <https://www.python.org/dev/peps/pep-0564/>`_ | Time functions with nanosecond resolution | Partial [#ftimenanosec]_ |
| `PEP 567 <https://www.python.org/dev/peps/pep-0567/>`_ | Context Variables | | +--------------------------------------------------------+--------------------------------------------------+--------------------------------------+
+--------------------------------------------------------+--------------------------------------------------+----------------+ | `PEP 565 <https://www.python.org/dev/peps/pep-0565/>`_ | Show DeprecationWarning in ``__main__`` | |
+--------------------------------------------------------+--------------------------------------------------+--------------------------------------+
| `PEP 567 <https://www.python.org/dev/peps/pep-0567/>`_ | Context Variables | |
+--------------------------------------------------------+--------------------------------------------------+--------------------------------------+
Other Language Changes: Other Language Changes:
+----------------------------------------------------------------------------------------------------------+----------------+ .. table::
| async and await are now reserved keywords | Completed | :widths: 90 10
+----------------------------------------------------------------------------------------------------------+----------------+
| dict objects must preserve insertion-order | | +-----------------------------------------------------------------------------------------------------------------+----------------+
+----------------------------------------------------------------------------------------------------------+----------------+ | ``async`` and ``await`` are now reserved keywords | Complete |
| More than 255 arguments can now be passed to a function; a function can now have more than 255 parameters| | +-----------------------------------------------------------------------------------------------------------------+----------------+
+----------------------------------------------------------------------------------------------------------+----------------+ | ``dict`` objects must preserve insertion-order | |
| bytes.fromhex() and bytearray.fromhex() now ignore all ASCII whitespace, not only spaces | | +-----------------------------------------------------------------------------------------------------------------+----------------+
+----------------------------------------------------------------------------------------------------------+----------------+ | More than 255 arguments can now be passed to a function; a function can now have more than 255 parameters | |
| str, bytes, and bytearray gained support for the new isascii() method, which can be used to test if a | | +-----------------------------------------------------------------------------------------------------------------+----------------+
| string or bytes contain only the ASCII characters | | | ``bytes.fromhex()`` and ``bytearray.fromhex()`` now ignore all ASCII whitespace, not only spaces | |
+----------------------------------------------------------------------------------------------------------+----------------+ +-----------------------------------------------------------------------------------------------------------------+----------------+
| ImportError now displays module name and module __file__ path whenfrom ... import ... fails | | | ``str``, ``bytes``, and ``bytearray`` gained support for the new ``isascii()`` method, which can be used to | |
+----------------------------------------------------------------------------------------------------------+----------------+ | test if a string or bytes contain only the ASCII characters | |
| Circular imports involving absolute imports with binding a submodule to a name are now supported | | +-----------------------------------------------------------------------------------------------------------------+----------------+
+----------------------------------------------------------------------------------------------------------+----------------+ | ``ImportError`` now displays module name and module ``__file__`` path when ``from ... import ...`` fails | |
| object.__format__(x, '') is now equivalent to str(x) rather than format(str(self), '') | | +-----------------------------------------------------------------------------------------------------------------+----------------+
+----------------------------------------------------------------------------------------------------------+----------------+ | Circular imports involving absolute imports with binding a submodule to a name are now supported | |
| In order to better support dynamic creation of stack traces, types.TracebackType can now be instantiated | | +-----------------------------------------------------------------------------------------------------------------+----------------+
| from Python code, and the tb_next attribute on tracebacks is now writable | | | ``object.__format__(x, '')`` is now equivalent to ``str(x)`` rather than ``format(str(self), '')`` | |
+----------------------------------------------------------------------------------------------------------+----------------+ +-----------------------------------------------------------------------------------------------------------------+----------------+
| When using the -m switch, sys.path[0] is now eagerly expanded to the full starting directory path, rather| | | In order to better support dynamic creation of stack traces, ``types.TracebackType`` can now be | |
| than being left as the empty directory (which allows imports from the current working directory at the | | | instantiated from Python code, and the ``tb_next`` attribute on tracebacks is now writable | |
| time when an import occurs) | | +-----------------------------------------------------------------------------------------------------------------+----------------+
+----------------------------------------------------------------------------------------------------------+----------------+ | When using the ``-m`` switch, ``sys.path[0]`` is now eagerly expanded to the full starting directory path, | |
| The new -X importtime option or the PYTHONPROFILEIMPORTTIME environment variable can be used to show the | | | rather than being left as the empty directory (which allows imports from the current working directory | |
| timing of each module import | | | at the time when an import occurs) | |
+----------------------------------------------------------------------------------------------------------+----------------+ +-----------------------------------------------------------------------------------------------------------------+----------------+
| The new ``-X importtime`` option or the ``PYTHONPROFILEIMPORTTIME`` environment variable can be used to | |
| show the timing of each module import | |
+-----------------------------------------------------------------------------------------------------------------+----------------+
Changes to built-in modules: Changes to built-in modules:
.. table::
:widths: 90 10
+------------------------------------------------------------------------------------------------------------+----------------+ +------------------------------------------------------------------------------------------------------------+----------------+
| `asyncio <https://docs.python.org/3/whatsnew/3.7.html#asyncio>`_ | | | `asyncio <https://docs.python.org/3/whatsnew/3.7.html#asyncio>`_ | |
+------------------------------------------------------------------------------------------------------------+----------------+ +------------------------------------------------------------------------------------------------------------+----------------+
| asyncio (many, may need a separate ticket) | | | Too many to list | |
+------------------------------------------------------------------------------------------------------------+----------------+ +------------------------------------------------------------------------------------------------------------+----------------+
| `gc <https://docs.python.org/3/whatsnew/3.7.html#gc>`_ | | | `gc <https://docs.python.org/3/whatsnew/3.7.html#gc>`_ | |
+------------------------------------------------------------------------------------------------------------+----------------+ +------------------------------------------------------------------------------------------------------------+----------------+
@ -93,3 +102,7 @@ Changes to built-in modules:
+------------------------------------------------------------------------------------------------------------+----------------+ +------------------------------------------------------------------------------------------------------------+----------------+
| Mostly updates to support nanosecond resolution in PEP564, see above | | | Mostly updates to support nanosecond resolution in PEP564, see above | |
+------------------------------------------------------------------------------------------------------------+----------------+ +------------------------------------------------------------------------------------------------------------+----------------+
.. rubric:: Notes
.. [#ftimenanosec] Only :func:`time.time_ns` is implemented.

Wyświetl plik

@ -5,15 +5,18 @@ Python 3.8
Python 3.8.0 (final) was released on the 14 October 2019. The Features for 3.8 Python 3.8.0 (final) was released on the 14 October 2019. The Features for 3.8
are defined in `PEP 569 <https://www.python.org/dev/peps/pep-0569/#id9>`_ and are defined in `PEP 569 <https://www.python.org/dev/peps/pep-0569/#id9>`_ and
a detailed description of the changes can be found in What's New in `Python a detailed description of the changes can be found in `What's New in Python
3.8. <https://docs.python.org/3/whatsnew/3.8.html>`_ 3.8. <https://docs.python.org/3/whatsnew/3.8.html>`_
.. table::
:widths: 20 60 20
+--------------------------------------------------------+---------------------------------------------------+---------------+ +--------------------------------------------------------+---------------------------------------------------+---------------+
| **Features:** | Status | | **Features** | **Status** |
+--------------------------------------------------------+---------------------------------------------------+---------------+ +--------------------------------------------------------+---------------------------------------------------+---------------+
| `PEP 570 <https://www.python.org/dev/peps/pep-0570/>`_ | Positional-only arguments | | | `PEP 570 <https://www.python.org/dev/peps/pep-0570/>`_ | Positional-only arguments | |
+--------------------------------------------------------+---------------------------------------------------+---------------+ +--------------------------------------------------------+---------------------------------------------------+---------------+
| `PEP 572 <https://www.python.org/dev/peps/pep-0572/>`_ | Assignment Expressions | | | `PEP 572 <https://www.python.org/dev/peps/pep-0572/>`_ | Assignment Expressions | Complete |
+--------------------------------------------------------+---------------------------------------------------+---------------+ +--------------------------------------------------------+---------------------------------------------------+---------------+
| `PEP 574 <https://www.python.org/dev/peps/pep-0574/>`_ | Pickle protocol 5 with out-of-band data | | | `PEP 574 <https://www.python.org/dev/peps/pep-0574/>`_ | Pickle protocol 5 with out-of-band data | |
+--------------------------------------------------------+---------------------------------------------------+---------------+ +--------------------------------------------------------+---------------------------------------------------+---------------+
@ -25,13 +28,16 @@ a detailed description of the changes can be found in What's New in `Python
+--------------------------------------------------------+---------------------------------------------------+---------------+ +--------------------------------------------------------+---------------------------------------------------+---------------+
| **Miscellaneous** | | **Miscellaneous** |
+------------------------------------------------------------------------------------------------------------+---------------+ +------------------------------------------------------------------------------------------------------------+---------------+
| f-strings support = for self-documenting expressions and debugging | Completed | | f-strings support = for self-documenting expressions and debugging | Complete |
+------------------------------------------------------------------------------------------------------------+---------------+ +------------------------------------------------------------------------------------------------------------+---------------+
Other Language Changes: Other Language Changes:
.. table::
:widths: 90 10
+------------------------------------------------------------------------------------------------------------+-------------+ +------------------------------------------------------------------------------------------------------------+-------------+
| A *continue* statement was illegal in the *finally* clause due to a problem with the implementation. In | Completed | | A *continue* statement was illegal in the *finally* clause due to a problem with the implementation. In | Complete |
| Python 3.8 this restriction was lifted | | | Python 3.8 this restriction was lifted | |
+------------------------------------------------------------------------------------------------------------+-------------+ +------------------------------------------------------------------------------------------------------------+-------------+
| The *bool*, *int* , and *fractions.Fraction* types now have an *as_integer_ratio()* method like that found | | | The *bool*, *int* , and *fractions.Fraction* types now have an *as_integer_ratio()* method like that found | |
@ -72,14 +78,17 @@ Other Language Changes:
Changes to built-in modules: Changes to built-in modules:
.. table::
:widths: 90 10
+------------------------------------------------------------------------------------------------------------+-------------+ +------------------------------------------------------------------------------------------------------------+-------------+
| `asyncio` | | `asyncio <https://docs.python.org/3/whatsnew/3.8.html#asyncio>`_ |
+------------------------------------------------------------------------------------------------------------+-------------+ +------------------------------------------------------------------------------------------------------------+-------------+
| *asyncio.run()* has graduated from the provisional to stable API | Completed | | *asyncio.run()* has graduated from the provisional to stable API | Complete |
+------------------------------------------------------------------------------------------------------------+-------------+ +------------------------------------------------------------------------------------------------------------+-------------+
| Running *python -m asyncio* launches a natively async REPL | | | Running *python -m asyncio* launches a natively async REPL | |
+------------------------------------------------------------------------------------------------------------+-------------+ +------------------------------------------------------------------------------------------------------------+-------------+
| The exception *asyncio.CancelledError* now inherits from *BaseException* rather than *Exception* and no | Completed | | The exception *asyncio.CancelledError* now inherits from *BaseException* rather than *Exception* and no | Complete |
| longer inherits from *concurrent.futures.CancelledError* | | | longer inherits from *concurrent.futures.CancelledError* | |
+------------------------------------------------------------------------------------------------------------+-------------+ +------------------------------------------------------------------------------------------------------------+-------------+
| Added *asyncio.Task.get_coro()* for getting the wrapped coroutine within an *asyncio.Task* | | | Added *asyncio.Task.get_coro()* for getting the wrapped coroutine within an *asyncio.Task* | |
@ -90,12 +99,12 @@ Changes to built-in modules:
| Added support for Happy Eyeballs to *asyncio.loop.create_connection()*. To specify the behavior, two new | | | Added support for Happy Eyeballs to *asyncio.loop.create_connection()*. To specify the behavior, two new | |
| parameters have been added: *happy_eyeballs_delay* and interleave. | | | parameters have been added: *happy_eyeballs_delay* and interleave. | |
+------------------------------------------------------------------------------------------------------------+-------------+ +------------------------------------------------------------------------------------------------------------+-------------+
| `gc` | | `gc <https://docs.python.org/3/whatsnew/3.8.html#gc>`_ |
+------------------------------------------------------------------------------------------------------------+-------------+ +------------------------------------------------------------------------------------------------------------+-------------+
| *get_objects()* can now receive an optional generation parameter indicating a generation to get objects | | | *get_objects()* can now receive an optional generation parameter indicating a generation to get objects | |
| from. (Note, though, that while *gc* is a built-in, *get_objects()* is not implemented for MicroPython) | | | from. (Note, though, that while *gc* is a built-in, *get_objects()* is not implemented for MicroPython) | |
+------------------------------------------------------------------------------------------------------------+-------------+ +------------------------------------------------------------------------------------------------------------+-------------+
| `math` | | `math <https://docs.python.org/3/whatsnew/3.8.html#math>`_ |
+------------------------------------------------------------------------------------------------------------+-------------+ +------------------------------------------------------------------------------------------------------------+-------------+
| Added new function *math.dist()* for computing Euclidean distance between two points | | | Added new function *math.dist()* for computing Euclidean distance between two points | |
+------------------------------------------------------------------------------------------------------------+-------------+ +------------------------------------------------------------------------------------------------------------+-------------+
@ -109,9 +118,9 @@ Changes to built-in modules:
| Added a new function *math.isqrt()* for computing accurate integer square roots without conversion to | | | Added a new function *math.isqrt()* for computing accurate integer square roots without conversion to | |
| floating point | | | floating point | |
+------------------------------------------------------------------------------------------------------------+-------------+ +------------------------------------------------------------------------------------------------------------+-------------+
| The function *math.factorial()* no longer accepts arguments that are not int-like | Completed | | The function *math.factorial()* no longer accepts arguments that are not int-like | Complete |
+------------------------------------------------------------------------------------------------------------+-------------+ +------------------------------------------------------------------------------------------------------------+-------------+
| `sys` | | `sys <https://docs.python.org/3/whatsnew/3.8.html#sys>`_ |
+------------------------------------------------------------------------------------------------------------+-------------+ +------------------------------------------------------------------------------------------------------------+-------------+
| Add new *sys.unraisablehook()* function which can be overridden to control how "unraisable exceptions" | | | Add new *sys.unraisablehook()* function which can be overridden to control how "unraisable exceptions" | |
| are handled | | | are handled | |

Wyświetl plik

@ -8,35 +8,41 @@ defined in `PEP 596 <https://www.python.org/dev/peps/pep-0596/#features-for-3-9>
and a detailed description of the changes can be found in and a detailed description of the changes can be found in
`What's New in Python 3.9 <https://docs.python.org/3/whatsnew/3.9.html>`_ `What's New in Python 3.9 <https://docs.python.org/3/whatsnew/3.9.html>`_
.. table::
:widths: 20 60 20
+--------------------------------------------------------+----------------------------------------------------+--------------+ +--------------------------------------------------------+----------------------------------------------------+--------------+
| **Features:** | | **Status** | | **Features** | | **Status** |
+--------------------------------------------------------+----------------------------------------------------+--------------+ +--------------------------------------------------------+----------------------------------------------------+--------------+
| `PEP 573 <https://www.python.org/dev/peps/pep-0573/>`_ | fast access to module state from methods of C | | | `PEP 573 <https://www.python.org/dev/peps/pep-0573/>`_ | Fast access to module state from methods of C | |
| | extension types | | | | extension types | |
+--------------------------------------------------------+----------------------------------------------------+--------------+ +--------------------------------------------------------+----------------------------------------------------+--------------+
| `PEP 584 <https://www.python.org/dev/peps/pep-0584/>`_ | union operators added to dict | | | `PEP 584 <https://www.python.org/dev/peps/pep-0584/>`_ | Union operators added to dict | |
+--------------------------------------------------------+----------------------------------------------------+--------------+ +--------------------------------------------------------+----------------------------------------------------+--------------+
| `PEP 585 <https://www.python.org/dev/peps/pep-0584/>`_ | type hinting generics in standard collections | | | `PEP 585 <https://www.python.org/dev/peps/pep-0584/>`_ | Type hinting generics in standard collections | |
+--------------------------------------------------------+----------------------------------------------------+--------------+ +--------------------------------------------------------+----------------------------------------------------+--------------+
| `PEP 593 <https://www.python.org/dev/peps/pep-0593/>`_ | flexible function and variable annotations | | | `PEP 593 <https://www.python.org/dev/peps/pep-0593/>`_ | Flexible function and variable annotations | |
+--------------------------------------------------------+----------------------------------------------------+--------------+ +--------------------------------------------------------+----------------------------------------------------+--------------+
| `PEP 602 <https://www.python.org/dev/peps/pep-0602/>`_ | CPython adopts an annual release cycle. Instead of | | | `PEP 602 <https://www.python.org/dev/peps/pep-0602/>`_ | CPython adopts an annual release cycle. Instead of | |
| | annual, aiming for two month release cycle | | | | annual, aiming for two month release cycle | |
+--------------------------------------------------------+----------------------------------------------------+--------------+ +--------------------------------------------------------+----------------------------------------------------+--------------+
| `PEP 614 <https://www.python.org/dev/peps/pep-0614/>`_ | relaxed grammar restrictions on decorators | | | `PEP 614 <https://www.python.org/dev/peps/pep-0614/>`_ | Relaxed grammar restrictions on decorators | |
+--------------------------------------------------------+----------------------------------------------------+--------------+ +--------------------------------------------------------+----------------------------------------------------+--------------+
| `PEP 615 <https://www.python.org/dev/peps/pep-0615/>`_ | the IANA Time Zone Database is now present in the | | | `PEP 615 <https://www.python.org/dev/peps/pep-0615/>`_ | The IANA Time Zone Database is now present in the | |
| | standard library in the zoneinfo module | | | | standard library in the zoneinfo module | |
+--------------------------------------------------------+----------------------------------------------------+--------------+ +--------------------------------------------------------+----------------------------------------------------+--------------+
| `PEP 616 <https://www.python.org/dev/peps/pep-0616/>`_ | string methods to remove prefixes and suffixes | | | `PEP 616 <https://www.python.org/dev/peps/pep-0616/>`_ | String methods to remove prefixes and suffixes | |
+--------------------------------------------------------+----------------------------------------------------+--------------+ +--------------------------------------------------------+----------------------------------------------------+--------------+
| `PEP 617 <https://www.python.org/dev/peps/pep-0617/>`_ | CPython now uses a new parser based on PEG | | | `PEP 617 <https://www.python.org/dev/peps/pep-0617/>`_ | CPython now uses a new parser based on PEG | |
+--------------------------------------------------------+----------------------------------------------------+--------------+ +--------------------------------------------------------+----------------------------------------------------+--------------+
Other Language Changes: Other Language Changes:
.. table::
:widths: 90 10
+-------------------------------------------------------------------------------------------------------------+---------------+ +-------------------------------------------------------------------------------------------------------------+---------------+
| *__import__()* now raises *ImportError* instead of *ValueError* | Completed | | *__import__()* now raises *ImportError* instead of *ValueError* | Complete |
+-------------------------------------------------------------------------------------------------------------+---------------+ +-------------------------------------------------------------------------------------------------------------+---------------+
| Python now gets the absolute path of the script filename specified on the command line (ex: *python3* | | | Python now gets the absolute path of the script filename specified on the command line (ex: *python3* | |
| *script.py*): the *__file__* attribute of the *__main__* module became an absolute path, rather than a | | | *script.py*): the *__file__* attribute of the *__main__* module became an absolute path, rather than a | |
@ -62,8 +68,11 @@ Other Language Changes:
Changes to built-in modules: Changes to built-in modules:
.. table::
:widths: 90 10
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| `asyncio` | | `asyncio <https://docs.python.org/3/whatsnew/3.9.html#asyncio>`_ |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| Due to significant security concerns, the reuse_address parameter of *asyncio.loop.create_datagram_endpoint()*| | | Due to significant security concerns, the reuse_address parameter of *asyncio.loop.create_datagram_endpoint()*| |
| is no longer supported | | | is no longer supported | |
@ -82,13 +91,13 @@ Changes to built-in modules:
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| *asyncio* now raises *TyperError* when calling incompatible methods with an *ssl.SSLSocket* socket | | | *asyncio* now raises *TyperError* when calling incompatible methods with an *ssl.SSLSocket* socket | |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| `gc` | | `gc <https://docs.python.org/3/whatsnew/3.9.html#gc>`_ |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| Garbage collection does not block on resurrected objects | | | Garbage collection does not block on resurrected objects | |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| Added a new function *gc.is_finalized()* to check if an object has been finalized by the garbage collector | | | Added a new function *gc.is_finalized()* to check if an object has been finalized by the garbage collector | |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| `math` | | `math <https://docs.python.org/3/whatsnew/3.9.html#math>`_ |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| Expanded the *math.gcd()* function to handle multiple arguments. Formerly, it only supported two arguments | | | Expanded the *math.gcd()* function to handle multiple arguments. Formerly, it only supported two arguments | |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
@ -98,21 +107,21 @@ Changes to built-in modules:
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| Added *math.ulp()*: return the value of the least significant bit of a float | | | Added *math.ulp()*: return the value of the least significant bit of a float | |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| `os` | | `os <https://docs.python.org/3/whatsnew/3.9.html#os>`_ |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| Exposed the Linux-specific *os.pidfd_open()* and *os.P_PIDFD* | | | Exposed the Linux-specific *os.pidfd_open()* and *os.P_PIDFD* | |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| The *os.unsetenv()* function is now also available on Windows | Completed | | The *os.unsetenv()* function is now also available on Windows | Complete |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| The *os.putenv()* and *os.unsetenv()* functions are now always available | Completed | | The *os.putenv()* and *os.unsetenv()* functions are now always available | Complete |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| Added *os.waitstatus_to_exitcode()* function: convert a wait status to an exit code | | | Added *os.waitstatus_to_exitcode()* function: convert a wait status to an exit code | |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| `random` | | `random <https://docs.python.org/3/whatsnew/3.9.html#random>`_ |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| Added a new *random.Random.randbytes* method: generate random bytes | | | Added a new *random.Random.randbytes* method: generate random bytes | |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| `sys` | | `sys <https://docs.python.org/3/whatsnew/3.9.html#sys>`_ |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+
| Added a new *sys.platlibdir* attribute: name of the platform-specific library directory | | | Added a new *sys.platlibdir* attribute: name of the platform-specific library directory | |
+---------------------------------------------------------------------------------------------------------------+---------------+ +---------------------------------------------------------------------------------------------------------------+---------------+

5
docs/static/custom.css vendored 100644
Wyświetl plik

@ -0,0 +1,5 @@
/* Workaround to force Sphinx to render tables to 100% and wordwrap */
/* See https://stackoverflow.com/questions/69359978/grid-table-does-not-word-wrap for more details */
.wy-table-responsive table td, .wy-table-responsive table th {
white-space: inherit;
}