[Catalog-sig] V2 pre-PEP: transitioning to release file hosting on PYPI

M.-A. Lemburg mal at egenix.com
Tue Mar 12 20:28:21 CET 2013


On 12.03.2013 20:17, holger krekel wrote:
> On Tue, Mar 12, 2013 at 19:07 +0100, M.-A. Lemburg wrote:
>> Just a quick note (more later, if time permits)...
>>
>> On 12.03.2013 18:05, holger krekel wrote:
>>> Hi Marc-Andre, all,
>>>
>>>>> - Prepare PYPI implementation to allow a per-project "hosting mode",
>>>>>   effectively enabling or disabling external crawling.  When enabled 
>>>>>   nothing changes from the current situation of producing ``rel=download`` 
>>>>>   and ``rel=homepage`` attributed links on ``simple/`` pages, 
>>>>>   causing installers to crawl those sites.  
>>>>>   When disabled, the attributions of links will change 
>>>>>   to ``rel=newdownload`` and ``rel=newhomepage`` causing installers to
>>>>>   avoid crawling 3rd party sites.  Retaining the meta-information allows
>>>>>   tools to still make use of the semantic information.
>>>>
>>>> Please start using versioned APIs for these things. The
>>>> old style index should still be available under some
>>>> URL, e.g. /simple-v1/ or /v1/simple/ or /1/simple/
>>>
>>> Not sure it is neccessary in this case.  I would think it makes
>>> the implementation harder and it would probably break PEP381 (mirroring
>>> infrastructure) as well.
>>
>> Here's what I meant:
>>
>> We publish the current implementation of the /simple/ index API
>> under a new URL /simple-v1/, so that people that want to use
>> the old API can continue to do so.
>>
>> Then we setup a new /simple-v2/ index API with your proposed
>> change, perhaps even dropping the rel attribute altogether.
>>
>> During testing, we'd then have:
>>
>> /simple/    - same as /simple-v1/
>> /simple-v1/ - old API with rel attributes always set
>> /simple-v2/ - new API with your changes (rel attributes only
>>               set in some cases)
>>
>> After a month or so of testing, we then switch this to:
>>
>> /simple/    - same as /simple-v2/
>> /simple-v1/ - old API with rel attributes always set
>> /simple-v2/ - new API with your changes (rel attributes only
>>               set in some cases)
> 
> I understand but am not sure how easy this is to manage at the moment.
> I'd like to put this up in open questions and have (eventually) Richard 
> comment on this before evolving it further.

Should be pretty easy to do...

Just add a version parameter to .run_simple()
at
https://bitbucket.org/loewis/pypi/src/dc6c23cce746bb25e0b013a1a1e020bc27bb332b/webui.py?at=default#cl-706
and then hook it up to the two URLs
at
https://bitbucket.org/loewis/pypi/src/dc6c23cce746bb25e0b013a1a1e020bc27bb332b/webui.py?at=default#cl-486
and
https://bitbucket.org/loewis/pypi/src/dc6c23cce746bb25e0b013a1a1e020bc27bb332b/pypi.wsgi?at=default#cl-71

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Mar 12 2013)
>>> Python Projects, Consulting and Support ...   http://www.egenix.com/
>>> mxODBC.Zope/Plone.Database.Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the Catalog-SIG mailing list