Fix Python 3.9 type hint syntax evaluation errors#7
Conversation
thesk7828
commented
Apr 24, 2026
- Updates all SQLAlchemy models to use Optional[X] instead of X | None to maintain backwards compatibility with Python 3.9 when Mapped type hints are dynamically evaluated.
- Installs eval-type-backport in requirements.txt to allow Pydantic to safely parse X | None types dynamically under Python 3.9.
- Reference: Fail to launch the server #6
- Updates all SQLAlchemy models to use Optional[X] instead of X | None to maintain backwards compatibility with Python 3.9 when Mapped type hints are dynamically evaluated. - Installs eval-type-backport in requirements.txt to allow Pydantic to safely parse X | None types dynamically under Python 3.9.
iamfarooqh
left a comment
There was a problem hiding this comment.
Changes look good. Approved.
|
Hey @thesk7828 first off, thank you for the thorough investigation and the fix! The changes are solid and the code is now working correctly for Python 3.9 users. However, I noticed that your contribution is not appearing in the repository's contributors list, and I wanted to explain why so you can make sure your future contributions are properly credited. What happened -> The commit in this PR was authored with the following email address: This is a locally generated email based on your machine's hostname, not a real email address. GitHub links commits to GitHub accounts by matching the commit author email against the email registered on the account. Since this email doesn't match your GitHub account email, GitHub cannot attribute the commit to @thesk7828 so you won't appear in the contributors graph despite the code being merged. How to fix it for future contributions Run these two commands to configure git with your real GitHub email: You can find the exact email registered on your GitHub account at: https://github.com/settings/emails Once set, all future commits from your machine will be correctly linked to your GitHub account and you will appear as a contributor. Verifying it worked After updating the config, you can confirm the correct email is set by running:
|