| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This removes a warning from setuptools
Fixes: #1227
Change-Id: I81187e86038836ded39140076f25dc5f6bc1eb35
|
|
|
|
| |
Change-Id: I048cc0653de1b7885665b747cceb083d348f7f18
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
### Description
While reading the diff between [`rel_1_10_2...rel_1_10_3`](https://github.com/sqlalchemy/alembic/compare/rel_1_10_2...rel_1_10_3), the introduction of r-strings drew my attention, and that resulted in some [discussion on the relevant commit](https://github.com/sqlalchemy/alembic/commit/bc0c305b7c2cc0401e250fcd6a725aacecdd6e33).
This changeset filters the production of r-strings during stub-generation to cases where docstrings contain escape (backslash, `\`) characters.
I'll admit that I didn't realize until today that these stubs are primarily for typechecking. Since that's the case, I have doubts about whether the change is worthwhile (consistency and simplicity -- using r-strings for all docstrings in the stubs -- even if it's redundant, seems fine to me).
### Checklist
This pull request is:
- [x] A documentation / typographical error fix
- [x] A short code fix
- Relates to discussion at https://github.com/sqlalchemy/alembic/commit/bc0c305b7c2cc0401e250fcd6a725aacecdd6e33
Closes: #1218
Pull-request: https://github.com/sqlalchemy/alembic/pull/1218
Pull-request-sha: 352ab8829525435f78838687e12156a3fa3a3d86
Closes: #1219
Pull-request: https://github.com/sqlalchemy/alembic/pull/1219
Change-Id: I2808a592681dabc093d538f589e673fcc5e05822
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added support for autogenerate comparison of indexes on PostgreSQL which
include SQL expressions; the previous warning that such indexes were
skipped is now removed. This functionality requires SQLAlchemy 2.0.
For older SQLAlchemy versions, these indexes are still skipped.
Fixed issue where indexes on SQLite which include SQL expressions would not
compare against themselves correctly, generating false positives.
SQLAlchemy as of version 2 has no support for reflecting expression based
indexes on SQLite; so for now, the behavior is that SQLite expression-based
indexes are ignored for autogenerate compare, in the same way that
PostgreSQL expression-based indexes were ignored for the time that
SQLAlchemy did not support reflection of such indexes (which is now
supported in SQLAlchemy 2.0 as well as this release of Alembic).
Fixed issue in index detection where autogenerate change detection would
consider indexes with the same columns but with different order as equal,
while in general they are not equivalent in how a database will use them.
Fixes: #1165
Fixes: #1166
Change-Id: I226408eed855b923172e5df0bdab005ed2cc9f53
|
|/
|
|
|
|
|
| |
Index name can be null.
Fixes: #1168
Change-Id: Id7c944e19a9facd7d3862d43f84fd70aedace999
|
|
|
|
| |
Change-Id: I06bd0183a8931eec193f1007ea4f3b9016f9dec0
|
|
|
|
| |
Change-Id: I065a30d89c2c7b0c78ddd4f3e51770ab08d7dd95
|
|
|
|
| |
Change-Id: If7b9e9fca39e6a6abe45900ff396345c778bbaa9
|
|
|
|
|
| |
Fixes: #1025
Change-Id: I7c7050afc2291a07a08d454a1b8f8b192768d068
|
|
|
|
| |
Change-Id: Iec2b2ae9c2df9592988fa2239b768d1919eec297
|
|
|
|
| |
Change-Id: I9af924f6d28ebbfc1186b5369655bed7d3348766
|
| |
|
|
|
|
|
|
|
| |
Adjust require of importlib_metadata also include py3.8.
Fixes: #934
Change-Id: Id64163a0dc53226d62795d40190b6cec0aee522b
|
|
|
|
| |
Change-Id: If49e0ff00f0b00ed914ddb8979ae49c3a8a10a0e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Corrected "universal wheel" directive in setup.cfg so that building a wheel
does not target Python 2. The PyPi files index for 1.7.0 was corrected
manually. Pull request courtesy layday.
Fixes: #893
Closes: #894
Pull-request: https://github.com/sqlalchemy/alembic/pull/894
Pull-request-sha: 577afdbe5906247493182df95fe5e5338ac23080
Change-Id: I26ca6d9e3e8064d22713926707a53cb57a69d8e7
|
|
|
|
|
|
| |
The importlib.resources.files() API was not added until 3.9.
Change-Id: I62ef8974d6637394448346d7e0f86c6dd93f81a7
|
|
|
|
|
|
|
|
|
|
|
|
| |
The dependency on ``pkg_resources`` which is part of ``setuptools`` has
been removed, so there is no longer any runtime dependency on
``setuptools``. The functionality has been replaced with
``importlib.metadata`` and ``importlib.resources`` which are both part of
Python std.lib, or via pypy dependency ``importlib-metadata`` for Python
version < 3.8 and ``importlib-resources`` for Python version < 3.7.
Change-Id: I7802fe72ff644f52ae2edde53bc8e16f016b7c45
Fixes: #885
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stub .pyi files have been added for the "dynamically"
generated Alembic modules ``alembic.op`` and ``alembic.context``, which
include complete function signatures and docstrings, so that the functions
in these namespaces will have both IDE support (vscode, pycharm, etc) as
well as support for typing tools like Mypy. The files themselves are
statically generated from their source functions within the source tree.
Still not available is sphinx autodoc from the .pyi file. so
we might want to further modify this to write into the .py directly.
if we do *that*, we could almost get rid of ModuleClsProxy and
just generate proxying methods fully in op.py. however, this won't work
for the "extending ops" use case.
Change-Id: I3f084040de25ed3f8e92a4e9d0bb83d69b78eac6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pep-484 type annotations have been added throughout the library. This
should be helpful in providing Mypy and IDE support, however there is not
full support for Alembic's dynamically modified "op" namespace as of yet; a
future release will likely modify the approach used for importing this
namespace to be better compatible with pep-484 capabilities.
Type originally created using MonkeyType
Add types extracted with the MonkeyType https://github.com/instagram/MonkeyType
library by running the unit tests using ``monkeytype run -m pytest tests``, then
``monkeytype apply <module>`` (see below for further details).
USed MonkeyType version 20.5 on Python 3.8, since newer version have issues
After applying the types, the new imports are placed in a ``TYPE_CHECKING`` guard
and all type definition of non base types are deferred by using the string notation.
NOTE: since to apply the types MonkeType need to import the module, also the test
ones, the patch below mocks the setup done by pytest so that the tests could be
correctly imported
diff --git a/alembic/testing/__init__.py b/alembic/testing/__init__.py
index bdd1746..b1090c7 100644
Change-Id: Iff93628f4b43c740848871ce077a118db5e75d41
--- a/alembic/testing/__init__.py
+++ b/alembic/testing/__init__.py
@@ -9,6 +9,12 @@ from sqlalchemy.testing.config import combinations
from sqlalchemy.testing.config import fixture
from sqlalchemy.testing.config import requirements as requires
+from sqlalchemy.testing.plugin.pytestplugin import PytestFixtureFunctions
+from sqlalchemy.testing.plugin.plugin_base import _setup_requirements
+
+config._fixture_functions = PytestFixtureFunctions()
+_setup_requirements("tests.requirements:DefaultRequirements")
+
from alembic import util
from .assertions import assert_raises
from .assertions import assert_raises_message
Currently I'm using this branch of the sqlalchemy stubs:
https://github.com/sqlalchemy/sqlalchemy2-stubs/tree/alembic_updates
Change-Id: I8fd0700aab1913f395302626b8b84fea60334abd
|
|
|
|
|
|
| |
Now alembic supports only python from version 3.6.
Change-Id: Iccf124c2d74af801d90a16c9003cdad318768625
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Re-implemented the ``python-editor`` dependency as a small internal
function to avoid the need for external dependencies.
The implementation is based on the original
version in 7b91b325ff43a0e9235e0f15b57391fa92352626.
Make the ``python-dateutil`` library an optional dependency.
This library is only required if the ``timezone`` option
is used in the Alembic configuration.
An extra require named ``tz`` is available with
``pip install alembic[tz]`` to install it.
Fixes: #674
Fixes: #856
Change-Id: I07f17b2fea01e3a3d677ce95333fe3e8d8d438fd
|
|
|
|
|
|
|
|
|
| |
Fixed installation issue where the "templates" directory was not being
installed, preventing commands like "list-templates" and "init" from
working.
Change-Id: Ic47cee2dbb3c4c81a34e91557a3275ef68a22b74
Fixes: #780
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To accommodate SQLAlchemy 1.4 and 2.0, the migration model now no longer
assumes that the SQLAlchemy Connection will autocommit an individual
operation. This essentially means that for databases that use
non-transactional DDL (pysqlite current driver behavior, MySQL), there is
still a BEGIN/COMMIT block that will surround each individual migration.
Databases that support transactional DDL should continue to have the
same flow, either per migration or per-entire run, depending on the
value of the :paramref:`.Environment.configure.transaction_per_migration`
flag.
Compatibility is established such that the entire library should
not generate any SQLAlchemy 2.0 deprecation warnings and
SQLALCHEMY_WARN_20 is part of conftest.py. (one warning remains
for the moment that needs to be resolved on the SQLAlchemy side)
The test suite requires SQLAlchemy 1.4.0b2 for testing 1.4;
1.4.0b1 won't work.
Test suite / setup also being modernized, as we are at
SQLAlchemy 1.3 we can now remove the majority of the testing
suite plugin.
Change-Id: If55b1ea3c12ead66405ab3fadc76d15d89dabb90
|
|
|
|
|
|
|
|
| |
The latter is deprecated in SQLAlchemy master / 1.4.
also add maxfail 25 for py.test coverage
Change-Id: I673f5da025ecbc240b2c8944d5823866619b7cc7
|
|
|
|
|
|
|
| |
after black is applied, rewrite imports and fix
remaining whitespace / identifier issues.
Change-Id: I49474c085b5f4a4b52e4cf90c9705d6a896d4003
|
|
|
|
|
|
|
| |
run black -l 79 against source code, set up for
full flake8 testing.
Change-Id: I4108e1274d49894b9898ec5bd3a1147933a473d7
|
|
|
|
| |
Change-Id: Ia08a012647fdaf36925af0ee61124dd8f1f2651a
|
|
|
|
|
|
|
| |
Uses new [tool:pytest] directive.
Also removes tox minversion as we are well ahead of that version.
Change-Id: I32c767b8daa64c9e8d71a68c4f568d275719c7d7
|
| |
|
| |
|
|
|
| |
...to fit with other setuptools configs
|
|
|
|
|
|
|
|
|
|
|
|
| |
like to run tests against 0.8 and even late 0.7 versions with the same
capabilities, as well as run parallel testing against all of them.
we need a consistent system to get that all to work, so for now
we have the whole SQLA system shoved into here, not ideal but we have
a very good testing situation for now. Once we target 0.9.4 at the lowest
we should be able to move all this out.
- re-support 0.7, starting at 0.7.6 which is where things mostly work.
All tests, taking into account known skips and fails which are
added here for 0.7, early 0.8s, pass on 0.7.9.
|
|
|
|
| |
- some workarounds to get 0.8 mostly working
|
| |
|
|
|
|
| |
- update the readme.unittests a bit
|
|
|
|
| |
files...
|
|
|
|
| |
- add wheel format
|
| |
|
| |
|
| |
|
|
|
|
| |
- host on packages.python.org
|
|
|