-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLAlchemy 1.4 support + Move CI to GitHub workflows #506
Commits on Jul 9, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 6e11f3f - Browse repository at this point
Copy the full SHA 6e11f3fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 36e765b - Browse repository at this point
Copy the full SHA 36e765bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 743aa21 - Browse repository at this point
Copy the full SHA 743aa21View commit details -
Co-authored-by: Nicola Soranzo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 15dc668 - Browse repository at this point
Copy the full SHA 15dc668View commit details -
Co-authored-by: Nicola Soranzo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 527b885 - Browse repository at this point
Copy the full SHA 527b885View commit details
Commits on Jul 15, 2020
-
- postgres: return for the first positive test - use immutable for default argument
Configuration menu - View commit details
-
Copy full SHA for 37bb37b - Browse repository at this point
Copy the full SHA 37bb37bView commit details -
Merge branch 'topic/372-followup' of https://github.com/bernt-matthia…
…s/sqlalchemy-utils into topic/372-followup
Configuration menu - View commit details
-
Copy full SHA for 4b396d8 - Browse repository at this point
Copy the full SHA 4b396d8View commit details -
Co-authored-by: Nicola Soranzo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6dd16e7 - Browse repository at this point
Copy the full SHA 6dd16e7View commit details -
Co-authored-by: Nicola Soranzo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7e41e85 - Browse repository at this point
Copy the full SHA 7e41e85View commit details -
Configuration menu - View commit details
-
Copy full SHA for e481582 - Browse repository at this point
Copy the full SHA e481582View commit details
Commits on Jul 16, 2020
-
use Null connection pool and close connections
- use a connection (which is closed automatically) for data base existence check - explicitely use Null connection pool already with the 1st change disposal of the engine (which closes all open connections) is not necessary anymore. with the second change we are completely sure.
Configuration menu - View commit details
-
Copy full SHA for 74b3513 - Browse repository at this point
Copy the full SHA 74b3513View commit details -
Configuration menu - View commit details
-
Copy full SHA for acb681c - Browse repository at this point
Copy the full SHA acb681cView commit details
Commits on Jul 28, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 7908606 - Browse repository at this point
Copy the full SHA 7908606View commit details
Commits on Jul 29, 2020
-
Configuration menu - View commit details
-
Copy full SHA for f509f38 - Browse repository at this point
Copy the full SHA f509f38View commit details
Commits on Dec 25, 2020
-
Add support for SQLAlchemy 1.4
Import _ColumnEntity from sqlalchemy.orm.context if importing from .query fails. And while checking if database_exists, use url.set() as URL object is now immutable.
Configuration menu - View commit details
-
Copy full SHA for 504a92b - Browse repository at this point
Copy the full SHA 504a92bView commit details
Commits on Mar 16, 2021
-
2
Configuration menu - View commit details
-
Copy full SHA for 0931cae - Browse repository at this point
Copy the full SHA 0931caeView commit details
Commits on Mar 17, 2021
-
Removed the try..except constructs to set the database. Now checking …
…*once* the version of sqlalchemy in use and deciding *once* how to change the database address. Using a wrapping function ('set_database_from_url') to simplify the code.
Configuration menu - View commit details
-
Copy full SHA for 1f09558 - Browse repository at this point
Copy the full SHA 1f09558View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6646a47 - Browse repository at this point
Copy the full SHA 6646a47View commit details -
Use
execution_options()
method ofConnection
to set the transaction isolation level to autocommit for PostgreSQL.
Configuration menu - View commit details
-
Copy full SHA for 1db87e1 - Browse repository at this point
Copy the full SHA 1db87e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 36dca77 - Browse repository at this point
Copy the full SHA 36dca77View commit details -
Configuration menu - View commit details
-
Copy full SHA for 53cf0bc - Browse repository at this point
Copy the full SHA 53cf0bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 86cf5b2 - Browse repository at this point
Copy the full SHA 86cf5b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for b3d75c3 - Browse repository at this point
Copy the full SHA b3d75c3View commit details
Commits on Mar 18, 2021
-
Use
with engine.connect()
context managerConsolidate autocommit across drivers that support it, xref. kvesteri#494 and fix kvesteri#486 .
Configuration menu - View commit details
-
Copy full SHA for 4f52578 - Browse repository at this point
Copy the full SHA 4f52578View commit details -
Configuration menu - View commit details
-
Copy full SHA for 57e3f16 - Browse repository at this point
Copy the full SHA 57e3f16View commit details -
Configuration menu - View commit details
-
Copy full SHA for c791211 - Browse repository at this point
Copy the full SHA c791211View commit details
Commits on Mar 19, 2021
-
Update tests for changes in
create_database
to use `with engine.connect()` context manager (commit 4f52578 )
Configuration menu - View commit details
-
Copy full SHA for 36a24eb - Browse repository at this point
Copy the full SHA 36a24ebView commit details -
Install the version of pg8000 recommended by SQLAlchemy 1.3
when testing. xref. kvesteri#500 Fix the following exception: ``` _____________________________________________________________________________ TestDatabasePostgresPg8000.test_create_and_drop _____________________________________________________________________________ self = <tests.functions.test_database.TestDatabasePostgresPg8000 object at 0x7f3b3da76490>, dsn = 'postgresql+pg8000://postgres:postgres@localhost/db_to_test_create_and_drop_via_pg8000_driver' def test_create_and_drop(self, dsn): > assert not database_exists(dsn) tests/functions/test_database.py:15: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sqlalchemy_utils/functions/database.py:488: in database_exists return bool(_get_scalar_result(engine, text)) sqlalchemy_utils/functions/database.py:443: in _get_scalar_result with engine.connect() as conn: .venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py:2263: in connect return self._connection_cls(self, **kwargs) .venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py:104: in __init__ else engine.raw_connection() .venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py:2369: in raw_connection return self._wrap_pool_connect( .venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py:2336: in _wrap_pool_connect return fn() .venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py:304: in unique_connection return _ConnectionFairy._checkout(self) .venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py:778: in _checkout fairy = _ConnectionRecord.checkout(pool) .venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py:495: in checkout rec = pool._do_get() .venv/lib/python3.8/site-packages/sqlalchemy/pool/impl.py:241: in _do_get return self._create_connection() .venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py:309: in _create_connection return _ConnectionRecord(self) .venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py:440: in __init__ self.__connect(first_connect_check=True) .venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py:664: in __connect pool.dispatch.first_connect.for_modify( .venv/lib/python3.8/site-packages/sqlalchemy/event/attr.py:314: in exec_once_unless_exception self._exec_once_impl(True, *args, **kw) .venv/lib/python3.8/site-packages/sqlalchemy/event/attr.py:285: in _exec_once_impl self(*args, **kw) .venv/lib/python3.8/site-packages/sqlalchemy/event/attr.py:322: in __call__ fn(*args, **kw) .venv/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py:1406: in go return once_fn(*arg, **kw) .venv/lib/python3.8/site-packages/sqlalchemy/engine/strategies.py:199: in first_connect dialect.initialize(c) .venv/lib/python3.8/site-packages/sqlalchemy/dialects/postgresql/pg8000.py:215: in initialize super(PGDialect_pg8000, self).initialize(connection) .venv/lib/python3.8/site-packages/sqlalchemy/dialects/postgresql/base.py:2624: in initialize super(PGDialect, self).initialize(connection) .venv/lib/python3.8/site-packages/sqlalchemy/engine/default.py:311: in initialize self.server_version_info = self._get_server_version_info( .venv/lib/python3.8/site-packages/sqlalchemy/dialects/postgresql/base.py:2869: in _get_server_version_info v = connection.execute("select version()").scalar() .venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py:1003: in execute return self._execute_text(object_, multiparams, params) .venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py:1172: in _execute_text ret = self._execute_context( .venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py:1316: in _execute_context self._handle_dbapi_exception( .venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py:1514: in _handle_dbapi_exception util.raise_(exc_info[1], with_traceback=exc_info[2]) .venv/lib/python3.8/site-packages/sqlalchemy/util/compat.py:182: in raise_ raise exception .venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py:1294: in _execute_context result = context._setup_crud_result_proxy() .venv/lib/python3.8/site-packages/sqlalchemy/engine/default.py:1258: in _setup_crud_result_proxy result = self.get_result_proxy() .venv/lib/python3.8/site-packages/sqlalchemy/engine/default.py:1233: in get_result_proxy return result.ResultProxy(self) .venv/lib/python3.8/site-packages/sqlalchemy/engine/result.py:775: in __init__ self._init_metadata() .venv/lib/python3.8/site-packages/sqlalchemy/engine/result.py:807: in _init_metadata self._metadata = ResultMetaData(self, cursor_description) .venv/lib/python3.8/site-packages/sqlalchemy/engine/result.py:290: in __init__ raw = self._merge_cursor_description( .venv/lib/python3.8/site-packages/sqlalchemy/engine/result.py:496: in _merge_cursor_description return [ .venv/lib/python3.8/site-packages/sqlalchemy/engine/result.py:496: in <listcomp> return [ .venv/lib/python3.8/site-packages/sqlalchemy/engine/result.py:616: in _merge_cols_by_none for ( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <sqlalchemy.engine.result.ResultMetaData object at 0x7f3b3daa4a90>, context = <sqlalchemy.dialects.postgresql.pg8000.PGExecutionContext_pg8000 object at 0x7f3b3dda7100> cursor_description = [('version', 25, None, None, None, None, ...)] def _colnames_from_description(self, context, cursor_description): """Extract column names and data types from a cursor.description. Applies unicode decoding, column translation, "normalization", and case sensitivity rules to the names based on the dialect. """ dialect = context.dialect case_sensitive = dialect.case_sensitive translate_colname = context._translate_colname description_decoder = ( dialect._description_decoder if dialect.description_encoding else None ) normalize_name = ( dialect.normalize_name if dialect.requires_name_normalize else None ) untranslated = None self.keys = [] for idx, rec in enumerate(cursor_description): colname = rec[0] coltype = rec[1] if description_decoder: > colname = description_decoder(colname) E TypeError: expected bytes, str found .venv/lib/python3.8/site-packages/sqlalchemy/engine/result.py:545: TypeError ```
Configuration menu - View commit details
-
Copy full SHA for 151fc8c - Browse repository at this point
Copy the full SHA 151fc8cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6146a76 - Browse repository at this point
Copy the full SHA 6146a76View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c25400 - Browse repository at this point
Copy the full SHA 1c25400View commit details
Commits on Mar 22, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 2eecaa9 - Browse repository at this point
Copy the full SHA 2eecaa9View commit details -
Fix `AttributeError: type object 'User' has no attribute '_decl_class…
…_registry'` and similar messages for other objects.
Configuration menu - View commit details
-
Copy full SHA for 651e380 - Browse repository at this point
Copy the full SHA 651e380View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66dba08 - Browse repository at this point
Copy the full SHA 66dba08View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef10a3e - Browse repository at this point
Copy the full SHA ef10a3eView commit details -
Fix `AttributeError: module 'sqlalchemy.orm.mapper' has no attribute …
…'_mapper_registry'`
Configuration menu - View commit details
-
Copy full SHA for 481245c - Browse repository at this point
Copy the full SHA 481245cView commit details -
Fix
make_order_by_deterministic
for SQLAlchemy 1.4Fix errors: ``` def make_order_by_deterministic(query): """ order_by_func = sa.asc > if not query._order_by: E AttributeError: 'Query' object has no attribute '_order_by' ``` ``` tests/functions/test_make_order_by_deterministic.py:74: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ query = <sqlalchemy.orm.query.Query object at 0x7f03d5af64f0> def make_order_by_deterministic(query): else: order_by_func = sa.asc > column = order_by.get_children()[0] E TypeError: 'itertools.chain' object is not subscriptable ```
Configuration menu - View commit details
-
Copy full SHA for 7c6ebfe - Browse repository at this point
Copy the full SHA 7c6ebfeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2563593 - Browse repository at this point
Copy the full SHA 2563593View commit details -
Configuration menu - View commit details
-
Copy full SHA for ebf0c32 - Browse repository at this point
Copy the full SHA ebf0c32View commit details -
Configuration menu - View commit details
-
Copy full SHA for dd720c0 - Browse repository at this point
Copy the full SHA dd720c0View commit details
Commits on Mar 30, 2021
-
Co-authored-by: Nicola Soranzo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c02fed4 - Browse repository at this point
Copy the full SHA c02fed4View commit details
Commits on Mar 31, 2021
-
Configuration menu - View commit details
-
Copy full SHA for c76256c - Browse repository at this point
Copy the full SHA c76256cView commit details
Commits on Apr 9, 2021
-
This returns a `Subquery` object which is not executable in SQLAlchemy 1.4: ``` tests/relationships/test_select_correlated_expression.py:399: assert session.execute(aggregate) .venv/lib/python3.8/site-packages/sqlalchemy/orm/session.py:1587: in execute statement = coercions.expect(roles.StatementRole, statement) .venv/lib/python3.8/site-packages/sqlalchemy/sql/coercions.py:200: in expect return impl._implicit_coercions( .venv/lib/python3.8/site-packages/sqlalchemy/sql/coercions.py:836: in _implicit_coercions return super(StatementImpl, self)._implicit_coercions( .venv/lib/python3.8/site-packages/sqlalchemy/sql/coercions.py:242: in _implicit_coercions self._raise_for_expected(element, argname, resolved) .venv/lib/python3.8/site-packages/sqlalchemy/sql/coercions.py:270: in _raise_for_expected util.raise_(exc.ArgumentError(msg, code=code), replace_context=err) E sqlalchemy.exc.ArgumentError: Executable SQL or text() construct expected, got <sqlalchemy.sql.selectable.Subquery at 0x7fb34b5e1880; test>. ```
Configuration menu - View commit details
-
Copy full SHA for 99c1324 - Browse repository at this point
Copy the full SHA 99c1324View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e2a03a - Browse repository at this point
Copy the full SHA 7e2a03aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c1dda36 - Browse repository at this point
Copy the full SHA c1dda36View commit details -
remove sort_query and get_query_entities
The sort_query and get_query_entities functions never worked fully as intended and contained lots of quirky edge cases: 1. sort_query function was dangerous in a sense that it could be used for really inefficient queries (sorting by non-indexed column). 2. The entity string label introspection in both functions relied on SQLAlchemy internals which were drastically changed in SA 1.4. Relying on those was never a good idea in the first place.
Configuration menu - View commit details
-
Copy full SHA for 460e1da - Browse repository at this point
Copy the full SHA 460e1daView commit details -
Remove also
get_query_entity_by_alias()
which depends on `get_query_entities()` which was removed in commit 460e1da .
Configuration menu - View commit details
-
Copy full SHA for 3807a2c - Browse repository at this point
Copy the full SHA 3807a2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8587bcb - Browse repository at this point
Copy the full SHA 8587bcbView commit details -
Configuration menu - View commit details
-
Copy full SHA for a51367b - Browse repository at this point
Copy the full SHA a51367bView commit details -
Update sqlalchemy_utils/compat.py
Co-authored-by: Nicola Soranzo <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f62ce80 - Browse repository at this point
Copy the full SHA f62ce80View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0020cf - Browse repository at this point
Copy the full SHA f0020cfView commit details -
Add health checks for SQL Server docker service
Remove `!` from password so `SA_PASSWORD` doesn't need extra quotes.
Configuration menu - View commit details
-
Copy full SHA for 2a3de7b - Browse repository at this point
Copy the full SHA 2a3de7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b95760 - Browse repository at this point
Copy the full SHA 2b95760View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d576ee - Browse repository at this point
Copy the full SHA 8d576eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2683f8a - Browse repository at this point
Copy the full SHA 2683f8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c57f6dd - Browse repository at this point
Copy the full SHA c57f6ddView commit details
Commits on Apr 11, 2021
-
change tests to use non-deprecated class
Change EncryptedType tests to use StringEncryptedType
Configuration menu - View commit details
-
Copy full SHA for f46a7a8 - Browse repository at this point
Copy the full SHA f46a7a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b28d00 - Browse repository at this point
Copy the full SHA 0b28d00View commit details -
Configuration menu - View commit details
-
Copy full SHA for 823b1dc - Browse repository at this point
Copy the full SHA 823b1dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 12d88d7 - Browse repository at this point
Copy the full SHA 12d88d7View commit details