Skip to content

[2.5] Migrate from poetry to uv#101

Merged
ctheune merged 2 commits into
2.5.xfrom
PL-134240-migrate-to-uv-2.5
Apr 10, 2026
Merged

[2.5] Migrate from poetry to uv#101
ctheune merged 2 commits into
2.5.xfrom
PL-134240-migrate-to-uv-2.5

Conversation

@leona-ya
Copy link
Copy Markdown
Member

@leona-ya leona-ya commented Apr 2, 2026

Related issue(s): PL-134240

  • Change is documented in changelog

Security implications

  • Security requirements defined? (WHERE)
  • Security requirements tested? (EVIDENCE)
    tested that commands inside the nix package still work

@leona-ya leona-ya force-pushed the PL-134240-migrate-to-uv-2.5 branch 2 times, most recently from 1841099 to 989ee07 Compare April 2, 2026 10:58
leona-ya added 2 commits April 2, 2026 13:13
poetry2nix failed to compile with newer nixpkgs versions. poetry2nix
is also unmaintained. Therefore, migrate to uv with uv2nix.

* Hatch is the build system, as recommended by migrate-to-uv, as uv currently
  doesn't support "complicated" projects
* Migrate to uv also within the GitHub actions
@leona-ya leona-ya force-pushed the PL-134240-migrate-to-uv-2.5 branch from 989ee07 to ba16eed Compare April 2, 2026 11:13
@leona-ya leona-ya marked this pull request as ready for review April 7, 2026 08:18
Copy link
Copy Markdown
Member

@osnyx osnyx left a comment

Choose a reason for hiding this comment

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

We need to ensure these changes also reach the main branch somehow.

@osnyx
Copy link
Copy Markdown
Member

osnyx commented Apr 7, 2026

Note thatnix flake check fails on darwin, but succeeds on linux:

$ nix flake check
error: Cannot build '/nix/store/5sck46b4qnv10r7mhdpd37zj97bsvn12-pytest.drv'.
       Reason: builder failed with exit code 1.
       Output paths:
         /nix/store/iihrmqj967c1lbfzdh1xv34jml5i8zdk-pytest
       Last 25 log lines:
       >   File "/nix/store/c4bjl0vag06x58ckhj0y29153il8pjyi-backy-dev-env/lib/python3.12/site-packages/_pytest/runner.py", line 169, in pytest_runtest_call
       >     item.runtest()
       >   File "/nix/store/c4bjl0vag06x58ckhj0y29153il8pjyi-backy-dev-env/lib/python3.12/site-packages/_pytest/python.py", line 1792, in runtest
       >     self.ihook.pytest_pyfunc_call(pyfuncitem=self)
       >   File "/nix/store/c4bjl0vag06x58ckhj0y29153il8pjyi-backy-dev-env/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__
       >     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
       >            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       >   File "/nix/store/c4bjl0vag06x58ckhj0y29153il8pjyi-backy-dev-env/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexec
       >     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
       >            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       >   File "/nix/store/c4bjl0vag06x58ckhj0y29153il8pjyi-backy-dev-env/lib/python3.12/site-packages/pluggy/_callers.py", line 182, in _multicall
       >     return outcome.get_result()
       >            ^^^^^^^^^^^^^^^^^^^^
       >   File "/nix/store/c4bjl0vag06x58ckhj0y29153il8pjyi-backy-dev-env/lib/python3.12/site-packages/pluggy/_result.py", line 100, in get_result
       >     raise exc.with_traceback(exc.__traceback__)
       >   File "/nix/store/c4bjl0vag06x58ckhj0y29153il8pjyi-backy-dev-env/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall
       >     res = hook_impl.function(*args)
       >           ^^^^^^^^^^^^^^^^^^^^^^^^^
       >   File "/nix/store/c4bjl0vag06x58ckhj0y29153il8pjyi-backy-dev-env/lib/python3.12/site-packages/_pytest/python.py", line 194, in pytest_pyfunc_call
       >     result = testfunction(**testargs)
       >              ^^^^^^^^^^^^^^^^^^^^^^^^
       >   File "/nix/var/nix/builds/nix-33255-3349203958/nw99drchy1iqsf8gvmkmii9ddvvmpj7w-source/src/backy/tests/test_timeout.py", line 12, in test_timeout
       >     assert "tick\ntick\ntick" in out
       > AssertionError: assert 'tick\ntick\ntick' in 'tick\ntick\n'
       > ======================== 1 failed, 235 passed in 31.69s ========================
       For full logs, run:
         nix log /nix/store/5sck46b4qnv10r7mhdpd37zj97bsvn12-pytest.drv

╭─os@OS MacBook Pro ~/src/backy ‹PL-134240-migrate-to-uv-2.5›
╰─$ nix flake check                                                                                                                                                                                  1 ↵
error: Cannot build '/nix/store/5sck46b4qnv10r7mhdpd37zj97bsvn12-pytest.drv'.
       Reason: builder failed with exit code 1.
       Output paths:
         /nix/store/iihrmqj967c1lbfzdh1xv34jml5i8zdk-pytest
       Last 25 log lines:
       > 2026-04-07T17:43:17.744229 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.744292 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.744358 39552 D utils/files-roughly-equal-verifying offset=70
       > 2026-04-07T17:43:17.744469 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.744537 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.744601 39552 D utils/files-roughly-equal-verifying offset=210
       > 2026-04-07T17:43:17.744716 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.744781 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.744846 39552 D utils/files-roughly-equal-verifying offset=20
       > 2026-04-07T17:43:17.744960 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.745029 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.745106 39552 D utils/files-roughly-equal-verifying offset=50
       > 2026-04-07T17:43:17.745223 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.745288 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.745353 39552 D utils/files-roughly-equal-verifying offset=240
       > 2026-04-07T17:43:17.745466 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.745533 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.745600 39552 D utils/files-roughly-equal-verifying offset=220
       > 2026-04-07T17:43:17.745715 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.745779 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.745848 39552 D utils/files-roughly-equal-verifying offset=60
       > 2026-04-07T17:43:17.746010 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.746083 39552 D utils/posix_fadivse-unavailable
       > 2026-04-07T17:43:17.746156 39552 D utils/files-roughly-equal-verifying offset=240
       > ======================== 1 failed, 235 passed in 26.89s ========================
       For full logs, run:
         nix log /nix/store/5sck46b4qnv10r7mhdpd37zj97bsvn12-pytest.drv

That's due to the apparent test dependence on the fadvise function.

@leona-ya
Copy link
Copy Markdown
Member Author

leona-ya commented Apr 8, 2026

Note that nix flake check fails on darwin, but succeeds on linux:

I also can get this test to succeed on darwin, but it's flaky there.

We need to ensure these changes also reach the main branch somehow.

I honestly have not really an idea of backy's current state. Yes, we need to do that, I can prepare the PR (if we decide for that), but would need context :)

@ctheune ctheune merged commit 474d97c into 2.5.x Apr 10, 2026
3 checks passed
@ctheune ctheune deleted the PL-134240-migrate-to-uv-2.5 branch April 10, 2026 07:11
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.

3 participants