Upgrade to Python 3.11
ProprietaryMigrate deprecated and removed APIs for Python 3.11 compatibility. This includes handling removed modules, deprecated functions, and API changes between Python 3.10 and 3.11.
org. openrewrite. python. migrate. UpgradeToPython311mod run . --recipe= org. openrewrite. python. migrate. UpgradeToPython311Install 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.10
- Replace
typing.Textwithstr - Find removed
inspect.getargspec() - Replace
configparser.SafeConfigParserwithConfigParser - Replace
ConfigParser.readfp()withread_file() - Replace deprecated
gettextl*gettext()functions - Change import
- Replace deprecated
unittestmethod aliases - Migrate
@asyncio.coroutinetoasync def - Find deprecated
@asyncio.coroutinedecorator - Find
socket.getfqdn()usage - Find deprecated
locale.getdefaultlocale()usage - Replace
re.template()withre.compile()and flagre.TEMPLATE/re.T - org.openrewrite.python.migrate.UpgradePythonVersionTo311