Skip to content
This repository has been archived by the owner on Feb 17, 2019. It is now read-only.

Update flask-sqlalchemy to 2.3.2 #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pyup-bot
Copy link
Contributor

This PR updates Flask-SQLAlchemy from 1.0 to 2.3.2.

Changelog

2.3.2

-------------

Released on October 11, 2017

- Don't mask the parent table for single-table inheritance models. (`561`_)

.. _561: https://github.com/mitsuhiko/flask-sqlalchemy/pull/561

2.3.1

-------------

Released on October 5, 2017

- If a model has a table name that matches an existing table in the metadata,
use that table. Fixes a regression where reflected tables were not picked up
by models. (`551`_)
- Raise the correct error when a model has a table name but no primary key.
(`556`_)
- Fix ``repr`` on models that don't have an identity because they have not been
flushed yet. (`555`_)
- Allow specifying a ``max_per_page`` limit for pagination, to avoid users
specifying high values in the request args. (`542`_)
- For ``paginate`` with ``error_out=False``, the minimum value for ``page`` is
1 and ``per_page`` is 0. (`558`_)

.. _542: https://github.com/mitsuhiko/flask-sqlalchemy/pull/542
.. _551: https://github.com/mitsuhiko/flask-sqlalchemy/pull/551
.. _555: https://github.com/mitsuhiko/flask-sqlalchemy/pull/555
.. _556: https://github.com/mitsuhiko/flask-sqlalchemy/pull/556
.. _558: https://github.com/mitsuhiko/flask-sqlalchemy/pull/558

2.3.0

-------------

Released on September 28, 2017

- Multiple bugs with ``__tablename__`` generation are fixed. Names will be
generated for models that define a primary key, but not for single-table
inheritance subclasses. Names will not override a ``declared_attr``.
``PrimaryKeyConstraint`` is detected. (`541`_)
- Passing an existing ``declarative_base()`` as ``model_class`` to
``SQLAlchemy.__init__`` will use this as the base class instead of creating
one. This allows customizing the metaclass used to construct the base.
(`546`_)
- The undocumented ``DeclarativeMeta`` internals that the extension uses for
binds and table name generation have been refactored to work as mixins.
Documentation is added about how to create a custom metaclass that does not
do table name generation. (`546`_)
- Model and metaclass code has been moved to a new ``models`` module.
``_BoundDeclarativeMeta`` is renamed to ``DefaultMeta``; the old name will be
removed in 3.0. (`546`_)
- Models have a default ``repr`` that shows the model name and primary key.
(`530`_)
- Fixed a bug where using ``init_app`` would cause connectors to always use the
``current_app`` rather than the app they were created for. This caused issues
when multiple apps were registered with the extension. (`547`_)

.. _530: https://github.com/mitsuhiko/flask-sqlalchemy/pull/530
.. _541: https://github.com/mitsuhiko/flask-sqlalchemy/pull/541
.. _546: https://github.com/mitsuhiko/flask-sqlalchemy/pull/546
.. _547: https://github.com/mitsuhiko/flask-sqlalchemy/pull/547

2.2

-----------

Released on February 27, 2017, codename Dubnium

- Minimum SQLAlchemy version is 0.8 due to use of ``sqlalchemy.inspect``.
- Added support for custom ``query_class`` and ``model_class`` as args
to the ``SQLAlchemy`` constructor. (`328`_)
- Allow listening to SQLAlchemy events on ``db.session``. (`364`_)
- Allow ``__bind_key__`` on abstract models. (`373`_)
- Allow ``SQLALCHEMY_ECHO`` to be a string. (`409`_)
- Warn when ``SQLALCHEMY_DATABASE_URI`` is not set. (`443`_)
- Don't let pagination generate invalid page numbers. (`460`_)
- Drop support of Flask < 0.10. This means the db session is always tied to
the app context and its teardown event. (`461`_)
- Tablename generation logic no longer accesses class properties unless they
are ``declared_attr``. (`467`_)

.. _328: https://github.com/mitsuhiko/flask-sqlalchemy/pull/328
.. _364: https://github.com/mitsuhiko/flask-sqlalchemy/pull/364
.. _373: https://github.com/mitsuhiko/flask-sqlalchemy/pull/373
.. _409: https://github.com/mitsuhiko/flask-sqlalchemy/pull/409
.. _443: https://github.com/mitsuhiko/flask-sqlalchemy/pull/443
.. _460: https://github.com/mitsuhiko/flask-sqlalchemy/pull/460
.. _461: https://github.com/mitsuhiko/flask-sqlalchemy/pull/461
.. _467: https://github.com/mitsuhiko/flask-sqlalchemy/pull/467

2.1

-----------

Released on October 23rd 2015, codename Caesium

- Table names are automatically generated in more cases, including
subclassing mixins and abstract models.
- Allow using a custom MetaData object.
- Add support for binds parameter to session.

2.0

-----------

Released on August 29th 2014, codename Bohrium

- Changed how the builtin signals are subscribed to skip non Flask-SQLAlchemy
sessions.  This will also fix the attribute error about model changes
not existing.
- Added a way to control how signals for model modifications are tracked.
- Made the ``SignallingSession`` a public interface and added a hook
for customizing session creation.
- If the ``bind`` parameter is given to the signalling session it will no
longer cause an error that a parameter is given twice.
- Added working table reflection support.
- Enabled autoflush by default.
- Consider ``SQLALCHEMY_COMMIT_ON_TEARDOWN`` harmful and remove from docs.
Links

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant