-
Notifications
You must be signed in to change notification settings - Fork 304
WhatsNew–Python3.3
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.3.html
- PEP 405: Virtual Environments
- PEP 420: Implicit Namespace Packages
- PEP 3118: New
memoryviewimplementation and buffer protocol documentation - PEP 393: Flexible String Representation
- PEP 397: Python Launcher for Windows
- PEP 3151: Reworking the OS and IO exception hierarchy
- PEP 380: Syntax for Delegating to a Subgenerator
- PEP 409: Suppressing exception context
- PEP 414: Explicit Unicode literals
- PEP 3155: Qualified name for classes and functions
- PEP 412: Key-Sharing Dictionary
- PEP 362: Function Signature Object
- PEP 421: Adding
sys.implementation
- Added support for Unicode name aliases and named sequences. Both
unicodedata.lookup()and'\N{...}'now resolve name aliases, andunicodedata.lookup()resolves named sequences too. - Unicode database updated to UCD version 6.1.0
- Equality comparisons on
range()objects now return a result reflecting the equality of the underlying sequences generated by those range objects. - The
count(),find(),rfind(),index()andrindex()methods ofbytesandbytearrayobjects now accept an integer between 0 and 255 as their first argument. - The
rjust(),ljust(), andcenter()methods ofbytesandbytearraynow accept abytearrayfor thefillargument. - New methods have been added to
listandbytearray:copy()andclear(). Consequently,MutableSequencenow also defines aclear()method - Raw
bytesliterals can now be writtenrb"..."as well asbr"...". -
dict.setdefault()now does only one lookup for the given key, making it atomic when used with built-in types. - The error messages produced when a function call does not match the function signature have been significantly improved.
-
open()gets a newopenerparameter: the underlying file descriptor for the file object is then obtained by callingopenerwith(file, flags). It can be used to use custom flags likeos.O_CLOEXECfor example. The'x'mode was added: open for exclusive creation, failing if the file already exists. -
print(): added theflushkeyword argument. If theflushkeyword argument is true, the stream is forcibly flushed. -
hash(): hash randomization is enabled by default, seeobject.__hash__()andPYTHONHASHSEED. - The
strtype gets a newcasefold()method: return a casefolded copy of the string, casefolded strings may be used for caseless matching. For example,'�'.casefold()returns'ss'.
-
faulthandler -
ipaddress -
lzma
-
abc -
array -
base64 -
binascii -
bz2 -
codecs -
collections -
contextlib -
crypt -
curses -
datetime -
decimal -
email -
ftplib -
functools -
gc -
hmac -
http -
html -
imaplib -
inspect -
io -
itertools -
logging -
math -
mmap -
multiprocessing -
nntplib -
os -
pdb -
pickle -
pydoc -
re -
sched -
select -
shlex -
shutil -
signal -
smtpd -
smtplib -
socket -
socketserver -
sqlite3 -
ssl -
stat -
struct -
subprocess -
sys -
tarfile -
tempfile -
textwrap -
threading -
time -
types -
unittest -
urllib -
webbrowser -
xml.etree.ElementTree -
zlib
- Passing a non-empty string to
object.__format__()is deprecated, and will produce aTypeErrorin Python 3.4 - The unicode_internal codec has been deprecated because of the PEP 393, use UTF-8, UTF-16 (
utf-16-leorutf-16-be), or UTF-32 (utf-32-leorutf-32-be) -
ftplib.FTP.nlst()andftplib.FTP.dir(): useftplib.FTP.mlsd() -
platform.popen(): use thesubprocessmodule. Check especially the "Replacing Older Functions with thesubprocessModule" section (issue 11377). - The Windows
bytesAPI has been deprecated in theosmodule. Use Unicode filenames, instead ofbytesfilenames, to not depend on the ANSI code page anymore and to support any filename. - The
xml.etree.cElementTreemodule is deprecated. The accelerator is used automatically whenever available. - The behaviour of
time.clock()depends on the platform: use the newtime.perf_counter()ortime.process_time()function instead, depending on your requirements, to have a well defined behaviour. -
The(Never implemented, but removed in Python 3.7)os.stat_float_times()function is deprecated. -
abcmodule:-
abc.abstractpropertyhas been deprecated, usepropertywithabc.abstractmethod()instead. -
abc.abstractclassmethodhas been deprecated, useclassmethodwithabc.abstractmethod()instead. -
abc.abstractstaticmethodhas been deprecated, usestaticmethodwithabc.abstractmethod()instead.
-
-
importlib.abc.SourceLoader.path_mtime()is now deprecated in favour ofimportlib.abc.SourceLoader.path_stats()as bytecode files now store both the modification time and size of the source file the bytecode file was compiled from.
Still looking for more? Browse the Discussions tab, where you can ask questions to the IronPython community.
🐍 IronPython