Fix Python 3.12 test failures: replace removed distutils module#115
Merged
thientc merged 2 commits into113-documentation-for-python-packagefrom Mar 19, 2026
Merged
Fix Python 3.12 test failures: replace removed distutils module#115thientc merged 2 commits into113-documentation-for-python-packagefrom
thientc merged 2 commits into113-documentation-for-python-packagefrom
Conversation
…fix test_newline assertion - Replace `from distutils.dir_util import copy_tree` with `from shutil import copytree` in base_generator.py - Remove unused distutils import from generator.py - Use copytree(..., dirs_exist_ok=True) to match original copy_tree behavior - Fix test_newline in test_fuzzer.py to match actual _xml_escape implementation Co-authored-by: thientc <12711255+thientc@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add custom exceptions for structured error handling in Futag
Fix Python 3.12 test failures: replace removed distutils module
Mar 19, 2026
db5c4c9
into
113-documentation-for-python-package
8 checks passed
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.
CI fails on Python 3.12 because
distutilswas removed from the stdlib (PEP 632).base_generator.py: Replacefrom distutils.dir_util import copy_treewithfrom shutil import copytree, usingdirs_exist_ok=Trueto preserve existing behaviorgenerator.py: Remove unuseddistutilsimport (inherited fromBaseGenerator)test_fuzzer.py: Fixtest_newlineassertion —_xml_escapereplaces\nwith space, not All 45 tests pass on Python 3.12.
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.