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

2.4.1: test_convert_req_dict_to_req_line fails #1649

Closed
1 task done
dvzrv opened this issue Jan 28, 2023 · 3 comments · Fixed by j178/pdm#1
Closed
1 task done

2.4.1: test_convert_req_dict_to_req_line fails #1649

dvzrv opened this issue Jan 28, 2023 · 3 comments · Fixed by j178/pdm#1
Labels
🐛 bug Something isn't working

Comments

@dvzrv
Copy link

dvzrv commented Jan 28, 2023

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

  export PDM_PEP517_SCM_VERSION=$pkgver
  python -m build --wheel --no-isolation

  local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")

  cd $_name-$pkgver
  # install to temporary location, as importlib is used
  python -m installer --destdir=test_dir dist/*.whl
  export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
  # skip tests that would fail because of missing interpreters: https://github.com/pdm-project/pdm/issues/1175
  pytest -vv -c /dev/null -k 'not test_basic_integration and not test_use_invalid_wrapper_python'

Dependencies:

community/cython                     0.29.33-1        8.03 MiB
core/libnsl                          2.0.0-2          0.07 MiB
core/python                          3.10.9-1        55.19 MiB
extra/python-appdirs                 1.4.4-7          0.07 MiB
community/python-autocommand         2.2.2-1          0.07 MiB
community/python-boolean.py          4.0-1            0.26 MiB
community/python-cerberus            1.3.4-4          0.59 MiB
extra/python-chardet                 5.1.0-1          2.49 MiB
community/python-click               8.1.3-1          0.89 MiB
community/python-colorama            0.4.6-1          0.17 MiB
community/python-distlib             0.3.6-1          0.95 MiB
community/python-fastjsonschema      2.16.2-1         0.20 MiB
community/python-filelock            3.8.2-1          0.05 MiB
extra/python-idna                    3.4-1            0.67 MiB
community/python-inflect             6.0.2-1          0.28 MiB
community/python-jaraco.context      4.2.0-1          0.03 MiB
community/python-jaraco.functools    3.5.2-1          0.05 MiB
community/python-jaraco.text         3.11.0-1         0.07 MiB
community/python-license-expression  30.1.0-1         0.99 MiB
community/python-markdown-it-py      2.1.0-1          0.49 MiB
community/python-mdurl               0.1.2-2          0.04 MiB
community/python-more-itertools      9.0.0-1          0.49 MiB
community/python-msgpack             1.0.4-1          0.25 MiB
extra/python-ordered-set             4.1.0-1          0.06 MiB
community/python-pydantic            1.10.4-1         7.23 MiB
community/python-pygments            2.14.0-1        12.19 MiB
extra/python-pyparsing               3.0.9-1          0.96 MiB
extra/python-requests                2.28.1-1         0.45 MiB
extra/python-setuptools              1:65.6.3-1       3.31 MiB
extra/python-tomli-w                 1.0.0-5          0.03 MiB
extra/python-trove-classifiers       2023.1.20-1      0.11 MiB
community/python-typing_extensions   4.4.0-1          0.22 MiB
community/python-uc-micro-py         1.0.1-3          0.02 MiB
extra/python-urllib3                 1.26.12-1        0.70 MiB
extra/python-validate-pyproject      0.12-1           0.22 MiB
community/python-blinker             1.5-1            0.08 MiB
community/python-cachecontrol        1:0.12.11-1      0.12 MiB
community/python-certifi             2022.12.07-1     0.01 MiB
community/python-dotenv              0.21.1-1         0.10 MiB
community/python-findpython          0.2.3-1          0.13 MiB
community/python-installer           0.6.0-1          1.20 MiB
community/python-lockfile            0.12.2-11        0.08 MiB
extra/python-packaging               21.3-1           0.26 MiB
community/python-pdm-pep517          1:1.0.6-1        0.28 MiB
extra/python-platformdirs            2.6.2-1          0.12 MiB
community/python-pyproject-hooks     1.0.0-1          0.07 MiB
community/python-requests-toolbelt   0.10.1-1         0.38 MiB
extra/python-resolvelib              0.9.0-1          0.11 MiB
community/python-rich                13.3.0-1         2.85 MiB
community/python-shellingham         1.5.0.post1-1    0.04 MiB
extra/python-tomli                   2.0.1-1          0.08 MiB
community/python-tomlkit             0.11.6-1         0.39 MiB
community/python-unearth             0.7.2-1          0.31 MiB
extra/python-virtualenv              20.17.1-1        9.06 MiB

Actual behavior

=================================== FAILURES ===================================
______ test_convert_req_dict_to_req_line[foo >=4.*, <=5.*-foo<5.0,>=4.0] _______

req = 'foo >=4.*, <=5.*', result = 'foo<5.0,>=4.0'

    @pytest.mark.parametrize("req, result", REQUIREMENTS)
    def test_convert_req_dict_to_req_line(req, result):
        r = parse_requirement(req)
        result = result or req
>       assert r.as_line() == result
E       AssertionError: assert 'foo<=5.*,>=4.*' == 'foo<5.0,>=4.0'
E         - foo<5.0,>=4.0
E         ?       ^     ^
E         + foo<=5.*,>=4.*
E         ?     +  ^     ^

tests/models/test_requirements.py:63: AssertionError
_____ test_convert_req_dict_to_req_line[foo (>=4.*, <=5.*)-foo<5.0,>=4.0] ______

req = 'foo (>=4.*, <=5.*)', result = 'foo<5.0,>=4.0'

    @pytest.mark.parametrize("req, result", REQUIREMENTS)
    def test_convert_req_dict_to_req_line(req, result):
        r = parse_requirement(req)
        result = result or req
>       assert r.as_line() == result
E       AssertionError: assert 'foo<=5.*,>=4.*' == 'foo<5.0,>=4.0'
E         - foo<5.0,>=4.0
E         ?       ^     ^
E         + foo<=5.*,>=4.*
E         ?     +  ^     ^

python-pdm-2.4.1-1-x86_64-build.log

python-pdm-2.4.0-1-x86_64-check.log

Expected behavior

All unit tests pass.

Environment Information

n/a (packaging from 2.4.1 sdist tarball

@dvzrv dvzrv added the 🐛 bug Something isn't working label Jan 28, 2023
@frostming
Copy link
Collaborator

Make sure the packaging version is >=22

@dvzrv
Copy link
Author

dvzrv commented Jan 28, 2023

That's unfortunately not possible right now:
https://lists.archlinux.org/archives/list/[email protected]/thread/UHQH6S3FYHWRSMYMQ26PR7MKK2P6H5IS/

The vendored stuff in setuptools has been updated, but no new release has been made since:
pypa/setuptools#3790

@frostming
Copy link
Collaborator

got it, will skip those tests in a new patch release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants