← All recipes
Moderne licensed

Replace Element.getiterator() with Element.iter()

Recipe IDorg.openrewrite.python.migrate.ReplaceElementGetiteratorArtifactopenrewrite-migrate-python

Replace getiterator() with iter() on XML Element objects. The getiterator() method was 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.ReplaceElementGetiterator

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

mod config recipes pip install openrewrite-migrate-python