Skip to content

fix(statistics)!: Count requests in statistics passed to adaptive crawler factories and require the adaptive state model - #2447

Draft
Mantisus wants to merge 3 commits into
apify:v2from
Mantisus:adaptive-factory-statistics
Draft

Mantisus wants to merge 3 commits into
apify:v2from
Mantisus:adaptive-factory-statistics

Conversation

@Mantisus

Copy link
Copy Markdown
Collaborator

Description

  • AdaptivePlaywrightCrawler.with_beautifulsoup_static_parser and with_parsel_static_parser pass statistics to the crawler as is, so the instance you pass is the one that counts, with all its settings.
  • AdaptivePlaywrightCrawler raises a ValueError when statistics don't use AdaptivePlaywrightCrawlerStatisticState as their state model.
  • Statistics.replace_state_model is removed.

For how to update your code, see the upgrade guide.

Issues

Testing

  • Unit and integration tests for statistics passed to the factory methods, including the ValueError for another state model.

✍️ Drafted by Claude Code

@Mantisus
Mantisus marked this pull request as draft November 14, 2026 22:37
@Mantisus Mantisus self-assigned this Nov 14, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 14, 2026
@Mantisus
Mantisus force-pushed the adaptive-factory-statistics branch from bd176e9 to fa2fa4b Compare November 15, 2026 22:30

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

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant