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

Homepage doesn't show up on PyPI #9646

Closed
notpushkin opened this issue Aug 21, 2024 · 3 comments
Closed

Homepage doesn't show up on PyPI #9646

notpushkin opened this issue Aug 21, 2024 · 3 comments
Assignees
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Milestone

Comments

@notpushkin
Copy link

Description

I've published a package on PyPI, and the homepage URL wasn't picked up from [tool.poetry]: https://test.pypi.org/project/poetry-homepage-bug-repro/

[tool.poetry]
# ...
homepage = "https://example.com/"
repository = "https://example.net/repo.git"
documentation = "https://example.com/docs"

I've looked at the METADATA file in the wheel and it seems that Poetry puts homepage URL into Home-page property only and doesn't create a Project-URL entry like for other [tool.poetry] URLs. PyPI on the other hand seems to ignore Home-page altogether now. This issue might be related: pypi/warehouse#11220

Workarounds

If you put homepage URL in [tool.poetry.urls], it does show up on PyPI just fine: https://test.pypi.org/project/poetry-homepage-bug-workaround/

[tool.poetry.urls]
"Homepage" = "https://example.com/"

Poetry Installation Method

pipx

Operating System

Fedora 40

Poetry Version

Poetry (version 1.8.3)

Poetry Configuration

cache-dir = "/home/ale/.cache/pypoetry"
experimental.system-git-client = false
installer.max-workers = null
installer.modern-installation = true
installer.no-binary = null
installer.parallel = true
keyring.enabled = true
repositories.testpypi.url = "https://test.pypi.org/legacy/"
solver.lazy-wheel = true
virtualenvs.create = true
virtualenvs.in-project = true
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs"  # /home/ale/.cache/pypoetry/virtualenvs
virtualenvs.prefer-active-python = false
virtualenvs.prompt = "{project_name}-py{python_version}"
warnings.export = true

Python Sysconfig

No response

Example pyproject.toml

[tool.poetry]
name = "poetry-homepage-bug-repro"
version = "0.1.0"
description = ""
authors = ["Alexander Pushkov <[email protected]>"]
readme = "README.md"
homepage = "https://example.com/"
repository = "https://example.net/repo.git"
documentation = "https://example.com/docs"

[tool.poetry.dependencies]
python = "^3.12"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

Poetry Runtime Logs

$ poetry publish --build -r testpypi -vvv
Loading configuration file /home/ale/.config/pypoetry/config.toml
Loading configuration file /tmp/poetry-homepage-bug-repro/poetry.toml
Using virtualenv: /tmp/poetry-homepage-bug-repro/.venv
Building poetry-homepage-bug-repro (0.1.0)
  - Building sdist
  - Adding: /tmp/poetry-homepage-bug-repro/poetry_homepage_bug_repro/__init__.py
  - Adding: pyproject.toml
  - Adding: README.md
  - Built poetry_homepage_bug_repro-0.1.0.tar.gz
  - Building wheel
  - Adding: /tmp/poetry-homepage-bug-repro/poetry_homepage_bug_repro/__init__.py
  - Built poetry_homepage_bug_repro-0.1.0-py3-none-any.whl

Found an API token for testpypi.
Publishing poetry-homepage-bug-repro (0.1.0) to testpypi
 - Uploading poetry_homepage_bug_repro-0.1.0-py3-none-any.whl 0%[urllib3:urllib3.connectionpool] Starting new HTTPS connection (1): test.pypi.org:443
 - Uploading poetry_homepage_bug_repro-0.1.0-py3-none-any.whl 100%[urllib3:urllib3.connectionpool] https://test.pypi.org:443 "POST /legacy/ HTTP/11" 200 106
 - Uploading poetry_homepage_bug_repro-0.1.0-py3-none-any.whl 100%
 - Uploading poetry_homepage_bug_repro-0.1.0.tar.gz 100%[urllib3:urllib3.connectionpool] https://test.pypi.org:443 "POST /legacy/ HTTP/11" 200 106
 - Uploading poetry_homepage_bug_repro-0.1.0.tar.gz 100%
@notpushkin notpushkin added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Aug 21, 2024
@Secrus
Copy link
Member

Secrus commented Aug 21, 2024

I would say that this is a Warehouse issue, since packaging guide doesn't deprecate the fields Poetry is setting. However, we can add an extra case in our build to make it compatible with how Warehouse works.

@radoering
Copy link
Member

@notpushkin @Secrus Am I missing something or has this been fixed by Warehouse? I can see a homepage link for both https://test.pypi.org/project/poetry-homepage-bug-repro/ and https://test.pypi.org/project/poetry-homepage-bug-workaround/

@Secrus
Copy link
Member

Secrus commented Oct 12, 2024

@notpushkin @Secrus Am I missing something or has this been fixed by Warehouse? I can see a homepage link for both https://test.pypi.org/project/poetry-homepage-bug-repro/ and https://test.pypi.org/project/poetry-homepage-bug-workaround/

Probably a recent deploy or something. Seems like my work wasn't needed after all.

@Secrus Secrus closed this as completed Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants