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:
- Create a pull-through python repository (have not tested with non-pull-through)
pip install -i http://<pulp-host>/pypi/<repository>/simple/ --trusted-host <pulp-host> --uploaded-prior-to P3D flask (or any other package)
- Get error:
ERROR: Index http://<pulp-host>/pypi/<repository>/simple/flask/ does not provide upload-time metadata
Steps using uv:
- Create a pull-through python repository (have not tested with non-pull-through)
uv add --index http://<pulp-host>/pypi/<repository>/simple/ --trusted-host <pulp-host> --exclude-newer P3D flask
- 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.
Version
Installed from pulp-oci-images/images/compose
Describe the bug
When trying to pip install a package from a pulp repository, using
--uploaded-prior-toresults in an error. Similar, trying to uv add using--exclude-neweralso results in an error.To Reproduce
Steps to reproduce the behavior using pip:
pip install -i http://<pulp-host>/pypi/<repository>/simple/ --trusted-host <pulp-host> --uploaded-prior-to P3D flask(or any other package)ERROR: Index http://<pulp-host>/pypi/<repository>/simple/flask/ does not provide upload-time metadataSteps using uv:
uv add --index http://<pulp-host>/pypi/<repository>/simple/ --trusted-host <pulp-host> --exclude-newer P3D flaskNo 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 likewarning: flask-3.1.3.tar.gz is missing an upload date, but user provided: 2026-09-04T14:31:14.9107263ZExpected 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
Acceptheader. It looks like pip may be sending a request similar tocurl -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.