[Pulp-dev] Feedback Wanted, Upcoming Changes in Pulp Python

Daniel Alley dalley at redhat.com
Tue May 25 01:13:21 UTC 2021

I mostly concur with Matthias, "pypi" is just as unlikely to lead to any
namespace conflicts as "pulp_python/pypi/".  It wouldn't be too significant
either way, though.

+1 to the general principle of the change.

On Wed, May 19, 2021 at 4:01 AM Matthias Dellweg <mdellweg at redhat.com>

> Just one thought:
> I assume $PULP_BASE_ADDR is the part without "pulp/api/v3/". So why should
> you include the "pulp_python" segment? You could just host it as e.g. "
> http://localhost/pypi/foo/simple". The interfaces provided there should
> not be in any way specific to pulp_anything.
> On Tue, May 18, 2021 at 11:44 PM Gerrod Ubben <gubben at redhat.com> wrote:
>> Hey everyone,
>> I am currently working on the long-awaited Twine upload support [0] for
>> pulp_python. To add this functionality a new upload endpoint is needed.
>> Since this new endpoint will need to be able to accept POST requests I plan
>> to make the Python endpoints apart of the Pulp API.
>> Proposed change: Have Python endpoints available at
>> "/pulp_python/pypi/{base_path}/"
>> API Current Location New Location Description
>> simple $PULP_CONTENT_ADDR/pulp/content/{base_path}/simple/
>> $PULP_BASE_ADDR/pulp_python/pypi/{base_path}/simple/ Used for installing
>> packages
>> pypi $PULP_CONTENT_ADDR/pulp/content/{base_path}/pypi/
>> $PULP_BASE_ADDR/pulp_python/pypi/{base_path}/pypi/ Used for syncing
>> repositories
>> upload
>> $PULP_BASE_ADDR/pulp_python/pypi/{base_path}/legacy/
>> **$PULP_BASE_ADDR/pulp_python/pypi/{base_path}/simple/* Used for
>> uploading packages
>> The current Python endpoints will still be available at their present
>> locations (and will be used as the backbone for the new locations) and the
>> new upload endpoint will be available at '/legacy/' since the default PyPI
>> endpoint Twine uses is 'https://upload.pypi.org/legacy/'. Pip stores its
>> index URLs in a 'pip.conf' file [1]  and Twine stores its index URLs in the
>> '.pypirc' file [2], so to have an easy setup across all Python tools I am
>> thinking of also having the upload functionality available at the simple
>> URL. This way one URL can be used for the Pulp Python index across all the
>> Python tooling.
>> An example workflow with these new changes:
>>> pulp python repository create --name foo
>>> pulp python distribution create --name foo --base-path foo --repository
>>> foo
>>> export PULP_PYTHON_INDEX=$PULP_BASE_ADDR/pulp_python/pypi/foo/simple/
>>> twine upload --repository-url $PULP_PYTHON_INDEX dist/* --skip-existing
>>> pip install -i $PULP_PYTHON_INDEX pulpcore
>> Do these changes concern anyone? Would a different name for the upload
>> endpoint be preferred? Should the simple endpoint also support uploading
>> packages? I plan on having this feature fully complete and ready for review
>> by the end of the week, May 21st. Any feedback before then would be
>> appreciated.
>> [0] https://github.com/pulp/pulp_python/pull/367
>> [1] https://pip.pypa.io/en/stable/user_guide/#configuration
>> [2] https://packaging.python.org/specifications/pypirc/
>> Thanks,
>> Gerrod
>> _______________________________________________
>> Pulp-dev mailing list
>> Pulp-dev at redhat.com
>> https://listman.redhat.com/mailman/listinfo/pulp-dev
> _______________________________________________
> Pulp-dev mailing list
> Pulp-dev at redhat.com
> https://listman.redhat.com/mailman/listinfo/pulp-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20210524/cfdb06c8/attachment.htm>

More information about the Pulp-dev mailing list