Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

flask-sqlalchemy

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flask-sqlalchemy - pypi Package Compare versions

Comparing version
2.4.2
to
2.4.3
+12
-1
CHANGES.rst

@@ -0,8 +1,19 @@

Version 2.4.3
-------------
Released 2020-05-26
- Deprecate ``SQLALCHEMY_COMMIT_ON_TEARDOWN`` as it can cause various
design issues that are difficult to debug. Call
``db.session.commit()`` directly instead. :issue:`216`
Version 2.4.2
-------------
Released 2020-04-22
Released 2020-05-25
- Fix bad pagination when records are de-duped. :pr:`812`
Version 2.4.1

@@ -9,0 +20,0 @@ -------------

+9
-7

@@ -101,11 +101,13 @@ .. currentmodule:: flask_sqlalchemy

.. versionchanged:: 2.4
* ``SQLALCHEMY_ENGINE_OPTIONS`` configuration key was added.
* Deprecated keys
* ``SQLALCHEMY_ENGINE_OPTIONS`` configuration key was added.
* Deprecated keys
* ``SQLALCHEMY_NATIVE_UNICODE``
* ``SQLALCHEMY_POOL_SIZE``
* ``SQLALCHEMY_POOL_TIMEOUT``
* ``SQLALCHEMY_POOL_RECYCLE``
* ``SQLALCHEMY_MAX_OVERFLOW``
* ``SQLALCHEMY_NATIVE_UNICODE``
* ``SQLALCHEMY_POOL_SIZE``
* ``SQLALCHEMY_POOL_TIMEOUT``
* ``SQLALCHEMY_POOL_RECYCLE``
* ``SQLALCHEMY_MAX_OVERFLOW``
.. versionchanged:: 2.4.3
Deprecated ``SQLALCHEMY_COMMIT_ON_TEARDOWN``.

@@ -112,0 +114,0 @@

Metadata-Version: 1.2
Name: Flask-SQLAlchemy
Version: 2.4.2
Version: 2.4.3
Summary: Adds SQLAlchemy support to your Flask application.

@@ -5,0 +5,0 @@ Home-page: https://github.com/pallets/flask-sqlalchemy

@@ -27,3 +27,3 @@ # -*- coding: utf-8 -*-

__version__ = "2.4.2"
__version__ = "2.4.3"

@@ -698,2 +698,6 @@ # the best timer function for the platform

The `use_native_unicode` parameter was deprecated.
.. versionchanged:: 2.4.3
``COMMIT_ON_TEARDOWN`` is deprecated and will be removed in
version 3.1. Call ``db.session.commit()`` directly instead.
"""

@@ -848,2 +852,9 @@

if app.config['SQLALCHEMY_COMMIT_ON_TEARDOWN']:
warnings.warn(
"'COMMIT_ON_TEARDOWN' is deprecated and will be"
" removed in version 3.1. Call"
" 'db.session.commit()'` directly instead.",
DeprecationWarning,
)
if response_or_exc is None:

@@ -850,0 +861,0 @@ self.session.commit()

Metadata-Version: 1.2
Name: Flask-SQLAlchemy
Version: 2.4.2
Version: 2.4.3
Summary: Adds SQLAlchemy support to your Flask application.

@@ -5,0 +5,0 @@ Home-page: https://github.com/pallets/flask-sqlalchemy

@@ -25,3 +25,5 @@ import flask

def test_commit_on_success(client):
resp = client.post('/create')
with pytest.warns(DeprecationWarning, match="COMMIT_ON_TEARDOWN"):
resp = client.post('/create')
assert resp.status_code == 200

@@ -32,4 +34,6 @@ assert client.get('/').data == b'Test one'

def test_roll_back_on_failure(client):
resp = client.post('/create', data={'fail': 'on'})
with pytest.warns(DeprecationWarning, match="COMMIT_ON_TEARDOWN"):
resp = client.post('/create', data={'fail': 'on'})
assert resp.status_code == 500
assert client.get('/').data == b''