FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Deprecate `Connection.set_charset()` at runtime and document warning behavior by Copilot · Pull Request #1243 · PyMySQL/PyMySQL · GitHub

Deprecate Connection.set_charset() at runtime and document warning behavior - #1243

Merged
methane merged 4 commits into
mainfrom
copilot/deprecate-connection-set-charset
May 19, 2026
Merged

Deprecate Connection.set_charset() at runtime and document warning behavior#1243
methane merged 4 commits into
mainfrom
copilot/deprecate-connection-set-charset

Conversation

Copilot AI commented May 18, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

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 emits DeprecationWarning and continues delegating to set_character_set(charset) to preserve behavior.
  • Focused deprecation coverage

    • Added a focused test in pymysql/tests/test_err.py asserting:
      • the warning category/message, and
      • delegation to set_character_set(...).
  • Changelog update

    • Added an entry under v1.2.0 noting that Connection.set_charset(charset) now emits DeprecationWarning.
warnings.warn(
    "'set_charset' is deprecated, use 'set_character_set' instead",
    DeprecationWarning,
    2,
)
self.set_character_set(charset)

Copilot AI linked an issue May 18, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Deprecate Connection.set_charset method and emit warning Deprecate Connection.set_charset() at runtime and document warning behavior May 18, 2026
Copilot AI requested a review from methane May 18, 2026 16:08

methane commented May 18, 2026

Copy link
Copy Markdown
Member

@copilot 9200bcfをrevertして

This reverts commit 9200bcf.

Co-authored-by: methane <199592+methane@users.noreply.github.com>

Copilot AI commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

@copilot 9200bcfをrevertして

9200bcf を revert しました。対応コミットは b762bc9 です。

methane marked this pull request as ready for review May 19, 2026 04:23
methane merged commit 637fe7e into main May 19, 2026
23 of 25 checks passed
methane deleted the copilot/deprecate-connection-set-charset branch May 19, 2026 04:43
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deprecate Connection.set_charset(charset)

2 participants


Back | FazBrowse Home | New Git URL