-
Notifications
You must be signed in to change notification settings - Fork 298
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
memoryview
implementation 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 ofbytes
andbytearray
objects now accept an integer between 0 and 255 as their first argument. - The
rjust()
,ljust()
, andcenter()
methods ofbytes
andbytearray
now accept abytearray
for thefill
argument. - New methods have been added to
list
andbytearray
:copy()
andclear()
. Consequently,MutableSequence
now also defines aclear()
method - Raw
bytes
literals 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 newopener
parameter: the underlying file descriptor for the file object is then obtained by callingopener
with(file, flags)
. It can be used to use custom flags likeos.O_CLOEXEC
for example. The'x'
mode was added: open for exclusive creation, failing if the file already exists. -
print()
: added theflush
keyword argument. If theflush
keyword argument is true, the stream is forcibly flushed. -
hash()
: hash randomization is enabled by default, seeobject.__hash__()
andPYTHONHASHSEED
. - The
str
type 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 aTypeError
in Python 3.4 - The unicode_internal codec has been deprecated because of the PEP 393, use UTF-8, UTF-16 (
utf-16-le
orutf-16-be
), or UTF-32 (utf-32-le
orutf-32-be
) -
ftplib.FTP.nlst()
andftplib.FTP.dir()
: useftplib.FTP.mlsd()
-
platform.popen()
: use thesubprocess
module. Check especially the "Replacing Older Functions with thesubprocess
Module" section (issue 11377). - The Windows
bytes
API has been deprecated in theos
module. Use Unicode filenames, instead ofbytes
filenames, to not depend on the ANSI code page anymore and to support any filename. - The
xml.etree.cElementTree
module 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. -
abc
module:-
abc.abstractproperty
has been deprecated, useproperty
withabc.abstractmethod()
instead. -
abc.abstractclassmethod
has been deprecated, useclassmethod
withabc.abstractmethod()
instead. -
abc.abstractstaticmethod
has been deprecated, usestaticmethod
withabc.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