feat: Add Python 3.13/3.14 support and bump deps#117
Merged
Conversation
Add classifiers for Python 3.13 and 3.14 (also ensure 3.12 listed) in pyproject.toml and setup.cfg, and extend Black target versions to include py312–py314. Also bump dependency versions in requirements.txt: aiohttp -> 3.13.4, cryptography -> 46.0.6, PyJWT -> 2.12.1, requests -> 2.33.0, setuptools -> >=82.0.0, yarl -> 1.23.0. These changes enable compatibility with newer Python releases and update third-party packages to newer versions.
Use timezone-aware UTC datetimes for entity creation and subscription times (add timezone import and apply datetime.timezone.utc). Update numerous tests to generate created_time in UTC. Adjust OAuth/enforcer tests: change permission_id namespace to "casbin/permission-built-in", relax the online/offline/all_count assertion, and modify user update flows to fetch the server-assigned user (id) before updating. Also set default fields in some test fixtures (e.g. plan.currency, product.currency, subscription.state) and fix permission.model to "casbin/user-model-built-in". These changes stabilize time handling and make tests align with server-assigned identifiers and updated resource naming.
Update CI workflow to use Python 3.14 in .github/workflows/build.yml. Reformat test code in src/tests/test_group.py and src/tests/test_webhook.py to use multi-line argument lists for Group.new and Webhook.new calls for improved readability/PEP8 compliance. No functional changes to logic or behavior.
Contributor
Author
|
@hsluoyz Could you please review? I can't add you as rewiver to this PR. |
There was a problem hiding this comment.
Pull request overview
Updates the package metadata and tooling configuration to advertise/support newer Python versions (3.12–3.14), bumps runtime dependencies, and adjusts the test suite to be compatible with updated server expectations and timezone-aware timestamps.
Changes:
- Add Python 3.12–3.14 classifiers and extend Black target versions through py314.
- Bump dependency versions in
requirements.txt. - Fix/adjust unit tests (UTC timestamps, updated IDs/fields, and user-update flow).
Reviewed changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/tests/test_webhook.py |
Use timezone-aware UTC created_time in webhook tests. |
src/tests/test_user.py |
Use UTC created_time for user creation. |
src/tests/test_syncer.py |
Use UTC created_time for syncer creation. |
src/tests/test_subscription.py |
Use UTC created_time and set subscription state. |
src/tests/test_session.py |
Use UTC created_time for session creation. |
src/tests/test_role.py |
Use UTC created_time for role creation. |
src/tests/test_provider.py |
Use UTC created_time for provider creation. |
src/tests/test_product.py |
Use UTC created_time and set product currency. |
src/tests/test_pricing.py |
Use UTC created_time for pricing creation. |
src/tests/test_plan.py |
Use UTC created_time and set plan currency. |
src/tests/test_permission.py |
Use UTC created_time and update model id to include owner prefix. |
src/tests/test_payment.py |
Use UTC created_time for payment creation. |
src/tests/test_organization.py |
Use UTC created_time for organization creation. |
src/tests/test_oauth.py |
Update permission ids, relax user-count assertion, and re-fetch user before update. |
src/tests/test_model.py |
Use UTC created_time for model creation. |
src/tests/test_group.py |
Use UTC created_time and reformat group creation for readability. |
src/tests/test_enforcer.py |
Use UTC created_time for enforcer creation. |
src/tests/test_cert.py |
Use UTC created_time for cert creation. |
src/tests/test_async_oauth.py |
Update permission ids, relax user-count assertion, and re-fetch user before update (async). |
src/tests/test_application.py |
Use UTC created_time for application creation. |
src/tests/test_adapter.py |
Use UTC created_time for adapter creation. |
src/casdoor/subscription.py |
Make startTime/endTime defaults timezone-aware (UTC). |
setup.cfg |
Add trove classifiers for Python 3.12–3.14. |
requirements.txt |
Bump aiohttp/cryptography/PyJWT/requests/setuptools/yarl versions. |
pyproject.toml |
Add classifiers for 3.13/3.14 and extend Black target versions to py312–py314. |
.github/workflows/build.yml |
Update CI Python version from 3.12 to 3.14. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
@dshilovprpl thanks for the contribution! Looking forward to the next PR! |
github-actions Bot
pushed a commit
that referenced
this pull request
Mar 30, 2026
# [1.41.0](v1.40.0...v1.41.0) (2026-03-30) ### Features * Add Python 3.13/3.14 support and bump deps ([#117](#117)) ([18a3b86](18a3b86))
|
🎉 This PR is included in version 1.41.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
Add classifiers for Python 3.13 and 3.14 (also ensure 3.12 listed) in pyproject.toml and setup.cfg, and extend Black target versions to include py312–py314. Also bump dependency versions in requirements.txt: aiohttp -> 3.13.4, cryptography -> 46.0.6, PyJWT -> 2.12.1, requests -> 2.33.0, setuptools -> >=82.0.0, yarl -> 1.23.0. These changes enable compatibility with newer Python releases and update third-party packages to newer versions.
Fixed tests.