Skip to content

refactor: use DeprecationWarning instead of logger.warning#687

Open
vdusek wants to merge 1 commit intomasterfrom
fix/standardize-deprecation-warnings
Open

refactor: use DeprecationWarning instead of logger.warning#687
vdusek wants to merge 1 commit intomasterfrom
fix/standardize-deprecation-warnings

Conversation

@vdusek
Copy link
Copy Markdown
Contributor

@vdusek vdusek commented Mar 28, 2026

Summary

  • Replace logger.warning() with warnings.warn(DeprecationWarning) for deprecated params in batch_add_requests() (both sync and async) to match the pattern used in DatasetClient.download_items()
  • DeprecationWarning is the Python standard — visible by default, caught by pytest -W error::DeprecationWarning, and filterable via warnings.filterwarnings()
  • Remove unused logging import

🤖 Generated with Claude Code

…params

Replace logger.warning() calls with warnings.warn(DeprecationWarning) in
RequestQueueClient and RequestQueueClientAsync batch_add_requests() for
consistency with the rest of the codebase.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Mar 28, 2026
@vdusek vdusek self-assigned this Mar 28, 2026
@github-actions github-actions bot added this to the 137th sprint - Tooling team milestone Mar 28, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 28, 2026

Codecov Report

❌ Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.57%. Comparing base (111d46e) to head (2ccbf61).

Files with missing lines Patch % Lines
...rc/apify_client/_resource_clients/request_queue.py 20.00% 4 Missing ⚠️

❌ Your patch check has failed because the patch coverage (20.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #687      +/-   ##
==========================================
- Coverage   94.61%   94.57%   -0.05%     
==========================================
  Files          45       45              
  Lines        4404     4403       -1     
==========================================
- Hits         4167     4164       -3     
- Misses        237      239       +2     
Flag Coverage Δ
integration 94.57% <20.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek changed the title fix: use DeprecationWarning instead of logger.warning for deprecated params refactor: use DeprecationWarning instead of logger.warning Mar 28, 2026
@vdusek vdusek requested a review from Pijukatel March 28, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. 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.

2 participants