Skip to content

PYTHON-6140 [v4.18] [Build Failure] TestBSON.test_encode_size_limit MemoryError on Windows - #3093

Open
blink1073 wants to merge 1 commit into
mongodb:v4.18from
blink1073:PYTHON-6140-v4.18
Open

blink1073 wants to merge 1 commit into
mongodb:v4.18from
blink1073:PYTHON-6140-v4.18

Conversation

@blink1073

@blink1073 blink1073 commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

PYTHON-6140

Backport of #3092

Changes in this PR

Skip TestBSON.test_encode_size_limit on hosts with less than 6GiB of total physical memory. The test needs ~4GiB of peak memory to encode a document that exceeds the BSON size limit, but on 4GB windows-64-vsMulti-small hosts the allocations fail with MemoryError before the expected ValueError is raised.

Test Plan

  • Verified locally: test_encode_size_limit now skips on a 4GiB host.
  • Win32 tests pass in CI.

Checklist

Checklist for Author

  • Did you update the changelog (if necessary)? N/A
  • Is there test coverage? — N/A
  • Is any followup work tracked in a JIRA ticket? N/A

Checklist for Reviewer

  • Does the title of the PR reference a JIRA Ticket?
  • Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
  • Is all relevant documentation (README or docstring) updated?

@blink1073
blink1073 requested a review from a team as a code owner October 2, 2026 21:20
@blink1073
blink1073 requested a review from sleepyStick October 2, 2026 21:20
@blink1073
blink1073 marked this pull request as draft October 2, 2026 21:21
@blink1073
blink1073 marked this pull request as ready for review October 2, 2026 21:47

This branch has not been deployed

No deployments
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.

1 participant