Skip to content
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

[FIXME] Nightly CI failures (against pip latest) #2007

Closed
webknjaz opened this issue Oct 21, 2023 · 3 comments · Fixed by #2011
Closed

[FIXME] Nightly CI failures (against pip latest) #2007

webknjaz opened this issue Oct 21, 2023 · 3 comments · Fixed by #2011
Labels
ci Related to continuous integration tasks dependency Related to a dependency good first issue A good item for first time contributors to work on help wanted Request help from the community pip Related to pip PR wanted Feature is discussed or bug is confirmed, PR needed resolver Related to dependency resolver tests Testing and related things

Comments

@webknjaz
Copy link
Member

Here's an example: https://github.com/jazzband/pip-tools/actions/runs/6595090364/job/17919708295.

=================================== FAILURES ===================================
___ test_combine_different_extras_of_the_same_package[backtracking resolver] ___
[gw3] darwin -- Python 3.10.13 /Users/runner/work/pip-tools/pip-tools/.tox/piplatest-coverage/bin/python

pip_conf = '/private/var/folders/3s/vfzpb5r51gs6y328rmlgzm7c0000gn/T/pytest-of-runner/pytest-0/popen-gw3/test_combine_different_extras_1/pip.conf'
runner = <click.testing.CliRunner object at 0x111ac1330>
tmpdir = local('/private/var/folders/3s/vfzpb5r51gs6y328rmlgzm7c0000gn/T/pytest-of-runner/pytest-0/popen-gw3/test_combine_different_extras_1')
make_package = <function make_package.<locals>._make_package at 0x1106fab00>
make_wheel = <function make_wheel.<locals>._make_wheel at 0x11054d5a0>

    def test_combine_different_extras_of_the_same_package(
        pip_conf, runner, tmpdir, make_package, make_wheel
    ):
        """
        Loosely based on the example from [https://github.com/jazzband/pip-tools/issues/1511.](https://github.com/jazzband/pip-tools/issues/1511.?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
        """
        pkgs = [
            make_package(
                "fake-colorful",
                version="0.3",
            ),
            make_package(
                "fake-tensorboardX",
                version="0.5",
            ),
            make_package(
                "fake-ray",
                version="0.1",
                extras_require={
                    "default": ["fake-colorful==0.3"],
                    "tune": ["fake-tensorboardX==0.5"],
                },
            ),
            make_package(
                "fake-tune-sklearn",
                version="0.7",
                install_requires=[
                    "fake-ray[tune]==0.1",
                ],
            ),
        ]
    
        dists_dir = tmpdir / "dists"
        for pkg in pkgs:
            make_wheel(pkg, dists_dir)
    
        with open("requirements.in", "w") as req_in:
            req_in.writelines(
                [
                    "fake-ray[default]==0.1\n",
                    "fake-tune-sklearn==0.7\n",
                ]
            )
    
        out = runner.invoke(
            cli,
            [
                "--output-file",
                "-",
                "--quiet",
                "--find-links",
                str(dists_dir),
                "--no-header",
                "--no-emit-options",
            ],
        )
        assert out.exit_code == 0
>       assert (
            dedent(
                """\
            fake-colorful==0.3
                # via fake-ray
            fake-ray[default,tune]==0.1
                # via
                #   -r requirements.in
                #   fake-tune-sklearn
            fake-tensorboardx==0.5
                # via fake-ray
            fake-tune-sklearn==0.7
                # via -r requirements.in
            """
            )
            == out.stdout
        )
E       AssertionError: assert 'fake-colorfu...irements.in\n' == 'fake-colorfu...irements.in\n'
E         Skipping 106 identical leading characters in diff, use -v to show
E         -  #   fake-ray
E         -     #   fake-tune-sklearn
E         ? ---
E         +  #   fake-tune-sklearn
E           fake-tensorboardx==0.5
E               # via fake-ray
E           fake-tune-sklearn==0.7
E               # via -r requirements.in

/Users/runner/work/pip-tools/pip-tools/tests/test_cli_compile.py:2354: AssertionError
----------------------------- Captured stderr call -----------------------------
/Users/runner/work/pip-tools/pip-tools/.tox/piplatest-coverage/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
/Users/runner/work/pip-tools/pip-tools/.tox/piplatest-coverage/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
/Users/runner/work/pip-tools/pip-tools/.tox/piplatest-coverage/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
/Users/runner/work/pip-tools/pip-tools/.tox/piplatest-coverage/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
=============================== warnings summary ===============================
tests/conftest.py:29
tests/conftest.py:29
tests/conftest.py:29
tests/conftest.py:29
tests/conftest.py:29
  /Users/runner/work/pip-tools/pip-tools/tests/conftest.py:29: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pip._vendor.pkg_resources import Requirement

.tox/piplatest-coverage/lib/python3.10/site-packages/xdist/plugin.py:252
.tox/piplatest-coverage/lib/python3.10/site-packages/xdist/plugin.py:252
.tox/piplatest-coverage/lib/python3.10/site-packages/xdist/plugin.py:252
.tox/piplatest-coverage/lib/python3.10/site-packages/xdist/plugin.py:252
.tox/piplatest-coverage/lib/python3.10/site-packages/xdist/plugin.py:252
  /Users/runner/work/pip-tools/pip-tools/.tox/piplatest-coverage/lib/python3.10/site-packages/xdist/plugin.py:252: DeprecationWarning: The --rsyncdir command line argument and rsyncdirs config variable are deprecated.
  The rsync feature will be removed in pytest-xdist 4.0.
    config.issue_config_time_warning(warning, 2)

tests/test_resolver.py: 1 warning
tests/test_cli_compile.py: 66 warnings
  /Users/runner/work/pip-tools/pip-tools/.tox/piplatest-coverage/lib/python3.10/site-packages/pip/_vendor/packaging/specifiers.py:255: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
    warnings.warn(

tests/test_resolver.py: 24 warnings
tests/test_cli_compile.py: 132 warnings
  /Users/runner/work/pip-tools/pip-tools/.tox/piplatest-coverage/lib/python3.10/site-packages/pip/_vendor/packaging/version.py:111: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
    warnings.warn(

tests/test_resolver.py::test_resolver[input16-expected16-False-unsafe_constraints16]
  /Users/runner/work/pip-tools/pip-tools/.tox/piplatest-coverage/lib/python3.10/site-packages/pip/_internal/models/link.py:445: PipDeprecationWarning: DEPRECATION: git+https://github.com/celery/billiard#egg=billiard==3.5.9999 contains an egg fragment with a non-PEP 508 name pip 25.0 will enforce this behaviour change. A possible replacement is to use the req @ url syntax, and remove the egg fragment. Discussion can be found at https://github.com/pypa/pip/issues/11617
    deprecated(

tests/test_sync.py::test_merge_urls
  /Users/runner/work/pip-tools/pip-tools/.tox/piplatest-coverage/lib/python3.10/site-packages/pip/_internal/models/link.py:445: PipDeprecationWarning: DEPRECATION: file:///example.zip#egg=example==1.0 contains an egg fragment with a non-PEP 508 name pip 25.0 will enforce this behaviour change. A possible replacement is to use the req @ url syntax, and remove the egg fragment. Discussion can be found at https://github.com/pypa/pip/issues/11617
    deprecated(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

It would also be useful to look into the file descriptor leaks per

sys:1: ResourceWarning: unclosed <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 49217), raddr=('127.0.0.1', 49210)>
sys:1: ResourceWarning: unclosed <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 49218), raddr=('127.0.0.1', 49210)>
sys:1: ResourceWarning: unclosed <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 49215), raddr=('127.0.0.1', 49210)>
sys:1: ResourceWarning: unclosed <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 49216), raddr=('127.0.0.1', 49210)>
@webknjaz webknjaz added PR wanted Feature is discussed or bug is confirmed, PR needed help wanted Request help from the community tests Testing and related things pip Related to pip dependency Related to a dependency good first issue A good item for first time contributors to work on resolver Related to dependency resolver ci Related to continuous integration tasks labels Oct 21, 2023
@AndydeCleyre
Copy link
Contributor

Is this #2003?

@webknjaz
Copy link
Member Author

Likely somewhat related. I haven't looked deep. Just wanted to document it explicitly.

@AndydeCleyre
Copy link
Contributor

I think it's exactly that issue. Quoting from my comment there:

This can be seen in current main when testing with the latest pip release, where, at least locally, test_combine_different_extras_of_the_same_package is failing because now fake-ray[default,tune] is annotated as via fake-ray (other via items are still there, I'm paraphrasing to highlight the new change).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Related to continuous integration tasks dependency Related to a dependency good first issue A good item for first time contributors to work on help wanted Request help from the community pip Related to pip PR wanted Feature is discussed or bug is confirmed, PR needed resolver Related to dependency resolver tests Testing and related things
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants