openrewrite-migrate-python 0.8.0.dev20260510172013__tar.gz → 0.8.0.dev20260510225444__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/PKG-INFO +1 -1
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/pyproject.toml +1 -1
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/array_deprecations.py +4 -3
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/cgi_parse_deprecations.py +4 -3
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/functools_deprecations.py +3 -2
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/html_parser_deprecations.py +3 -2
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/locale_getdefaultlocale_deprecation.py +3 -2
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/os_deprecations.py +9 -3
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/pathlib_deprecations.py +3 -2
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/platform_deprecations.py +3 -2
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/re_deprecations.py +9 -2
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/shutil_deprecations.py +3 -2
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/socket_deprecations.py +3 -2
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/tarfile_deprecations.py +9 -2
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/tempfile_deprecations.py +3 -2
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/threading_deprecations.py +6 -5
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/threading_is_alive_deprecation.py +3 -2
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/urllib_deprecations.py +9 -3
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/xml_deprecations.py +4 -3
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python.egg-info/PKG-INFO +1 -1
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/setup.cfg +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_code_quality_python/__init__.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_code_quality_python/codequality/__init__.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_code_quality_python/codequality/_semantically_equal.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_code_quality_python/codequality/all_branches_identical.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_code_quality_python/codequality/boolean_checks_not_inverted.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_code_quality_python/codequality/collapsible_if_statements.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_code_quality_python/codequality/merge_identical_branches.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_code_quality_python/codequality/remove_duplicate_conditions.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_code_quality_python/codequality/remove_self_assignment.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_code_quality_python/codequality/remove_unconditional_value_overwrite.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_code_quality_python/codequality/simplify_boolean_literal.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_code_quality_python/codequality/simplify_redundant_logical_expression.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/__init__.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/__init__.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/_markers.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/aifc_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/ast_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/asyncio_coroutine_to_async.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/asyncio_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/calendar_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/cgi_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/collections_abc_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/configparser_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/datetime_utc.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/distutils_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/distutils_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/future_imports.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/gettext_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/imp_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/langchain_classic_imports.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/langchain_community_imports.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/langchain_provider_imports.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/locale_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/macpath_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/mailcap_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/nntplib_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/pep594_system_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/pipes_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/pkgutil_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/removed_modules_312.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/ssl_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/string_formatting.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/sys_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/sys_last_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/telnetlib_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/typing_callable.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/typing_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/typing_union_to_pipe.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/unittest_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/upgrade_to_langchain02.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/upgrade_to_langchain1.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/upgrade_to_python310.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/upgrade_to_python311.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/upgrade_to_python312.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/upgrade_to_python313.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/upgrade_to_python314.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/upgrade_to_python38.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/upgrade_to_python39.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/uu_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python/migrate/xdrlib_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python.egg-info/SOURCES.txt +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python.egg-info/dependency_links.txt +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python.egg-info/entry_points.txt +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python.egg-info/requires.txt +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/src/openrewrite_migrate_python.egg-info/top_level.txt +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_aifc_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_array_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_ast_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_asyncio_coroutine_to_async.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_asyncio_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_calendar_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_cgi_parse_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_change_import_recipes.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_collections_abc_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_configparser_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_datetime_utc.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_distutils_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_future_imports.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_gettext_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_html_parser_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_imp_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_langchain_classic_imports.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_langchain_community_imports.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_langchain_provider_imports.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_locale_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_locale_getdefaultlocale_deprecation.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_macpath_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_os_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_pep594_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_pep594_system_migrations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_pkgutil_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_platform_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_re_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_removed_modules_312.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_shutil_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_ssl_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_string_formatting.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_sys_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_sys_last_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_tarfile_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_threading_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_threading_extended.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_threading_is_alive_deprecation.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_typing_callable.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_typing_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_typing_union_to_pipe.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_unittest_deprecations.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_upgrade_recipes.py +0 -0
- {openrewrite_migrate_python-0.8.0.dev20260510172013 → openrewrite_migrate_python-0.8.0.dev20260510225444}/tests/test_xml_deprecations.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openrewrite-migrate-python
|
|
3
|
-
Version: 0.8.0.
|
|
3
|
+
Version: 0.8.0.dev20260510225444
|
|
4
4
|
Summary: OpenRewrite recipes for migrating Python codebases to newer Python versions.
|
|
5
5
|
Author-email: "Moderne Inc." <support@moderne.io>
|
|
6
6
|
License: Moderne Proprietary
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "openrewrite-migrate-python"
|
|
7
7
|
description = "OpenRewrite recipes for migrating Python codebases to newer Python versions."
|
|
8
|
-
version = "0.8.0.
|
|
8
|
+
version = "0.8.0.dev20260510225444" # Updated dynamically during release
|
|
9
9
|
authors = [{ name = "Moderne Inc.", email = "support@moderne.io" }]
|
|
10
10
|
license = { text = "Moderne Proprietary" }
|
|
11
11
|
readme = "README.md"
|
|
@@ -10,10 +10,11 @@ See: https://docs.python.org/3/library/array.html
|
|
|
10
10
|
|
|
11
11
|
from typing import Any, List, Optional
|
|
12
12
|
|
|
13
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
13
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
14
14
|
from rewrite.category import CategoryDescriptor
|
|
15
15
|
from rewrite.decorators import categorize
|
|
16
16
|
from rewrite.marketplace import Python
|
|
17
|
+
from rewrite.python.preconditions import uses_method
|
|
17
18
|
from rewrite.python.visitor import PythonVisitor
|
|
18
19
|
from rewrite.java.tree import Identifier, MethodInvocation
|
|
19
20
|
|
|
@@ -76,7 +77,7 @@ class ReplaceArrayTostring(Recipe):
|
|
|
76
77
|
new_name = method.name.replace(_simple_name="tobytes")
|
|
77
78
|
return method.replace(_name=new_name)
|
|
78
79
|
|
|
79
|
-
return Visitor()
|
|
80
|
+
return Preconditions.check(uses_method("*..* tostring(..)"), Visitor())
|
|
80
81
|
|
|
81
82
|
|
|
82
83
|
@categorize(_Python314)
|
|
@@ -130,4 +131,4 @@ class ReplaceArrayFromstring(Recipe):
|
|
|
130
131
|
new_name = method.name.replace(_simple_name="frombytes")
|
|
131
132
|
return method.replace(_name=new_name)
|
|
132
133
|
|
|
133
|
-
return Visitor()
|
|
134
|
+
return Preconditions.check(uses_method("*..* fromstring(..)"), Visitor())
|
|
@@ -13,11 +13,12 @@ See: https://docs.python.org/3/whatsnew/3.8.html#api-and-feature-removals
|
|
|
13
13
|
|
|
14
14
|
from typing import Any, List, Optional
|
|
15
15
|
|
|
16
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
16
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
17
17
|
from rewrite.category import CategoryDescriptor
|
|
18
18
|
from rewrite.decorators import categorize
|
|
19
19
|
from rewrite.marketplace import Python
|
|
20
20
|
from rewrite.markers import Markers
|
|
21
|
+
from rewrite.python.preconditions import uses_method
|
|
21
22
|
from rewrite.python.visitor import PythonVisitor
|
|
22
23
|
from rewrite.java.support_types import JLeftPadded, Space
|
|
23
24
|
from rewrite.java.tree import FieldAccess, Identifier, MethodInvocation
|
|
@@ -135,7 +136,7 @@ class ReplaceCgiParseQs(Recipe):
|
|
|
135
136
|
new_padded = old_padded.replace(_element=new_select)
|
|
136
137
|
return method.padding.replace(_select=new_padded)
|
|
137
138
|
|
|
138
|
-
return Visitor()
|
|
139
|
+
return Preconditions.check(uses_method("*..* parse_qs(..)"), Visitor())
|
|
139
140
|
|
|
140
141
|
|
|
141
142
|
@categorize(_Python38)
|
|
@@ -201,4 +202,4 @@ class ReplaceCgiParseQsl(Recipe):
|
|
|
201
202
|
new_padded = old_padded.replace(_element=new_select)
|
|
202
203
|
return method.padding.replace(_select=new_padded)
|
|
203
204
|
|
|
204
|
-
return Visitor()
|
|
205
|
+
return Preconditions.check(uses_method("*..* parse_qsl(..)"), Visitor())
|
|
@@ -11,10 +11,11 @@ See: https://docs.python.org/3/library/functools.html
|
|
|
11
11
|
|
|
12
12
|
from typing import Any, List, Optional
|
|
13
13
|
|
|
14
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
14
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
15
15
|
from rewrite.category import CategoryDescriptor
|
|
16
16
|
from rewrite.decorators import categorize
|
|
17
17
|
from rewrite.marketplace import Python
|
|
18
|
+
from rewrite.python.preconditions import uses_method
|
|
18
19
|
from rewrite.python.visitor import PythonVisitor
|
|
19
20
|
from rewrite.java.tree import Identifier, MethodInvocation
|
|
20
21
|
from ._markers import mark_deprecated
|
|
@@ -85,4 +86,4 @@ class FindFunctoolsCmpToKey(Recipe):
|
|
|
85
86
|
|
|
86
87
|
return method
|
|
87
88
|
|
|
88
|
-
return Visitor()
|
|
89
|
+
return Preconditions.check(uses_method("*..* cmp_to_key(..)"), Visitor())
|
|
@@ -9,10 +9,11 @@ See: https://docs.python.org/3/whatsnew/3.9.html#removed
|
|
|
9
9
|
|
|
10
10
|
from typing import Any, List, Optional
|
|
11
11
|
|
|
12
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
12
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
13
13
|
from rewrite.category import CategoryDescriptor
|
|
14
14
|
from rewrite.decorators import categorize
|
|
15
15
|
from rewrite.marketplace import Python
|
|
16
|
+
from rewrite.python.preconditions import uses_method
|
|
16
17
|
from rewrite.python.visitor import PythonVisitor
|
|
17
18
|
from rewrite.java.tree import Identifier, MethodInvocation
|
|
18
19
|
|
|
@@ -102,4 +103,4 @@ class ReplaceHtmlParserUnescape(Recipe):
|
|
|
102
103
|
|
|
103
104
|
return method
|
|
104
105
|
|
|
105
|
-
return Visitor()
|
|
106
|
+
return Preconditions.check(uses_method("*..* unescape(..)"), Visitor())
|
|
@@ -9,10 +9,11 @@ See: https://docs.python.org/3/whatsnew/3.11.html#deprecated
|
|
|
9
9
|
|
|
10
10
|
from typing import Any, List, Optional
|
|
11
11
|
|
|
12
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
12
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
13
13
|
from rewrite.category import CategoryDescriptor
|
|
14
14
|
from rewrite.decorators import categorize
|
|
15
15
|
from rewrite.marketplace import Python
|
|
16
|
+
from rewrite.python.preconditions import uses_method
|
|
16
17
|
from rewrite.python.visitor import PythonVisitor
|
|
17
18
|
from rewrite.java.tree import Identifier, MethodInvocation
|
|
18
19
|
from ._markers import mark_deprecated
|
|
@@ -90,4 +91,4 @@ class FindLocaleGetdefaultlocale(Recipe):
|
|
|
90
91
|
"locale.getpreferredencoding(False) instead."
|
|
91
92
|
)
|
|
92
93
|
|
|
93
|
-
return Visitor()
|
|
94
|
+
return Preconditions.check(uses_method("*..* getdefaultlocale(..)"), Visitor())
|
|
@@ -10,10 +10,11 @@ See: https://docs.python.org/3/library/os.html
|
|
|
10
10
|
|
|
11
11
|
from typing import Any, List, Optional
|
|
12
12
|
|
|
13
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
13
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
14
14
|
from rewrite.category import CategoryDescriptor
|
|
15
15
|
from rewrite.decorators import categorize
|
|
16
16
|
from rewrite.marketplace import Python
|
|
17
|
+
from rewrite.python.preconditions import uses_method
|
|
17
18
|
from rewrite.python.visitor import PythonVisitor
|
|
18
19
|
from rewrite.java.tree import Identifier, FieldAccess, MethodInvocation
|
|
19
20
|
from ._markers import mark_deprecated
|
|
@@ -80,7 +81,7 @@ class FindOsPopen(Recipe):
|
|
|
80
81
|
|
|
81
82
|
return method
|
|
82
83
|
|
|
83
|
-
return Visitor()
|
|
84
|
+
return Preconditions.check(uses_method("*..* popen(..)"), Visitor())
|
|
84
85
|
|
|
85
86
|
|
|
86
87
|
@categorize(_Migrate)
|
|
@@ -145,4 +146,9 @@ class FindOsSpawn(Recipe):
|
|
|
145
146
|
|
|
146
147
|
return method
|
|
147
148
|
|
|
148
|
-
return
|
|
149
|
+
return Preconditions.check(
|
|
150
|
+
Preconditions.or_(
|
|
151
|
+
*(uses_method(f"*..* {name}(..)") for name in sorted(spawn_functions))
|
|
152
|
+
),
|
|
153
|
+
Visitor(),
|
|
154
|
+
)
|
|
@@ -9,10 +9,11 @@ See: https://docs.python.org/3/library/pathlib.html
|
|
|
9
9
|
|
|
10
10
|
from typing import Any, List, Optional
|
|
11
11
|
|
|
12
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
12
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
13
13
|
from rewrite.category import CategoryDescriptor
|
|
14
14
|
from rewrite.decorators import categorize
|
|
15
15
|
from rewrite.marketplace import Python
|
|
16
|
+
from rewrite.python.preconditions import uses_method
|
|
16
17
|
from rewrite.python.visitor import PythonVisitor
|
|
17
18
|
from rewrite.java.tree import Identifier, MethodInvocation
|
|
18
19
|
from ._markers import mark_deprecated
|
|
@@ -85,4 +86,4 @@ class FindPathlibLinkTo(Recipe):
|
|
|
85
86
|
"Use hardlink_to() instead (note: argument order is reversed)."
|
|
86
87
|
)
|
|
87
88
|
|
|
88
|
-
return Visitor()
|
|
89
|
+
return Preconditions.check(uses_method("*..* link_to(..)"), Visitor())
|
|
@@ -9,11 +9,12 @@ See: https://docs.python.org/3/whatsnew/3.8.html#api-and-feature-removals
|
|
|
9
9
|
|
|
10
10
|
from typing import Any, List, Optional
|
|
11
11
|
|
|
12
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
12
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
13
13
|
from rewrite.category import CategoryDescriptor
|
|
14
14
|
from rewrite.decorators import categorize
|
|
15
15
|
from rewrite.marketplace import Python
|
|
16
16
|
from rewrite.markers import Markers
|
|
17
|
+
from rewrite.python.preconditions import uses_method
|
|
17
18
|
from rewrite.python.visitor import PythonVisitor
|
|
18
19
|
from rewrite.java.support_types import JLeftPadded, JRightPadded, Space
|
|
19
20
|
from rewrite.java.tree import Identifier, Literal, MethodInvocation
|
|
@@ -135,4 +136,4 @@ class ReplacePlatformPopen(Recipe):
|
|
|
135
136
|
|
|
136
137
|
return method
|
|
137
138
|
|
|
138
|
-
return Visitor()
|
|
139
|
+
return Preconditions.check(uses_method("*..* popen(..)"), Visitor())
|
|
@@ -12,10 +12,11 @@ See: https://docs.python.org/3/whatsnew/3.11.html#deprecated
|
|
|
12
12
|
|
|
13
13
|
from typing import Any, List, Optional
|
|
14
14
|
|
|
15
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
15
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
16
16
|
from rewrite.category import CategoryDescriptor
|
|
17
17
|
from rewrite.decorators import categorize
|
|
18
18
|
from rewrite.marketplace import Python
|
|
19
|
+
from rewrite.python.preconditions import uses_method, uses_type
|
|
19
20
|
from rewrite.python.visitor import PythonVisitor
|
|
20
21
|
from rewrite.java.tree import FieldAccess, Identifier, MethodInvocation
|
|
21
22
|
from ._markers import mark_deprecated
|
|
@@ -115,4 +116,10 @@ class ReplaceReTemplate(Recipe):
|
|
|
115
116
|
"and removed in 3.13."
|
|
116
117
|
)
|
|
117
118
|
|
|
118
|
-
return
|
|
119
|
+
return Preconditions.check(
|
|
120
|
+
Preconditions.or_(
|
|
121
|
+
uses_method("*..* template(..)"),
|
|
122
|
+
uses_type("re"),
|
|
123
|
+
),
|
|
124
|
+
Visitor(),
|
|
125
|
+
)
|
|
@@ -9,10 +9,11 @@ See: https://docs.python.org/3/whatsnew/3.12.html#deprecated
|
|
|
9
9
|
|
|
10
10
|
from typing import Any, List, Optional
|
|
11
11
|
|
|
12
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
12
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
13
13
|
from rewrite.category import CategoryDescriptor
|
|
14
14
|
from rewrite.decorators import categorize
|
|
15
15
|
from rewrite.marketplace import Python
|
|
16
|
+
from rewrite.python.preconditions import uses_method
|
|
16
17
|
from rewrite.python.visitor import PythonVisitor
|
|
17
18
|
from rewrite.java.tree import Identifier, MethodInvocation
|
|
18
19
|
from ._markers import mark_deprecated
|
|
@@ -99,4 +100,4 @@ class FindShutilRmtreeOnerror(Recipe):
|
|
|
99
100
|
|
|
100
101
|
return method
|
|
101
102
|
|
|
102
|
-
return Visitor()
|
|
103
|
+
return Preconditions.check(uses_method("*..* rmtree(..)"), Visitor())
|
|
@@ -11,10 +11,11 @@ See: https://docs.python.org/3/library/socket.html
|
|
|
11
11
|
|
|
12
12
|
from typing import Any, List, Optional
|
|
13
13
|
|
|
14
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
14
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
15
15
|
from rewrite.category import CategoryDescriptor
|
|
16
16
|
from rewrite.decorators import categorize
|
|
17
17
|
from rewrite.marketplace import Python
|
|
18
|
+
from rewrite.python.preconditions import uses_method
|
|
18
19
|
from rewrite.python.visitor import PythonVisitor
|
|
19
20
|
from rewrite.java.tree import Identifier, MethodInvocation
|
|
20
21
|
from ._markers import mark_deprecated
|
|
@@ -83,4 +84,4 @@ class FindSocketGetFQDN(Recipe):
|
|
|
83
84
|
"Consider using socket.gethostname() instead."
|
|
84
85
|
)
|
|
85
86
|
|
|
86
|
-
return Visitor()
|
|
87
|
+
return Preconditions.check(uses_method("*..* getfqdn(..)"), Visitor())
|
|
@@ -9,10 +9,11 @@ See: https://docs.python.org/3/whatsnew/3.8.html#api-and-feature-removals
|
|
|
9
9
|
|
|
10
10
|
from typing import Any, List, Optional
|
|
11
11
|
|
|
12
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
12
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
13
13
|
from rewrite.category import CategoryDescriptor
|
|
14
14
|
from rewrite.decorators import categorize
|
|
15
15
|
from rewrite.marketplace import Python
|
|
16
|
+
from rewrite.python.preconditions import uses_method, uses_type
|
|
16
17
|
from rewrite.python.visitor import PythonVisitor
|
|
17
18
|
from rewrite.java.tree import FieldAccess, Identifier
|
|
18
19
|
|
|
@@ -103,4 +104,10 @@ class ReplaceTarfileFilemode(Recipe):
|
|
|
103
104
|
new_target = target.replace(_simple_name="stat")
|
|
104
105
|
return field_access.replace(_target=new_target)
|
|
105
106
|
|
|
106
|
-
return
|
|
107
|
+
return Preconditions.check(
|
|
108
|
+
Preconditions.or_(
|
|
109
|
+
uses_method("*..* filemode(..)"),
|
|
110
|
+
uses_type("tarfile"),
|
|
111
|
+
),
|
|
112
|
+
Visitor(),
|
|
113
|
+
)
|
|
@@ -14,10 +14,11 @@ See: https://docs.python.org/3/library/tempfile.html
|
|
|
14
14
|
|
|
15
15
|
from typing import Any, List, Optional
|
|
16
16
|
|
|
17
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
17
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
18
18
|
from rewrite.category import CategoryDescriptor
|
|
19
19
|
from rewrite.decorators import categorize
|
|
20
20
|
from rewrite.marketplace import Python
|
|
21
|
+
from rewrite.python.preconditions import uses_method
|
|
21
22
|
from rewrite.python.visitor import PythonVisitor
|
|
22
23
|
from rewrite.java.tree import Identifier, MethodInvocation
|
|
23
24
|
from ._markers import mark_deprecated
|
|
@@ -100,4 +101,4 @@ class FindTempfileMktemp(Recipe):
|
|
|
100
101
|
"Use tempfile.mkstemp() or NamedTemporaryFile() instead."
|
|
101
102
|
)
|
|
102
103
|
|
|
103
|
-
return Visitor()
|
|
104
|
+
return Preconditions.check(uses_method("*..* mktemp(..)"), Visitor())
|
|
@@ -17,10 +17,11 @@ See: https://docs.python.org/3/library/threading.html
|
|
|
17
17
|
|
|
18
18
|
from typing import Any, List, Optional
|
|
19
19
|
|
|
20
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
20
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
21
21
|
from rewrite.category import CategoryDescriptor
|
|
22
22
|
from rewrite.decorators import categorize
|
|
23
23
|
from rewrite.marketplace import Python
|
|
24
|
+
from rewrite.python.preconditions import uses_method
|
|
24
25
|
from rewrite.python.visitor import PythonVisitor
|
|
25
26
|
from rewrite.python.template import pattern, template, capture
|
|
26
27
|
from rewrite.java.tree import Identifier, MethodInvocation
|
|
@@ -92,7 +93,7 @@ class ReplaceThreadingCurrentThread(Recipe):
|
|
|
92
93
|
new_name = method.name.replace(_simple_name="current_thread")
|
|
93
94
|
return method.replace(_name=new_name)
|
|
94
95
|
|
|
95
|
-
return Visitor()
|
|
96
|
+
return Preconditions.check(uses_method("*..* currentThread(..)"), Visitor())
|
|
96
97
|
|
|
97
98
|
|
|
98
99
|
@categorize(_Python310)
|
|
@@ -154,7 +155,7 @@ class ReplaceThreadingActiveCount(Recipe):
|
|
|
154
155
|
new_name = method.name.replace(_simple_name="active_count")
|
|
155
156
|
return method.replace(_name=new_name)
|
|
156
157
|
|
|
157
|
-
return Visitor()
|
|
158
|
+
return Preconditions.check(uses_method("*..* activeCount(..)"), Visitor())
|
|
158
159
|
|
|
159
160
|
|
|
160
161
|
@categorize(_Python310)
|
|
@@ -211,7 +212,7 @@ class ReplaceConditionNotifyAll(Recipe):
|
|
|
211
212
|
new_name = method.name.replace(_simple_name="notify_all")
|
|
212
213
|
return method.replace(_name=new_name)
|
|
213
214
|
|
|
214
|
-
return Visitor()
|
|
215
|
+
return Preconditions.check(uses_method("*..* notifyAll(..)"), Visitor())
|
|
215
216
|
|
|
216
217
|
|
|
217
218
|
# Pattern/template pairs for getter-to-property conversions
|
|
@@ -289,7 +290,7 @@ class ReplaceEventIsSet(Recipe):
|
|
|
289
290
|
new_name = method.name.replace(_simple_name="is_set")
|
|
290
291
|
return method.replace(_name=new_name)
|
|
291
292
|
|
|
292
|
-
return Visitor()
|
|
293
|
+
return Preconditions.check(uses_method("*..* isSet(..)"), Visitor())
|
|
293
294
|
|
|
294
295
|
|
|
295
296
|
@categorize(_Python310)
|
|
@@ -9,10 +9,11 @@ See: https://docs.python.org/3/whatsnew/3.9.html#removed
|
|
|
9
9
|
|
|
10
10
|
from typing import Any, List, Optional
|
|
11
11
|
|
|
12
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
12
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
13
13
|
from rewrite.category import CategoryDescriptor
|
|
14
14
|
from rewrite.decorators import categorize
|
|
15
15
|
from rewrite.marketplace import Python
|
|
16
|
+
from rewrite.python.preconditions import uses_method
|
|
16
17
|
from rewrite.python.visitor import PythonVisitor
|
|
17
18
|
from rewrite.java.tree import Identifier, MethodInvocation
|
|
18
19
|
|
|
@@ -79,4 +80,4 @@ class ReplaceThreadIsAlive(Recipe):
|
|
|
79
80
|
new_name = method.name.replace(_simple_name="is_alive")
|
|
80
81
|
return method.replace(_name=new_name)
|
|
81
82
|
|
|
82
|
-
return Visitor()
|
|
83
|
+
return Preconditions.check(uses_method("*..* isAlive(..)"), Visitor())
|
|
@@ -19,10 +19,11 @@ See: https://docs.python.org/3/library/urllib.parse.html
|
|
|
19
19
|
|
|
20
20
|
from typing import Any, List, Optional
|
|
21
21
|
|
|
22
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
22
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
23
23
|
from rewrite.category import CategoryDescriptor
|
|
24
24
|
from rewrite.decorators import categorize
|
|
25
25
|
from rewrite.marketplace import Python
|
|
26
|
+
from rewrite.python.preconditions import uses_method
|
|
26
27
|
from rewrite.python.visitor import PythonVisitor
|
|
27
28
|
from rewrite.java.tree import Identifier, MethodInvocation, FieldAccess
|
|
28
29
|
from ._markers import mark_deprecated
|
|
@@ -130,7 +131,12 @@ class FindUrllibParseSplitFunctions(Recipe):
|
|
|
130
131
|
|
|
131
132
|
return method
|
|
132
133
|
|
|
133
|
-
return
|
|
134
|
+
return Preconditions.check(
|
|
135
|
+
Preconditions.or_(
|
|
136
|
+
*(uses_method(f"*..* {name}(..)") for name in _DEPRECATED_SPLITS)
|
|
137
|
+
),
|
|
138
|
+
Visitor(),
|
|
139
|
+
)
|
|
134
140
|
|
|
135
141
|
|
|
136
142
|
@categorize(_Python314)
|
|
@@ -191,4 +197,4 @@ class FindUrllibParseToBytes(Recipe):
|
|
|
191
197
|
|
|
192
198
|
return method
|
|
193
199
|
|
|
194
|
-
return Visitor()
|
|
200
|
+
return Preconditions.check(uses_method("*..* to_bytes(..)"), Visitor())
|
|
@@ -10,11 +10,12 @@ See: https://docs.python.org/3/library/xml.etree.elementtree.html
|
|
|
10
10
|
|
|
11
11
|
from typing import Any, List, Optional
|
|
12
12
|
|
|
13
|
-
from rewrite import ExecutionContext, Recipe, TreeVisitor
|
|
13
|
+
from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
|
|
14
14
|
from rewrite.category import CategoryDescriptor
|
|
15
15
|
from rewrite.decorators import categorize
|
|
16
16
|
from rewrite.marketplace import Python
|
|
17
17
|
from rewrite.markers import Markers
|
|
18
|
+
from rewrite.python.preconditions import uses_method
|
|
18
19
|
from rewrite.python.visitor import PythonVisitor
|
|
19
20
|
from rewrite.java.support_types import JRightPadded, Space
|
|
20
21
|
from rewrite.java.tree import Identifier, MethodInvocation
|
|
@@ -114,7 +115,7 @@ class ReplaceElementGetchildren(Recipe):
|
|
|
114
115
|
|
|
115
116
|
return result
|
|
116
117
|
|
|
117
|
-
return Visitor()
|
|
118
|
+
return Preconditions.check(uses_method("*..* getchildren(..)"), Visitor())
|
|
118
119
|
|
|
119
120
|
|
|
120
121
|
@categorize(_Python39)
|
|
@@ -184,4 +185,4 @@ class ReplaceElementGetiterator(Recipe):
|
|
|
184
185
|
new_name = method.name.replace(_simple_name="iter")
|
|
185
186
|
return method.replace(_name=new_name)
|
|
186
187
|
|
|
187
|
-
return Visitor()
|
|
188
|
+
return Preconditions.check(uses_method("*..* getiterator(..)"), Visitor())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openrewrite-migrate-python
|
|
3
|
-
Version: 0.8.0.
|
|
3
|
+
Version: 0.8.0.dev20260510225444
|
|
4
4
|
Summary: OpenRewrite recipes for migrating Python codebases to newer Python versions.
|
|
5
5
|
Author-email: "Moderne Inc." <support@moderne.io>
|
|
6
6
|
License: Moderne Proprietary
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|