Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jun 28, 2025

The pyodide pipeline was failing due to doctest mismatches in the Z3 Python API. The issue was that Z3's string representation for sequence extraction operations changed from Extract(...) format to str.substr(...) format, but the docstring examples still expected the old format.

Changes made:

  • Extract function: Updated expected output from Extract(StringVal("hello"), 1, 3) to str.substr("hello", 1, 3)
  • SubString function: Updated expected output from Extract(StringVal("hello world"), 6, 5) to str.substr("hello world", 6, 5)
  • SubSeq function: Updated expected output from Extract(StringVal("hello world"), 0, 5) to str.substr("hello world", 0, 5)

Example of the fix:

>>> s = StringVal("hello")
>>> Extract(s, 1, 3)  # Extract 3 characters starting at position 1
str.substr("hello", 1, 3)  # Updated from: Extract(StringVal("hello"), 1, 3)

These changes align the documentation with Z3's current output format and resolve the build failures in the pyodide pipeline.

Fixes #7702.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Build break in pydoc Fix pydoc doctest failures by updating expected output format for string operations Jun 28, 2025
Copilot finished work on behalf of NikolajBjorner June 28, 2025 02:09
Copilot AI requested a review from NikolajBjorner June 28, 2025 02:09
@NikolajBjorner NikolajBjorner marked this pull request as ready for review June 28, 2025 02:10
@NikolajBjorner NikolajBjorner merged commit 84a6e4d into master Jun 28, 2025
2 of 15 checks passed
@NikolajBjorner NikolajBjorner deleted the copilot/fix-7702 branch September 15, 2025 16:49
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.

Build break in pydoc

2 participants