-
Couldn't load subscription status.
- Fork 304
WhatsNew–Python3.6
Lamparter edited this page Nov 18, 2024
·
1 revision
Important
This file is used by maintainers to track implementation of core functionality from Python 3 into IronPython.
https://docs.python.org/3/whatsnew/3.6.html
- PEP 498: Formatted string literals
- PEP 526: Syntax for variable annotations
- PEP 515: Underscores in Numeric Literals
- PEP 525: Asynchronous Generators
- PEP 530: Asynchronous Comprehensions
- PEP 487: Simpler customization of class creation
- PEP 487: Descriptor Protocol Enhancements
- PEP 519: Adding a file system path protocol
- PEP 495: Local Time Disambiguation
- PEP 529: Change Windows filesystem encoding to UTF-8
- PEP 528: Change Windows console encoding to UTF-8
- PEP 520: Preserving Class Attribute Definition Order
- PEP 468: Preserving Keyword Argument Order
- PEP 523: Adding a frame evaluation API to CPython
- A
globalornonlocalstatement must now textually appear before the first use of the affected name in the same scope. Previously this was aSyntaxWarning. - It is now possible to set a special method to
Noneto indicate that the corresponding operation is not available. For example, if a class sets__iter__()toNone, the class is not iterable. - Long sequences of repeated traceback lines are now abbreviated as
"[Previous line repeated {count} more times]"(see traceback for an example). - Import now raises the new exception
ModuleNotFoundError(subclass ofImportError) when it cannot find a module. Code that currently checks forImportError(in try-except) will still work. - Class methods relying on zero-argument
super()will now work correctly when called from metaclass methods during class creation.
-
secrets
-
array -
ast -
asyncio -
binascii -
cmath -
collections -
concurrent.futures -
contextlib -
datetime -
decimal -
distutils -
email -
encodings -
enum -
faulthandler -
fileinput -
hashlib -
http.client -
idlelib and IDLE -
importlib -
inspect -
json -
logging -
math -
multiprocessing -
operator -
os -
pathlib -
pdb -
pickle -
pickletools -
pydoc -
random -
re -
readline -
rlcompleter -
shlex -
site -
sqlite3 -
socket -
socketserver -
ssl -
statistics -
struct -
subprocess -
sys -
telnetlib -
time -
timeit -
tkinter -
traceback -
tracemalloc -
typing -
unicodedata -
unittest.mock -
urllib.requests -
urllib.robotparser -
venv -
warnings -
winreg -
winsound -
xmlrpc.client -
zipfile -
zlib
- When
--version(short form:-V) is supplied twice, Python printssys.versionfor detailed information.
-
asyncandawaitare not recommended to be used as variable, class, function or module names. Introduced by PEP 492 in Python 3.5, they will become proper keywords in Python 3.7. Starting in Python 3.6, the use ofasyncorawaitas names will generate aDeprecationWarning.
- Raising the
StopIterationexception inside a generator will now generate aDeprecationWarningand will trigger aRuntimeErrorin Python 3.7. See PEP 479: Change StopIteration handling inside generators for details. - The
__aiter__()method is now expected to return an asynchronous iterator directly instead of returning an awaitable as previously. Doing the former will trigger aDeprecationWarning. Backward compatibility will be removed in Python 3.7. - A backslash-character pair that is not a valid escape sequence now generates a
DeprecationWarning. Although this will eventually become aSyntaxError, that will not be for several Python releases. - When performing a relative import, falling back on
__name__and__path__from the calling module when__spec__or__package__are not defined now raises anImportWarning.
- The
asynchathas been deprecated in favor ofasyncio. - The
asyncorehas been deprecated in favor ofasyncio. - Unlike other
dbmimplementations, thedbm.dumbmodule creates databases with the'rw'mode and allows modifying the database opened with the'r'mode. This behavior is now deprecated and will be removed in 3.8. - The undocumented
extra_pathargument to theDistributionconstructor is now considered deprecated and will raise a warning if set. Support for this parameter will be removed in a future Python release. See bpo-27919 for details. - The support of non-integer arguments in
getgrgid()has been deprecated. - The
importlib.machinery.SourceFileLoader.load_module()andimportlib.machinery.SourcelessFileLoader.load_module()methods are now deprecated. They were the only remaining implementations ofimportlib.abc.Loader.load_module()inimportlibthat had not been deprecated in previous versions of Python in favour ofimportlib.abc.Loader.exec_module(). - The
importlib.machinery.WindowsRegistryFinderclass is now deprecated. As of 3.6.0, it is still added tosys.meta_pathby default (on Windows), but this may change in future releases. - Undocumented support of general bytes-like objects as paths in
osfunctions,compile()and similar functions is now deprecated. - Support for inline flags
(?letters)in the middle of the regular expression has been deprecated and will be removed in a future Python version. Flags at the start of a regular expression are still allowed. - OpenSSL 0.9.8, 1.0.0 and 1.0.1 are deprecated and no longer supported. In the future the
sslmodule will require at least OpenSSL 1.0.2 or 1.1.0.. - SSL-related arguments like
certfile,keyfileandcheck_hostnameinftplib,http.client,imaplib,poplib, andsmtplibhave been deprecated in favor ofcontext. - A couple of protocols and functions of the
sslmodule are now deprecated. Some features will no longer be available in future versions of OpenSSL. Other features are deprecated in favor of a different API. - The
tkinter.tixmodule is now deprecated.tkinterusers should usetkinter.ttkinstead. - The
pyvenvscript has been deprecated in favour ofpython3 -m venv. This prevents confusion as to what Python interpreterpyvenvis connected to and thus what Python interpreter will be used by the virtual environment.
- Unknown escapes consisting of
'\'and an ASCII letter in regular expressions will now cause an error. In replacement templates forre.sub()they are still allowed, but deprecated. There.LOCALEflag can now only be used with binary patterns. -
inspect.getmoduleinfo()was removed (was deprecated since CPython 3.3).inspect.getmodulename()should be used for obtaining the module name for a given path. -
traceback.Ignoreclass andtraceback.usage,traceback.modname,traceback.fullmodname,traceback.find_lines_from_code,traceback.find_lines,traceback.find_strings,traceback.find_executable_linesmethods were removed from thetracebackmodule. They were undocumented methods deprecated since Python 3.2 and equivalent functionality is available from private methods. - The
tk_menuBar()andtk_bindForTraversal()dummy methods intkinterwidget classes were removed (corresponding Tk commands were obsolete since Tk 4.0). - The
open()method of thezipfile.ZipFileclass no longer supports the'U'mode (was deprecated since Python 3.4). Useio.TextIOWrapperfor reading compressed text files in universal newlines mode. - The undocumented
IN,CDROM,DLFCN,TYPES,CDIO, andSTROPTSmodules have been removed. They had been available in the platform specificLib/plat-*/directories, but were chronically out of date, inconsistently available across platforms, and unmaintained. The script that created these modules is still available in the source distribution at Tools/scripts/h2py.py. - The deprecated
asynchat.fifoclass has been removed.
Still looking for more? Browse the Discussions tab, where you can ask questions to the IronPython community.
🐍 IronPython