<feed xmlns='http://www.w3.org/2005/Atom'>
<title>searxng/.git/searx/network, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/'/>
<entry>
<title>[fix] searx.network: fix string concatenation of proxy error message</title>
<updated>2025-12-26T17:07:51+00:00</updated>
<author>
<name>Aadniz</name>
<email>8147434+Aadniz@users.noreply.github.com</email>
</author>
<published>2025-12-12T15:20:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=8851f4d6b1f13e3f14b2a64e97cc87fb4bdec15e'/>
<id>8851f4d6b1f13e3f14b2a64e97cc87fb4bdec15e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[upd] pypi: Bump black from 24.3.0 to 25.9.0 (#5251)</title>
<updated>2025-09-26T10:35:57+00:00</updated>
<author>
<name>Markus Heiser</name>
<email>markus.heiser@darmarIT.de</email>
</author>
<published>2025-09-26T10:35:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=81cbe0befe993b57b7daee2643e6016586262436'/>
<id>81cbe0befe993b57b7daee2643e6016586262436</id>
<content type='text'>
In 25.1.0 [2] an old bug has been fixed: "Docstring formatting does not apply to
module docstrings" [3].

[1] https://github.com/psf/black/blob/main/CHANGES.md#2590
[2] https://github.com/psf/black/blob/main/CHANGES.md#2510
[3] https://github.com/psf/black/issues/4094

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 25.1.0 [2] an old bug has been fixed: "Docstring formatting does not apply to
module docstrings" [3].

[1] https://github.com/psf/black/blob/main/CHANGES.md#2590
[2] https://github.com/psf/black/blob/main/CHANGES.md#2510
[3] https://github.com/psf/black/issues/4094

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[mod] py: remove uvloop (#5220)</title>
<updated>2025-09-20T09:12:34+00:00</updated>
<author>
<name>Ivan Gabaldon</name>
<email>igabaldon@inetol.net</email>
</author>
<published>2025-09-20T09:12:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=164167dea0a0823845de42188818e7f80262aa71'/>
<id>164167dea0a0823845de42188818e7f80262aa71</id>
<content type='text'>
We get some good stuff without uvloop, 13MB~ less of dependencies, 3
minutes of build time for armv7 saved, and we are one step closer to NT
compatibility. Although it's true that theoretically the raw performance
have worsened on network side (we only used uvloop for that), the latest
cpython versions have been improving on asyncio performance.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We get some good stuff without uvloop, 13MB~ less of dependencies, 3
minutes of build time for armv7 saved, and we are one step closer to NT
compatibility. Although it's true that theoretically the raw performance
have worsened on network side (we only used uvloop for that), the latest
cpython versions have been improving on asyncio performance.</pre>
</div>
</content>
</entry>
<entry>
<title>[fix] image proxy: object has no attribute 'status_code' (#5212)</title>
<updated>2025-09-20T05:54:58+00:00</updated>
<author>
<name>Léon Tiekötter</name>
<email>leon@tiekoetter.com</email>
</author>
<published>2025-09-20T05:54:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=57ef342ad11eae84629b9c1e889d2b9aa212efeb'/>
<id>57ef342ad11eae84629b9c1e889d2b9aa212efeb</id>
<content type='text'>
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] https://github.com/searxng/searxng/pull/5204</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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] https://github.com/searxng/searxng/pull/5204</pre>
</div>
</content>
</entry>
<entry>
<title>[mod] addition of various type hints / engine processors</title>
<updated>2025-09-18T17:40:03+00:00</updated>
<author>
<name>Markus Heiser</name>
<email>markus.heiser@darmarit.de</email>
</author>
<published>2025-09-11T17:10:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=8f8343dc0d78bb57215afc3e99fd9000fce6e0cf'/>
<id>8f8343dc0d78bb57215afc3e99fd9000fce6e0cf</id>
<content type='text'>
Continuation of #5147 .. typification of the engine processors.

BTW:

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

[#5147] https://github.com/searxng/searxng/pull/5147

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Continuation of #5147 .. typification of the engine processors.

BTW:

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

[#5147] https://github.com/searxng/searxng/pull/5147

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[mod] addition of various type hints / tbc</title>
<updated>2025-09-03T11:37:36+00:00</updated>
<author>
<name>Markus Heiser</name>
<email>markus.heiser@darmarit.de</email>
</author>
<published>2025-08-22T15:17:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=57b9673efb1b4fd18a3ac15e26da642201e2cd33'/>
<id>57b9673efb1b4fd18a3ac15e26da642201e2cd33</id>
<content type='text'>
- pyright configuration [1]_
- stub files: types-lxml [2]_
- addition of various type hints
- enable use of new type system features on older Python versions [3]_
- ``.tool-versions`` - set python to lowest version we support (3.10.18) [4]_:
  Older versions typically lack some typing features found in newer Python
  versions.  Therefore, for local type checking (before commit), it is necessary
  to use the older Python interpreter.

.. [1] https://docs.basedpyright.com/v1.20.0/configuration/config-files/
.. [2] https://pypi.org/project/types-lxml/
.. [3] https://typing-extensions.readthedocs.io/en/latest/#
.. [4] https://mise.jdx.dev/configuration.html#tool-versions

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
Format: reST
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- pyright configuration [1]_
- stub files: types-lxml [2]_
- addition of various type hints
- enable use of new type system features on older Python versions [3]_
- ``.tool-versions`` - set python to lowest version we support (3.10.18) [4]_:
  Older versions typically lack some typing features found in newer Python
  versions.  Therefore, for local type checking (before commit), it is necessary
  to use the older Python interpreter.

.. [1] https://docs.basedpyright.com/v1.20.0/configuration/config-files/
.. [2] https://pypi.org/project/types-lxml/
.. [3] https://typing-extensions.readthedocs.io/en/latest/#
.. [4] https://mise.jdx.dev/configuration.html#tool-versions

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
Format: reST
</pre>
</div>
</content>
</entry>
<entry>
<title>[fix] searx.network: don't trigger DeprecationWarning (#4845)</title>
<updated>2025-05-24T10:40:05+00:00</updated>
<author>
<name>Alexandre Flament</name>
<email>alex@al-f.net</email>
</author>
<published>2025-05-24T10:40:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=9ed9a9aa53a17df476437fb16c24c44e7c345f56'/>
<id>9ed9a9aa53a17df476437fb16c24c44e7c345f56</id>
<content type='text'>
Avoid a confusing warning:

    DeprecationWarning: Setting per-request cookies=&lt;...&gt; is being deprecated

Code based on httpx unit test [1]

[1] https://github.com/encode/httpx/blob/6a99f6f2b3a638719f70200de9983f80d618ee1c/tests/client/test_cookies.py#L123-L137

Closes: https://github.com/searxng/searxng/issues/4833</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid a confusing warning:

    DeprecationWarning: Setting per-request cookies=&lt;...&gt; is being deprecated

Code based on httpx unit test [1]

[1] https://github.com/encode/httpx/blob/6a99f6f2b3a638719f70200de9983f80d618ee1c/tests/client/test_cookies.py#L123-L137

Closes: https://github.com/searxng/searxng/issues/4833</pre>
</div>
</content>
</entry>
<entry>
<title>[mod] upgrade to httpx 0.28.1 (#4674)</title>
<updated>2025-05-20T16:18:07+00:00</updated>
<author>
<name>Alexandre Flament</name>
<email>alex@al-f.net</email>
</author>
<published>2025-05-20T16:18:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=7a3742ae56cc983667407283e1acc3640bd72bbe'/>
<id>7a3742ae56cc983667407283e1acc3640bd72bbe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[fix] issues when launching a local development server</title>
<updated>2025-04-22T12:26:11+00:00</updated>
<author>
<name>Markus Heiser</name>
<email>markus.heiser@darmarit.de</email>
</author>
<published>2025-04-09T12:01:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=e9157b3c1a502a5898d370c0e98cc3e5ef8ef3f0'/>
<id>e9157b3c1a502a5898d370c0e98cc3e5ef8ef3f0</id>
<content type='text'>
A local development server can be launched by one of these command lines::

    $ flask --app searx.webapp run
    $ python -m searx.webapp

The different ways of starting the server should lead to the same result, which
is generally the case.  However, if the modules are reloaded after code
changes (reload option), it must be avoided that the application is initialized
twice at startup.  We have already discussed this in 2022 [1][2].

Further information on this topic can be found in [3][4][5].

To test a bash in the ./local environment was started and the follwing commands
had been executed::

    $ ./manage pyenv.cmd bash --norc --noprofile
    (py3) SEARXNG_DEBUG=1 flask --app searx.webapp run --reload
    (py3) SEARXNG_DEBUG=1 python -m searx.webapp

Since the generic parts of the docs also initialize the app to generate doc from
it, the build of the docs was also tested::

    $ make docs.clean docs.live

[1] https://github.com/searxng/searxng/pull/1656#issuecomment-1214198941
[2] https://github.com/searxng/searxng/pull/1616#issuecomment-1206137468
[3] https://flask.palletsprojects.com/en/stable/api/#flask.Flask.run
[4] https://github.com/pallets/flask/issues/5307#issuecomment-1774646119
[5] https://stackoverflow.com/a/25504196

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A local development server can be launched by one of these command lines::

    $ flask --app searx.webapp run
    $ python -m searx.webapp

The different ways of starting the server should lead to the same result, which
is generally the case.  However, if the modules are reloaded after code
changes (reload option), it must be avoided that the application is initialized
twice at startup.  We have already discussed this in 2022 [1][2].

Further information on this topic can be found in [3][4][5].

To test a bash in the ./local environment was started and the follwing commands
had been executed::

    $ ./manage pyenv.cmd bash --norc --noprofile
    (py3) SEARXNG_DEBUG=1 flask --app searx.webapp run --reload
    (py3) SEARXNG_DEBUG=1 python -m searx.webapp

Since the generic parts of the docs also initialize the app to generate doc from
it, the build of the docs was also tested::

    $ make docs.clean docs.live

[1] https://github.com/searxng/searxng/pull/1656#issuecomment-1214198941
[2] https://github.com/searxng/searxng/pull/1616#issuecomment-1206137468
[3] https://flask.palletsprojects.com/en/stable/api/#flask.Flask.run
[4] https://github.com/pallets/flask/issues/5307#issuecomment-1774646119
[5] https://stackoverflow.com/a/25504196

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[refactor] typification of SearXNG (initial) / result items (part 1)</title>
<updated>2025-01-28T06:07:08+00:00</updated>
<author>
<name>Markus Heiser</name>
<email>markus.heiser@darmarit.de</email>
</author>
<published>2024-12-15T08:59:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.slickd.xyz/searxng/.git/commit/?id=edfbf1e1183815cea3b723f3b66260bc55679f32'/>
<id>edfbf1e1183815cea3b723f3b66260bc55679f32</id>
<content type='text'>
Typification of SearXNG
=======================

This patch introduces the typing of the results.  The why and how is described
in the documentation, please generate the documentation ..

    $ make docs.clean docs.live

and read the following articles in the "Developer documentation":

- result types --&gt; http://0.0.0.0:8000/dev/result_types/index.html

The result types are available from the `searx.result_types` module.  The
following have been implemented so far:

- base result type: `searx.result_type.Result`
  --&gt; http://0.0.0.0:8000/dev/result_types/base_result.html

- answer results
  --&gt; http://0.0.0.0:8000/dev/result_types/answer.html

including the type for translations (inspired by #3925).  For all other
types (which still need to be set up in subsequent PRs), template documentation
has been created for the transition period.

Doc of the fields used in Templates
===================================

The template documentation is the basis for the typing and is the first complete
documentation of the results (needed for engine development).  It is the
"working paper" (the plan) with which further typifications can be implemented
in subsequent PRs.

- https://github.com/searxng/searxng/issues/357

Answer Templates
================

With the new (sub) types for `Answer`, the templates for the answers have also
been revised, `Translation` are now displayed with collapsible entries (inspired
by #3925).

    !en-de dog

Plugins &amp; Answerer
==================

The implementation for `Plugin` and `Answer` has been revised, see
documentation:

- Plugin: http://0.0.0.0:8000/dev/plugins/index.html
- Answerer: http://0.0.0.0:8000/dev/answerers/index.html

With `AnswerStorage` and `AnswerStorage` to manage those items (in follow up
PRs, `ArticleStorage`, `InfoStorage` and .. will be implemented)

Autocomplete
============

The autocompletion had a bug where the results from `Answer` had not been shown
in the past.  To test activate autocompletion and try search terms for which we
have answerers

- statistics: type `min 1 2 3` .. in the completion list you should find an
  entry like `[de] min(1, 2, 3) = 1`

- random: type `random uuid` .. in the completion list, the first item is a
  random UUID

Extended Types
==============

SearXNG extends e.g. the request and response types of flask and httpx, a module
has been set up for type extensions:

- Extended Types
  --&gt; http://0.0.0.0:8000/dev/extended_types.html

Unit-Tests
==========

The unit tests have been completely revised.  In the previous implementation,
the runtime (the global variables such as `searx.settings`) was not initialized
before each test, so the runtime environment with which a test ran was always
determined by the tests that ran before it.  This was also the reason why we
sometimes had to observe non-deterministic errors in the tests in the past:

- https://github.com/searxng/searxng/issues/2988 is one example for the Runtime
  issues, with non-deterministic behavior ..

- https://github.com/searxng/searxng/pull/3650
- https://github.com/searxng/searxng/pull/3654
- https://github.com/searxng/searxng/pull/3642#issuecomment-2226884469
- https://github.com/searxng/searxng/pull/3746#issuecomment-2300965005

Why msgspec.Struct
==================

We have already discussed typing based on e.g. `TypeDict` or `dataclass` in the past:

- https://github.com/searxng/searxng/pull/1562/files
- https://gist.github.com/dalf/972eb05e7a9bee161487132a7de244d2
- https://github.com/searxng/searxng/pull/1412/files
- https://github.com/searxng/searxng/pull/1356

In my opinion, TypeDict is unsuitable because the objects are still dictionaries
and not instances of classes / the `dataclass` are classes but ...

The `msgspec.Struct` combine the advantages of typing, runtime behaviour and
also offer the option of (fast) serializing (incl. type check) the objects.

Currently not possible but conceivable with `msgspec`: Outsourcing the engines
into separate processes, what possibilities this opens up in the future is left
to the imagination!

Internally, we have already defined that it is desirable to decouple the
development of the engines from the development of the SearXNG core / The
serialization of the `Result` objects is a prerequisite for this.

HINT: The threads listed above were the template for this PR, even though the
implementation here is based on msgspec.  They should also be an inspiration for
the following PRs of typification, as the models and implementations can provide
a good direction.

Why just one commit?
====================

I tried to create several (thematically separated) commits, but gave up at some
point ... there are too many things to tackle at once / The comprehensibility of
the commits would not be improved by a thematic separation. On the contrary, we
would have to make multiple changes at the same places and the goal of a change
would be vaguely recognizable in the fog of the commits.

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Typification of SearXNG
=======================

This patch introduces the typing of the results.  The why and how is described
in the documentation, please generate the documentation ..

    $ make docs.clean docs.live

and read the following articles in the "Developer documentation":

- result types --&gt; http://0.0.0.0:8000/dev/result_types/index.html

The result types are available from the `searx.result_types` module.  The
following have been implemented so far:

- base result type: `searx.result_type.Result`
  --&gt; http://0.0.0.0:8000/dev/result_types/base_result.html

- answer results
  --&gt; http://0.0.0.0:8000/dev/result_types/answer.html

including the type for translations (inspired by #3925).  For all other
types (which still need to be set up in subsequent PRs), template documentation
has been created for the transition period.

Doc of the fields used in Templates
===================================

The template documentation is the basis for the typing and is the first complete
documentation of the results (needed for engine development).  It is the
"working paper" (the plan) with which further typifications can be implemented
in subsequent PRs.

- https://github.com/searxng/searxng/issues/357

Answer Templates
================

With the new (sub) types for `Answer`, the templates for the answers have also
been revised, `Translation` are now displayed with collapsible entries (inspired
by #3925).

    !en-de dog

Plugins &amp; Answerer
==================

The implementation for `Plugin` and `Answer` has been revised, see
documentation:

- Plugin: http://0.0.0.0:8000/dev/plugins/index.html
- Answerer: http://0.0.0.0:8000/dev/answerers/index.html

With `AnswerStorage` and `AnswerStorage` to manage those items (in follow up
PRs, `ArticleStorage`, `InfoStorage` and .. will be implemented)

Autocomplete
============

The autocompletion had a bug where the results from `Answer` had not been shown
in the past.  To test activate autocompletion and try search terms for which we
have answerers

- statistics: type `min 1 2 3` .. in the completion list you should find an
  entry like `[de] min(1, 2, 3) = 1`

- random: type `random uuid` .. in the completion list, the first item is a
  random UUID

Extended Types
==============

SearXNG extends e.g. the request and response types of flask and httpx, a module
has been set up for type extensions:

- Extended Types
  --&gt; http://0.0.0.0:8000/dev/extended_types.html

Unit-Tests
==========

The unit tests have been completely revised.  In the previous implementation,
the runtime (the global variables such as `searx.settings`) was not initialized
before each test, so the runtime environment with which a test ran was always
determined by the tests that ran before it.  This was also the reason why we
sometimes had to observe non-deterministic errors in the tests in the past:

- https://github.com/searxng/searxng/issues/2988 is one example for the Runtime
  issues, with non-deterministic behavior ..

- https://github.com/searxng/searxng/pull/3650
- https://github.com/searxng/searxng/pull/3654
- https://github.com/searxng/searxng/pull/3642#issuecomment-2226884469
- https://github.com/searxng/searxng/pull/3746#issuecomment-2300965005

Why msgspec.Struct
==================

We have already discussed typing based on e.g. `TypeDict` or `dataclass` in the past:

- https://github.com/searxng/searxng/pull/1562/files
- https://gist.github.com/dalf/972eb05e7a9bee161487132a7de244d2
- https://github.com/searxng/searxng/pull/1412/files
- https://github.com/searxng/searxng/pull/1356

In my opinion, TypeDict is unsuitable because the objects are still dictionaries
and not instances of classes / the `dataclass` are classes but ...

The `msgspec.Struct` combine the advantages of typing, runtime behaviour and
also offer the option of (fast) serializing (incl. type check) the objects.

Currently not possible but conceivable with `msgspec`: Outsourcing the engines
into separate processes, what possibilities this opens up in the future is left
to the imagination!

Internally, we have already defined that it is desirable to decouple the
development of the engines from the development of the SearXNG core / The
serialization of the `Result` objects is a prerequisite for this.

HINT: The threads listed above were the template for this PR, even though the
implementation here is based on msgspec.  They should also be an inspiration for
the following PRs of typification, as the models and implementations can provide
a good direction.

Why just one commit?
====================

I tried to create several (thematically separated) commits, but gave up at some
point ... there are too many things to tackle at once / The comprehensibility of
the commits would not be improved by a thematic separation. On the contrary, we
would have to make multiple changes at the same places and the goal of a change
would be vaguely recognizable in the fog of the commits.

Signed-off-by: Markus Heiser &lt;markus.heiser@darmarit.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
