Commit 6726028
committed
fix(venv): group venv prefixes by path component, not raw path
When files overlap between packages, and dist-info directories are
present, it results in a prefix list like `foo foo-bar foo/bar`.
When sorted as raw strings, hyphen sorts before slash, so the continuity
of path prefixes is violated and they are grouped separately. An error
then occurs because both `foo/` and `foo/bar` are created, but the
latter is a sub-path of the former.
To fix, change the sort key to a tuple of path components. This makes
`foo foo-bar foo/bar` sort as `(foo,) (foo, bar), (foo-bar, )`,
resulting in the correct order.
Fixes #32041 parent ec1df01 commit 6726028
File tree
2 files changed
+5
-1
lines changed- python/private
- tests/venv_site_packages_libs/app_files_building
2 files changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
142 | 144 | | |
143 | 145 | | |
144 | 146 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| |||
0 commit comments