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

Conversation

@dalf
Copy link
Contributor

@dalf dalf commented Mar 2, 2024

What does this PR do?

Rely on tomllib for Python >= 3.11

Why is this change important?

How to test this PR locally?

Author's checklist

Related issues

@dalf dalf requested a review from return42 March 2, 2024 07:39
Rely on tomllib for Python >= 3.11
@return42
Copy link
Member

return42 commented Mar 2, 2024

Thanks for this PR / I will review! .. but first I want to get #2981 reviewed and merged / if it is OK for you.

@return42
Copy link
Member

return42 commented Mar 15, 2024

As long we do not see any drawbacks in using pytomlpp I'm not sure we should remove it .. its 4 times faster compared to the pure python implementation in py3.11.

However if we want less dependencies we should replace pytomlpp by tomli in py < 3.11 / tomli is the tomllib module that has been added to the standard library in Python 3.11 and the compatibility layer is simpler, compared the one we need for pytomlpp & standard library.

@dalf
Copy link
Contributor Author

dalf commented Mar 16, 2024

its 4 times faster compared to the pure python implementation in py3.11.

I don't think config loading is the SearXNG startup time bottleneck.

if we want less dependencies we should replace pytomlpp by tomli in py < 3.11

I agree: tomli is a written in pure Python, so there is no additional build time for "uncommon" architectures.

@unixfox
Copy link
Contributor

unixfox commented Mar 16, 2024

Real pleasure. Building pytomlpp for ARM on alpine Linux takes ages!

@unixfox
Copy link
Contributor

unixfox commented Apr 15, 2024

Is this PR ready :)?

@return42 return42 merged commit ac430a9 into searxng:master May 5, 2024
@dalf dalf deleted the drop_pytomlpp branch May 5, 2024 16:13
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.

4 participants