Skip to content

"Index does not provide upload-time metadata" error when using --uploaded-prior-to #1370

Description

@Barker404

Version

Describe the bug
When trying to pip install a package from a pulp repository, using --uploaded-prior-to results in an error. Similar, trying to uv add using --exclude-newer also results in an error.

To Reproduce
Steps to reproduce the behavior using pip:

  1. Create a pull-through python repository (have not tested with non-pull-through)
  2. pip install -i http://<pulp-host>/pypi/<repository>/simple/ --trusted-host <pulp-host> --uploaded-prior-to P3D flask (or any other package)
  3. Get error: ERROR: Index http://<pulp-host>/pypi/<repository>/simple/flask/ does not provide upload-time metadata

Steps using uv:

  1. Create a pull-through python repository (have not tested with non-pull-through)
  2. uv add --index http://<pulp-host>/pypi/<repository>/simple/ --trusted-host <pulp-host> --exclude-newer P3D flask
  3. Get error: No solution found when resolving dependencies: Because there are no versions of flask and your project depends on flask, we can conclude that your project's requirements are unsatisfiable. allow with warnings like warning: flask-3.1.3.tar.gz is missing an upload date, but user provided: 2026-09-04T14:31:14.9107263Z

Expected behavior
Pip (and uv) should be able to find the upload-time metadata and use it to filter package versions.

Additional context
This may be happening because of the way that pulp is handling the weight of content types within the Accept header. It looks like pip may be sending a request similar to curl -H 'Accept: application/vnd.pypi.simple.v1+json, application/vnd.pypi.simple.v1+html; q=0.1, text/html; q=0.01' http://<pulp-host>/pypi/<repository>/simple/flask/. A request like this results in a JSON response (with upload time metadata) from pypi, but an HTML response (which can't contain upload-time metadata) from pulp.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions