这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@return42
Copy link
Member

Continuation of #5147 .. typification of the engine processors.

BTW:

  • removed obsolete engine property https_support
  • fixed & improved currency_convert
  • engine instances can now implement a engine.setup() method

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR continues the typification work from #5147 by adding type hints and improving engine processors. It introduces structured request parameter types for different engine types, removes obsolete engine properties, and enhances the currency conversion functionality.

Key changes:

  • Adds comprehensive type annotations to all engine processors and their parameter types
  • Introduces type-safe parameter classes (OnlineParams, OnlineDictParams, OnlineCurrenciesParams) for different engine types
  • Replaces the old engine initialization system with a new setup/init pattern allowing asynchronous initialization
  • Removes the obsolete https_support property from engines

Reviewed Changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
searx/search/processors/*.py Complete type annotation overhaul for all processor classes with structured parameter types
searx/engines/*.py Updates to use new parameter types and removal of obsolete properties
searx/data/currencies.py Enhanced with type annotations and improved currency validation methods
searx/search/models.py Type refinements for SearchQuery class with literal types for enums
tests/unit/*.py Updated to match new processor initialization patterns

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Continuation of searxng#5147 .. typification of the engine processors.

BTW:

- removed obsolete engine property https_support
- fixed & improved currency_convert
- engine instances can now implement a engine.setup method

[searxng#5147] searxng#5147

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@return42 return42 force-pushed the type-hints-Processores branch from 4a539df to a0d1c87 Compare September 15, 2025 12:35
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@return42 return42 merged commit 09fddfd into searxng:master Sep 18, 2025
6 checks passed
@return42 return42 deleted the type-hints-Processores branch September 18, 2025 17:40
return42 pushed a commit to tiekoetter/searxng that referenced this pull request Sep 20, 2025
Commit 8f8343d [1] introduced a bug in the network logic of SearXNG where stream
requests (such as the one from the image proxy) would fail because a wrapper was
returned instead of a response object with the correct attribute.

This is just a quick in place fix I implemented to get it working again. It
would be better to implement corresponding logic to give stream requests the
correct object.

[1] searxng#5204
return42 pushed a commit that referenced this pull request Sep 20, 2025
Commit 8f8343d [1] introduced a bug in the network logic of SearXNG where stream
requests (such as the one from the image proxy) would fail because a wrapper was
returned instead of a response object with the correct attribute.

This is just a quick in place fix I implemented to get it working again. It
would be better to implement corresponding logic to give stream requests the
correct object.

[1] #5204
return42 added a commit to return42/searxng that referenced this pull request Sep 24, 2025
This patch is a leftover from PR-5204 [1].

[1] searxng#5204

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit to return42/searxng that referenced this pull request Sep 24, 2025
This patch is a leftover from PR-5204 [1].

[1] searxng#5204

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit to return42/searxng that referenced this pull request Sep 24, 2025
This patch is a leftover from PR-5204 [1].

[1] searxng#5204

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit to return42/searxng that referenced this pull request Sep 24, 2025
This patch is a leftover from PR-5204 [1].

[1] searxng#5204

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit to return42/searxng that referenced this pull request Sep 25, 2025
…ring

Issue was introduced by PR-5204 [1]

reported issue::

    logger.error("init method of engine %s failed (%s).", eng_proc.engine.name)
    TypeError: not enough arguments for format string

[1] searxng#5204

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit that referenced this pull request Sep 25, 2025
…ring (#5241)

Issue was introduced by PR-5204 [1]

reported issue::

    logger.error("init method of engine %s failed (%s).", eng_proc.engine.name)
    TypeError: not enough arguments for format string

[1] #5204

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit to return42/searxng that referenced this pull request Sep 25, 2025
This patch is a leftover from PR-5204 [1].

[1] searxng#5204

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit to return42/searxng that referenced this pull request Sep 28, 2025
This patch is a leftover from PR-5204 [1].

[1] searxng#5204

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit that referenced this pull request Sep 28, 2025
This patch is a leftover from PR-5204 [1].

[1] #5204

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
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