At 02:08 PM 1/19/2010 -0600, Ian Bicking wrote:
On Mon, Jan 18, 2010 at 2:57 PM, "Martin v. Löwis" <<mailto:[email protected]>[email protected]> wrote:
I would like to change the simple API in the following
ways, within a few days:

1. XML-escape href attributes to make the pages well-formed XML
  (possibly other changes required for that as well, but I only
   ran into lack of &amp;)
2. Make file paths relative (from <http://pypi.python.org/packages>http://pypi.python.org/packages
  to ../../packages)

Objections?


This should be tested with easy_install/pip. Â I'm pretty sure 2 will be fine but 1 could break things if those clients aren't doing unescaping. Â I'm pretty sure pip is not unescaping.

If you're using setuptools to do your PyPI access in pip, you are indeed unescaping. ;-) setuptools.package_index does full HTML entity decoding, including both named and numeric references, so XML escaping (which is a subset of that) should be just fine.

Likewise, #2 should be fine as long as urlparse.urljoin produces the correct result using the retrieved-from URL as the base URL. I stress this because some web applications treat the urls "foo" and "foo/" as if they were interchangeable, and for relative-URL purposes, they are not. So, as long as PyPI handles this correctly based on the URL that was sent by the *client* (rather than perhaps a canonical URL the client "should have" sent), then that will be fine.
_______________________________________________
Catalog-SIG mailing list
[email protected]
http://mail.python.org/mailman/listinfo/catalog-sig

Reply via email to