Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for Python 3.14 by updating the test matrix, classifiers, and fixing compatibility issues. The changes include adapting the coroutine function detection logic for Python 3.14's improved inspect.iscoroutinefunction, fixing test declarations that were incorrectly marked as async, and adding an ensure_ascii parameter to the JSON serializer.
Key changes:
- Added Python 3.14 to the CI test matrix and package classifiers
- Updated coroutine function detection to use
inspect.iscoroutinefunctionfor Python 3.14+ - Fixed JSON serializer tests to be synchronous (removed unnecessary
asyncdeclarations) - Added
ensure_asciiparameter toJSONSerializerclass with corresponding tests
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/serializers/test_json_serializer.py | Corrected test functions from async to sync, removed PLR2004 noqa comments (now globally ignored), and added parametrized test for ensure_ascii parameter |
| taskiq/serializers/json_serializer.py | Added ensure_ascii parameter to JSONSerializer constructor and applied it in dumpb method |
| taskiq/receiver/receiver.py | Added Python version detection and conditional use of inspect.iscoroutinefunction for Python 3.14+ to address coroutine detection improvements |
| pyproject.toml | Added Python 3.14 classifier and globally ignored PLR2004 (magic value) rule for all test files |
| .github/workflows/test.yml | Added Python 3.14 to the test matrix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
40bbe0c to
5f772a4
Compare
s3rius
approved these changes
Dec 7, 2025
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.
asyncio.iscoroutinefunctiondeprecation in 3.16