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

Link collection ignores package-index-binding #2442

Closed
1 task done
sanmai-NL opened this issue Nov 28, 2023 · 1 comment · Fixed by #2444
Closed
1 task done

Link collection ignores package-index-binding #2442

sanmai-NL opened this issue Nov 28, 2023 · 1 comment · Fixed by #2444
Assignees
Labels
🐛 bug Something isn't working

Comments

@sanmai-NL
Copy link
Contributor

  • 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

pyproject.toml

...

[[tool.pdm.source]]
exclude_packages = ["*"]
include_packages = ["mypackage"]
name = "mypackage"
url = "https://gitlab.com/api/v4/projects/123456/packages/pypi/simple"

...

Actual behavior

$ pdm list --graph --resolve
STATUS: Fetching hashes for resolved packages...
Failed to collect links from https://pypi.org/simple/mypackage/: Client Error(404): Not Found
Failed to collect links from https://gitlab.com/api/v4/projects/123456/packages/pypi/simple/python-dotenv/: Client Error(404): Not Found
Failed to collect links from https://gitlab.com/api/v4/projects/123456/packages/pypi/simple/bandit/: Client Error(404): Not Found
Failed to collect links from https://gitlab.com/api/v4/projects/123456/packages/pypi/simple/black/: Client Error(404): Not Found
Failed to collect links from https://gitlab.com/api/v4/projects/123456/packages/pypi/simple/coverage/: Client Error(404): Not Found
Failed to collect links from https://gitlab.com/api/v4/projects/123456/packages/pypi/simple/creosote/: Client Error(404): Not Found
Failed to collect links from https://gitlab.com/api/v4/projects/123456/packages/pypi/simple/debugpy/: Client Error(404): Not Found
Failed to collect links from https://gitlab.com/api/v4/projects/123456/packages/pypi/simple/isort/: Client Error(404): Not Found
Failed to collect links from https://gitlab.com/api/v4/projects/123456/packages/pypi/simple/linkify-it-py/: Client E
...

Expected behavior

No links are collected for package, index pairs that are excluded by the project config.

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
  pdm info && pdm info --env
PDM version:
  2.10.4
Python Interpreter:
  /blah/.venv/bin/python (3.11)
Project Root:
  /blah
Local Packages:
  
{
  "implementation_name": "cpython",
  "implementation_version": "3.11.6",
  "os_name": "posix",
  "platform_machine": "arm64",
  "platform_release": "23.1.0",
  "platform_system": "Darwin",
  "platform_version": "Darwin Kernel Version 23.1.0: Mon Oct  9 21:28:45 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6020",
  "python_full_version": "3.11.6",
  "platform_python_implementation": "CPython",
  "python_version": "3.11",
  "sys_platform": "darwin"
}
@sanmai-NL sanmai-NL added the 🐛 bug Something isn't working label Nov 28, 2023
@frostming frostming self-assigned this Nov 29, 2023
frostming added a commit that referenced this issue Nov 29, 2023
Fixes #2442

Signed-off-by: Frost Ming <me@frostming.com>
@sanmai-NL
Copy link
Contributor Author

@frostming

The defect persists or regressed for me, when using lock.

$  pdm info && pdm info --env
⏳ Started on 2024-09-23T13:45:14Z
PDM version:
  2.19.0
Python Interpreter:
  /Users/user/devel/project/.venv/bin/python (3.12)
Project Root:
  /Users/user/devel/project/_template
Local Packages:
  
INFO: PDM 2.19.0 is installed, while 2.19.1 is available.
Please run `brew upgrade pdm` to upgrade.
Run `pdm config check_update false` to disable the check.
{
  "implementation_name": "cpython",
  "implementation_version": "3.12.6",
  "os_name": "posix",
  "platform_machine": "arm64",
  "platform_release": "24.0.0",
  "platform_system": "Darwin",
  "platform_version": "Darwin Kernel Version 24.0.0: Mon Aug 12 20:52:12 PDT 2024; root:xnu-11215.1.10~2/RELEASE_ARM64_T6020",
  "python_full_version": "3.12.6",
  "platform_python_implementation": "CPython",
  "python_version": "3.12",
  "sys_platform": "darwin"
}
INFO: PDM 2.19.0 is installed, while 2.19.1 is available.
$ pdm lock --append --group ':all' --verbose --implementation cpython --platform windows
pdm.termui: ======== Start resolving requirements ========
pdm.termui:   mypackage>=2024.7.13.14.21.44
pdm.termui:   pdm-backend>=2.4.1
pdm.termui:   mypackage>=2024.7.13.14.21.44
pdm.termui:   black[jupyter]>=24.8.0
pdm.termui:   coverage>=7.6.1
pdm.termui:   creosote>=3.0.2
pdm.termui:   debugpy>=1.8.5
pdm.termui:   isort>=5.13.2
pdm.termui:   mdformat-black>=0.1.1
pdm.termui:   mdformat-footnote>=0.1.1
pdm.termui:   mdformat-frontmatter>=2.0.8
pdm.termui:   mdformat-gfm>=0.3.6
pdm.termui:   mdformat-tables>=1.0.0
pdm.termui:   mdformat>=0.7.17
pdm.termui:   mypy>=1.11.2
pdm.termui:   pycodestyle>=2.12.1
pdm.termui:   pylint>=3.3.0
pdm.termui:   python-dotenv>=1.0.1
pdm.termui:   rope>=1.13.0
pdm.termui:   ruff>=0.6.7
pdm.termui:   toml-sort>=0.23.1
pdm.termui:   vulture>=2.12
pdm.termui:   pytest>=8.3.3
pdm.termui:   Adding requirement python>=3.12
pdm.termui:   Adding requirement mypackage>=2024.7.13.14.21.44
pdm.termui:   Adding requirement pdm-backend>=2.4.1
unearth.collector: Failed to collect links from https://gitlab.com/api/v4/projects/123456/packages/pypi/simple/pdm-backend/: Client Error(404): Not Found

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