Repository navigation
Sync python-sqlite-sqlalchemy with the updated tutorial - #947
Merged
realpython-bot merged 1 commit intoNov 18, 2026
Merged
Conversation
…agement With Python, SQLite, and SQLAlchemy - Replace DataFrame.append() (removed in pandas 2.0) with pd.concat() in example_1 - Import declarative_base from sqlalchemy.orm (sqlalchemy.ext.declarative is deprecated) - Pin every dependency in setup.py to current releases and require Python 3.11+ - Update README Python version Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
realpython-bot
deleted the
maintenance/python-sqlite-sqlalchemy-20261118
branch
November 18, 2026 07:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs
python-sqlite-sqlalchemy/with the maintenance update of Data Management With Python, SQLite, and SQLAlchemy.What changed and why
project/examples/example_1/main.py:add_new_book()now usespd.concat()instead ofDataFrame.append(), which was removed in pandas 2.0 and raisedAttributeError.project/modules/models.py: importsdeclarative_basefromsqlalchemy.orminstead of the deprecatedsqlalchemy.ext.declarative.setup.py: every dependency is now pinned with==to its current release (pandas 3.1.1, SQLAlchemy 2.1.9, treelib 1.8.0, Flask 3.1.3, Flask-SQLAlchemy 3.1.1, Flask-Cors 6.0.5, Flask-WTF 1.3.0, python-dateutil 4.0.0, python-dotenv 1.2.4; Flask-Bootstrap4 stays at 4.0.2, the latest release).treelibwas previously unpinned. Addspython_requires=">=3.11", the floor that pandas 3 and SQLAlchemy 2.1 need.README.md: Python version updated from 3.8.0 to 3.15.2, and states the 3.11 floor.These changes match the article draft: https://realpython.com/pbjt/blog/post/2656/change/
Maintenance card: https://trello.com/c/kkoQgDkb
Verification
On Python 3.15.2, in a fresh venv set up with
python -m pip install -e .(the README's route):python -m project.examples.example_1.main: output matches the article's console listing.python -m project.examples.example_2.mainandpython -m project.build_data.build_author_book_publisher_sqliteboth run cleanly.examples/example_3(Flask): every GET route returned 200 through the Flask test client, run with-W error::DeprecationWarning. Creating an artist and an album through POST worked as well.ruff@0.14.1 format --checkandruff checkboth pass on the folder.Note:
uv pip install -e .fails on the folder becausesetup.cfgnames the packagelocal_projectwhilesetup.pynames itproject. This was already the case before this PR, which leaves it alone.piphandles it.🤖 Generated with Claude Code