openrewrite-migrate-python 0.9.0.dev20260606102208__tar.gz → 0.9.0.dev20260606181158__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.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/PKG-INFO +1 -1
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/pyproject.toml +1 -1
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/typing_union_to_pipe.py +21 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python.egg-info/PKG-INFO +1 -1
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_typing_union_to_pipe.py +60 -35
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/setup.cfg +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_code_quality_python/__init__.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_code_quality_python/codequality/__init__.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_code_quality_python/codequality/_semantically_equal.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_code_quality_python/codequality/all_branches_identical.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_code_quality_python/codequality/boolean_checks_not_inverted.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_code_quality_python/codequality/collapsible_if_statements.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_code_quality_python/codequality/merge_identical_branches.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_code_quality_python/codequality/remove_duplicate_conditions.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_code_quality_python/codequality/remove_self_assignment.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_code_quality_python/codequality/remove_unconditional_value_overwrite.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_code_quality_python/codequality/simplify_boolean_literal.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_code_quality_python/codequality/simplify_redundant_logical_expression.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/__init__.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/__init__.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/_markers.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/aifc_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/array_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/ast_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/asyncio_coroutine_to_async.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/asyncio_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/calendar_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/cgi_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/cgi_parse_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/collections_abc_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/configparser_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/datetime_utc.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/distutils_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/distutils_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/functools_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/future_imports.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/gettext_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/html_parser_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/imp_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/langchain_classic_imports.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/langchain_community_imports.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/langchain_provider_imports.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/locale_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/locale_getdefaultlocale_deprecation.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/macpath_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/mailcap_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/nntplib_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/os_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/pathlib_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/pep594_system_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/pipes_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/pkgutil_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/platform_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/pydantic_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/pydantic_model_fields.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/re_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/removed_modules_312.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/shutil_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/socket_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/ssl_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/string_formatting.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/sys_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/sys_last_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/tarfile_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/telnetlib_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/tempfile_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/threading_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/threading_is_alive_deprecation.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/typing_callable.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/typing_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/unittest_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/upgrade_to_langchain02.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/upgrade_to_langchain1.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/upgrade_to_pydantic.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/upgrade_to_python310.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/upgrade_to_python311.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/upgrade_to_python312.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/upgrade_to_python313.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/upgrade_to_python314.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/upgrade_to_python38.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/upgrade_to_python39.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/urllib_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/uu_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/xdrlib_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python/migrate/xml_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python.egg-info/SOURCES.txt +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python.egg-info/dependency_links.txt +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python.egg-info/entry_points.txt +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python.egg-info/requires.txt +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/src/openrewrite_migrate_python.egg-info/top_level.txt +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_aifc_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_array_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_ast_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_asyncio_coroutine_to_async.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_asyncio_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_calendar_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_cgi_parse_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_change_import_recipes.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_collections_abc_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_configparser_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_datetime_utc.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_distutils_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_future_imports.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_gettext_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_html_parser_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_imp_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_langchain_classic_imports.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_langchain_community_imports.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_langchain_provider_imports.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_locale_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_locale_getdefaultlocale_deprecation.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_macpath_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_os_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_pep594_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_pep594_system_migrations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_pkgutil_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_platform_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_pydantic_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_pydantic_model_fields.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_re_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_removed_modules_312.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_shutil_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_ssl_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_string_formatting.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_sys_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_sys_last_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_tarfile_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_threading_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_threading_extended.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_threading_is_alive_deprecation.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_typing_callable.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_typing_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_unittest_deprecations.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/tests/test_upgrade_recipes.py +0 -0
- {openrewrite_migrate_python-0.9.0.dev20260606102208 → openrewrite_migrate_python-0.9.0.dev20260606181158}/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.9.0.
|
|
3
|
+
Version: 0.9.0.dev20260606181158
|
|
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.9.0.
|
|
8
|
+
version = "0.9.0.dev20260606181158" # 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"
|
|
@@ -17,6 +17,7 @@ from rewrite.category import CategoryDescriptor
|
|
|
17
17
|
from rewrite.decorators import categorize
|
|
18
18
|
from rewrite.marketplace import Python
|
|
19
19
|
from rewrite.markers import Markers
|
|
20
|
+
from rewrite.python.remove_import import RemoveImportOptions, maybe_remove_import
|
|
20
21
|
from rewrite.python.visitor import PythonVisitor
|
|
21
22
|
from rewrite.java.support_types import JRightPadded, Space
|
|
22
23
|
from rewrite.java.tree import (
|
|
@@ -168,6 +169,11 @@ class ReplaceTypingOptionalWithUnion(Recipe):
|
|
|
168
169
|
|
|
169
170
|
type_arg = type_params[0]
|
|
170
171
|
|
|
172
|
+
# Drop the now-unused `from typing import Optional` (kept if still used)
|
|
173
|
+
maybe_remove_import(
|
|
174
|
+
self, RemoveImportOptions(module="typing", name="Optional")
|
|
175
|
+
)
|
|
176
|
+
|
|
171
177
|
# Create X | None using UnionType
|
|
172
178
|
none_literal = _create_none_literal(Space.EMPTY)
|
|
173
179
|
return _create_union_type([type_arg, none_literal], param_type.prefix)
|
|
@@ -184,6 +190,11 @@ class ReplaceTypingOptionalWithUnion(Recipe):
|
|
|
184
190
|
# Get the type argument from the dimension
|
|
185
191
|
index = array_access.dimension.index
|
|
186
192
|
|
|
193
|
+
# Drop the now-unused `from typing import Optional` (kept if still used)
|
|
194
|
+
maybe_remove_import(
|
|
195
|
+
self, RemoveImportOptions(module="typing", name="Optional")
|
|
196
|
+
)
|
|
197
|
+
|
|
187
198
|
# Create X | None using UnionType
|
|
188
199
|
none_literal = _create_none_literal(Space.EMPTY)
|
|
189
200
|
return _create_union_type([index, none_literal], array_access.prefix)
|
|
@@ -243,6 +254,11 @@ class ReplaceTypingUnionWithPipe(Recipe):
|
|
|
243
254
|
if type_params is None or len(type_params) < 2:
|
|
244
255
|
return param_type
|
|
245
256
|
|
|
257
|
+
# Drop the now-unused `from typing import Union` (kept if still used)
|
|
258
|
+
maybe_remove_import(
|
|
259
|
+
self, RemoveImportOptions(module="typing", name="Union")
|
|
260
|
+
)
|
|
261
|
+
|
|
246
262
|
# Create union type with all type parameters
|
|
247
263
|
return _create_union_type(list(type_params), param_type.prefix)
|
|
248
264
|
|
|
@@ -266,6 +282,11 @@ class ReplaceTypingUnionWithPipe(Recipe):
|
|
|
266
282
|
if len(elements) < 2:
|
|
267
283
|
return array_access
|
|
268
284
|
|
|
285
|
+
# Drop the now-unused `from typing import Union` (kept if still used)
|
|
286
|
+
maybe_remove_import(
|
|
287
|
+
self, RemoveImportOptions(module="typing", name="Union")
|
|
288
|
+
)
|
|
289
|
+
|
|
269
290
|
# Create union type with all elements
|
|
270
291
|
return _create_union_type(elements, array_access.prefix)
|
|
271
292
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openrewrite-migrate-python
|
|
3
|
-
Version: 0.9.0.
|
|
3
|
+
Version: 0.9.0.dev20260606181158
|
|
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
|
|
@@ -11,54 +11,47 @@ class TestReplaceTypingOptionalWithUnion:
|
|
|
11
11
|
"""Tests for the ReplaceTypingOptionalWithUnion recipe."""
|
|
12
12
|
|
|
13
13
|
def test_replaces_optional_simple_type(self):
|
|
14
|
-
"""Test replacing Optional[str] with str | None."""
|
|
14
|
+
"""Test replacing Optional[str] with str | None and removing the import."""
|
|
15
15
|
spec = RecipeSpec(recipe=ReplaceTypingOptionalWithUnion())
|
|
16
16
|
spec.rewrite_run(
|
|
17
17
|
python(
|
|
18
18
|
"""
|
|
19
19
|
from typing import Optional
|
|
20
|
-
|
|
21
20
|
name: Optional[str] = None
|
|
22
21
|
""",
|
|
23
22
|
"""
|
|
24
|
-
from typing import Optional
|
|
25
|
-
|
|
26
23
|
name: str | None = None
|
|
27
24
|
""",
|
|
28
25
|
)
|
|
29
26
|
)
|
|
30
27
|
|
|
31
28
|
def test_replaces_optional_complex_type(self):
|
|
32
|
-
"""Test replacing Optional with a complex type argument."""
|
|
29
|
+
"""Test replacing Optional with a complex type argument; keep still-used import."""
|
|
33
30
|
spec = RecipeSpec(recipe=ReplaceTypingOptionalWithUnion())
|
|
34
31
|
spec.rewrite_run(
|
|
35
32
|
python(
|
|
36
33
|
"""
|
|
37
34
|
from typing import Optional, List
|
|
38
|
-
|
|
39
35
|
items: Optional[List[int]] = None
|
|
40
36
|
""",
|
|
41
37
|
"""
|
|
42
|
-
from typing import
|
|
43
|
-
|
|
38
|
+
from typing import List
|
|
44
39
|
items: List[int] | None = None
|
|
45
40
|
""",
|
|
46
41
|
)
|
|
47
42
|
)
|
|
48
43
|
|
|
49
44
|
def test_replaces_typing_dot_optional(self):
|
|
50
|
-
"""Test replacing typing.Optional[X] (fully qualified)."""
|
|
45
|
+
"""Test replacing typing.Optional[X] (fully qualified); import typing kept."""
|
|
51
46
|
spec = RecipeSpec(recipe=ReplaceTypingOptionalWithUnion())
|
|
52
47
|
spec.rewrite_run(
|
|
53
48
|
python(
|
|
54
49
|
"""
|
|
55
50
|
import typing
|
|
56
|
-
|
|
57
51
|
name: typing.Optional[str] = None
|
|
58
52
|
""",
|
|
59
53
|
"""
|
|
60
54
|
import typing
|
|
61
|
-
|
|
62
55
|
name: str | None = None
|
|
63
56
|
""",
|
|
64
57
|
)
|
|
@@ -71,12 +64,29 @@ class TestReplaceTypingOptionalWithUnion:
|
|
|
71
64
|
python(
|
|
72
65
|
"""
|
|
73
66
|
from typing import List
|
|
74
|
-
|
|
75
67
|
items: List[str] = []
|
|
76
68
|
"""
|
|
77
69
|
)
|
|
78
70
|
)
|
|
79
71
|
|
|
72
|
+
def test_keeps_import_when_optional_still_used(self):
|
|
73
|
+
"""Test that the import is kept when Optional is still referenced elsewhere."""
|
|
74
|
+
spec = RecipeSpec(recipe=ReplaceTypingOptionalWithUnion())
|
|
75
|
+
spec.rewrite_run(
|
|
76
|
+
python(
|
|
77
|
+
"""
|
|
78
|
+
from typing import Optional
|
|
79
|
+
alias = Optional
|
|
80
|
+
name: Optional[str] = None
|
|
81
|
+
""",
|
|
82
|
+
"""
|
|
83
|
+
from typing import Optional
|
|
84
|
+
alias = Optional
|
|
85
|
+
name: str | None = None
|
|
86
|
+
""",
|
|
87
|
+
)
|
|
88
|
+
)
|
|
89
|
+
|
|
80
90
|
def test_replaces_optional_in_return_type(self):
|
|
81
91
|
"""Test replacing Optional in function return types."""
|
|
82
92
|
spec = RecipeSpec(recipe=ReplaceTypingOptionalWithUnion())
|
|
@@ -84,13 +94,10 @@ class TestReplaceTypingOptionalWithUnion:
|
|
|
84
94
|
python(
|
|
85
95
|
"""
|
|
86
96
|
from typing import Optional
|
|
87
|
-
|
|
88
97
|
def process() -> Optional[int]:
|
|
89
98
|
return None
|
|
90
99
|
""",
|
|
91
100
|
"""
|
|
92
|
-
from typing import Optional
|
|
93
|
-
|
|
94
101
|
def process() -> int | None:
|
|
95
102
|
return None
|
|
96
103
|
""",
|
|
@@ -104,13 +111,10 @@ class TestReplaceTypingOptionalWithUnion:
|
|
|
104
111
|
python(
|
|
105
112
|
"""
|
|
106
113
|
from typing import Optional
|
|
107
|
-
|
|
108
114
|
def process(name: Optional[str]) -> Optional[int]:
|
|
109
115
|
return None
|
|
110
116
|
""",
|
|
111
117
|
"""
|
|
112
|
-
from typing import Optional
|
|
113
|
-
|
|
114
118
|
def process(name: str | None) -> int | None:
|
|
115
119
|
return None
|
|
116
120
|
""",
|
|
@@ -122,18 +126,15 @@ class TestReplaceTypingUnionWithPipe:
|
|
|
122
126
|
"""Tests for the ReplaceTypingUnionWithPipe recipe."""
|
|
123
127
|
|
|
124
128
|
def test_replaces_union_two_types(self):
|
|
125
|
-
"""Test replacing Union[int, str] with int | str."""
|
|
129
|
+
"""Test replacing Union[int, str] with int | str and removing the import."""
|
|
126
130
|
spec = RecipeSpec(recipe=ReplaceTypingUnionWithPipe())
|
|
127
131
|
spec.rewrite_run(
|
|
128
132
|
python(
|
|
129
133
|
"""
|
|
130
134
|
from typing import Union
|
|
131
|
-
|
|
132
135
|
value: Union[int, str] = 0
|
|
133
136
|
""",
|
|
134
137
|
"""
|
|
135
|
-
from typing import Union
|
|
136
|
-
|
|
137
138
|
value: int | str = 0
|
|
138
139
|
""",
|
|
139
140
|
)
|
|
@@ -146,30 +147,25 @@ class TestReplaceTypingUnionWithPipe:
|
|
|
146
147
|
python(
|
|
147
148
|
"""
|
|
148
149
|
from typing import Union
|
|
149
|
-
|
|
150
150
|
value: Union[int, str, float] = 0
|
|
151
151
|
""",
|
|
152
152
|
"""
|
|
153
|
-
from typing import Union
|
|
154
|
-
|
|
155
153
|
value: int | str | float = 0
|
|
156
154
|
""",
|
|
157
155
|
)
|
|
158
156
|
)
|
|
159
157
|
|
|
160
158
|
def test_replaces_typing_dot_union(self):
|
|
161
|
-
"""Test replacing typing.Union[X, Y] (fully qualified)."""
|
|
159
|
+
"""Test replacing typing.Union[X, Y] (fully qualified); import typing kept."""
|
|
162
160
|
spec = RecipeSpec(recipe=ReplaceTypingUnionWithPipe())
|
|
163
161
|
spec.rewrite_run(
|
|
164
162
|
python(
|
|
165
163
|
"""
|
|
166
164
|
import typing
|
|
167
|
-
|
|
168
165
|
value: typing.Union[int, str] = 0
|
|
169
166
|
""",
|
|
170
167
|
"""
|
|
171
168
|
import typing
|
|
172
|
-
|
|
173
169
|
value: int | str = 0
|
|
174
170
|
""",
|
|
175
171
|
)
|
|
@@ -182,12 +178,47 @@ class TestReplaceTypingUnionWithPipe:
|
|
|
182
178
|
python(
|
|
183
179
|
"""
|
|
184
180
|
from typing import List
|
|
185
|
-
|
|
186
181
|
items: List[str] = []
|
|
187
182
|
"""
|
|
188
183
|
)
|
|
189
184
|
)
|
|
190
185
|
|
|
186
|
+
def test_keeps_import_when_union_still_used(self):
|
|
187
|
+
"""Test that the import is kept when Union is still referenced elsewhere."""
|
|
188
|
+
spec = RecipeSpec(recipe=ReplaceTypingUnionWithPipe())
|
|
189
|
+
spec.rewrite_run(
|
|
190
|
+
python(
|
|
191
|
+
"""
|
|
192
|
+
from typing import Union
|
|
193
|
+
alias = Union
|
|
194
|
+
value: Union[int, str] = 0
|
|
195
|
+
""",
|
|
196
|
+
"""
|
|
197
|
+
from typing import Union
|
|
198
|
+
alias = Union
|
|
199
|
+
value: int | str = 0
|
|
200
|
+
""",
|
|
201
|
+
)
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
def test_keeps_other_imports_when_removing_union(self):
|
|
205
|
+
"""Test partial removal: only Union is dropped, other names are kept."""
|
|
206
|
+
spec = RecipeSpec(recipe=ReplaceTypingUnionWithPipe())
|
|
207
|
+
spec.rewrite_run(
|
|
208
|
+
python(
|
|
209
|
+
"""
|
|
210
|
+
from typing import Union, List
|
|
211
|
+
value: Union[int, str] = 0
|
|
212
|
+
items: List[int] = []
|
|
213
|
+
""",
|
|
214
|
+
"""
|
|
215
|
+
from typing import List
|
|
216
|
+
value: int | str = 0
|
|
217
|
+
items: List[int] = []
|
|
218
|
+
""",
|
|
219
|
+
)
|
|
220
|
+
)
|
|
221
|
+
|
|
191
222
|
def test_replaces_union_in_return_type(self):
|
|
192
223
|
"""Test replacing Union in function return types."""
|
|
193
224
|
spec = RecipeSpec(recipe=ReplaceTypingUnionWithPipe())
|
|
@@ -195,13 +226,10 @@ class TestReplaceTypingUnionWithPipe:
|
|
|
195
226
|
python(
|
|
196
227
|
"""
|
|
197
228
|
from typing import Union
|
|
198
|
-
|
|
199
229
|
def process() -> Union[str, None]:
|
|
200
230
|
return None
|
|
201
231
|
""",
|
|
202
232
|
"""
|
|
203
|
-
from typing import Union
|
|
204
|
-
|
|
205
233
|
def process() -> str | None:
|
|
206
234
|
return None
|
|
207
235
|
""",
|
|
@@ -215,13 +243,10 @@ class TestReplaceTypingUnionWithPipe:
|
|
|
215
243
|
python(
|
|
216
244
|
"""
|
|
217
245
|
from typing import Union
|
|
218
|
-
|
|
219
246
|
def process(value: Union[int, str]) -> Union[str, None]:
|
|
220
247
|
return str(value)
|
|
221
248
|
""",
|
|
222
249
|
"""
|
|
223
|
-
from typing import Union
|
|
224
|
-
|
|
225
250
|
def process(value: int | str) -> str | None:
|
|
226
251
|
return str(value)
|
|
227
252
|
""",
|
|
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
|
|
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
|