Migrate
Categories
Composite Recipes
Recipes that include further recipes, often including the individual recipes below.
- Upgrade to Python 3.10
- Upgrade to Python 3.11
- Upgrade to Python 3.12
- Upgrade to Python 3.13
- Upgrade to Python 3.14
- Upgrade to Python 3.8
- Upgrade to Python 3.9
Recipes
- Find
__future__imports - Find deprecated
@asyncio.coroutinedecorator - Find deprecated
Element.getchildren()usage - Find deprecated
Path.link_to()usage - Find deprecated
aifcmodule usage - Find deprecated
audioopmodule usage - Find deprecated
cgimodule usage - Find deprecated
cgitbmodule usage - Find deprecated
chunkmodule usage - Find deprecated
cryptmodule usage - Find deprecated distutils module usage
- Find deprecated
imghdrmodule usage - Find deprecated imp module usage
- Find deprecated
locale.getdefaultlocale()usage - Find deprecated
mailcapmodule usage - Find deprecated
msilibmodule usage - Find deprecated
nismodule usage - Find deprecated
nntplibmodule usage - Find deprecated
os.popen()usage - Find deprecated
os.spawn*()usage - Find deprecated
ossaudiodevmodule usage - Find deprecated
pipesmodule usage - Find deprecated
re.template()/re.TEMPLATEusage - Find deprecated
shutil.rmtree(onerror=...)parameter - Find deprecated
sndhdrmodule usage - Find deprecated
spwdmodule usage - Find deprecated
ssl.match_hostname() - Find deprecated
sunaumodule usage - Find deprecated
sys.last_type/sys.last_value/sys.last_traceback - Find deprecated
telnetlibmodule usage - Find deprecated
tempfile.mktemp()usage - Find deprecated urllib.parse split functions
- Find deprecated
urllib.parse.to_bytes()usage - Find deprecated
uumodule usage - Find deprecated
xdrlibmodule usage - Find
functools.cmp_to_key()usage - Find modules removed in Python 3.12
- Find removed
HTMLParser.unescape()usage - Find removed
cgi.parse_qs()usage - Find removed
cgi.parse_qsl()usage - Find removed
macpathmodule usage - Find removed
platform.popen()usage - Find removed
sys.set_coroutine_wrapper()/sys.get_coroutine_wrapper() - Find removed
tarfile.filemodeusage - Find
socket.getfqdn()usage - Migrate
@asyncio.coroutinetoasync def - Migrate to
pyproject.toml - Replace
%formatting with f-string - Replace
Condition.notifyAll()withCondition.notify_all() - Replace
ConfigParser.readfp()withread_file() - Replace
Element.getiterator()withElement.iter() - Replace
Event.isSet()withEvent.is_set() - Replace
Thread.getName()withThread.name - Replace
Thread.isAlive()withThread.is_alive() - Replace
Thread.isDaemon()withThread.daemon - Replace
Thread.setDaemon()withThread.daemon = ... - Replace
Thread.setName()withThread.name = ... - Replace
array.fromstring()witharray.frombytes() - Replace
array.tostring()witharray.tobytes() - Replace
ast.Byteswithast.Constant - Replace
ast.Ellipsiswithast.Constant - Replace
ast.NameConstantwithast.Constant - Replace
ast.Numwithast.Constant - Replace
ast.Strwithast.Constant - Replace
collectionsABC imports withcollections.abc - Replace
configparser.SafeConfigParserwithConfigParser - Replace
datetime.utcfromtimestamp()withdatetime.fromtimestamp(ts, UTC) - Replace
datetime.utcnow()withdatetime.now(UTC) - Replace deprecated calendar constants with uppercase
- Replace deprecated distutils.version usage
- Replace deprecated gettext l*gettext() functions
- Replace deprecated unittest method aliases
- Replace
locale.resetlocale()withlocale.setlocale(LC_ALL, '') - Replace
pkgutil.find_loader()withimportlib.util.find_spec() - Replace
pkgutil.get_loader()withimportlib.util.find_spec() - Replace
str.format()with f-string - Replace
threading.activeCount()withthreading.active_count() - Replace
threading.currentThread()withthreading.current_thread() - Replace
typing.Callablewithcollections.abc.Callable - Replace
typing.Dictwithdict - Replace
typing.Listwithlist - Replace
typing.Optional[X]withX | None - Replace
typing.Setwithset - Replace
typing.Textwithstr - Replace
typing.Tuplewithtuple - Replace
typing.Union[X, Y]withX | Y