Skip to content

infrastructure: Stricter tox dependensies#8119

Merged
bluetech merged 3 commits intopytest-dev:masterfrom
antonblr:pluggy-build-slow
Dec 12, 2020
Merged

infrastructure: Stricter tox dependensies#8119
bluetech merged 3 commits intopytest-dev:masterfrom
antonblr:pluggy-build-slow

Conversation

@antonblr
Copy link
Member

@antonblr antonblr commented Dec 10, 2020

Proposal for #8117

@bluetech - I pinned the min versions for some of the packages to the current latest in tox.ini (so pip will resolve them sooner). Builds are running faster now (ubuntu-py37-pluggy ~2min).

tox.ini Outdated
pexpect: pexpect
pluggymaster: git+https://github.com/pytest-dev/pluggy.git@master
pygments
pluggymaster: git+https://github.com/pytest-dev/pluggy.git@0.13.1
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure what to do with this - with master pip fails :

The user requested pluggy 1.0.0.dev42+g0a064fe (from git+https://github.com/pytest-dev/pluggy.git@master)
    pytest 6.1.2 depends on pluggy<1.0 and >=0.12

Copy link
Member

Choose a reason for hiding this comment

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

The defensiv requirement pin for pluggy may need to be widened

Copy link
Member Author

@antonblr antonblr Dec 10, 2020

Choose a reason for hiding this comment

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

I have a couple of questions:

  • Is it ok to bump the upper bound for pluggy (there are quite a few commits - pluggy/compare/0.13.1...master)?
  • pytest>=6.0.0 requirement comes from pytest-xdist, which is in tox deps. What is the proper way of telling tox/pip to use local pytest (sdist package) when installing deps, instead of resolving from released ones?

Copy link
Member

Choose a reason for hiding this comment

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

the bump for pluggy may need some experimentation
i have no idea how to tell tox/pip

Copy link
Member

Choose a reason for hiding this comment

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

The idea of pluggymaster is to make sure pluggy master is working. So here it needs to remain @master.

But to think the conflict that the new resolver trips over, I think we can bump the pluggy requirement in setup.cfg to something like pluggy<1.0.0a1. pytest works with current pluggy master, and we'll at least try to make sure the next pluggy development release (if any) would use an alpha rather than dev.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have loosened pluggy requirements for pytest locally, but the issue is:

  • tox installs pytest-xdist
  • pytest-xdist requires pytest>=6.0.0
  • pip start resolving pytest from released versions, instead of local one, that have pluggy versions bumped

I'm just started with tox (looking into config options), but perhaps someone have an idea how to solve this already.

Logs from tox -e py37-pluggymaster-xdist :

ERROR: Cannot install pluggy 1.0.0.dev42+g0a064fe (from git+https://github.com/pytest-dev/pluggy.git@master) 
and pytest-xdist because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested pluggy 1.0.0.dev42+g0a064fe (from git+https://github.com/pytest-dev/pluggy.git@master)
    pytest 6.1.2 depends on pluggy<1.0 and >=0.12
    The user requested pluggy 1.0.0.dev42+g0a064fe (from git+https://github.com/pytest-dev/pluggy.git@master)
    pytest 6.1.1 depends on pluggy<1.0 and >=0.12
    The user requested pluggy 1.0.0.dev42+g0a064fe (from git+https://github.com/pytest-dev/pluggy.git@master)
    pytest 6.1.0 depends on pluggy<1.0 and >=0.12
    The user requested pluggy 1.0.0.dev42+g0a064fe (from git+https://github.com/pytest-dev/pluggy.git@master)
    pytest 6.0.2 depends on pluggy<1.0 and >=0.12
    The user requested pluggy 1.0.0.dev42+g0a064fe (from git+https://github.com/pytest-dev/pluggy.git@master)
    pytest 6.0.1 depends on pluggy<1.0 and >=0.12
    The user requested pluggy 1.0.0.dev42+g0a064fe (from git+https://github.com/pytest-dev/pluggy.git@master)
    pytest 6.0.0 depends on pluggy<1.0 and >=0.12

Copy link
Member Author

Choose a reason for hiding this comment

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

adding xdist: -e . (7b281fe) seem to work, but not sure if this is the right way.

@antonblr antonblr marked this pull request as ready for review December 10, 2020 18:10
@antonblr antonblr changed the title Stricter tox dependensies infrastructure: Stricter tox dependensies Dec 10, 2020
Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

Thanks a lot for digging into this @antonblr.

The main.yml LGTM, consistent with what the test job already does.

The tox changes look good to, it's good to bump things there occasionally, except for the pluggy change where I left a comment.

About the pyproject.yml/setup.cfg changes, it's generally better to have a wide range to give more flexibility to users. So I wonder if they were required for fixing the issues.

tox.ini Outdated
pexpect: pexpect
pluggymaster: git+https://github.com/pytest-dev/pluggy.git@master
pygments
pluggymaster: git+https://github.com/pytest-dev/pluggy.git@0.13.1
Copy link
Member

Choose a reason for hiding this comment

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

The idea of pluggymaster is to make sure pluggy master is working. So here it needs to remain @master.

But to think the conflict that the new resolver trips over, I think we can bump the pluggy requirement in setup.cfg to something like pluggy<1.0.0a1. pytest works with current pluggy master, and we'll at least try to make sure the next pluggy development release (if any) would use an alpha rather than dev.

Comment on lines -55 to +56
setuptools>=40.0
setuptools-scm
setuptools>=>=42.0
setuptools-scm>=3.4
Copy link
Member Author

Choose a reason for hiding this comment

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

kept them in-sync with pyptoject.toml

Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

Well, I guess all of the circular dependencies were bound to catch up to us eventually! I'm not sure if xdist: -e . is the appropriate way to deal with it really but since we need a clean CI for the upcoming release, let's go with that for now and figure it out later...

@bluetech bluetech merged commit cf1051c into pytest-dev:master Dec 12, 2020
@antonblr antonblr deleted the pluggy-build-slow branch December 12, 2020 16:49
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