-
-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tox4: The usedevelop
ineffective with skipsdist
/ editable package not present in virtual environment
#2730
Comments
usedevelop
ineffective with skipsdist
/ no editable package not present in virtual environmentusedevelop
ineffective with skipsdist
/ editable package not present in virtual environment
Huh, surprised this works. If you set |
TL;DR
tox 3 -> installs the editable package
tox 3 -> installs the editable package
tox 3 -> does not install anything but deps
tox 3 -> installs the regular package (after adding |
Got it, thanks for confirmation. I may propose a PR over the weekend, if no one comes first to that.
To be honest, I learned that years ago in some OpenStack projects, such as here https://opendev.org/openstack/neutron/src/branch/master/tox.ini – so I thought this is the expected behavior ;-) |
Yes, there are many hundreds of projects in OpenStack alone impacted by this, but it's just one of many adjustments they'll need to make before they can remove their global tox<4 pin. |
* removed skipsdist=True to make sure novaclient is available in the virtual env. The usedevelop and skipsdist does not work together any more tox-dev/tox#2730. For bindep we still don't need the current repo to be installed in the env so skipsdist added there. Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/866943 Change-Id: I979b91570c7b60273f35fbdf8464f6a9ee2007d6
* Update python-novaclient from branch 'master' to c7cb02f1f7d508863c5e33f9d4b8e26b1a7ab6c0 - Make tox.ini tox 4.0.0 compatible * removed skipsdist=True to make sure novaclient is available in the virtual env. The usedevelop and skipsdist does not work together any more tox-dev/tox#2730. For bindep we still don't need the current repo to be installed in the env so skipsdist added there. Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/866943 Change-Id: I979b91570c7b60273f35fbdf8464f6a9ee2007d6
Following the recommendations provided in [1], this patch disables the "skipsdist" flag. Also format passenv values due to cannot contain whitespace, and add allowlist_externals where necessary because looks more strictly checked. [1]tox-dev/tox#2730 Change-Id: Iea8e355cd18c51a00bdbe5225239965cfc1704d7
* Update ovn-octavia-provider from branch 'master' to ef019ed63b7be9b2ff2eff5a1530d0870529da72 - Fix jobs after tox4 upgrade Following the recommendations provided in [1], this patch disables the "skipsdist" flag. Also format passenv values due to cannot contain whitespace, and add allowlist_externals where necessary because looks more strictly checked. [1]tox-dev/tox#2730 Change-Id: Iea8e355cd18c51a00bdbe5225239965cfc1704d7
Following the recommendations provided in [1], this patch disables the "skipsdist" flag. Also format passenv values due to cannot contain whitespace, and add allowlist_externals where necessary because looks more strictly checked. [1]tox-dev/tox#2730 Change-Id: Iea8e355cd18c51a00bdbe5225239965cfc1704d7 (cherry picked from commit ef019ed)
Following the recommendations provided in [1], this patch disables the "skipsdist" flag. Also format passenv values due to cannot contain whitespace, and add allowlist_externals where necessary because looks more strictly checked. [1]tox-dev/tox#2730 Change-Id: Iea8e355cd18c51a00bdbe5225239965cfc1704d7 (cherry picked from commit ef019ed)
Following the recommendations provided in [1], this patch disables the "skipsdist" flag. Also format passenv values due to cannot contain whitespace, and add allowlist_externals where necessary because looks more strictly checked. [1]tox-dev/tox#2730 Conflicts: tox.ini Change-Id: Iea8e355cd18c51a00bdbe5225239965cfc1704d7 (cherry picked from commit ef019ed)
Following the recommendations provided in [1], this patch disables the "skipsdist" flag. Also format passenv values due to cannot contain whitespace, and add allowlist_externals where necessary because looks more strictly checked. [1]tox-dev/tox#2730 Change-Id: Iea8e355cd18c51a00bdbe5225239965cfc1704d7 (cherry picked from commit ef019ed)
The use of this global setting may have some undesired side effects, and I see no documentation as to why we have it in the first place. Let's drop it on the back of what some other OpenStack projects are doing. References: https://review.opendev.org/c/x/charm-ovn-central/+/869165/comments/9e2cf4c4_acea15b6 tox-dev/tox#2730
The use of the `skipsdist` global setting may have some undesired side effects, let's drop it in favor of the upstream recommendations. References: https://tox.wiki/en/latest/config.html#skip_install tox-dev/tox#2730 https://review.opendev.org/c/x/charm-ovn-central/+/869165/comments/9e2cf4c4_acea15b6
'[tox] skipsdist' behaves differently in tox 4 [1]. In addition, setting '[testenv] basepython' with '[tox] ignore_basepython_conflict' has been the cause of a few tox 4 bugs (most since fixed, thankfully) and might be deprecated [2]. Remove it since we don't need it in any of our environments. [1] tox-dev/tox#2730 [2] tox-dev/tox#2846 Signed-off-by: Stephen Finucane <[email protected]>
'[tox] skipsdist' behaves differently in tox 4 [1]. In addition, setting '[testenv] basepython' with '[tox] ignore_basepython_conflict' has been the cause of a few tox 4 bugs (most since fixed, thankfully) and might be deprecated [2]. Remove it since we don't need it in any of our environments. [1] tox-dev/tox#2730 [2] tox-dev/tox#2846 Signed-off-by: Stephen Finucane <[email protected]>
* Update neutron from branch 'master' to 61f1b31e6fd39512cd2a8362a8f39ae63578727a - Merge "Adapt deploy_rootwrap filters path for tox4" - Adapt deploy_rootwrap filters path for tox4 This patch also fixes the issue of the deploy_rootwrap.sh script related to the rootwrap filters path. This path checks if the path is absolute (tox3) or relative (tox4) and makes it absolute in the second case. [1]tox-dev/tox#2730 Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/866943 Closes-Bug: #1999558 Change-Id: I7a4a30268cb352f25bad7983b94690c0b681e5fa
This patch also fixes the issue of the deploy_rootwrap.sh script related to the rootwrap filters path. This path checks if the path is absolute (tox3) or relative (tox4) and makes it absolute in the second case. [1]tox-dev/tox#2730 Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/866943 Closes-Bug: #1999558 Change-Id: I7a4a30268cb352f25bad7983b94690c0b681e5fa
* Update python-magnumclient from branch 'master' to 4d74c31c9a8d0677996d32ee7f7057e23bba4683 - Support tox4 Renamed deprecated option whitelist_externals to allowlist_externals. Bumped tox minversion as allowlist_externals is only supported in 3.18 [1]. Also set skipsdist=False (default) due to [2]. [1] https://tox.wiki/en/3.24.5/config.html#conf-allowlist_externals [2] tox-dev/tox#2730 Change-Id: Iee2f00418804c21589bd8abc19a8b25aff458e77
Renamed deprecated option whitelist_externals to allowlist_externals. Bumped tox minversion as allowlist_externals is only supported in 3.18 [1]. Also set skipsdist=False (default) due to [2]. [1] https://tox.wiki/en/3.24.5/config.html#conf-allowlist_externals [2] tox-dev/tox#2730 Change-Id: Iee2f00418804c21589bd8abc19a8b25aff458e77
* Update magnum-ui from branch 'master' to 452ca7da23f4489bc0dd25cfd031d4f1db04dfa6 - Fix tox tox4 errors if basepython and python in other envs are different. [1] Bumped tox minversion as allowlist_externals is only supported in 3.18 [2] [1] tox-dev/tox#2838 [2] tox-dev/tox#2730 Change-Id: I9d24395a7cc5d8423a58ec1e3ed8468ca6984e77
tox4 errors if basepython and python in other envs are different. [1] Bumped tox minversion as allowlist_externals is only supported in 3.18 [2] [1] tox-dev/tox#2838 [2] tox-dev/tox#2730 Change-Id: I9d24395a7cc5d8423a58ec1e3ed8468ca6984e77
In tox v4, "skipdist" together with "usedevelop" do not work: tox-dev/tox#2730 I do not understand why we use both options, since we do not lint the code with tox (or similar), so we actually need to install the package every time. Closes #123
See also: tox-dev/tox#2730 Closes #123
fwiw, just to link it here, using https://tox.wiki/en/3.1.3/example/general.html#avoiding-expensive-sdist (arbitrary version selected based off of a google search) |
Have you tried with package = editable |
I don't think this is a good practice, hence removing it. Using editable installation come with significant downsides. |
I'm not necessarily asking for it to be restored, I just wanted to link to something that would describe why people may have had this configuration in place to begin with. We've been stuck using |
Yes, it was fairly widespread. Communities I participate in had close to a thousand projects which needed their tox configuration troubleshot and adjusted to work with v4, and most of the time it turned out to be due to combining skipsdist with usedevelop which did install the project under v3 but stopped in v4. (Many of those projects are still pinning |
See tox-dev/tox#2730 and also the Neutron CI bug report https://bugs.launchpad.net/neutron/+bug/1999558
See tox-dev/tox#2730 and also the Neutron CI bug report https://bugs.launchpad.net/neutron/+bug/1999558
'[tox] skipsdist' behaves differently in tox 4 [1]. In addition, setting '[testenv] basepython' with '[tox] ignore_basepython_conflict' has been the cause of a few tox 4 bugs (most since fixed, thankfully) and might be deprecated [2]. Remove it since we don't need it in any of our environments. [1] tox-dev/tox#2730 [2] tox-dev/tox#2846 Conflicts: tox.ini NOTE(stephenfin): Conflicts are due to lack of support for Django 4.1. Signed-off-by: Stephen Finucane <[email protected]> (cherry picked from commit a03a0a5)
Both Looking at the
In
What I have witnessed is that if I set both:
Tox states it is not using
And if I understand it properly that comes from
The parent The parent is
So that when I believe the fix should be done in the child, it returns early on with
And after that if the package type is not determinated yet, set it to |
Then I guess instead of messing up with I have the use case of having large testenv that should skip the slow installation, but I still want one testenv triggering the
With tox v4 and the new semantic it seems I can do:
I will give it a try on a live project and verify. It looks like eventually the |
In tox v4, "skipdist" together with "usedevelop" do not work: tox-dev/tox#2730 I do not understand why we use both options, since we do not lint the code with tox (or similar), so we actually need to install the package every time. Closes #123
Issue
So far in most of our tox environments, for example for linters, we do not need the package, so we set
skipsdist
toTrue
in the main configuration and where the package is needed for functional tests, the optionusedevelop
installs the editable package. However, it is no longer true for new release of tox.Apparently with release 4.0 the tox changed behavior for
usedevelop
option, but I did not find it mentioned in FAQ. Is this intentional behavior now? Maybe it is a side effect of modifications mentioned under packaging changes?Environment
pip list
Output of running tox
Provide the output of
tox -rvv
:Minimal example
myproject/__init__.py file
pyproject.toml
tox.ini file
The text was updated successfully, but these errors were encountered: