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

Poetry user agent for all requests #8487

Closed
2 tasks done
Agalin opened this issue Sep 29, 2023 · 3 comments
Closed
2 tasks done

Poetry user agent for all requests #8487

Agalin opened this issue Sep 29, 2023 · 3 comments
Labels
kind/feature Feature requests/implementations

Comments

@Agalin
Copy link

Agalin commented Sep 29, 2023

  • I have searched the issues of this repo and believe that this is not a duplicate. There is a similar issue (Set user agent for pip install #2367) which is mostly about PyPI stats and no longer valid as pip is not used.
  • I have searched the FAQ and general documentation and believe that my question is not already covered.

Feature Request

Poetry should set its own user agent. Currently it makes all requests (both for package versions list retrieval and package download) with the default one provided by the requests library: python-requests/<version>, e.g. python-requests/2.31.0.

Lack of an unique user agent makes it tricky to differentiate between installer and human requests.

Why is it important?

We're using Devpi for our internal index. It supports both human-readable and simple listings of packages. Simple one is available through a dedicated suffix or if one of two requirements is matched - user agent is specific to installers or Accept header is set to installer-specific. See this code for currently supported values.

But there is another reason such a differentiation is useful - it makes it possible to show cached data to installers while avoiding stale results when traversed manually.

@Agalin Agalin added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Sep 29, 2023
@dimbleby
Copy link
Contributor

#8394, please close

@Agalin
Copy link
Author

Agalin commented Sep 29, 2023

Oh. Missed it due to it being merged already. Great!

@Agalin Agalin closed this as completed Sep 29, 2023
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
@abn abn removed the status/triage This issue needs to be triaged label Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations
Projects
None yet
Development

No branches or pull requests

3 participants