alembic 1.16.2__tar.gz → 1.16.4__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 (245) hide show
  1. {alembic-1.16.2/alembic.egg-info → alembic-1.16.4}/PKG-INFO +1 -1
  2. {alembic-1.16.2 → alembic-1.16.4}/alembic/__init__.py +1 -1
  3. {alembic-1.16.2 → alembic-1.16.4}/alembic/autogenerate/render.py +17 -4
  4. {alembic-1.16.2 → alembic-1.16.4}/alembic/config.py +16 -1
  5. {alembic-1.16.2 → alembic-1.16.4}/alembic/script/base.py +2 -4
  6. {alembic-1.16.2 → alembic-1.16.4}/alembic/script/write_hooks.py +42 -44
  7. {alembic-1.16.2/alembic/templates/generic → alembic-1.16.4/alembic/templates/async}/alembic.ini.mako +9 -3
  8. {alembic-1.16.2/alembic/templates/async → alembic-1.16.4/alembic/templates/generic}/alembic.ini.mako +9 -3
  9. {alembic-1.16.2 → alembic-1.16.4}/alembic/templates/multidb/alembic.ini.mako +8 -2
  10. {alembic-1.16.2 → alembic-1.16.4}/alembic/templates/pyproject/pyproject.toml.mako +9 -3
  11. alembic-1.16.4/alembic/templates/pyproject_async/README +1 -0
  12. alembic-1.16.4/alembic/templates/pyproject_async/alembic.ini.mako +44 -0
  13. alembic-1.16.4/alembic/templates/pyproject_async/env.py +89 -0
  14. alembic-1.16.4/alembic/templates/pyproject_async/pyproject.toml.mako +82 -0
  15. alembic-1.16.4/alembic/templates/pyproject_async/script.py.mako +28 -0
  16. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/__init__.py +1 -0
  17. {alembic-1.16.2 → alembic-1.16.4}/alembic/util/sqla_compat.py +2 -4
  18. {alembic-1.16.2 → alembic-1.16.4/alembic.egg-info}/PKG-INFO +1 -1
  19. {alembic-1.16.2 → alembic-1.16.4}/alembic.egg-info/SOURCES.txt +10 -0
  20. {alembic-1.16.2/docs/build → alembic-1.16.4/docs/_sources}/autogenerate.rst +13 -6
  21. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/changelog.rst +55 -0
  22. {alembic-1.16.2/docs/build → alembic-1.16.4/docs/_sources}/cookbook.rst +2 -2
  23. {alembic-1.16.2/docs/build → alembic-1.16.4/docs/_sources}/tutorial.rst +8 -2
  24. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/documentation_options.js +1 -1
  25. {alembic-1.16.2 → alembic-1.16.4}/docs/api/autogenerate.html +3 -3
  26. {alembic-1.16.2 → alembic-1.16.4}/docs/api/commands.html +3 -3
  27. {alembic-1.16.2 → alembic-1.16.4}/docs/api/config.html +3 -3
  28. {alembic-1.16.2 → alembic-1.16.4}/docs/api/ddl.html +3 -3
  29. {alembic-1.16.2 → alembic-1.16.4}/docs/api/index.html +3 -3
  30. {alembic-1.16.2 → alembic-1.16.4}/docs/api/operations.html +3 -3
  31. {alembic-1.16.2 → alembic-1.16.4}/docs/api/overview.html +3 -3
  32. {alembic-1.16.2 → alembic-1.16.4}/docs/api/runtime.html +3 -3
  33. {alembic-1.16.2 → alembic-1.16.4}/docs/api/script.html +3 -3
  34. {alembic-1.16.2 → alembic-1.16.4}/docs/autogenerate.html +18 -10
  35. {alembic-1.16.2 → alembic-1.16.4}/docs/batch.html +3 -3
  36. {alembic-1.16.2 → alembic-1.16.4}/docs/branches.html +3 -3
  37. {alembic-1.16.2/docs/_sources → alembic-1.16.4/docs/build}/autogenerate.rst +13 -6
  38. {alembic-1.16.2 → alembic-1.16.4}/docs/build/changelog.rst +55 -0
  39. {alembic-1.16.2 → alembic-1.16.4}/docs/build/conf.py +2 -2
  40. {alembic-1.16.2/docs/_sources → alembic-1.16.4/docs/build}/cookbook.rst +2 -2
  41. {alembic-1.16.2/docs/_sources → alembic-1.16.4/docs/build}/tutorial.rst +8 -2
  42. {alembic-1.16.2 → alembic-1.16.4}/docs/changelog.html +77 -3
  43. {alembic-1.16.2 → alembic-1.16.4}/docs/cookbook.html +5 -5
  44. {alembic-1.16.2 → alembic-1.16.4}/docs/front.html +3 -3
  45. {alembic-1.16.2 → alembic-1.16.4}/docs/genindex.html +3 -3
  46. {alembic-1.16.2 → alembic-1.16.4}/docs/index.html +12 -3
  47. {alembic-1.16.2 → alembic-1.16.4}/docs/naming.html +3 -3
  48. {alembic-1.16.2 → alembic-1.16.4}/docs/offline.html +3 -3
  49. {alembic-1.16.2 → alembic-1.16.4}/docs/ops.html +3 -3
  50. {alembic-1.16.2 → alembic-1.16.4}/docs/py-modindex.html +3 -3
  51. {alembic-1.16.2 → alembic-1.16.4}/docs/search.html +3 -3
  52. alembic-1.16.4/docs/searchindex.js +1 -0
  53. {alembic-1.16.2 → alembic-1.16.4}/docs/tutorial.html +11 -5
  54. {alembic-1.16.2 → alembic-1.16.4}/setup.cfg +1 -0
  55. {alembic-1.16.2 → alembic-1.16.4}/tests/test_autogen_render.py +35 -0
  56. {alembic-1.16.2 → alembic-1.16.4}/tests/test_config.py +44 -0
  57. {alembic-1.16.2 → alembic-1.16.4}/tests/test_mysql.py +18 -0
  58. {alembic-1.16.2 → alembic-1.16.4}/tests/test_post_write.py +191 -0
  59. {alembic-1.16.2 → alembic-1.16.4}/tests/test_script_production.py +101 -0
  60. {alembic-1.16.2 → alembic-1.16.4}/tox.ini +1 -1
  61. alembic-1.16.2/docs/searchindex.js +0 -1
  62. {alembic-1.16.2 → alembic-1.16.4}/CHANGES +0 -0
  63. {alembic-1.16.2 → alembic-1.16.4}/LICENSE +0 -0
  64. {alembic-1.16.2 → alembic-1.16.4}/MANIFEST.in +0 -0
  65. {alembic-1.16.2 → alembic-1.16.4}/README.rst +0 -0
  66. {alembic-1.16.2 → alembic-1.16.4}/README.unittests.rst +0 -0
  67. {alembic-1.16.2 → alembic-1.16.4}/alembic/__main__.py +0 -0
  68. {alembic-1.16.2 → alembic-1.16.4}/alembic/autogenerate/__init__.py +0 -0
  69. {alembic-1.16.2 → alembic-1.16.4}/alembic/autogenerate/api.py +0 -0
  70. {alembic-1.16.2 → alembic-1.16.4}/alembic/autogenerate/compare.py +0 -0
  71. {alembic-1.16.2 → alembic-1.16.4}/alembic/autogenerate/rewriter.py +0 -0
  72. {alembic-1.16.2 → alembic-1.16.4}/alembic/command.py +0 -0
  73. {alembic-1.16.2 → alembic-1.16.4}/alembic/context.py +0 -0
  74. {alembic-1.16.2 → alembic-1.16.4}/alembic/context.pyi +0 -0
  75. {alembic-1.16.2 → alembic-1.16.4}/alembic/ddl/__init__.py +0 -0
  76. {alembic-1.16.2 → alembic-1.16.4}/alembic/ddl/_autogen.py +0 -0
  77. {alembic-1.16.2 → alembic-1.16.4}/alembic/ddl/base.py +0 -0
  78. {alembic-1.16.2 → alembic-1.16.4}/alembic/ddl/impl.py +0 -0
  79. {alembic-1.16.2 → alembic-1.16.4}/alembic/ddl/mssql.py +0 -0
  80. {alembic-1.16.2 → alembic-1.16.4}/alembic/ddl/mysql.py +0 -0
  81. {alembic-1.16.2 → alembic-1.16.4}/alembic/ddl/oracle.py +0 -0
  82. {alembic-1.16.2 → alembic-1.16.4}/alembic/ddl/postgresql.py +0 -0
  83. {alembic-1.16.2 → alembic-1.16.4}/alembic/ddl/sqlite.py +0 -0
  84. {alembic-1.16.2 → alembic-1.16.4}/alembic/environment.py +0 -0
  85. {alembic-1.16.2 → alembic-1.16.4}/alembic/migration.py +0 -0
  86. {alembic-1.16.2 → alembic-1.16.4}/alembic/op.py +0 -0
  87. {alembic-1.16.2 → alembic-1.16.4}/alembic/op.pyi +0 -0
  88. {alembic-1.16.2 → alembic-1.16.4}/alembic/operations/__init__.py +0 -0
  89. {alembic-1.16.2 → alembic-1.16.4}/alembic/operations/base.py +0 -0
  90. {alembic-1.16.2 → alembic-1.16.4}/alembic/operations/batch.py +0 -0
  91. {alembic-1.16.2 → alembic-1.16.4}/alembic/operations/ops.py +0 -0
  92. {alembic-1.16.2 → alembic-1.16.4}/alembic/operations/schemaobj.py +0 -0
  93. {alembic-1.16.2 → alembic-1.16.4}/alembic/operations/toimpl.py +0 -0
  94. {alembic-1.16.2 → alembic-1.16.4}/alembic/py.typed +0 -0
  95. {alembic-1.16.2 → alembic-1.16.4}/alembic/runtime/__init__.py +0 -0
  96. {alembic-1.16.2 → alembic-1.16.4}/alembic/runtime/environment.py +0 -0
  97. {alembic-1.16.2 → alembic-1.16.4}/alembic/runtime/migration.py +0 -0
  98. {alembic-1.16.2 → alembic-1.16.4}/alembic/script/__init__.py +0 -0
  99. {alembic-1.16.2 → alembic-1.16.4}/alembic/script/revision.py +0 -0
  100. {alembic-1.16.2 → alembic-1.16.4}/alembic/templates/async/README +0 -0
  101. {alembic-1.16.2 → alembic-1.16.4}/alembic/templates/async/env.py +0 -0
  102. {alembic-1.16.2 → alembic-1.16.4}/alembic/templates/async/script.py.mako +0 -0
  103. {alembic-1.16.2 → alembic-1.16.4}/alembic/templates/generic/README +0 -0
  104. {alembic-1.16.2 → alembic-1.16.4}/alembic/templates/generic/env.py +0 -0
  105. {alembic-1.16.2 → alembic-1.16.4}/alembic/templates/generic/script.py.mako +0 -0
  106. {alembic-1.16.2 → alembic-1.16.4}/alembic/templates/multidb/README +0 -0
  107. {alembic-1.16.2 → alembic-1.16.4}/alembic/templates/multidb/env.py +0 -0
  108. {alembic-1.16.2 → alembic-1.16.4}/alembic/templates/multidb/script.py.mako +0 -0
  109. {alembic-1.16.2 → alembic-1.16.4}/alembic/templates/pyproject/README +0 -0
  110. {alembic-1.16.2 → alembic-1.16.4}/alembic/templates/pyproject/alembic.ini.mako +0 -0
  111. {alembic-1.16.2 → alembic-1.16.4}/alembic/templates/pyproject/env.py +0 -0
  112. {alembic-1.16.2 → alembic-1.16.4}/alembic/templates/pyproject/script.py.mako +0 -0
  113. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/assertions.py +0 -0
  114. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/env.py +0 -0
  115. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/fixtures.py +0 -0
  116. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/plugin/__init__.py +0 -0
  117. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/plugin/bootstrap.py +0 -0
  118. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/requirements.py +0 -0
  119. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/schemacompare.py +0 -0
  120. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/suite/__init__.py +0 -0
  121. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/suite/_autogen_fixtures.py +0 -0
  122. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/suite/test_autogen_comments.py +0 -0
  123. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/suite/test_autogen_computed.py +0 -0
  124. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/suite/test_autogen_diffs.py +0 -0
  125. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/suite/test_autogen_fks.py +0 -0
  126. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/suite/test_autogen_identity.py +0 -0
  127. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/suite/test_environment.py +0 -0
  128. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/suite/test_op.py +0 -0
  129. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/util.py +0 -0
  130. {alembic-1.16.2 → alembic-1.16.4}/alembic/testing/warnings.py +0 -0
  131. {alembic-1.16.2 → alembic-1.16.4}/alembic/util/__init__.py +0 -0
  132. {alembic-1.16.2 → alembic-1.16.4}/alembic/util/compat.py +0 -0
  133. {alembic-1.16.2 → alembic-1.16.4}/alembic/util/editor.py +0 -0
  134. {alembic-1.16.2 → alembic-1.16.4}/alembic/util/exc.py +0 -0
  135. {alembic-1.16.2 → alembic-1.16.4}/alembic/util/langhelpers.py +0 -0
  136. {alembic-1.16.2 → alembic-1.16.4}/alembic/util/messaging.py +0 -0
  137. {alembic-1.16.2 → alembic-1.16.4}/alembic/util/pyfiles.py +0 -0
  138. {alembic-1.16.2 → alembic-1.16.4}/alembic.egg-info/dependency_links.txt +0 -0
  139. {alembic-1.16.2 → alembic-1.16.4}/alembic.egg-info/entry_points.txt +0 -0
  140. {alembic-1.16.2 → alembic-1.16.4}/alembic.egg-info/not-zip-safe +0 -0
  141. {alembic-1.16.2 → alembic-1.16.4}/alembic.egg-info/requires.txt +0 -0
  142. {alembic-1.16.2 → alembic-1.16.4}/alembic.egg-info/top_level.txt +0 -0
  143. {alembic-1.16.2 → alembic-1.16.4}/docs/_images/api_overview.png +0 -0
  144. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/api/autogenerate.rst +0 -0
  145. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/api/commands.rst +0 -0
  146. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/api/config.rst +0 -0
  147. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/api/ddl.rst +0 -0
  148. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/api/index.rst +0 -0
  149. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/api/operations.rst +0 -0
  150. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/api/overview.rst +0 -0
  151. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/api/runtime.rst +0 -0
  152. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/api/script.rst +0 -0
  153. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/batch.rst +0 -0
  154. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/branches.rst +0 -0
  155. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/front.rst +0 -0
  156. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/index.rst +0 -0
  157. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/naming.rst +0 -0
  158. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/offline.rst +0 -0
  159. {alembic-1.16.2 → alembic-1.16.4}/docs/_sources/ops.rst +0 -0
  160. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/basic.css +0 -0
  161. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/changelog.css +0 -0
  162. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/clipboard.min.js +0 -0
  163. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/copybutton.css +0 -0
  164. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/copybutton.js +0 -0
  165. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/copybutton_funcs.js +0 -0
  166. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/doctools.js +0 -0
  167. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/file.png +0 -0
  168. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/images/logo_colab.png +0 -0
  169. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/language_data.js +0 -0
  170. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/minus.png +0 -0
  171. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/nature_override.css +0 -0
  172. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/plus.png +0 -0
  173. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/pygments.css +0 -0
  174. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/sbt-webpack-macros.html +0 -0
  175. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/scripts/bootstrap.js +0 -0
  176. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/scripts/bootstrap.js.LICENSE.txt +0 -0
  177. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/scripts/pydata-sphinx-theme.js +0 -0
  178. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/scripts/sphinx-book-theme.js +0 -0
  179. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/searchtools.js +0 -0
  180. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/site_custom_css.css +0 -0
  181. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/sphinx_highlight.js +0 -0
  182. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/sphinx_paramlinks.css +0 -0
  183. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/styles/bootstrap.css +0 -0
  184. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/styles/pydata-sphinx-theme.css +0 -0
  185. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/styles/sphinx-book-theme.css +0 -0
  186. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/styles/theme.css +0 -0
  187. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/vendor/fontawesome/6.5.2/LICENSE.txt +0 -0
  188. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/vendor/fontawesome/6.5.2/css/all.min.css +0 -0
  189. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/vendor/fontawesome/6.5.2/js/all.min.js +0 -0
  190. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/vendor/fontawesome/6.5.2/js/all.min.js.LICENSE.txt +0 -0
  191. {alembic-1.16.2 → alembic-1.16.4}/docs/_static/webpack-macros.html +0 -0
  192. {alembic-1.16.2 → alembic-1.16.4}/docs/build/Makefile +0 -0
  193. {alembic-1.16.2 → alembic-1.16.4}/docs/build/_static/nature_override.css +0 -0
  194. {alembic-1.16.2 → alembic-1.16.4}/docs/build/_static/site_custom_css.css +0 -0
  195. {alembic-1.16.2 → alembic-1.16.4}/docs/build/_templates/site_custom_sidebars.html +0 -0
  196. {alembic-1.16.2 → alembic-1.16.4}/docs/build/api/api_overview.png +0 -0
  197. {alembic-1.16.2 → alembic-1.16.4}/docs/build/api/autogenerate.rst +0 -0
  198. {alembic-1.16.2 → alembic-1.16.4}/docs/build/api/commands.rst +0 -0
  199. {alembic-1.16.2 → alembic-1.16.4}/docs/build/api/config.rst +0 -0
  200. {alembic-1.16.2 → alembic-1.16.4}/docs/build/api/ddl.rst +0 -0
  201. {alembic-1.16.2 → alembic-1.16.4}/docs/build/api/index.rst +0 -0
  202. {alembic-1.16.2 → alembic-1.16.4}/docs/build/api/operations.rst +0 -0
  203. {alembic-1.16.2 → alembic-1.16.4}/docs/build/api/overview.rst +0 -0
  204. {alembic-1.16.2 → alembic-1.16.4}/docs/build/api/runtime.rst +0 -0
  205. {alembic-1.16.2 → alembic-1.16.4}/docs/build/api/script.rst +0 -0
  206. {alembic-1.16.2 → alembic-1.16.4}/docs/build/batch.rst +0 -0
  207. {alembic-1.16.2 → alembic-1.16.4}/docs/build/branches.rst +0 -0
  208. {alembic-1.16.2 → alembic-1.16.4}/docs/build/front.rst +0 -0
  209. {alembic-1.16.2 → alembic-1.16.4}/docs/build/index.rst +0 -0
  210. {alembic-1.16.2 → alembic-1.16.4}/docs/build/naming.rst +0 -0
  211. {alembic-1.16.2 → alembic-1.16.4}/docs/build/offline.rst +0 -0
  212. {alembic-1.16.2 → alembic-1.16.4}/docs/build/ops.rst +0 -0
  213. {alembic-1.16.2 → alembic-1.16.4}/docs/build/requirements.txt +0 -0
  214. {alembic-1.16.2 → alembic-1.16.4}/docs/build/unreleased/README.txt +0 -0
  215. {alembic-1.16.2 → alembic-1.16.4}/pyproject.toml +0 -0
  216. {alembic-1.16.2 → alembic-1.16.4}/setup.py +0 -0
  217. {alembic-1.16.2 → alembic-1.16.4}/tests/__init__.py +0 -0
  218. {alembic-1.16.2 → alembic-1.16.4}/tests/_large_map.py +0 -0
  219. {alembic-1.16.2 → alembic-1.16.4}/tests/conftest.py +0 -0
  220. {alembic-1.16.2 → alembic-1.16.4}/tests/requirements.py +0 -0
  221. {alembic-1.16.2 → alembic-1.16.4}/tests/test_autogen_composition.py +0 -0
  222. {alembic-1.16.2 → alembic-1.16.4}/tests/test_autogen_diffs.py +0 -0
  223. {alembic-1.16.2 → alembic-1.16.4}/tests/test_autogen_indexes.py +0 -0
  224. {alembic-1.16.2 → alembic-1.16.4}/tests/test_batch.py +0 -0
  225. {alembic-1.16.2 → alembic-1.16.4}/tests/test_bulk_insert.py +0 -0
  226. {alembic-1.16.2 → alembic-1.16.4}/tests/test_command.py +0 -0
  227. {alembic-1.16.2 → alembic-1.16.4}/tests/test_editor.py +0 -0
  228. {alembic-1.16.2 → alembic-1.16.4}/tests/test_environment.py +0 -0
  229. {alembic-1.16.2 → alembic-1.16.4}/tests/test_external_dialect.py +0 -0
  230. {alembic-1.16.2 → alembic-1.16.4}/tests/test_impl.py +0 -0
  231. {alembic-1.16.2 → alembic-1.16.4}/tests/test_messaging.py +0 -0
  232. {alembic-1.16.2 → alembic-1.16.4}/tests/test_mssql.py +0 -0
  233. {alembic-1.16.2 → alembic-1.16.4}/tests/test_offline_environment.py +0 -0
  234. {alembic-1.16.2 → alembic-1.16.4}/tests/test_op.py +0 -0
  235. {alembic-1.16.2 → alembic-1.16.4}/tests/test_op_naming_convention.py +0 -0
  236. {alembic-1.16.2 → alembic-1.16.4}/tests/test_oracle.py +0 -0
  237. {alembic-1.16.2 → alembic-1.16.4}/tests/test_postgresql.py +0 -0
  238. {alembic-1.16.2 → alembic-1.16.4}/tests/test_revision.py +0 -0
  239. {alembic-1.16.2 → alembic-1.16.4}/tests/test_script_consumption.py +0 -0
  240. {alembic-1.16.2 → alembic-1.16.4}/tests/test_sqlite.py +0 -0
  241. {alembic-1.16.2 → alembic-1.16.4}/tests/test_stubs.py +0 -0
  242. {alembic-1.16.2 → alembic-1.16.4}/tests/test_suite.py +0 -0
  243. {alembic-1.16.2 → alembic-1.16.4}/tests/test_version_table.py +0 -0
  244. {alembic-1.16.2 → alembic-1.16.4}/tests/test_version_traversal.py +0 -0
  245. {alembic-1.16.2 → alembic-1.16.4}/tools/write_pyi.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alembic
3
- Version: 1.16.2
3
+ Version: 1.16.4
4
4
  Summary: A database migration tool for SQLAlchemy.
5
5
  Author-email: Mike Bayer <mike_mp@zzzcomputing.com>
6
6
  License-Expression: MIT
@@ -1,4 +1,4 @@
1
1
  from . import context
2
2
  from . import op
3
3
 
4
- __version__ = "1.16.2"
4
+ __version__ = "1.16.4"
@@ -813,6 +813,8 @@ def _render_server_default(
813
813
  return _render_potential_expr(
814
814
  default.arg, autogen_context, is_server_default=True
815
815
  )
816
+ elif isinstance(default, sa_schema.FetchedValue):
817
+ return _render_fetched_value(autogen_context)
816
818
 
817
819
  if isinstance(default, str) and repr_:
818
820
  default = repr(re.sub(r"^'|'$", "", default))
@@ -850,6 +852,12 @@ def _render_identity(
850
852
  }
851
853
 
852
854
 
855
+ def _render_fetched_value(autogen_context: AutogenContext) -> str:
856
+ return "%(prefix)sFetchedValue()" % {
857
+ "prefix": _sqlalchemy_autogenerate_prefix(autogen_context),
858
+ }
859
+
860
+
853
861
  def _repr_type(
854
862
  type_: TypeEngine,
855
863
  autogen_context: AutogenContext,
@@ -1000,7 +1008,7 @@ def _render_primary_key(
1000
1008
  def _fk_colspec(
1001
1009
  fk: ForeignKey,
1002
1010
  metadata_schema: Optional[str],
1003
- namespace_metadata: MetaData,
1011
+ namespace_metadata: Optional[MetaData],
1004
1012
  ) -> str:
1005
1013
  """Implement a 'safe' version of ForeignKey._get_colspec() that
1006
1014
  won't fail if the remote table can't be resolved.
@@ -1024,7 +1032,10 @@ def _fk_colspec(
1024
1032
  # the FK constraint needs to be rendered in terms of the column
1025
1033
  # name.
1026
1034
 
1027
- if table_fullname in namespace_metadata.tables:
1035
+ if (
1036
+ namespace_metadata is not None
1037
+ and table_fullname in namespace_metadata.tables
1038
+ ):
1028
1039
  col = namespace_metadata.tables[table_fullname].c.get(colname)
1029
1040
  if col is not None:
1030
1041
  colname = _ident(col.name) # type: ignore[assignment]
@@ -1055,7 +1066,7 @@ def _populate_render_fk_opts(
1055
1066
  def _render_foreign_key(
1056
1067
  constraint: ForeignKeyConstraint,
1057
1068
  autogen_context: AutogenContext,
1058
- namespace_metadata: MetaData,
1069
+ namespace_metadata: Optional[MetaData],
1059
1070
  ) -> Optional[str]:
1060
1071
  rendered = _user_defined_render("foreign_key", constraint, autogen_context)
1061
1072
  if rendered is not False:
@@ -1069,7 +1080,9 @@ def _render_foreign_key(
1069
1080
 
1070
1081
  _populate_render_fk_opts(constraint, opts)
1071
1082
 
1072
- apply_metadata_schema = namespace_metadata.schema
1083
+ apply_metadata_schema = (
1084
+ namespace_metadata.schema if namespace_metadata is not None else None
1085
+ )
1073
1086
  return (
1074
1087
  "%(prefix)sForeignKeyConstraint([%(cols)s], "
1075
1088
  "[%(refcols)s], %(args)s)"
@@ -455,6 +455,19 @@ class Config:
455
455
  else:
456
456
  return self._get_toml_config_value(name, default=default)
457
457
 
458
+ def get_alembic_boolean_option(self, name: str) -> bool:
459
+ if self.file_config.has_option(self.config_ini_section, name):
460
+ return (
461
+ self.file_config.get(self.config_ini_section, name) == "true"
462
+ )
463
+ else:
464
+ value = self.toml_alembic_config.get(name, False)
465
+ if not isinstance(value, bool):
466
+ raise util.CommandError(
467
+ f"boolean value expected for TOML parameter {name!r}"
468
+ )
469
+ return value
470
+
458
471
  def _get_toml_config_value(
459
472
  self, name: str, default: Optional[Any] = None
460
473
  ) -> Union[None, str, list[str], dict[str, str], list[dict[str, str]]]:
@@ -483,7 +496,9 @@ class Config:
483
496
  {k: v % (self.toml_args) for k, v in value.items()},
484
497
  )
485
498
  else:
486
- raise util.CommandError("unsupported TOML value type")
499
+ raise util.CommandError(
500
+ f"unsupported TOML value type for key: {name!r}"
501
+ )
487
502
  return value
488
503
 
489
504
  @util.memoized_property
@@ -186,16 +186,14 @@ class ScriptDirectory:
186
186
  if prepend_sys_path:
187
187
  sys.path[:0] = prepend_sys_path
188
188
 
189
- rvl = (
190
- config.get_alembic_option("recursive_version_locations") == "true"
191
- )
189
+ rvl = config.get_alembic_boolean_option("recursive_version_locations")
192
190
  return ScriptDirectory(
193
191
  util.coerce_resource_to_filename(script_location),
194
192
  file_template=config.get_alembic_option(
195
193
  "file_template", _default_file_template
196
194
  ),
197
195
  truncate_slug_length=truncate_slug_length,
198
- sourceless=config.get_alembic_option("sourceless") == "true",
196
+ sourceless=config.get_alembic_boolean_option("sourceless"),
199
197
  output_encoding=config.get_alembic_option(
200
198
  "output_encoding", "utf-8"
201
199
  ),
@@ -3,6 +3,7 @@
3
3
 
4
4
  from __future__ import annotations
5
5
 
6
+ import importlib.util
6
7
  import os
7
8
  import shlex
8
9
  import subprocess
@@ -112,17 +113,35 @@ def _parse_cmdline_options(cmdline_options_str: str, path: str) -> List[str]:
112
113
  return cmdline_options_list
113
114
 
114
115
 
115
- @register("console_scripts")
116
- def console_scripts(
117
- path: str, options: dict, ignore_output: bool = False
118
- ) -> None:
116
+ def _get_required_option(options: dict, name: str) -> str:
119
117
  try:
120
- entrypoint_name = options["entrypoint"]
118
+ return options[name]
121
119
  except KeyError as ke:
122
120
  raise util.CommandError(
123
- f"Key {options['_hook_name']}.entrypoint is required for post "
121
+ f"Key {options['_hook_name']}.{name} is required for post "
124
122
  f"write hook {options['_hook_name']!r}"
125
123
  ) from ke
124
+
125
+
126
+ def _run_hook(
127
+ path: str, options: dict, ignore_output: bool, command: List[str]
128
+ ) -> None:
129
+ cwd: Optional[str] = options.get("cwd", None)
130
+ cmdline_options_str = options.get("options", "")
131
+ cmdline_options_list = _parse_cmdline_options(cmdline_options_str, path)
132
+
133
+ kw: Dict[str, Any] = {}
134
+ if ignore_output:
135
+ kw["stdout"] = kw["stderr"] = subprocess.DEVNULL
136
+
137
+ subprocess.run([*command, *cmdline_options_list], cwd=cwd, **kw)
138
+
139
+
140
+ @register("console_scripts")
141
+ def console_scripts(
142
+ path: str, options: dict, ignore_output: bool = False
143
+ ) -> None:
144
+ entrypoint_name = _get_required_option(options, "entrypoint")
126
145
  for entry in compat.importlib_metadata_get("console_scripts"):
127
146
  if entry.name == entrypoint_name:
128
147
  impl: Any = entry
@@ -131,48 +150,27 @@ def console_scripts(
131
150
  raise util.CommandError(
132
151
  f"Could not find entrypoint console_scripts.{entrypoint_name}"
133
152
  )
134
- cwd: Optional[str] = options.get("cwd", None)
135
- cmdline_options_str = options.get("options", "")
136
- cmdline_options_list = _parse_cmdline_options(cmdline_options_str, path)
137
-
138
- kw: Dict[str, Any] = {}
139
- if ignore_output:
140
- kw["stdout"] = kw["stderr"] = subprocess.DEVNULL
141
153
 
142
- subprocess.run(
143
- [
144
- sys.executable,
145
- "-c",
146
- f"import {impl.module}; {impl.module}.{impl.attr}()",
147
- ]
148
- + cmdline_options_list,
149
- cwd=cwd,
150
- **kw,
151
- )
154
+ command = [
155
+ sys.executable,
156
+ "-c",
157
+ f"import {impl.module}; {impl.module}.{impl.attr}()",
158
+ ]
159
+ _run_hook(path, options, ignore_output, command)
152
160
 
153
161
 
154
162
  @register("exec")
155
163
  def exec_(path: str, options: dict, ignore_output: bool = False) -> None:
156
- try:
157
- executable = options["executable"]
158
- except KeyError as ke:
159
- raise util.CommandError(
160
- f"Key {options['_hook_name']}.executable is required for post "
161
- f"write hook {options['_hook_name']!r}"
162
- ) from ke
163
- cwd: Optional[str] = options.get("cwd", None)
164
- cmdline_options_str = options.get("options", "")
165
- cmdline_options_list = _parse_cmdline_options(cmdline_options_str, path)
164
+ executable = _get_required_option(options, "executable")
165
+ _run_hook(path, options, ignore_output, command=[executable])
166
166
 
167
- kw: Dict[str, Any] = {}
168
- if ignore_output:
169
- kw["stdout"] = kw["stderr"] = subprocess.DEVNULL
170
167
 
171
- subprocess.run(
172
- [
173
- executable,
174
- *cmdline_options_list,
175
- ],
176
- cwd=cwd,
177
- **kw,
178
- )
168
+ @register("module")
169
+ def module(path: str, options: dict, ignore_output: bool = False) -> None:
170
+ module_name = _get_required_option(options, "module")
171
+
172
+ if importlib.util.find_spec(module_name) is None:
173
+ raise util.CommandError(f"Could not find module {module_name}")
174
+
175
+ command = [sys.executable, "-m", module_name]
176
+ _run_hook(path, options, ignore_output, command)
@@ -18,7 +18,6 @@ script_location = ${script_location}
18
18
  # is defined by "path_separator" below.
19
19
  prepend_sys_path = .
20
20
 
21
-
22
21
  # timezone to use when rendering the date within the migration file
23
22
  # as well as the filename.
24
23
  # If specified, requires the python>=3.9 or backports.zoneinfo library and tzdata library.
@@ -72,6 +71,7 @@ prepend_sys_path = .
72
71
  # Use os.pathsep. Default configuration used for new projects.
73
72
  path_separator = os
74
73
 
74
+
75
75
  # set to 'true' to search source files recursively
76
76
  # in each "version_locations" directory
77
77
  # new in Alembic version 1.10
@@ -98,10 +98,16 @@ sqlalchemy.url = driver://user:pass@localhost/dbname
98
98
  # black.entrypoint = black
99
99
  # black.options = -l 79 REVISION_SCRIPT_FILENAME
100
100
 
101
- # lint with attempts to fix using "ruff" - use the exec runner, execute a binary
101
+ # lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
102
+ # hooks = ruff
103
+ # ruff.type = module
104
+ # ruff.module = ruff
105
+ # ruff.options = check --fix REVISION_SCRIPT_FILENAME
106
+
107
+ # Alternatively, use the exec runner to execute a binary found on your PATH
102
108
  # hooks = ruff
103
109
  # ruff.type = exec
104
- # ruff.executable = %(here)s/.venv/bin/ruff
110
+ # ruff.executable = ruff
105
111
  # ruff.options = check --fix REVISION_SCRIPT_FILENAME
106
112
 
107
113
  # Logging configuration. This is also consumed by the user-maintained
@@ -18,6 +18,7 @@ script_location = ${script_location}
18
18
  # is defined by "path_separator" below.
19
19
  prepend_sys_path = .
20
20
 
21
+
21
22
  # timezone to use when rendering the date within the migration file
22
23
  # as well as the filename.
23
24
  # If specified, requires the python>=3.9 or backports.zoneinfo library and tzdata library.
@@ -71,7 +72,6 @@ prepend_sys_path = .
71
72
  # Use os.pathsep. Default configuration used for new projects.
72
73
  path_separator = os
73
74
 
74
-
75
75
  # set to 'true' to search source files recursively
76
76
  # in each "version_locations" directory
77
77
  # new in Alembic version 1.10
@@ -98,10 +98,16 @@ sqlalchemy.url = driver://user:pass@localhost/dbname
98
98
  # black.entrypoint = black
99
99
  # black.options = -l 79 REVISION_SCRIPT_FILENAME
100
100
 
101
- # lint with attempts to fix using "ruff" - use the exec runner, execute a binary
101
+ # lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
102
+ # hooks = ruff
103
+ # ruff.type = module
104
+ # ruff.module = ruff
105
+ # ruff.options = check --fix REVISION_SCRIPT_FILENAME
106
+
107
+ # Alternatively, use the exec runner to execute a binary found on your PATH
102
108
  # hooks = ruff
103
109
  # ruff.type = exec
104
- # ruff.executable = %(here)s/.venv/bin/ruff
110
+ # ruff.executable = ruff
105
111
  # ruff.options = check --fix REVISION_SCRIPT_FILENAME
106
112
 
107
113
  # Logging configuration. This is also consumed by the user-maintained
@@ -106,10 +106,16 @@ sqlalchemy.url = driver://user:pass@localhost/dbname2
106
106
  # black.entrypoint = black
107
107
  # black.options = -l 79 REVISION_SCRIPT_FILENAME
108
108
 
109
- # lint with attempts to fix using "ruff" - use the exec runner, execute a binary
109
+ # lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
110
+ # hooks = ruff
111
+ # ruff.type = module
112
+ # ruff.module = ruff
113
+ # ruff.options = check --fix REVISION_SCRIPT_FILENAME
114
+
115
+ # Alternatively, use the exec runner to execute a binary found on your PATH
110
116
  # hooks = ruff
111
117
  # ruff.type = exec
112
- # ruff.executable = %(here)s/.venv/bin/ruff
118
+ # ruff.executable = ruff
113
119
  # ruff.options = check --fix REVISION_SCRIPT_FILENAME
114
120
 
115
121
  # Logging configuration. This is also consumed by the user-maintained
@@ -67,10 +67,16 @@ prepend_sys_path = [
67
67
  # options = "-l 79 REVISION_SCRIPT_FILENAME"
68
68
  #
69
69
  # [[tool.alembic.post_write_hooks]]
70
- # lint with attempts to fix using "ruff" - use the exec runner,
71
- # execute a binary
70
+ # lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
71
+ # name = "ruff"
72
+ # type = "module"
73
+ # module = "ruff"
74
+ # options = "check --fix REVISION_SCRIPT_FILENAME"
75
+ #
76
+ # [[tool.alembic.post_write_hooks]]
77
+ # Alternatively, use the exec runner to execute a binary found on your PATH
72
78
  # name = "ruff"
73
79
  # type = "exec"
74
- # executable = "%(here)s/.venv/bin/ruff"
80
+ # executable = "ruff"
75
81
  # options = "check --fix REVISION_SCRIPT_FILENAME"
76
82
 
@@ -0,0 +1 @@
1
+ pyproject configuration, with an async dbapi.
@@ -0,0 +1,44 @@
1
+ # A generic, single database configuration.
2
+
3
+ [alembic]
4
+
5
+ # database URL. This is consumed by the user-maintained env.py script only.
6
+ # other means of configuring database URLs may be customized within the env.py
7
+ # file.
8
+ sqlalchemy.url = driver://user:pass@localhost/dbname
9
+
10
+
11
+ # Logging configuration
12
+ [loggers]
13
+ keys = root,sqlalchemy,alembic
14
+
15
+ [handlers]
16
+ keys = console
17
+
18
+ [formatters]
19
+ keys = generic
20
+
21
+ [logger_root]
22
+ level = WARNING
23
+ handlers = console
24
+ qualname =
25
+
26
+ [logger_sqlalchemy]
27
+ level = WARNING
28
+ handlers =
29
+ qualname = sqlalchemy.engine
30
+
31
+ [logger_alembic]
32
+ level = INFO
33
+ handlers =
34
+ qualname = alembic
35
+
36
+ [handler_console]
37
+ class = StreamHandler
38
+ args = (sys.stderr,)
39
+ level = NOTSET
40
+ formatter = generic
41
+
42
+ [formatter_generic]
43
+ format = %(levelname)-5.5s [%(name)s] %(message)s
44
+ datefmt = %H:%M:%S
@@ -0,0 +1,89 @@
1
+ import asyncio
2
+ from logging.config import fileConfig
3
+
4
+ from sqlalchemy import pool
5
+ from sqlalchemy.engine import Connection
6
+ from sqlalchemy.ext.asyncio import async_engine_from_config
7
+
8
+ from alembic import context
9
+
10
+ # this is the Alembic Config object, which provides
11
+ # access to the values within the .ini file in use.
12
+ config = context.config
13
+
14
+ # Interpret the config file for Python logging.
15
+ # This line sets up loggers basically.
16
+ if config.config_file_name is not None:
17
+ fileConfig(config.config_file_name)
18
+
19
+ # add your model's MetaData object here
20
+ # for 'autogenerate' support
21
+ # from myapp import mymodel
22
+ # target_metadata = mymodel.Base.metadata
23
+ target_metadata = None
24
+
25
+ # other values from the config, defined by the needs of env.py,
26
+ # can be acquired:
27
+ # my_important_option = config.get_main_option("my_important_option")
28
+ # ... etc.
29
+
30
+
31
+ def run_migrations_offline() -> None:
32
+ """Run migrations in 'offline' mode.
33
+
34
+ This configures the context with just a URL
35
+ and not an Engine, though an Engine is acceptable
36
+ here as well. By skipping the Engine creation
37
+ we don't even need a DBAPI to be available.
38
+
39
+ Calls to context.execute() here emit the given string to the
40
+ script output.
41
+
42
+ """
43
+ url = config.get_main_option("sqlalchemy.url")
44
+ context.configure(
45
+ url=url,
46
+ target_metadata=target_metadata,
47
+ literal_binds=True,
48
+ dialect_opts={"paramstyle": "named"},
49
+ )
50
+
51
+ with context.begin_transaction():
52
+ context.run_migrations()
53
+
54
+
55
+ def do_run_migrations(connection: Connection) -> None:
56
+ context.configure(connection=connection, target_metadata=target_metadata)
57
+
58
+ with context.begin_transaction():
59
+ context.run_migrations()
60
+
61
+
62
+ async def run_async_migrations() -> None:
63
+ """In this scenario we need to create an Engine
64
+ and associate a connection with the context.
65
+
66
+ """
67
+
68
+ connectable = async_engine_from_config(
69
+ config.get_section(config.config_ini_section, {}),
70
+ prefix="sqlalchemy.",
71
+ poolclass=pool.NullPool,
72
+ )
73
+
74
+ async with connectable.connect() as connection:
75
+ await connection.run_sync(do_run_migrations)
76
+
77
+ await connectable.dispose()
78
+
79
+
80
+ def run_migrations_online() -> None:
81
+ """Run migrations in 'online' mode."""
82
+
83
+ asyncio.run(run_async_migrations())
84
+
85
+
86
+ if context.is_offline_mode():
87
+ run_migrations_offline()
88
+ else:
89
+ run_migrations_online()
@@ -0,0 +1,82 @@
1
+ [tool.alembic]
2
+
3
+ # path to migration scripts.
4
+ # this is typically a path given in POSIX (e.g. forward slashes)
5
+ # format, relative to the token %(here)s which refers to the location of this
6
+ # ini file
7
+ script_location = "${script_location}"
8
+
9
+ # template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
10
+ # Uncomment the line below if you want the files to be prepended with date and time
11
+ # see https://alembic.sqlalchemy.org/en/latest/tutorial.html#editing-the-ini-file
12
+ # for all available tokens
13
+ # file_template = "%%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s"
14
+
15
+ # additional paths to be prepended to sys.path. defaults to the current working directory.
16
+ prepend_sys_path = [
17
+ "."
18
+ ]
19
+
20
+ # timezone to use when rendering the date within the migration file
21
+ # as well as the filename.
22
+ # If specified, requires the python>=3.9 or backports.zoneinfo library and tzdata library.
23
+ # Any required deps can installed by adding `alembic[tz]` to the pip requirements
24
+ # string value is passed to ZoneInfo()
25
+ # leave blank for localtime
26
+ # timezone =
27
+
28
+ # max length of characters to apply to the "slug" field
29
+ # truncate_slug_length = 40
30
+
31
+ # set to 'true' to run the environment during
32
+ # the 'revision' command, regardless of autogenerate
33
+ # revision_environment = false
34
+
35
+ # set to 'true' to allow .pyc and .pyo files without
36
+ # a source .py file to be detected as revisions in the
37
+ # versions/ directory
38
+ # sourceless = false
39
+
40
+ # version location specification; This defaults
41
+ # to <script_location>/versions. When using multiple version
42
+ # directories, initial revisions must be specified with --version-path.
43
+ # version_locations = [
44
+ # "%(here)s/alembic/versions",
45
+ # "%(here)s/foo/bar"
46
+ # ]
47
+
48
+
49
+ # set to 'true' to search source files recursively
50
+ # in each "version_locations" directory
51
+ # new in Alembic version 1.10
52
+ # recursive_version_locations = false
53
+
54
+ # the output encoding used when revision files
55
+ # are written from script.py.mako
56
+ # output_encoding = "utf-8"
57
+
58
+ # This section defines scripts or Python functions that are run
59
+ # on newly generated revision scripts. See the documentation for further
60
+ # detail and examples
61
+ # [[tool.alembic.post_write_hooks]]
62
+ # format using "black" - use the console_scripts runner,
63
+ # against the "black" entrypoint
64
+ # name = "black"
65
+ # type = "console_scripts"
66
+ # entrypoint = "black"
67
+ # options = "-l 79 REVISION_SCRIPT_FILENAME"
68
+ #
69
+ # [[tool.alembic.post_write_hooks]]
70
+ # lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
71
+ # name = "ruff"
72
+ # type = "module"
73
+ # module = "ruff"
74
+ # options = "check --fix REVISION_SCRIPT_FILENAME"
75
+ #
76
+ # [[tool.alembic.post_write_hooks]]
77
+ # Alternatively, use the exec runner to execute a binary found on your PATH
78
+ # name = "ruff"
79
+ # type = "exec"
80
+ # executable = "ruff"
81
+ # options = "check --fix REVISION_SCRIPT_FILENAME"
82
+
@@ -0,0 +1,28 @@
1
+ """${message}
2
+
3
+ Revision ID: ${up_revision}
4
+ Revises: ${down_revision | comma,n}
5
+ Create Date: ${create_date}
6
+
7
+ """
8
+ from typing import Sequence, Union
9
+
10
+ from alembic import op
11
+ import sqlalchemy as sa
12
+ ${imports if imports else ""}
13
+
14
+ # revision identifiers, used by Alembic.
15
+ revision: str = ${repr(up_revision)}
16
+ down_revision: Union[str, Sequence[str], None] = ${repr(down_revision)}
17
+ branch_labels: Union[str, Sequence[str], None] = ${repr(branch_labels)}
18
+ depends_on: Union[str, Sequence[str], None] = ${repr(depends_on)}
19
+
20
+
21
+ def upgrade() -> None:
22
+ """Upgrade schema."""
23
+ ${upgrades if upgrades else "pass"}
24
+
25
+
26
+ def downgrade() -> None:
27
+ """Downgrade schema."""
28
+ ${downgrades if downgrades else "pass"}
@@ -9,6 +9,7 @@ from sqlalchemy.testing import uses_deprecated
9
9
  from sqlalchemy.testing.config import combinations
10
10
  from sqlalchemy.testing.config import fixture
11
11
  from sqlalchemy.testing.config import requirements as requires
12
+ from sqlalchemy.testing.config import Variation
12
13
  from sqlalchemy.testing.config import variation
13
14
 
14
15
  from .assertions import assert_raises
@@ -31,12 +31,10 @@ from sqlalchemy.sql.elements import BindParameter
31
31
  from sqlalchemy.sql.elements import ColumnClause
32
32
  from sqlalchemy.sql.elements import TextClause
33
33
  from sqlalchemy.sql.elements import UnaryExpression
34
+ from sqlalchemy.sql.naming import _NONE_NAME as _NONE_NAME # type: ignore[attr-defined] # noqa: E501
34
35
  from sqlalchemy.sql.visitors import traverse
35
36
  from typing_extensions import TypeGuard
36
37
 
37
- if True:
38
- from sqlalchemy.sql.naming import _NONE_NAME as _NONE_NAME # type: ignore[attr-defined] # noqa: E501
39
-
40
38
  if TYPE_CHECKING:
41
39
  from sqlalchemy import ClauseElement
42
40
  from sqlalchemy import Identity
@@ -81,7 +79,7 @@ if TYPE_CHECKING:
81
79
  ) -> Callable[[_CompilerProtocol], _CompilerProtocol]: ...
82
80
 
83
81
  else:
84
- from sqlalchemy.ext.compiler import compiles
82
+ from sqlalchemy.ext.compiler import compiles # noqa: I100,I202
85
83
 
86
84
 
87
85
  identity_has_dialect_kwargs = issubclass(schema.Identity, DialectKWArgs)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alembic
3
- Version: 1.16.2
3
+ Version: 1.16.4
4
4
  Summary: A database migration tool for SQLAlchemy.
5
5
  Author-email: Mike Bayer <mike_mp@zzzcomputing.com>
6
6
  License-Expression: MIT
@@ -62,6 +62,11 @@ tox.ini
62
62
  ./alembic/templates/pyproject/env.py
63
63
  ./alembic/templates/pyproject/pyproject.toml.mako
64
64
  ./alembic/templates/pyproject/script.py.mako
65
+ ./alembic/templates/pyproject_async/README
66
+ ./alembic/templates/pyproject_async/alembic.ini.mako
67
+ ./alembic/templates/pyproject_async/env.py
68
+ ./alembic/templates/pyproject_async/pyproject.toml.mako
69
+ ./alembic/templates/pyproject_async/script.py.mako
65
70
  ./alembic/testing/__init__.py
66
71
  ./alembic/testing/assertions.py
67
72
  ./alembic/testing/env.py
@@ -151,6 +156,11 @@ alembic/templates/pyproject/alembic.ini.mako
151
156
  alembic/templates/pyproject/env.py
152
157
  alembic/templates/pyproject/pyproject.toml.mako
153
158
  alembic/templates/pyproject/script.py.mako
159
+ alembic/templates/pyproject_async/README
160
+ alembic/templates/pyproject_async/alembic.ini.mako
161
+ alembic/templates/pyproject_async/env.py
162
+ alembic/templates/pyproject_async/pyproject.toml.mako
163
+ alembic/templates/pyproject_async/script.py.mako
154
164
  alembic/testing/__init__.py
155
165
  alembic/testing/assertions.py
156
166
  alembic/testing/env.py