Remove deprecated cgi module and clean up related dead code#1771
Open
Copilot wants to merge 2 commits intodevelopmentfrom
Open
Remove deprecated cgi module and clean up related dead code#1771Copilot wants to merge 2 commits intodevelopmentfrom
cgi module and clean up related dead code#1771Copilot wants to merge 2 commits intodevelopmentfrom
Conversation
Agent-Logs-Url: https://github.com/tableau/server-client-python/sessions/453f920c-7857-4503-ad99-0ccef076d792 Co-authored-by: jacalata <2009720+jacalata@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove deprecated cgi module to comply with PEP-0594
Remove deprecated Apr 7, 2026
cgi module and clean up related dead code
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.
The
cgimodule was deprecated in Python 3.11 and removed in Python 3.13 (PEP-594). The three download endpoints had already migrated fromcgi.parse_header()toemail.message.Message.get_filename(), but left behind dead code from the old dict-based API.Changes
fix_filename()fromhelpers/headers.py(and deleted the now-empty file) — it existed solely to normalizecgi.parse_header()'s dict output (handlingfilename*=UTF-8''...keys).Message.get_filename()already decodes RFC 2231 encoding natively, making this function a permanent no-op.fix_filenameimports and calls fromdatasources_endpoint.py,workbooks_endpoint.py,flows_endpoint.pyparams→filenamein each download method to reflect thatget_filename()returns a string, not a parameter dictBefore
After
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
test/usr/bin/python python -m pytest test/ -v arse_header\|cgi k/server-client-python/server-client-python/tableauserverclient/filesys_helpers.py tnet/tools/bash(dns block)/usr/bin/python python -m pytest test/ rev-�� HEAD git k/_temp/ghcca-node/node/bin/git --abbrev-ref HEAD k/_temp/ghcca-no--abbrev-ref git desc�� --tags --dirty git --long --match v[[:digit:]]* git(dns block)/usr/bin/python python -m pytest test/ rev-�� --git-dir git rgo/bin/git HEAD git git git show�� -s --format=%ci k/_temp/ghcca-node/node/bin/git --git-dir git rgo/bin/git git(dns block)If you need me to access, download, or install something from one of these locations, you can either: