-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binding DB sessions based on SQLAlchemy 1, changing how to declare Base Model classes, and other code modernization #6
base: master
Are you sure you want to change the base?
Conversation
…se Model classes, and other code modernization - DB session binding based on SQLAlchemy 2, Base Model class declaration method change - Reflected select, delete code based on SQLAlchemy 2 - Changed how to declare Model class based on SQLAlchemy 2 - Added pyproject.toml file after removing setup.py due to the introduction of PEP 517/518 - Fixed minimum installed version to Python 3.7
Warning Rate Limit Exceeded@search5 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 11 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe updates primarily focus on ensuring compatibility with SQLAlchemy version 2 across various components, streamlining the build and publish process for packages, and refining model annotations in the Changes
Related issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to path filters (1)
pyproject.toml
is excluded by:!**/*.toml
Files selected for processing (3)
- CHANGELOG.md (1 hunks)
- Makefile (1 hunks)
- social_pyramid/models.py (2 hunks)
Additional comments: 5
Makefile (3)
- 2-2: The use of
python -m build
is a modern and recommended approach for building packages, aligning with PEP 517/518. This change simplifies the build process and ensures compatibility with modern Python packaging standards.- 5-5: Using
twine upload dist/*
for publishing packages is a secure and recommended practice. It ensures that the package is uploaded securely to PyPI, protecting against potential man-in-the-middle attacks that could compromise package integrity.- 1-8: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [8-10]
The clean command effectively removes bytecode files,
__pycache__
directories, and build artifacts, ensuring a clean state for subsequent builds. This is a good practice for maintaining a clean and manageable project structure.CHANGELOG.md (1)
- 10-13: The changelog entries clearly document the significant changes made in this release, including compatibility updates for SQLAlchemy 2, packaging information updates per PEP 517/518, and the update to the minimum Python version requirement. This adherence to the Keep a Changelog format helps users understand the impact of the changes and the project's adherence to Semantic Versioning.
social_pyramid/models.py (1)
- 38-42: The use of
Mapped
andmapped_column
for type annotations in theUserSocialAuth
class aligns with SQLAlchemy 2's recommended practices for ORM model declarations. This modern approach enhances readability and maintainability of the code by clearly indicating the types of the model attributes. It's also worth noting the correct use ofForeignKey
andrelationship
to establish the association betweenUserSocialAuth
andUser
, which is crucial for maintaining referential integrity in the database.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Proposed changes
With the introduction of PEP 517/518, the Python package build process has changed to allow the use of multiple build backends. We've improved the build process accordingly.
In addition, we improved the program to ensure that several previously developed libraries work properly with the newly updated SQLAlchemy 2 in January 2023.
Please consider this PR and look forward to the new version release. I took the time to fix the program and submit the patch because I'm planning to include it in a Korean Flask-based programming book I'm writing.
Types of changes
Please check the type of change your PR introduces:
Checklist
Put an
x
in the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask. We're here to
help! This is simply a reminder of what we are going to look for before merging
your code.
Summary by CodeRabbit
UserSocialAuth
class in the social authentication system for better type annotation and clarity.