the editable installs don't work currently. I believe they clash with the dependencies…
- User
the editable installs don't work currently. I believe they clash with the dependencies specified for the project.
what I want you to first plan out is how we can create a reproducible example that we can encode in the tests.
the normal structure I have is directory A which contains packages X and Y. Y has a dependency on X, and specifies this in the pyproject.toml via dependencies, e.g. X >=0.1.2. Then, in the uvs section, I specify in editable something like
"../X". Assistant
I'll explore the codebase to understand the editable installs implementation and the existing test patterns.
Assistant
Good exploration results. Now let me design the test approach.
Assistant
Let me read the key files to verify details before writing the final plan.
Assistant
Now I have everything I need. Let me write the plan.
Assistant
This is a crucial detail — the bug is silent (no error, just wrong install mode). That completely changes the test design. Let me update the plan.
Assistant
The plan is ready. The core insight: since the bug is silent (no error, just wrong install mode), the integration test uses a "wheel vs source" differentiation trick — build X into a wheel, then modify X's source. If editable mode works, the modified source is picked up; if not, the stale wheel is used. This cleanly proves whether editable is actually active.
Assistant
Let me start with the first three tasks in parallel since they're independent.
Assistant
Now I'll create/edit the three independent files in parallel.
Assistant
Now the integration test file:
Assistant
Now let me run both test suites — unit tests first, then integration.
Assistant
All 56 unit tests pass, 2 integration tests correctly skipped. Now let's run the integration tests.
Assistant
Interesting — the xfail test unexpectedly passed. That means
--with-editabledoes work correctly when usingno-index = true+find-links. The user's bug might manifest differently. Let me test without the local index to better match the real scenario.Assistant
This reveals the core issue:
--with-editabledoes not participate in dependency resolution at all. Even when X is right there as an editable, uv still tries to resolve the dependency from the index. Let me restructure the test to capture both manifestations.Assistant
All 3 integration tests pass. Let me also verify the full suite still works.
- User
[Request interrupted by user]
- User
continue
Assistant
All the work from the previous session is complete. Let me summarize the results.
Assistant
Everything was already implemented and verified. Here's what was done and the key findings:
What was created
File Action tests/conftest.pyCreated — --run-integrationflag, auto-skips@pytest.mark.integrationpyproject.tomlEdited — added [tool.pytest.ini_options]with markertests/test_runner.pyEdited — added test_editable_overlaps_with_project_dependencytests/test_editable_integration.pyCreated — 3 integration tests with workspace fixture - User
I don't have a uv.lock file. I am using a private index that behaves the same as PyPi.
Assistant
That's helpful. Our
find-linkstest may not faithfully reproduce a real index.find-linksis a flat directory of wheels — a proper PEP 503 index behaves differently in uv's resolution. Let me add a test that uses a local PEP 503-style index to more closely match your setup, and see if the editable still wins or gets shadowed.Assistant
I need to plan adding a PEP 503 index test. Let me update the plan.
Assistant
Good question — let me check how
uvhandles editable installs (symlink vs full install). This matters because if uv builds a wheel even for--with-editable, the "editable" wouldn't reflect source changes.Assistant
To answer your question: uv does not use symlinks. It uses a
.pthfile mechanism that adds the source directory tosys.path. The module file points directly to the original source:codeModule file: /tmp/.../X/src/uvscript_test_x/__init__.py direct_url.json: {"url":"file:///tmp/.../X","dir_info":{"editable":true}} Is symlink: FalseSo the source files are used directly, not copied into site-packages. This confirms our MARKER test approach is valid — if editable works, the live source is picked up.
The puzzle remains: our
find-linkstest showed editable winning, but your private index setup doesn't. The difference might be in how uv resolves from a proper PEP 503 index vs a flatfind-linksdirectory.Assistant
Now I need to find the exact wheel filename to construct the PEP 503 index. Let me first check what
uv buildproduces, then update the test.Assistant
Now update the workspace fixture to also create the PEP 503 index structure.
Assistant
Now update
_write_y_pyprojectto support the PEP 503 index option.Assistant
Now update the existing test calls and add the new PEP 503 test.
Assistant
Now add the PEP 503 test.
Assistant
The PEP 503 index isn't being picked up. Let me debug the generated config and directory structure.
Assistant
no-index = truedisables all index lookups including the manually configured ones. Let me try using the local index as the default instead.Assistant
The PEP 503 index works with
default = true— and the editable still wins. Let me also test a scenario where the index version differs from the local source version, which might be closer to the user's case.Assistant
Editable still wins even with a version mismatch. Let me try one more thing — a strict version pin where the editable version doesn't match.
Assistant
Interesting —
--with-editableoverrides even a strict==0.1.2pin when the source is at0.1.3.dev0. I cannot reproduce the bug with any of these index configurations. Let me update the test with the working PEP 503 setup and report the findings.Assistant
All 4 pass. Let me verify the full suite too.
Assistant
All 56 unit tests pass, 4 integration tests properly skipped by default (all pass with
--run-integration).Summary of findings
The test infrastructure is in place with 4 integration test scenarios, but I could not reproduce the editable install being silently ignored. In all configurations tested:
Scenario Result No index, dependency on X Fails (expected — --with-editablecan't satisfy deps)find-links+ dependency on XEditable wins PEP 503 index + dependency on X Editable wins No dependency, just editable Editable wins Even with version mismatches (index has 0.1.2, source has 0.1.3.dev0) and strict pins (
==0.1.2), the editable always takes precedence.To help narrow down the issue in your setup, could you share:
- Your
uv --versionoutput - The relevant parts of Y's
pyproject.toml(dependency spec + uvs config) - Does Y have a
.venvdirectory that was created before the editable was configured? - Are you using namespace packages (I noticed the commit history mentions them)?
- Your
- User
tidy up the code, commit the tests.
Assistant
The
urllib.parseimport is unused now (we useurllib.parse.quotebut actually the wheel filename doesn't need URL encoding for a simple name). Let me check.Assistant
The
urllib.parse.quoteis unnecessary for this wheel filename — let me clean that up along with the module docstring (finding #2 turned out to be wrong).Assistant
Now let me verify everything still passes.
Assistant
All 60 tests pass. Now let me check lint and commit.
Assistant
Committed. 4 files changed:
tests/conftest.py— integration test infrastructure (--run-integrationflag)tests/test_editable_integration.py— 4 integration tests (find-links, PEP 503, no-index, no-dependency)tests/test_runner.py— unit test documenting naive--with-editablecommand constructionpyproject.toml— pytest marker registration