Skip to content

Fix Python 3.9 type hint syntax evaluation errors#7

Merged
iamfarooqh merged 1 commit intoAISecurityConsortium:mainfrom
thesk7828:fix/python-39-type-hints
Apr 24, 2026
Merged

Fix Python 3.9 type hint syntax evaluation errors#7
iamfarooqh merged 1 commit intoAISecurityConsortium:mainfrom
thesk7828:fix/python-39-type-hints

Conversation

@thesk7828
Copy link
Copy Markdown

  • 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 iamfarooqh self-assigned this Apr 24, 2026
@iamfarooqh iamfarooqh added the good first issue Good for newcomers label Apr 24, 2026
Copy link
Copy Markdown
Member

@iamfarooqh iamfarooqh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good. Approved.

@iamfarooqh iamfarooqh merged commit 2513291 into AISecurityConsortium:main Apr 24, 2026
4 checks passed
@iamfarooqh
Copy link
Copy Markdown
Member

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:
shaktishrivas@shaktis-MacBook-Pro.local

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:

git config --global user.email "your-github-email@example.com"
git config --global user.name "Your Name"

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:

git config --global user.email
Again, great work on tracking down the root cause and providing a clean fix. We appreciate the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants