Coder Social home page Coder Social logo

Comments (7)

Sillocan avatar Sillocan commented on August 17, 2024

Seeing the same issue on our end.

from flask-marshmallow.

sirosen avatar sirosen commented on August 17, 2024

Hi there, thanks for reporting this!
I want to note up front that 0.15.0 is the first release in a couple of years, so there's a lot of potential drift to account for, as other packages have updated over time. I'll be trying to understand and fix issues as quickly as I can, but it may take some time.

Could you also let me know the version numbers of the relevant packages you're using?
In particular, versions of marshmallow, flask-sqlalchemy (if applicable), marshmallow-sqlalchemy, and sqlalchemy strike me as relevant. It's best to work out how to reproduce the issue before I try making any adjustments to fix it.

from flask-marshmallow.

ChriZzn avatar ChriZzn commented on August 17, 2024

Hi @sirosen,

i have the same Problem, i think it is related with this Update: https://github.com/sqlalchemy/sqlalchemy/releases/tag/rel_2_0_9

Because this change got also Backported to v1.4.48.

from flask-marshmallow.

Sillocan avatar Sillocan commented on August 17, 2024
marshmallow-3.19.0
flask_marshmallow-0.15.0
Flask_SQLAlchemy-2.5.1
marshmallow_sqlalchemy-0.29.0
SQLAlchemy-1.4.47

from flask-marshmallow.

inbarshani avatar inbarshani commented on August 17, 2024
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
atomicwrites = "*"
boto3="*"
autopep8 = "*"
colorama = "*"
croniter = "*"
firebase-admin = "*"
flask = "==2.0.*"
flask-cors = "*"
flask-mail = "*"
flask-marshmallow = "==0.14.0"
flask-migrate = "*"
flask-sqlalchemy = "==2.5.1"
hubspot3 = "*"
intuit-oauth = "*"
marshmallow-sqlalchemy = "*"
mock = "*"
pdfkit = "*"
psycopg2-binary = "==2.9.5"
pylint = "*"
pytest = "==6.2.0"
python-dotenv = "~=0.21.1"
pytz = "*"
requests = "*"
shapely = "==1.7.1"
soracom = "==0.0.1.post0"
sqlalchemy = "==1.4.46"
coverage-threshold = "==0.4.4"
coverage = "==6.3.2"
orjson = "~=3.7.7"
deepdiff = "~=5.8.1"
flask-jwt-extended = "~=4.4.4"
werkzeug = "~=2.0.1"
flask-bcrypt = "*"
pytest-cov = "~=4.0.0"
pytest-xdist = "~=3.2.1"
filelock = "==3.9.0"
sqlalchemycollector = "*"

[dev-packages]
flake8 = "*"

[requires]
python_version = "3.8"

from flask-marshmallow.

sirosen avatar sirosen commented on August 17, 2024

It seems very likely that most of these issues stem from the fact that support for flask-sqlalchemy<3 was dropped. This was not correctly documented in the changelog before (sorry!), which has been fixed in the repo and will update on readthedocs with the next release.

There are two comments here which indicate flask-sqlalchemy v2, which supports this guess.

I have pretty limited availability the next few days to respond or work on things, so I'm just going to brain dump some thoughts (hopefully informative and uncontroversial):

  • this is not a critical issue, since users can easily pin to v0.14.0 until they're ready to upgrade
  • there's no plan to support flask-sqlalchemy v2 in a future release. I would only consider it in extraordinary circumstances -- my intent is to get this library on healthy footing again, including reasonable lower bounds for dependencies
  • upgrading to flask-sqlalchemy v3 is a pretty minor matter for most apps -- I recently handled this at work and it was a chore but not a hard one -- and is my recommendation to most users
  • as a general recommendation, you should be pinning dependencies for any deployed production applications (pdm, poetry, pipenv, pip-tools, etc)

That last point is not meant to put blame on anyone seeing problems -- if someone is having a bad time because this broke their app I'm genuinely sorry -- but to help make sure that folks walk away with the right conclusions. If you're not pinning dependencies, you're going to experience breakage sooner or later.

from flask-marshmallow.

sirosen avatar sirosen commented on August 17, 2024

I've been able to reproduce the initial report using flask-sqlalchemy 2.5.1, and confirm that it's fixed with flask-sqlalchemy 3.0.3.
As such, I'm going to close this as a (fixed) documentation issue about ending support for flask-sqlalchemy 2.x

Here's my reproducer for reference:

import flask

from flask_marshmallow import Marshmallow
from flask_sqlalchemy import SQLAlchemy


db = SQLAlchemy()
ma = Marshmallow()


def create_app() -> flask.Flask:
    app = flask.Flask("extapp")
    app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///:memory:"
    db.init_app(app)
    ma.init_app(app)
    return app


app = create_app()

from flask-marshmallow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.