Upgrade to Python 3.13
ProprietaryMigrate deprecated and removed APIs for Python 3.13 compatibility. This includes detecting usage of modules removed in PEP 594 ('dead batteries'), other API changes between Python 3.12 and 3.13, bumping ruff past the pinned releases that do not install cleanly on Python 3.13, and replacing the deprecated avro-python3 with Apache avro.
org. openrewrite. python. migrate. UpgradeToPython313mod run . --recipe= org. openrewrite. python. migrate. UpgradeToPython313Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.
- Upgrade to Python 3.12
- Replace
locale.resetlocale()withlocale.setlocale(LC_ALL, '') - Replace
pipes.quote()withshlex.quote() - 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
imghdrmodule usage - Find deprecated
mailcapmodule usage - Find deprecated
msilibmodule usage - Find deprecated
nismodule usage - Find deprecated
nntplibmodule usage - Find deprecated
ossaudiodevmodule usage - Find deprecated
pipesmodule usage - Find deprecated
sndhdrmodule usage - Find deprecated
spwdmodule usage - Find deprecated
sunaumodule usage - Find deprecated
telnetlibmodule usage - Find deprecated
uumodule usage - Find deprecated
xdrlibmodule usage - Replace
array'u'typecode with'w' - Find
array'u'typecode - org.openrewrite.python.UpgradeDependencyVersion
- Migrate the deprecated
avro-python3package toavro - org.openrewrite.python.migrate.UpgradePythonVersionTo313