You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is intended to track the status of Python 3.9 core features as implemented by MicroPython.
Python 3.9.0 (final) was released on the 5th October 2020. The Features for 3.9 are defined in PEP 596 and a detailed description of the changes can be found in What's New in Python 3.9.
__import__() now raises ImportError instead of ValueError; Done, see 53519e3
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 relative path.
By default, for best performance, the errors argument is only checked at the first encoding/decoding error and the encoding argument is sometimes ignored for empty strings.
"".replace("", s, n) now returns s instead of an empty string for all non-zero n. It is now consistent with "".replace("", s).
Any valid expression can now be used as a decorator. Previously, the grammar was much more restrictive.
Parallel running of aclose() / asend() / athrow() is now prohibited, and ag_running now reflects the actual running status of the async generator.
Unexpected errors in calling the __iter__ method are no longer masked by TypeError in the in operator and functions contains(), indexOf() and countOf() of the operator module.
Unparenthesized lambda expressions can no longer be the expression part in an if clause in comprehensions and generator expressions.
Due to significant security concerns, the reuse_address parameter of asyncio.loop.create_datagram_endpoint() is no longer supported
Added a new coroutine shutdown_default_executor() that schedules a shutdown for the default executor that waits on the ThreadPoolExecutor to finish closing. Also, asyncio.run() has been updated to use the new coroutine.
Added asyncio.PidfdChildWatcher, a Linux-specific child watcher implementation that polls process file descriptors
Added a new coroutine asyncio.to_thread()
When cancelling the task due to a timeout, asyncio.wait_for() will now wait until the cancellation is complete also in the case when timeout is <= 0, like it does with positive timeouts.
asyncio now raises TyperError when calling incompatible methods with an ssl.SSLSocket socket
Uh oh!
There was an error while loading. Please reload this page.
This issue is intended to track the status of Python 3.9 core features as implemented by MicroPython.
Python 3.9.0 (final) was released on the 5th October 2020. The Features for 3.9 are defined in PEP 596 and a detailed description of the changes can be found in What's New in Python 3.9.
Other language changes
__import__()
now raisesImportError
instead ofValueError
; Done, see 53519e3python3 script.py
): the__file__
attribute of the__main__
module became an absolute path, rather than a relative path."".replace("", s, n)
now returnss
instead of an empty string for all non-zero n. It is now consistent with"".replace("", s)
.aclose()
/asend()
/athrow()
is now prohibited, and ag_running now reflects the actual running status of the async generator.__iter__
method are no longer masked by TypeError in the in operator and functions contains(), indexOf() and countOf() of the operator module.Changes to MicroPython built-in modules
asyncio.loop.create_datagram_endpoint()
is no longer supportedshutdown_default_executor()
that schedules a shutdown for the default executor that waits on theThreadPoolExecutor
to finish closing. Also,asyncio.run()
has been updated to use the new coroutine.asyncio.PidfdChildWatcher
, a Linux-specific child watcher implementation that polls process file descriptorscoroutine asyncio.to_thread()
asyncio.wait_for()
will now wait until the cancellation is complete also in the case when timeout is <= 0, like it does with positive timeouts.asyncio
now raisesTyperError
when calling incompatible methods with anssl.SSLSocket
socketgc.is_finalized()
to check if an object has been finalized by the garbage collectormath.gcd()
function to handle multiple arguments. Formerly, it only supported two arguments.math.lcm()
: return the least common multiple of specified argumentsmath.nextafter()
: return the next floating-point value after x towards ymath.ulp()
: return the value of the least significant bit of a floatos.pidfd_open()
andos.P_PIDFD
os.unsetenv()
function is now also available on Windowsos.putenv()
andos.unsetenv()
functions are now always availableos.waitstatus_to_exitcode()
function: convert a wait status to an exit coderandom.Random.randbytes
method: generate random bytessys.platlibdir attribute
: name of the platform-specific library directorysys.stderr
was block-buffered when non-interactive. Now stderr defaults to always being line-buffered.(Changes to non-built-in modules will need to be documented elsewhere.)
The text was updated successfully, but these errors were encountered: