Repository navigation
chore: replace deprecated lazy='noload' in SQL storage models - #2274
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2274 +/- ##
=======================================
Coverage 93.90% 93.90%
=======================================
Files 182 182
Lines 13144 13144
=======================================
Hits 12343 12343
Misses 801 801
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vdusek
marked this pull request as ready for review
October 5, 2026 14:34
Member
|
@Mantisus I've tried to set up a GH app that should approve based on your PR approvals, so please try to approve again so we can test it. |
Member
|
ok, seems to be working, i just had to adjust the app permissions a bit |
vdusek
added a commit
that referenced
this pull request
Oct 5, 2026
…er clock (#2275) `test_static_handler_raised_throttled_error_is_deferred` failed on macOS ([run](https://github.com/apify/crawlee-python/actions/runs/37274209355/job/111647535443)). The test put the domain into a 50 ms backoff and raised `RequestThrottledError`. The crawler defers the request only if `is_throttled()` still holds when it checks, and on a loaded runner the backoff ran out first. The request then went down the ordinary-error path and fell back to the browser. A new helper, `open_throttler_held_until_reclaim()` in `tests/unit/utils.py`, opens the throttler on a stopped `Mock` clock with a 1-minute backoff. The domain is always still held back when the crawler checks. When the crawler reclaims the deferred request, the clock moves past the backoff, so the retry is dispatched right away. The same race also failed `test_handler_raised_throttled_error_is_deferred` in the basic crawler suite ([run](https://github.com/apify/crawlee-python/actions/runs/37325111977/job/111813759733), on #2274). Six deferral tests in the basic, HTTP, Playwright and adaptive crawler suites now use the helper. Their assertions are unchanged, and all of them fail when `_is_held_back` is forced to `False`. The stall tests still use the 50 ms backoff, since they need real time to pass through `max_domain_stall`. Closes: #2271 *✍️ Drafted by Claude Code*
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SQLAlchemy 2.1 deprecates the
noloadloader strategy, so the four relationships in the SQL storage models raisedSADeprecationWarningfor users on 2.1. They now uselazy='raise', passive_deletes=True.Nothing reads these relationships, and the SQL clients delete rows with Core
delete()statements, relying on the FKondelete='CASCADE'. The SQL tests pass on SQLAlchemy 2.1.3 with the deprecation warning turned into an error, and on 2.0.54.Closes: #2272
✍️ Drafted by Claude Code