You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UV seems to be a new replacement for several python eco system tools, including pip and venv. It is build by the ruff authors and claims to be much faster than tools like pip. It can also be used as a replacement for these tools without too much hazard.
I think this tool can offer us many benefits, especially as part of the x64 migration strategy.
Support for dependency groups, for example to have a separate group for system tests
It can manage python itself as well has handling multiple python versions per project, likely beneficial for the X64 migration.
It has support for package locking, meaning that nvda development environments will be consistent and reproducible
It has the concept of build systems, so we can probably integrate it with scons pretty neatly.
Probably more...
A downside is that you need to install uv stand alone, but that's a oneliner with winget. And after that, you can either use an already installed version of python or let uv automatically use the right python version.
Great idea. Uv seems to have some traction in the Python ecosystem and offers some clear advantages. Even without the 64 bits migration having a tool manage the environment + Python runtime might be useful, since I only use a 32 bits Python for NVDA development and a 64 bits Python for everything else.
test.mock_socket.socket is used by remote unit tests, particularly test_transport.TestTCPTransportCreateOutboundSocket, methods test_createOutboundSocketOnion and test_createOutboundSocketRegularInsecure.
However, according to the python docs, the test module should not be used.
Note: The test package is meant for internal use by Python only. It is documented for the benefit of the core developers of Python. Any use of this package outside of Python’s standard library is discouraged as code mentioned here can change or be removed without notice
The python distributions used by uv do not bundle the test module for this particular reason.
@LeonarddeR - could you open a separate issue to document removing the use of the test module, particularly if you have any suggestions of alternatives
Just created #18005. I found it a bit difficult to fit this into a particular template, so that's why I chose a bare issue.
Feel free to assign this to me, I will investigate further.
Activity
LeonarddeR commentedon Apr 10, 2025
Here is an in depth article about pros and cons.
bramd commentedon Apr 15, 2025
Great idea. Uv seems to have some traction in the Python ecosystem and offers some clear advantages. Even without the 64 bits migration having a tool manage the environment + Python runtime might be useful, since I only use a 32 bits Python for NVDA development and a 64 bits Python for everything else.
seanbudd commentedon Apr 15, 2025
We'd be interested in seeing a proof of concept branch for this and comparing build times and structure of code
LeonarddeR commentedon Apr 16, 2025
Thanks @seanbudd. I started with a poc, it is really blazing fast. I also discovered #17975
LeonarddeR commentedon Apr 18, 2025
test.mock_socket.socket is used by remote unit tests, particularly test_transport.TestTCPTransportCreateOutboundSocket, methods test_createOutboundSocketOnion and test_createOutboundSocketRegularInsecure.
However, according to the python docs, the test module should not be used.
The python distributions used by uv do not bundle the test module for this particular reason.
seanbudd commentedon Apr 24, 2025
@LeonarddeR - could you open a separate issue to document removing the use of the test module, particularly if you have any suggestions of alternatives
LeonarddeR commentedon Apr 24, 2025
Just created #18005. I found it a bit difficult to fit this into a particular template, so that's why I chose a bare issue.
Feel free to assign this to me, I will investigate further.
use uv as venv/dependency orchestrator (#17978)