openrewrite-migrate-python 0.17.0.dev20261022150922__tar.gz → 0.17.0.dev20261022194832__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.
Files changed (232) hide show
  1. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/PKG-INFO +1 -1
  2. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/pyproject.toml +1 -1
  3. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/__init__.py +42 -6
  4. openrewrite_migrate_python-0.17.0.dev20261022194832/src/openrewrite_migrate_python/migrate/_finders.py +109 -0
  5. openrewrite_migrate_python-0.17.0.dev20261022194832/src/openrewrite_migrate_python/migrate/array_deprecations.py +201 -0
  6. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/asyncio_deprecations.py +115 -1
  7. openrewrite_migrate_python-0.17.0.dev20261022194832/src/openrewrite_migrate_python/migrate/builtins_deprecations.py +89 -0
  8. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/collections_abc_migrations.py +66 -2
  9. openrewrite_migrate_python-0.17.0.dev20261022194832/src/openrewrite_migrate_python/migrate/ctypes_deprecations.py +68 -0
  10. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/glob_deprecations.py +52 -3
  11. openrewrite_migrate_python-0.17.0.dev20261022194832/src/openrewrite_migrate_python/migrate/http_server_deprecations.py +61 -0
  12. openrewrite_migrate_python-0.17.0.dev20261022194832/src/openrewrite_migrate_python/migrate/importlib_deprecations.py +136 -0
  13. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/pathlib_deprecations.py +59 -0
  14. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/platform_deprecations.py +51 -1
  15. openrewrite_migrate_python-0.17.0.dev20261022194832/src/openrewrite_migrate_python/migrate/profile_deprecations.py +68 -0
  16. openrewrite_migrate_python-0.17.0.dev20261022194832/src/openrewrite_migrate_python/migrate/sre_migrations.py +66 -0
  17. openrewrite_migrate_python-0.17.0.dev20261022194832/src/openrewrite_migrate_python/migrate/text_encoding.py +170 -0
  18. openrewrite_migrate_python-0.17.0.dev20261022194832/src/openrewrite_migrate_python/migrate/types_deprecations.py +78 -0
  19. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/typing_deprecations.py +53 -1
  20. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/upgrade_to_python312.py +5 -0
  21. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/upgrade_to_python313.py +3 -0
  22. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/upgrade_to_python314.py +4 -0
  23. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/upgrade_to_python315.py +29 -2
  24. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/upgrade_to_python39.py +2 -2
  25. openrewrite_migrate_python-0.17.0.dev20261022194832/src/openrewrite_migrate_python/migrate/wave_deprecations.py +72 -0
  26. openrewrite_migrate_python-0.17.0.dev20261022194832/src/openrewrite_migrate_python/migrate/webbrowser_deprecations.py +63 -0
  27. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python.egg-info/PKG-INFO +1 -1
  28. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python.egg-info/SOURCES.txt +21 -0
  29. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_array_deprecations.py +33 -0
  30. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_asyncio_deprecations.py +88 -0
  31. openrewrite_migrate_python-0.17.0.dev20261022194832/tests/test_builtins_deprecations.py +47 -0
  32. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_collections_abc_migrations.py +43 -0
  33. openrewrite_migrate_python-0.17.0.dev20261022194832/tests/test_ctypes_deprecations.py +19 -0
  34. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_glob_deprecations.py +15 -1
  35. openrewrite_migrate_python-0.17.0.dev20261022194832/tests/test_http_server_deprecations.py +79 -0
  36. openrewrite_migrate_python-0.17.0.dev20261022194832/tests/test_importlib_deprecations.py +70 -0
  37. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_pathlib_deprecations.py +36 -1
  38. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_platform_deprecations.py +15 -1
  39. openrewrite_migrate_python-0.17.0.dev20261022194832/tests/test_profile_deprecations.py +23 -0
  40. openrewrite_migrate_python-0.17.0.dev20261022194832/tests/test_sre_migrations.py +26 -0
  41. openrewrite_migrate_python-0.17.0.dev20261022194832/tests/test_text_encoding.py +143 -0
  42. openrewrite_migrate_python-0.17.0.dev20261022194832/tests/test_types_deprecations.py +62 -0
  43. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_typing_deprecations.py +38 -0
  44. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_upgrade_recipes.py +15 -0
  45. openrewrite_migrate_python-0.17.0.dev20261022194832/tests/test_wave_deprecations.py +35 -0
  46. openrewrite_migrate_python-0.17.0.dev20261022194832/tests/test_webbrowser_deprecations.py +22 -0
  47. openrewrite_migrate_python-0.17.0.dev20261022150922/src/openrewrite_migrate_python/migrate/array_deprecations.py +0 -113
  48. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/setup.cfg +0 -0
  49. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/__init__.py +0 -0
  50. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/__init__.py +0 -0
  51. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/_literals.py +0 -0
  52. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/_negation.py +0 -0
  53. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/assign_return.py +0 -0
  54. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/attr_access.py +0 -0
  55. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/boolean_simplification.py +0 -0
  56. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/collection_literals.py +0 -0
  57. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/comparison_simplification.py +0 -0
  58. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/complex_transforms.py +0 -0
  59. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/comprehension_cleanup.py +0 -0
  60. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/conditionals.py +0 -0
  61. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/datetime_cleanup.py +0 -0
  62. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/dict_cleanup.py +0 -0
  63. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/exception_cleanup.py +0 -0
  64. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/expression_simplification.py +0 -0
  65. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/logger_warn.py +0 -0
  66. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/loop_cleanup.py +0 -0
  67. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/merge_nested_with.py +0 -0
  68. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/merge_startswith_endswith.py +0 -0
  69. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/naming_conventions.py +0 -0
  70. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/negated_operators.py +0 -0
  71. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/none_and_identity.py +0 -0
  72. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/object_inheritance.py +0 -0
  73. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/pandas_cleanup.py +0 -0
  74. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/python_best_practices.py +0 -0
  75. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/range_cleanup.py +0 -0
  76. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/redundant_code.py +0 -0
  77. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/remove_trailing_return_none.py +0 -0
  78. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/string_cleanup.py +0 -0
  79. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/unreachable_code.py +0 -0
  80. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/use_items.py +0 -0
  81. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/use_list_clear.py +0 -0
  82. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/cleanup/yoda_conditions.py +0 -0
  83. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/__init__.py +0 -0
  84. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/_reindent.py +0 -0
  85. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/_semantically_equal.py +0 -0
  86. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/_side_effects.py +0 -0
  87. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/_trivia.py +0 -0
  88. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/_truth_value.py +0 -0
  89. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/all_branches_identical.py +0 -0
  90. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/boolean_checks_not_inverted.py +0 -0
  91. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/code_quality.py +0 -0
  92. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/collapsible_if_statements.py +0 -0
  93. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/find_suspicious_chained_comparison.py +0 -0
  94. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/merge_identical_branches.py +0 -0
  95. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/remove_duplicate_conditions.py +0 -0
  96. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/remove_self_assignment.py +0 -0
  97. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/remove_unconditional_value_overwrite.py +0 -0
  98. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/simplify_boolean_literal.py +0 -0
  99. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_code_quality_python/codequality/simplify_redundant_logical_expression.py +0 -0
  100. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/__init__.py +0 -0
  101. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/_decorators.py +0 -0
  102. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/_langchain_tables.py +0 -0
  103. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/_markers.py +0 -0
  104. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/_method_renames.py +0 -0
  105. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/_module_imports.py +0 -0
  106. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/_slots.py +0 -0
  107. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/aifc_migrations.py +0 -0
  108. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/ast_deprecations.py +0 -0
  109. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/asyncio_coroutine_to_async.py +0 -0
  110. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/avro_migrations.py +0 -0
  111. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/backoff_to_tenacity.py +0 -0
  112. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/calendar_deprecations.py +0 -0
  113. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/cgi_escape_deprecations.py +0 -0
  114. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/cgi_migrations.py +0 -0
  115. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/cgi_parse_deprecations.py +0 -0
  116. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/configparser_deprecations.py +0 -0
  117. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/datetime_utc.py +0 -0
  118. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/distutils_deprecations.py +0 -0
  119. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/distutils_migrations.py +0 -0
  120. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/functools_deprecations.py +0 -0
  121. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/future_imports.py +0 -0
  122. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/gettext_deprecations.py +0 -0
  123. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/html_parser_deprecations.py +0 -0
  124. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/imp_migrations.py +0 -0
  125. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/importlib_resources_deprecations.py +0 -0
  126. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/inspect_deprecations.py +0 -0
  127. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/langchain_classic_imports.py +0 -0
  128. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/langchain_community_imports.py +0 -0
  129. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/langchain_provider_imports.py +0 -0
  130. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/locale_deprecations.py +0 -0
  131. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/locale_getdefaultlocale_deprecation.py +0 -0
  132. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/macpath_deprecations.py +0 -0
  133. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/mailcap_migrations.py +0 -0
  134. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/module_cached_attribute.py +0 -0
  135. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/nntplib_migrations.py +0 -0
  136. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/os_deprecations.py +0 -0
  137. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/pep594_system_migrations.py +0 -0
  138. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/pipes_migrations.py +0 -0
  139. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/pkgutil_deprecations.py +0 -0
  140. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/pydantic_deprecations.py +0 -0
  141. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/pydantic_fields.py +0 -0
  142. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/pydantic_model_fields.py +0 -0
  143. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/re_deprecations.py +0 -0
  144. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/removed_modules_312.py +0 -0
  145. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/shutil_deprecations.py +0 -0
  146. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/socket_deprecations.py +0 -0
  147. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/ssl_deprecations.py +0 -0
  148. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/string_formatting.py +0 -0
  149. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/sys_deprecations.py +0 -0
  150. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/sys_last_deprecations.py +0 -0
  151. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/tarfile_deprecations.py +0 -0
  152. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/telnetlib_migrations.py +0 -0
  153. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/tempfile_deprecations.py +0 -0
  154. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/threading_deprecations.py +0 -0
  155. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/threading_is_alive_deprecation.py +0 -0
  156. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/typing_callable.py +0 -0
  157. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/typing_functional_syntax.py +0 -0
  158. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/typing_union_to_pipe.py +0 -0
  159. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/unittest_deprecations.py +0 -0
  160. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/upgrade_to_langchain02.py +0 -0
  161. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/upgrade_to_langchain1.py +0 -0
  162. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/upgrade_to_pandas.py +0 -0
  163. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/upgrade_to_pydantic.py +0 -0
  164. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/upgrade_to_python310.py +0 -0
  165. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/upgrade_to_python311.py +0 -0
  166. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/upgrade_to_python38.py +0 -0
  167. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/urllib_deprecations.py +0 -0
  168. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/uu_migrations.py +0 -0
  169. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/xdrlib_migrations.py +0 -0
  170. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python/migrate/xml_deprecations.py +0 -0
  171. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python.egg-info/dependency_links.txt +0 -0
  172. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python.egg-info/entry_points.txt +0 -0
  173. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python.egg-info/requires.txt +0 -0
  174. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/src/openrewrite_migrate_python.egg-info/top_level.txt +0 -0
  175. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_aifc_migrations.py +0 -0
  176. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_ast_deprecations.py +0 -0
  177. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_asyncio_coroutine_to_async.py +0 -0
  178. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_avro_migrations.py +0 -0
  179. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_backoff_to_tenacity.py +0 -0
  180. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_calendar_deprecations.py +0 -0
  181. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_cgi_escape_deprecations.py +0 -0
  182. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_cgi_parse_deprecations.py +0 -0
  183. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_change_import_recipes.py +0 -0
  184. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_configparser_deprecations.py +0 -0
  185. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_datetime_utc.py +0 -0
  186. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_distutils_deprecations.py +0 -0
  187. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_distutils_migrations.py +0 -0
  188. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_functools_deprecations.py +0 -0
  189. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_future_imports.py +0 -0
  190. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_gettext_deprecations.py +0 -0
  191. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_html_parser_deprecations.py +0 -0
  192. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_imp_migrations.py +0 -0
  193. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_importlib_resources_deprecations.py +0 -0
  194. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_inspect_deprecations.py +0 -0
  195. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_langchain_classic_imports.py +0 -0
  196. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_langchain_community_imports.py +0 -0
  197. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_langchain_provider_imports.py +0 -0
  198. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_locale_deprecations.py +0 -0
  199. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_locale_getdefaultlocale_deprecation.py +0 -0
  200. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_macpath_deprecations.py +0 -0
  201. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_mailcap_migrations.py +0 -0
  202. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_markers.py +0 -0
  203. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_module_cached_attribute.py +0 -0
  204. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_os_deprecations.py +0 -0
  205. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_pep594_migrations.py +0 -0
  206. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_pep594_system_migrations.py +0 -0
  207. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_pkgutil_deprecations.py +0 -0
  208. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_pydantic_deprecations.py +0 -0
  209. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_pydantic_fields.py +0 -0
  210. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_pydantic_model_fields.py +0 -0
  211. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_re_deprecations.py +0 -0
  212. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_removed_modules_312.py +0 -0
  213. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_shutil_deprecations.py +0 -0
  214. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_socket_deprecations.py +0 -0
  215. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_ssl_deprecations.py +0 -0
  216. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_string_formatting.py +0 -0
  217. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_sys_deprecations.py +0 -0
  218. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_sys_last_deprecations.py +0 -0
  219. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_tarfile_deprecations.py +0 -0
  220. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_tempfile_deprecations.py +0 -0
  221. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_threading_deprecations.py +0 -0
  222. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_threading_extended.py +0 -0
  223. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_threading_is_alive_deprecation.py +0 -0
  224. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_typing_alias_moves.py +0 -0
  225. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_typing_callable.py +0 -0
  226. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_typing_functional_syntax.py +0 -0
  227. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_typing_union_to_pipe.py +0 -0
  228. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_unittest_deprecations.py +0 -0
  229. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_upgrade_to_pydantic.py +0 -0
  230. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_urllib_deprecations.py +0 -0
  231. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/tests/test_xdrlib_migrations.py +0 -0
  232. {openrewrite_migrate_python-0.17.0.dev20261022150922 → openrewrite_migrate_python-0.17.0.dev20261022194832}/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.17.0.dev20261022150922
3
+ Version: 0.17.0.dev20261022194832
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.17.0.dev20261022150922" # Updated dynamically during release
8
+ version = "0.17.0.dev20261022194832" # 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"
@@ -20,7 +20,7 @@ from .aifc_migrations import (
20
20
  FindSndhdrModule,
21
21
  FindSunauModule,
22
22
  )
23
- from .array_deprecations import ReplaceArrayFromstring, ReplaceArrayTostring
23
+ from .array_deprecations import FindArrayUnicodeTypecode, ReplaceArrayFromstring, ReplaceArrayTostring
24
24
  from .ast_deprecations import (
25
25
  ReplaceAstBytes,
26
26
  ReplaceAstEllipsis,
@@ -29,30 +29,38 @@ from .ast_deprecations import (
29
29
  ReplaceAstStr,
30
30
  )
31
31
  from .asyncio_coroutine_to_async import MigrateAsyncioCoroutine
32
- from .asyncio_deprecations import FindAsyncioCoroutineDecorator
32
+ from .asyncio_deprecations import (
33
+ FindAsyncioCoroutineDecorator,
34
+ FindAsyncioEventLoopPolicy,
35
+ ReplaceAsyncioIscoroutinefunction,
36
+ )
33
37
  from .avro_migrations import MigrateAvroPython3ToAvro
34
38
  from .backoff_to_tenacity import (
35
39
  FindBackoffDecoratorsNotMigrated,
36
40
  MigrateBackoffToTenacity,
37
41
  ReplaceBackoffDecoratorsWithTenacity,
38
42
  )
43
+ from .builtins_deprecations import FindBitwiseInversionOnBool
39
44
  from .calendar_deprecations import ReplaceCalendarConstants
40
45
  from .cgi_migrations import FindCgiModule, FindCgitbModule
41
46
  from .cgi_parse_deprecations import ReplaceCgiParseQs, ReplaceCgiParseQsl
42
- from .collections_abc_migrations import ReplaceCollectionsAbcImports
47
+ from .collections_abc_migrations import FindByteString, ReplaceCollectionsAbcImports
43
48
  from .configparser_deprecations import (
44
49
  ReplaceConfigparserReadfp,
45
50
  ReplaceConfigparserSafeConfigParser,
46
51
  )
52
+ from .ctypes_deprecations import FindCtypesSetPointerType
47
53
  from .datetime_utc import ReplaceDatetimeUtcFromTimestamp, ReplaceDatetimeUtcNow
48
54
  from .distutils_deprecations import FindDistutilsUsage
49
55
  from .distutils_migrations import ReplaceDistutilsVersion
50
56
  from .functools_deprecations import FindFunctoolsCmpToKey
51
57
  from .future_imports import RemoveFutureImports
52
58
  from .gettext_deprecations import ReplaceGettextDeprecations
53
- from .glob_deprecations import ReplaceGlobGlob1
59
+ from .glob_deprecations import FindGlobGlob0, ReplaceGlobGlob1
54
60
  from .html_parser_deprecations import ReplaceHtmlParserUnescape
61
+ from .http_server_deprecations import FindCgiHttpRequestHandler
55
62
  from .imp_migrations import FindImpUsage
63
+ from .importlib_deprecations import FindLoaderLoadModule
56
64
  from .importlib_resources_deprecations import ReplaceImportlibResourcesFilesPackage
57
65
  from .inspect_deprecations import FindInspectGetargspec
58
66
  from .locale_deprecations import ReplaceLocaleResetlocale
@@ -62,8 +70,8 @@ from .mailcap_migrations import FindMailcapModule
62
70
  from .module_cached_attribute import ReplaceModuleCachedAttribute
63
71
  from .nntplib_migrations import FindNntplibModule
64
72
  from .os_deprecations import FindOsPopen, FindOsSpawn
65
- from .pathlib_deprecations import FindPathlibLinkTo
66
- from .platform_deprecations import ReplacePlatformPopen
73
+ from .pathlib_deprecations import FindPathlibIsReserved, FindPathlibLinkTo
74
+ from .platform_deprecations import FindPlatformJavaVer, ReplacePlatformPopen
67
75
  from .pep594_system_migrations import (
68
76
  FindCryptModule,
69
77
  FindMsilibModule,
@@ -73,6 +81,7 @@ from .pep594_system_migrations import (
73
81
  )
74
82
  from .pipes_migrations import FindPipesModule
75
83
  from .pkgutil_deprecations import ReplacePkgutilFindLoader, ReplacePkgutilGetLoader
84
+ from .profile_deprecations import FindProfileModule
76
85
  from .pydantic_deprecations import (
77
86
  FindDeprecatedJsonEncoders,
78
87
  FindDeprecatedSchemaGenerator,
@@ -88,6 +97,7 @@ from .re_deprecations import ReplaceReTemplate
88
97
  from .removed_modules_312 import FindRemovedModules312
89
98
  from .shutil_deprecations import FindShutilRmtreeOnerror
90
99
  from .socket_deprecations import FindSocketGetFQDN
100
+ from .sre_migrations import FindSreModules
91
101
  from .ssl_deprecations import FindSslMatchHostname
92
102
  from .string_formatting import ReplacePercentFormatWithFString, ReplaceStrFormatWithFString
93
103
  from .sys_deprecations import FindSysCheckInterval, FindSysCoroutineWrapper
@@ -95,6 +105,7 @@ from .sys_last_deprecations import ReplaceSysLastExcInfo
95
105
  from .tarfile_deprecations import ReplaceTarfileFilemode
96
106
  from .telnetlib_migrations import FindTelnetlibModule
97
107
  from .tempfile_deprecations import FindTempfileMktemp
108
+ from .text_encoding import FindImplicitTextEncoding
98
109
  from .threading_is_alive_deprecation import ReplaceThreadIsAlive
99
110
  from .threading_deprecations import (
100
111
  ReplaceConditionNotifyAll,
@@ -106,8 +117,10 @@ from .threading_deprecations import (
106
117
  ReplaceThreadingActiveCount,
107
118
  ReplaceThreadingCurrentThread,
108
119
  )
120
+ from .types_deprecations import FindCodeObjectCoLnotab
109
121
  from .typing_callable import ReplaceTypingCallableWithCollectionsAbcCallable
110
122
  from .typing_deprecations import (
123
+ FindTypingNoTypeCheckDecorator,
111
124
  ReplaceTypingDictWithDict,
112
125
  ReplaceTypingFrozenSetWithFrozenset,
113
126
  ReplaceTypingListWithList,
@@ -140,6 +153,8 @@ from .upgrade_to_pydantic import (
140
153
  )
141
154
  from .urllib_deprecations import FindUrllibParseSplitFunctions, FindUrllibParseToBytes
142
155
  from .uu_migrations import FindUuModule
156
+ from .wave_deprecations import FindWaveMarkers
157
+ from .webbrowser_deprecations import FindWebbrowserMacOSXOSAScript
143
158
  from .xdrlib_migrations import FindXdrlibModule
144
159
  from .xml_deprecations import ReplaceElementGetchildren, ReplaceElementGetiterator
145
160
 
@@ -259,6 +274,27 @@ __all__ = [
259
274
  "ReplaceModuleCachedAttribute",
260
275
  "ReplaceNamedTupleKeywordFields",
261
276
  "ReplaceTypedDictWithoutFields",
277
+ # Detection: Python 3.15
278
+ "FindCgiHttpRequestHandler",
279
+ "FindCodeObjectCoLnotab",
280
+ "FindCtypesSetPointerType",
281
+ "FindGlobGlob0",
282
+ "FindImplicitTextEncoding",
283
+ "FindLoaderLoadModule",
284
+ "FindPathlibIsReserved",
285
+ "FindPlatformJavaVer",
286
+ "FindSreModules",
287
+ "FindTypingNoTypeCheckDecorator",
288
+ "FindWaveMarkers",
289
+ # Auto-fix: Python 3.16 and 3.17 removals
290
+ "ReplaceAsyncioIscoroutinefunction",
291
+ # Detection: Python 3.16 and 3.17 removals
292
+ "FindArrayUnicodeTypecode",
293
+ "FindAsyncioEventLoopPolicy",
294
+ "FindBitwiseInversionOnBool",
295
+ "FindByteString",
296
+ "FindProfileModule",
297
+ "FindWebbrowserMacOSXOSAScript",
262
298
  # Auto-fix: LangChain
263
299
  "ReplaceLangchainCommunityImports",
264
300
  "ReplaceLangchainProviderImports",
@@ -0,0 +1,109 @@
1
+ """Marking calls and module-member references that a recipe only reports."""
2
+
3
+ from typing import Any, Dict, List, Sequence
4
+
5
+ from rewrite import Cursor, ExecutionContext, Preconditions, TreeVisitor
6
+ from rewrite.java.tree import FieldAccess, Identifier, J, MethodInvocation
7
+ from rewrite.python.binding_utils import import_bindings
8
+ from rewrite.python.method_matcher import MethodMatcher
9
+ from rewrite.python.preconditions import uses_import, uses_method
10
+ from rewrite.python.visitor import PythonVisitor
11
+
12
+ from ._markers import mark_deprecated
13
+
14
+
15
+ def module_member_path(cursor: Cursor, node: J) -> str | None:
16
+ """The dotted path ``node`` reads, such as ``http.server.CGIHTTPRequestHandler``, or None.
17
+
18
+ ``cursor`` stands on ``node``. A name answers where a ``from`` import binds it, and a dotted
19
+ attribute where its root name is a module an import binds. A guarded or relative import binds
20
+ a name that may not be the standard library's, so it answers None.
21
+ """
22
+ attributes: List[str] = []
23
+ chain: List[FieldAccess] = []
24
+ root = node
25
+ while isinstance(root, FieldAccess):
26
+ attributes.append(root.name.simple_name)
27
+ chain.append(root)
28
+ root = root.target
29
+ if not isinstance(root, Identifier):
30
+ return None
31
+
32
+ root_cursor = cursor
33
+ for field_access in chain[1:]:
34
+ root_cursor = Cursor(root_cursor, field_access)
35
+ binding = import_bindings(cursor).reference(root_cursor, root)
36
+ if binding is None or binding.guarded or binding.module.startswith(".") or binding.member == "*":
37
+ return None
38
+
39
+ if binding.member is not None:
40
+ base = f"{binding.module}.{binding.member}"
41
+ elif binding.name == binding.module.split(".")[0]:
42
+ # `import http.server` binds `http`, and the code spells the rest of the path itself.
43
+ base = binding.name
44
+ else:
45
+ base = binding.module
46
+ return ".".join([base, *reversed(attributes)])
47
+
48
+
49
+ def _gate(refs: Sequence[Any]) -> Any:
50
+ return refs[0] if len(refs) == 1 else Preconditions.or_(*refs)
51
+
52
+
53
+ def find_calls(
54
+ patterns: Sequence[str], message: str, match_overrides: bool = False
55
+ ) -> TreeVisitor[Any, ExecutionContext]:
56
+ """Marks each call matching one of ``patterns``."""
57
+ matchers = [MethodMatcher.create(p, match_overrides=match_overrides) for p in patterns]
58
+
59
+ class Visitor(PythonVisitor[ExecutionContext]):
60
+ def visit_method_invocation(self, method: MethodInvocation, p: ExecutionContext) -> J:
61
+ m = super().visit_method_invocation(method, p)
62
+ if isinstance(m, MethodInvocation) and any(mm.matches(m, cursor=self.cursor) for mm in matchers):
63
+ return mark_deprecated(m, message)
64
+ return m
65
+
66
+ return Preconditions.check(
67
+ _gate([uses_method(p, match_overrides=match_overrides) for p in patterns]), Visitor()
68
+ )
69
+
70
+
71
+ def find_member_references(messages: Dict[str, str]) -> TreeVisitor[Any, ExecutionContext]:
72
+ """Marks every use of a module member in ``messages``, keyed by its dotted path, called or not.
73
+
74
+ A use reaches the visitor in one of three shapes, one ``visit_*`` method each:
75
+
76
+ - a name a ``from`` import binds: ``CGIHTTPRequestHandler``, also as the name of a call
77
+ - a dotted attribute: ``http.server.CGIHTTPRequestHandler``
78
+ - a dotted call, held as a method invocation whose ``select`` is the owner rather than as a
79
+ field access: ``http.server.CGIHTTPRequestHandler(...)``
80
+
81
+ A name or attribute that no import binds to the module, such as ``obj.CGIHTTPRequestHandler``,
82
+ is left alone.
83
+ """
84
+ modules = {path.rsplit(".", 1)[0] for path in messages}
85
+
86
+ class Visitor(PythonVisitor[ExecutionContext]):
87
+ def visit_method_invocation(self, method: MethodInvocation, p: ExecutionContext) -> J:
88
+ m = super().visit_method_invocation(method, p)
89
+ if not isinstance(m, MethodInvocation) or m.select is None:
90
+ return m
91
+ owner = module_member_path(Cursor(self.cursor, m.select), m.select)
92
+ message = messages.get(f"{owner}.{m.name.simple_name}") if owner else None
93
+ return mark_deprecated(m, message) if message else m
94
+
95
+ def visit_field_access(self, field_access: FieldAccess, p: ExecutionContext) -> J:
96
+ fa = super().visit_field_access(field_access, p)
97
+ if not isinstance(fa, FieldAccess):
98
+ return fa
99
+ message = messages.get(module_member_path(self.cursor, fa) or "")
100
+ return mark_deprecated(fa, message) if message else fa
101
+
102
+ def visit_identifier(self, ident: Identifier, p: ExecutionContext) -> J:
103
+ i = super().visit_identifier(ident, p)
104
+ if not isinstance(i, Identifier):
105
+ return i
106
+ message = messages.get(module_member_path(self.cursor, i) or "")
107
+ return mark_deprecated(i, message) if message else i
108
+
109
+ return Preconditions.check(_gate([uses_import(m) for m in sorted(modules)]), Visitor())
@@ -0,0 +1,201 @@
1
+ """
2
+ Recipes for migrating deprecated array module methods.
3
+
4
+ The following methods were deprecated in Python 3.2 and removed in Python 3.9:
5
+ - ``array.tostring()`` -> ``array.tobytes()``
6
+ - ``array.fromstring()`` -> ``array.frombytes()``
7
+
8
+ The ``'u'`` typecode was deprecated in Python 3.13 and is scheduled for
9
+ removal in Python 3.16; ``FindArrayUnicodeTypecode`` reports it.
10
+
11
+ See: https://docs.python.org/3/library/array.html
12
+ """
13
+
14
+ from typing import Any, List, Optional
15
+
16
+ from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
17
+ from rewrite.category import CategoryDescriptor
18
+ from rewrite.decorators import categorize
19
+ from rewrite.java.tree import Empty, Identifier, J, Literal, MethodInvocation
20
+ from rewrite.marketplace import Python
21
+ from rewrite.python.method_matcher import MethodMatcher
22
+ from rewrite.python.preconditions import uses_method
23
+ from rewrite.python.tree import NamedArgument
24
+ from rewrite.python.visitor import PythonVisitor
25
+
26
+ from ._markers import mark_deprecated
27
+ from ._method_renames import rename_methods
28
+
29
+ # Define category path: Python > Migrate > Python 3.9
30
+ _Python39 = [
31
+ *Python,
32
+ CategoryDescriptor(display_name="Migrate"),
33
+ CategoryDescriptor(display_name="Python 3.9"),
34
+ ]
35
+
36
+ # Define category path: Python > Migrate > Python 3.13
37
+ _Python313 = [
38
+ *Python,
39
+ CategoryDescriptor(display_name="Migrate"),
40
+ CategoryDescriptor(display_name="Python 3.13"),
41
+ ]
42
+
43
+
44
+ @categorize(_Python39)
45
+ class ReplaceArrayTostring(Recipe):
46
+ """
47
+ Replace ``array.tostring()`` with ``array.tobytes()``.
48
+
49
+ The ``tostring()`` method was deprecated in Python 3.2 and removed in
50
+ Python 3.9. ``tobytes()`` behaves identically.
51
+
52
+ Example:
53
+ Before:
54
+ import array
55
+ my_array = array.array("b", b"ab")
56
+ data = my_array.tostring()
57
+
58
+ After:
59
+ import array
60
+ my_array = array.array("b", b"ab")
61
+ data = my_array.tobytes()
62
+ """
63
+
64
+ @property
65
+ def name(self) -> str:
66
+ return "org.openrewrite.python.migrate.ReplaceArrayTostring"
67
+
68
+ @property
69
+ def display_name(self) -> str:
70
+ return "Replace `array.tostring()` with `array.tobytes()`"
71
+
72
+ @property
73
+ def description(self) -> str:
74
+ return (
75
+ "Replace `tostring()` with `tobytes()` on array objects. "
76
+ "The `tostring()` method was deprecated in Python 3.2 and removed in 3.9. "
77
+ "Only fires where the receiver's type resolves to `array.array` or a subclass."
78
+ )
79
+
80
+ @property
81
+ def tags(self) -> List[str]:
82
+ return ["python", "migration", "3.9", "array"]
83
+
84
+ def editor(self) -> TreeVisitor[Any, ExecutionContext]:
85
+ return rename_methods("array.array", {"tostring": "tobytes"})
86
+
87
+
88
+ @categorize(_Python39)
89
+ class ReplaceArrayFromstring(Recipe):
90
+ """
91
+ Replace ``array.fromstring()`` with ``array.frombytes()``.
92
+
93
+ The ``fromstring()`` method was deprecated in Python 3.2 and removed in
94
+ Python 3.9. ``frombytes()`` behaves identically.
95
+
96
+ Example:
97
+ Before:
98
+ import array
99
+ my_array = array.array("b")
100
+ my_array.fromstring(data)
101
+
102
+ After:
103
+ import array
104
+ my_array = array.array("b")
105
+ my_array.frombytes(data)
106
+ """
107
+
108
+ @property
109
+ def name(self) -> str:
110
+ return "org.openrewrite.python.migrate.ReplaceArrayFromstring"
111
+
112
+ @property
113
+ def display_name(self) -> str:
114
+ return "Replace `array.fromstring()` with `array.frombytes()`"
115
+
116
+ @property
117
+ def description(self) -> str:
118
+ return (
119
+ "Replace `fromstring()` with `frombytes()` on array objects. "
120
+ "The `fromstring()` method was deprecated in Python 3.2 and removed in 3.9. "
121
+ "Only fires where the receiver's type resolves to `array.array` or a subclass."
122
+ )
123
+
124
+ @property
125
+ def tags(self) -> List[str]:
126
+ return ["python", "migration", "3.9", "array"]
127
+
128
+ def editor(self) -> TreeVisitor[Any, ExecutionContext]:
129
+ return rename_methods("array.array", {"fromstring": "frombytes"})
130
+
131
+
132
+ _ARRAY = "array.array <constructor>(..)"
133
+ _ARRAY_MATCHER = MethodMatcher.create(_ARRAY)
134
+
135
+
136
+ def _typecode(call: MethodInvocation) -> Optional[J]:
137
+ for arg in call.arguments:
138
+ if isinstance(arg, NamedArgument):
139
+ if isinstance(arg.name, Identifier) and arg.name.simple_name == "typecode":
140
+ return arg.value
141
+ elif not isinstance(arg, Empty):
142
+ return arg
143
+ return None
144
+
145
+
146
+ @categorize(_Python313)
147
+ class FindArrayUnicodeTypecode(Recipe):
148
+ """
149
+ Find arrays created with the `'u'` typecode, deprecated in Python 3.13
150
+ and scheduled for removal in Python 3.16.
151
+
152
+ `'u'` stores `wchar_t`, two bytes on Windows and four elsewhere. `'w'`
153
+ stores `Py_UCS4`, four bytes everywhere, so code reading the array's raw
154
+ bytes on Windows needs adjusting too.
155
+
156
+ Example:
157
+ Before:
158
+ import array
159
+ chars = array.array("u", "hello")
160
+
161
+ After:
162
+ import array
163
+ chars = array.array("w", "hello")
164
+ """
165
+
166
+ @property
167
+ def name(self) -> str:
168
+ return "org.openrewrite.python.migrate.FindArrayUnicodeTypecode"
169
+
170
+ @property
171
+ def display_name(self) -> str:
172
+ return "Find `array` `'u'` typecode"
173
+
174
+ @property
175
+ def description(self) -> str:
176
+ return (
177
+ "The `'u'` typecode of `array.array` was deprecated in Python 3.13 and is scheduled for "
178
+ "removal in Python 3.16. Use `'w'`, which stores 4-byte `Py_UCS4` code points where `'u'` "
179
+ "stored the platform's `wchar_t`, 2 bytes on Windows."
180
+ )
181
+
182
+ @property
183
+ def tags(self) -> List[str]:
184
+ return ["python", "migration", "3.13", "3.16", "array"]
185
+
186
+ def editor(self) -> TreeVisitor[Any, ExecutionContext]:
187
+ class Visitor(PythonVisitor[ExecutionContext]):
188
+ def visit_method_invocation(self, method: MethodInvocation, p: ExecutionContext) -> J:
189
+ m = super().visit_method_invocation(method, p)
190
+ if not isinstance(m, MethodInvocation) or not _ARRAY_MATCHER.matches(m, cursor=self.cursor):
191
+ return m
192
+ typecode = _typecode(m)
193
+ if isinstance(typecode, Literal) and typecode.value == "u":
194
+ return mark_deprecated(
195
+ m,
196
+ "The 'u' array typecode is deprecated and removed in Python 3.16. "
197
+ "Use 'w' (4-byte Py_UCS4) instead.",
198
+ )
199
+ return m
200
+
201
+ return Preconditions.check(uses_method(_ARRAY), Visitor())
@@ -13,10 +13,14 @@ becomes:
13
13
  async def my_func():
14
14
  await something()
15
15
 
16
+ ``asyncio.iscoroutinefunction()`` and the event loop policy system were
17
+ deprecated in Python 3.14 and are scheduled for removal in Python 3.16.
18
+
16
19
  See: https://docs.python.org/3/library/asyncio-task.html
20
+ See: https://docs.python.org/3/deprecations/pending-removal-in-3.16.html
17
21
  """
18
22
 
19
- from typing import Any
23
+ from typing import Any, List
20
24
 
21
25
  from rewrite import ExecutionContext, Preconditions, Recipe, TreeVisitor
22
26
  from rewrite.category import CategoryDescriptor
@@ -24,8 +28,10 @@ from rewrite.decorators import categorize
24
28
  from rewrite.marketplace import Python
25
29
  from rewrite.python.binding_utils import import_bindings
26
30
  from rewrite.python.preconditions import uses_import
31
+ from rewrite.python.recipes import ChangeImport
27
32
  from rewrite.python.visitor import PythonVisitor
28
33
  from rewrite.java.tree import FieldAccess, Identifier, J
34
+ from ._finders import find_member_references
29
35
  from ._markers import mark_deprecated
30
36
 
31
37
  # Define category path: Python > Migrate > Python 3.11
@@ -35,6 +41,13 @@ _Python311 = [
35
41
  CategoryDescriptor(display_name="Python 3.11"),
36
42
  ]
37
43
 
44
+ # Define category path: Python > Migrate > Python 3.14
45
+ _Python314 = [
46
+ *Python,
47
+ CategoryDescriptor(display_name="Migrate"),
48
+ CategoryDescriptor(display_name="Python 3.14"),
49
+ ]
50
+
38
51
 
39
52
  def _mark(tree: J) -> J:
40
53
  return mark_deprecated(
@@ -106,3 +119,104 @@ class FindAsyncioCoroutineDecorator(Recipe):
106
119
  return _mark(i)
107
120
 
108
121
  return Preconditions.check(uses_import("asyncio"), Visitor())
122
+
123
+
124
+ @categorize(_Python314)
125
+ class ReplaceAsyncioIscoroutinefunction(Recipe):
126
+ """
127
+ Replace `asyncio.iscoroutinefunction()` with
128
+ `inspect.iscoroutinefunction()`.
129
+
130
+ Example:
131
+ Before:
132
+ import asyncio
133
+ asyncio.iscoroutinefunction(handler)
134
+
135
+ After:
136
+ import inspect
137
+ inspect.iscoroutinefunction(handler)
138
+ """
139
+
140
+ @property
141
+ def name(self) -> str:
142
+ return "org.openrewrite.python.migrate.ReplaceAsyncioIscoroutinefunction"
143
+
144
+ @property
145
+ def display_name(self) -> str:
146
+ return "Replace `asyncio.iscoroutinefunction()` with `inspect.iscoroutinefunction()`"
147
+
148
+ @property
149
+ def description(self) -> str:
150
+ return (
151
+ "`asyncio.iscoroutinefunction()` was deprecated in Python 3.14 and is scheduled for "
152
+ "removal in Python 3.16. Use `inspect.iscoroutinefunction()` instead."
153
+ )
154
+
155
+ @property
156
+ def tags(self) -> List[str]:
157
+ return ["python", "migration", "3.14", "3.16", "asyncio"]
158
+
159
+ def recipe_list(self) -> List[Recipe]:
160
+ return [
161
+ ChangeImport(
162
+ old_module="asyncio",
163
+ old_name="iscoroutinefunction",
164
+ new_module="inspect",
165
+ new_name="iscoroutinefunction",
166
+ )
167
+ ]
168
+
169
+
170
+ _POLICY_MESSAGE = (
171
+ "The asyncio policy system is deprecated and removed in Python 3.16. "
172
+ "Pass loop_factory to asyncio.run() or asyncio.Runner instead."
173
+ )
174
+ _POLICY_MEMBERS = (
175
+ "AbstractEventLoopPolicy",
176
+ "DefaultEventLoopPolicy",
177
+ "WindowsSelectorEventLoopPolicy",
178
+ "WindowsProactorEventLoopPolicy",
179
+ "get_event_loop_policy",
180
+ "set_event_loop_policy",
181
+ )
182
+
183
+
184
+ @categorize(_Python314)
185
+ class FindAsyncioEventLoopPolicy(Recipe):
186
+ """
187
+ Find uses of the asyncio policy system, deprecated in Python 3.14 and
188
+ scheduled for removal in Python 3.16.
189
+
190
+ Example:
191
+ Before:
192
+ import asyncio
193
+ asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
194
+ asyncio.run(main())
195
+
196
+ After:
197
+ import asyncio
198
+ asyncio.run(main(), loop_factory=asyncio.SelectorEventLoop)
199
+ """
200
+
201
+ @property
202
+ def name(self) -> str:
203
+ return "org.openrewrite.python.migrate.FindAsyncioEventLoopPolicy"
204
+
205
+ @property
206
+ def display_name(self) -> str:
207
+ return "Find deprecated asyncio event loop policies"
208
+
209
+ @property
210
+ def description(self) -> str:
211
+ return (
212
+ "The asyncio policy system (`get_event_loop_policy()`, `set_event_loop_policy()` and the "
213
+ "`*EventLoopPolicy` classes) was deprecated in Python 3.14 and is scheduled for removal "
214
+ "in Python 3.16. Pass `loop_factory` to `asyncio.run()` or `asyncio.Runner` instead."
215
+ )
216
+
217
+ @property
218
+ def tags(self) -> List[str]:
219
+ return ["python", "migration", "3.14", "3.16", "asyncio"]
220
+
221
+ def editor(self) -> TreeVisitor[Any, ExecutionContext]:
222
+ return find_member_references({f"asyncio.{member}": _POLICY_MESSAGE for member in _POLICY_MEMBERS})