Skip to content

Backport changes to v4.20 branch - #3249

Open
blink1073 wants to merge 10 commits into
v4.20from
main
Open

blink1073 wants to merge 10 commits into
v4.20from
main

Conversation

@blink1073

Copy link
Copy Markdown
Member

Changes in this PR

Backport commits to the v4.20 branch to pick up bug fixes.

Test Plan

Evergreen tests.

Checklist

Checklist for Author

  • Did you update the changelog (if necessary)?
  • Is there test coverage?
  • Is any followup work tracked in a JIRA ticket? If so, add link(s).

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 and others added 9 commits November 19, 2026 12:24
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ns group (#3243)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mongodb-drivers-pr-bot[bot] <147046816+mongodb-drivers-pr-bot[bot]@users.noreply.github.com>
Co-authored-by: Steven Silvester <steve.silvester@mongodb.com>
…ariable name (#3238)

Co-authored-by: Iris <iris.ho@mongodb.com>
Co-authored-by: Iris <58442094+sleepyStick@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The schema-1.30 fixtures fail during setup because the unified runner only supports schema 1.28, and lowering their version alone would leave the new dsc restriction unenforced.

1 open issue
What changed in this PR

Backports fixes and maintenance updates to PyMongo’s v4.20 branch, preparing the 4.20.2 patch release.

Changes:

  • Validates GridFS filenames and fixes the logging environment variable while preserving compatibility with its misspelled name.
  • Adds staged synchronous-code generation, rollback handling, and regression tests.
  • Updates unified test fixtures, CI compatibility, fuzz replay, and release documentation.
File Description
tools/​test_synchro.py Tests staged generation, publication, rollback, and cleanup.
tools/​synchro.py Stages generated files and adds atomic replacement with rollback.
test/​unified-test-format/​invalid/​runOnRequirement-dsc-type.json Adds an invalid dsc type fixture.
test/​unified-test-format/​invalid/​runOnRequirement-dsc-enum.json Adds an invalid dsc value fixture.
test/​transactions/​unified/​commit.json Updates the schema version and adds a dsc exclusion.
test/​test_logger.py Mirrors logging configuration regression tests.
test/​test_gridfs.py Mirrors invalid-filename regression tests.
test/​helpers_shared.py Uses the correctly spelled logging environment variable.
test/​discovery_and_monitoring/​unified/​rediscover-quickly-after-step-down.json Updates the schema version and adds a dsc exclusion.
test/​asynchronous/​test_logger.py Tests logging variable precedence and legacy fallback.
test/​asynchronous/​test_gridfs.py Tests rejection of non-string filenames.
pymongo/​logger.py Reads the correct logging variable with legacy fallback.
gridfs/​synchronous/​grid_file.py Mirrors filename validation and API documentation.
gridfs/​asynchronous/​grid_file.py Validates filenames and documents the new type error.
doc/​changelog.rst Adds 4.20.2 fixes and updates security references.
CONTRIBUTING.md Documents staged generation and backup recovery.
.gitignore Ignores synchro staging, backup, and temporary files.
.github/​workflows/​sbom.yml Updates the pinned pull-request creation action.
.evergreen/​spec-patch/​PYTHON-6058.patch Adds a temporary credential-disclosure corpus patch.
.evergreen/​scripts/​test_setup_uv.py Adds a Python 3.6 syntax compatibility check.
.evergreen/​scripts/​setup_uv.py Removes an unsupported future import for older hosts.
.evergreen/​scripts/​setup_tests.py Disables pytest assertion rewriting on FIPS hosts.
.evergreen/​scripts/​capture-fuzz-corpus.sh Requests fuzz dependencies when replaying captured inputs.

Review effort: Balanced

Comment thread test/transactions/unified/commit.json Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The runner accepts schema 1.30 but ignores dsc requirements, allowing tests marked dsc: "forbid" to run on DSC deployments instead of being skipped.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread test/asynchronous/unified_format.py Resolved
@blink1073
blink1073 marked this pull request as ready for review November 24, 2026 19:05
@blink1073
blink1073 requested a review from a team as a code owner November 24, 2026 19:05
@codeowners-service-app

Copy link
Copy Markdown

Assigned caseyclements for team dbx-python because aclark4life is out of office.

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.

5 participants