Conversation
I'm a little skeptical of this diagnosis, insofar as tox's default So it should never actually attempt to run |
|
(You need at least pip 21.1, from 2021-04-24, for editable installs with just setup.cfg to work) |
|
Hmm, that's weird. Here's the output of trying to run (edit: note that this shows a pip version in my virtualenv, which tox might or might not pick up, but my system pip is running the same version) |
|
I also am skeptical because I don't recall having the issue you're facing, and moreover |
|
Hm actually I can reproduce now, not sure why I haven't ran into it before.. My (limited) understanding (and what happened experimentally) is that removing I also disagree with your interpretation of
The docs says (to my reading) it will use the As to why it's trying to do The simplest naïve workaround might be to have the 2-line stub I notice that someone on the tox repo seems to have found a workaround which we could use for now: tox-dev/tox#2197 (comment) (in essence, add Here's an example diff doing just that: https://github.com/ansible-community/ansible-compat/pull/96/files I reckon we can either do that or wait for this PR: tox-dev/tox#2273 |
Removing
So let's try to remove the reliance on editable install for Tox / CI? |
|
Ionel Mărieș has a nice blog post that delves deeper into package structure and testing in its first two sections. Everything from "The Setup Script" and beyond isn't particularly relevant to this, but the earlier sections are good, even when separated from a discussion of Amusingly, he ends with:
|
|
I'm going to close this PR on the basis that we've identified an actual issue but I misidentified its source and this patch isn't the right fix for it. |
Also, as a nitpick, maybe that's an issue with me not being a native english reader, but that sentence to me means that it uses |
|
It's genuinely ambiguous in Tox's docs; I had to dive into the source to determine what it meant. |
|
"in the style of" usually means that it "does something similar to", rather than explicitly using it. For example, I might do a code review in the style of richvdh, which means that I may use techniques I've noticed he's used. Rather than getting out my richvdh to do the review. |
Except the doc says
I would have understood "in the style of", but this to me means the package is installed with Also, sorry, I realise now that while by "that sentence" I was talking about the sentence from the docs it could also be understood as the sentence from the quote. I thought I added enough context to my comment to make it clear what I was referring to, but apparently didn't. Anyway, I've opened an issue on their side: tox-dev/tox#2282 |
#18 happens when we use `usedevelop=True`, since that option expects a `setup.py`. Removing it makes tox work twice in a row, as noted in the issue. We originally added `usedevelop=True` in Synapse as a workaround (#21 (comment)) which does not appear to be necessary for how we invoke trial (#21 (comment)).
When running
tox -e pylocally to run tests I realised it complained that it couldn't findsetup.py(which makes sense since we switched tosetup.cfg) unless I ranrm -r .tox/before every run. When digging, I realised it's because we run tox withusedevelop=true, which, according to docs, relies onsetup.pyto work.We only do this because we want to run
trialin CI, but imho the burden of having to recreate the tox environment for every run outweighs the advantages of usingtrialinstead of e.g. Python's ownunittestmodule. So my suggestion is that we stop usingtrialin favour ofunittest.