Comments (7)
Seeing the same issue on our end.
from flask-marshmallow.
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.
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.
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.
[[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.
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.
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)
- TypeError: 'method' object is not iterable HOT 1
- How to return MarshalResult when use SQLAlchemyAutoSchema HOT 1
- Race Conditions in Marshmallow - Context Not thread safe?
- ModuleNotFoundError: No module named 'flask_marshmallow' HOT 2
- HyperlinkRelated creating invalid endpoint HOT 1
- SQLAlchemy Numeric deserialized as string with auto_field
- Python3.10: Distutils depreciation warning HOT 1
- Better Separation of Duties HOT 1
- Been a while; time for a release? HOT 3
- How do I create a new ORM object with information passed via JSON? HOT 1
- DeprecationWarning from Flask-SQLAlchemy for app.extensions["sqlalchemy"] HOT 1
- Flask deprecation warning HOT 2
- '_SQLAlchemyState' object has no attribute 'session' HOT 3
- Building docs fails with Sphinx 7.2 and SOURCE_DATE_EPOCH environment variable
- The function decorated by the "post_load" decorator will undergo changes in parameter types as the function name changes.
- New release from dev HOT 2
- Add fields from APIFlask? HOT 8
- TypeError: Schema.__init__() got an unexpected keyword argument 'include_data' HOT 1
- File(allow_none=True) is not possible HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask-marshmallow.