Deprecate Connection.set_charset() at runtime and document warning behavior#1243
Merged
Conversation
Agent-Logs-Url: https://github.com/PyMySQL/PyMySQL/sessions/eda23570-b857-4910-815c-5cb6bb360740 Co-authored-by: methane <199592+methane@users.noreply.github.com>
Agent-Logs-Url: https://github.com/PyMySQL/PyMySQL/sessions/eda23570-b857-4910-815c-5cb6bb360740 Co-authored-by: methane <199592+methane@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Deprecate Connection.set_charset method and emit warning
Deprecate May 18, 2026
Connection.set_charset() at runtime and document warning behavior
Member
|
@copilot 9200bcfをrevertして |
This reverts commit 9200bcf. Co-authored-by: methane <199592+methane@users.noreply.github.com>
Contributor
Author
methane
approved these changes
May 19, 2026
methane
approved these changes
May 19, 2026
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.
Connection.set_charset(charset)was marked for future removal but did not emit a deprecation signal at call time. This change adds runtime deprecation signaling and updates release notes accordingly.Runtime deprecation behavior
Connection.set_charset(charset)now emitsDeprecationWarningand continues delegating toset_character_set(charset)to preserve behavior.Focused deprecation coverage
pymysql/tests/test_err.pyasserting:set_character_set(...).Changelog update
v1.2.0noting thatConnection.set_charset(charset)now emitsDeprecationWarning.