Skip to content

fix(python-sdk): suppress Pydantic shadow warnings for MonitorPageDiff/Snapshot - #3694

Merged
mogery merged 1 commit into
firecrawl:mainfrom
Adit-Jain-srm:fix/3643-pydantic-json-field-shadow
Jun 25, 2026
Merged

mogery merged 1 commit into
firecrawl:mainfrom
Adit-Jain-srm:fix/3643-pydantic-json-field-shadow

Conversation

@Adit-Jain-srm

@Adit-Jain-srm Adit-Jain-srm commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #3643 — MonitorPageSnapshot and MonitorPageDiff trigger UserWarning about shadowing Pydantic's BaseModel.json() method.

Problem

The json field in MonitorPageDiff (line 1116) and MonitorPageSnapshot (line 1123) shadows Pydantic's built-in json attribute, causing a UserWarning on import.

Fix

Add warnings.filterwarnings("ignore", ...) entries for these two classes, matching the existing pattern already used for ScrapeFormats and Document (lines 34-41 of types.py).

Changes

  • apps/python-sdk/firecrawl/v2/types.py: +8 lines (two warning filter entries)

Summary by cubic

Suppresses pydantic UserWarning caused by json field shadowing in MonitorPageDiff and MonitorPageSnapshot. Fixes #3643 by adding ignore filters in apps/python-sdk/firecrawl/v2/types.py to silence import-time warnings.

  • Bug Fixes
    • Added two warnings.filterwarnings("ignore", ...) entries for these models.
    • Mirrors existing filters for ScrapeFormats and Document; no behavior change.

Written for commit db1a7cd. Summary will update on new commits.

Review in cubic

…f and MonitorPageSnapshot

The 'json' field in MonitorPageDiff and MonitorPageSnapshot shadows

BaseModel.json(), triggering UserWarning on import. Add warning filters

matching the existing pattern used for ScrapeFormats and Document.

Fixes firecrawl#3643

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 1 file

Re-trigger cubic

@mogery
mogery merged commit 52f95e7 into firecrawl:main Jun 25, 2026
2 checks passed
@mogery

mogery commented Jun 25, 2026

Copy link
Copy Markdown
Member

Thanks!

jerbao pushed a commit to jerbao/firecrawl-custom that referenced this pull request Aug 22, 2026
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.

[Bug] MonitorPageSnapshot and MonitorPageDiff shadow Pydantic's json field

2 participants