python-peps/pep-0297.txt

130 lines
3.5 KiB
Plaintext
Raw Normal View History

PEP: 297
2002-07-23 11:14:06 -04:00
Title: Support for System Upgrades
Version: $Revision$
Last-Modified: $Date$
Author: mal@lemburg.com (Marc-André Lemburg)
Status: Rejected
2002-07-23 11:14:06 -04:00
Type: Standards Track
Content-Type: text/x-rst
2002-07-23 11:14:06 -04:00
Created: 19-Jul-2001
Python-Version: 2.6
Post-History:
2002-07-23 11:14:06 -04:00
Rejection Notice
================
This PEP is rejected for failure to generate significant interest.
2002-07-23 11:14:06 -04:00
Abstract
========
2002-07-23 11:14:06 -04:00
This PEP proposes strategies to allow the Python standard library
to be upgraded in parts without having to reinstall the complete
distribution or having to wait for a new patch level release.
2002-07-23 11:14:06 -04:00
2002-07-23 11:14:06 -04:00
Problem
=======
Python currently does not allow overriding modules or packages in
the standard library per default. Even though this is possible by
defining a ``PYTHONPATH`` environment variable (the paths defined in
this variable are prepended to the Python standard library path),
there is no standard way of achieving this without changing the
configuration.
2002-07-23 11:14:06 -04:00
Since Python's standard library is starting to host packages which
are also available separately, e.g. the distutils, email and PyXML
packages, which can also be installed independently of the Python
distribution, it is desirable to have an option to upgrade these
packages without having to wait for a new patch level release of
the Python interpreter to bring along the changes.
2002-07-23 11:14:06 -04:00
On some occasions, it may also be desirable to update modules of
the standard library without going through the whole Python release
cycle, e.g. in order to provide hot-fixes for security problems.
2002-07-23 11:14:06 -04:00
2002-07-23 11:14:06 -04:00
Proposed Solutions
==================
2002-07-23 11:14:06 -04:00
This PEP proposes two different but not necessarily conflicting
solutions:
2002-07-23 11:14:06 -04:00
1. Adding a new standard search path to ``sys.path``:
``$stdlibpath/system-packages`` just before the ``$stdlibpath``
entry. This complements the already existing entry for site
add-ons ``$stdlibpath/site-packages`` which is appended to the
``sys.path`` at interpreter startup time.
2002-07-23 11:14:06 -04:00
To make use of this new standard location, distutils will need
to grow support for installing certain packages in
``$stdlibpath/system-packages`` rather than the standard location
for third-party packages ``$stdlibpath/site-packages``.
2002-07-23 11:14:06 -04:00
2. Tweaking distutils to install directly into ``$stdlibpath`` for the
system upgrades rather than into ``$stdlibpath/site-packages``.
2002-07-23 11:14:06 -04:00
The first solution has a few advantages over the second:
2002-07-23 11:14:06 -04:00
* upgrades can be easily identified (just look in
``$stdlibpath/system-packages``)
2002-07-23 11:14:06 -04:00
* upgrades can be de-installed without affecting the rest
of the interpreter installation
2002-07-23 11:14:06 -04:00
* modules can be virtually removed from packages; this is
due to the way Python imports packages: once it finds the
top-level package directory it stay in this directory for
all subsequent package submodule imports
2002-07-23 11:14:06 -04:00
* the approach has an overall much cleaner design than the
hackish install on top of an existing installation approach
2002-07-23 11:14:06 -04:00
The only advantages of the second approach are that the Python
interpreter does not have to changed and that it works with
older Python versions.
2002-07-23 11:14:06 -04:00
Both solutions require changes to distutils. These changes can
also be implemented by package authors, but it would be better to
define a standard way of switching on the proposed behaviour.
2002-07-23 11:14:06 -04:00
2002-07-23 11:14:06 -04:00
Scope
=====
2002-07-23 11:14:06 -04:00
Solution 1: Python 2.6 and up
Solution 2: all Python versions supported by distutils
2002-07-23 11:14:06 -04:00
2002-07-23 11:14:06 -04:00
Credits
=======
2002-07-23 11:14:06 -04:00
None
2002-07-23 11:14:06 -04:00
2002-07-23 11:14:06 -04:00
References
==========
2002-07-23 11:14:06 -04:00
None
2002-07-23 11:14:06 -04:00
2002-07-23 11:14:06 -04:00
Copyright
=========
This document has been placed in the public domain.
2002-07-23 11:14:06 -04:00
..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End: