← All recipes
Moderne licensed

Replace Element.getchildren() with list(element)

Recipe IDorg.openrewrite.python.migrate.ReplaceElementGetchildrenArtifactopenrewrite-migrate-python

Replace getchildren() with list(element) on XML Element objects. Deprecated in Python 3.9.

Single recipepythonxmlmigration3.9Proprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.python.migrate.ReplaceElementGetchildren

If the recipe isn’t available locally, install it with:

mod config recipes pip install openrewrite-migrate-python