Skip to content
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

Add support for standard list type hints #50

Merged
merged 8 commits into from
Jul 13, 2024

Conversation

smt5541
Copy link
Collaborator

@smt5541 smt5541 commented Jul 1, 2024

🛠 Changes being made

Give examples of the changes you've made in this pull request. Include an itemized list if you can.

  • Update ValidateParameters#__call__ and ValidateParameters#validate to support list alongside the existing support for typing.List
  • Update GitHub Actions to run tests on Python 3.9-3.12
  • Update setup.py to add supported version information and additional PyPI classifiers

🧠 Rationale behind the change

Why did you choose to make these changes?

Reading through the typing documentation, I noticed that typing.List was deprecated as of Python 3.9. Since this library currently targets Python 3.9 at a minimum per some of its dependencies, it seems this would be a fitting change

Does this pull request resolve any open issues?

Closes #48

Were there any trade-offs you had to consider?

I had to ensure that our minimum supported Python version would not be changed by implementing this support. Our dependencies pin us to a minimum of Python 3.9, so it seems we remain at that level.

🧪 Testing

  • Have tests been added or updated for the changes introduced in this pull request?

  • Are the changes backwards compatible?

If the changes aren't backwards compatible, what other options were explored?

✨ Quality check

  • Are your changes free of any erroneous print statements, debuggers or other leftover code?

  • Has the README been updated to reflect the changes introduced (if applicable)?

💬 Additional comments

Feel free to add any further information below

Depends on #45

@smt5541 smt5541 self-assigned this Jul 2, 2024
@smt5541 smt5541 requested a review from Ge0rg3 July 2, 2024 00:19
flask_parameter_validation/parameter_validation.py Outdated Show resolved Hide resolved
flask_parameter_validation/parameter_validation.py Outdated Show resolved Hide resolved
flask_parameter_validation/parameter_validation.py Outdated Show resolved Hide resolved
flask_parameter_validation/parameter_validation.py Outdated Show resolved Hide resolved
@Ge0rg3
Copy link
Owner

Ge0rg3 commented Jul 11, 2024

I think to resolve current conflicts we can just take this branch version as source of truth?

@smt5541 smt5541 force-pushed the dev/smt5541/typing_list_deprecated branch from 5779749 to 3b43953 Compare July 11, 2024 21:58
@smt5541 smt5541 force-pushed the dev/smt5541/typing_list_deprecated branch from 3b43953 to e425b8c Compare July 11, 2024 22:17
@smt5541 smt5541 requested a review from Ge0rg3 July 11, 2024 22:18
@smt5541
Copy link
Collaborator Author

smt5541 commented Jul 11, 2024

I think to resolve current conflicts we can just take this branch version as source of truth?

Eh, mostly - some indentations introduced in other PRs made it a little messier, but that's all set now

@Ge0rg3 Ge0rg3 merged commit 2edb5e5 into master Jul 13, 2024
4 checks passed
@Ge0rg3
Copy link
Owner

Ge0rg3 commented Jul 13, 2024

Btw love the added pypi classifiers on this, should help with project visibility 👍

@Ge0rg3 Ge0rg3 deleted the dev/smt5541/typing_list_deprecated branch July 13, 2024 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

typing.List is deprecated in favor of list as of Python 3.9
3 participants