Skip to content

Migrate tor_exit_nodes HTTP client to httpx (part of #1214)#1222

Closed
Prasad8830 wants to merge 1 commit intoGreedyBear-Project:developfrom
Prasad8830:refactor/httpx-tor-exit-nodes-1214
Closed

Migrate tor_exit_nodes HTTP client to httpx (part of #1214)#1222
Prasad8830 wants to merge 1 commit intoGreedyBear-Project:developfrom
Prasad8830:refactor/httpx-tor-exit-nodes-1214

Conversation

@Prasad8830
Copy link
Copy Markdown

Description

This PR migrates only the Tor exit nodes cronjob HTTP call from requests to httpx, while preserving existing behaviour.

Scope is intentionally small and low risk:

  • Updated greedybear/cronjobs/tor_exit_nodes.py to use httpx.get(...).
  • Kept the same endpoint and timeout behaviour.
  • Kept raise_for_status() handling and exception propagation behaviour.
  • Updated Tor tests to patch/use the new HTTP client path and equivalent exception expectations.
  • Added httpx dependency and updated lockfile.

This is an incremental step toward standardising HTTP usage in cron jobs, starting from a low-risk fetcher.

Related issues

Type of change

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Chore (refactoring, dependency updates, CI/CD changes, code cleanup, docs-only changes).

Checklist

Please complete this checklist carefully. It helps guide your contribution and lets maintainers verify that all requirements are met.

Formalities

  • I have read and understood the rules about how to Contribute to this project.
  • I chose an appropriate title for the pull request in the form: <feature name>. Closes #999
  • My branch is based on develop.
  • The pull request is for the branch develop.
  • I have reviewed and verified any LLM-generated code included in this PR.

Docs and tests

  • I documented my code changes with docstrings and/or comments.
  • I have checked if my changes affect user-facing behaviour that is described in the docs. If so, I also created a pull request in the docs repository.
  • Linter (Ruff) gave 0 errors. If you have correctly installed pre-commit, it runs these checks and makes these adjustments on your behalf.
  • I have added tests for the feature/bug I solved.
  • All the tests gave 0 errors.

GUI changes

Ignore this section if you did not make any changes to the GUI.

  • I have provided a screenshot of the result in the PR.
  • I have created new frontend tests for the new component or updated existing ones.

@regulartim
Copy link
Copy Markdown
Member

I'll convert this to a draft, as it is not ready for review yet.

@regulartim regulartim marked this pull request as draft April 15, 2026 20:26
@regulartim
Copy link
Copy Markdown
Member

Succeeded by #1253 and #1254

@regulartim regulartim closed this Apr 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.

2 participants