Updated version of the PEP from Richard Jones.

(Barry, David: this is more recent that the version sent to the PEP editors.
 You can forget about the version you've already received.)
This commit is contained in:
Andrew M. Kuchling 2002-11-20 22:08:48 +00:00
parent 6f035a5ce2
commit df5f14d71c
1 changed files with 105 additions and 44 deletions

View File

@ -69,7 +69,7 @@ Specification
The specification takes three parts, the `web interface`_, the
`Distutils register command`_ and the `Distutils Trove
categorisation`_.
classification`_.
Web Interface
@ -102,7 +102,7 @@ The web interface implements the following commands/interfaces:
Accepts a POST submission of metadata about a package. The
"name" and "version" fields are mandatory, as they uniquely identify
an entry in the index. **Submit** will automatically determine
whether to create a new entry or updating an existing entry. The
whether to create a new entry or update an existing entry. The
metadata is checked for correctness where appropriate - specifically
the Trove discriminators are compared with the allowed set. An
update will update all information about the package based on the
@ -127,26 +127,12 @@ The web interface implements the following commands/interfaces:
Registration will be a three-step process, involving:
1. User submission of details via the Distutils *register* command,
1. User submission of details via the Distutils *register* command
or through the web,
2. Index server sending email to the user's email address with a URL
to visit to confirm registration with a random one-time key, and
3. User visits URL with the key and confirms registration.
Several user Roles will exist, generally revolving around a
particular package name:
Owner
Owns a package name, may assign Maintainer Role for that name. The
first user to register information about a package is deemed Owner
of the package name. The Admin user may change this if necessary.
May submit updates for the package name.
Maintainer
Can submit and update info for a particular package name.
Admin
Can assign Owner Role and edit user details.
**roles**
An interface for changing user Role assignments.
@ -170,6 +156,65 @@ Code Meaning Register command implications
package information (not Owner or Maintainer)
===== ============== ================================================
User Roles
----------
Three user Roles will be assignable to users:
Owner
Owns a package name, may assign Maintainer Role for that name. The
first user to register information about a package is deemed Owner
of the package name. The Admin user may change this if necessary.
May submit updates for the package name.
Maintainer
Can submit and update info for a particular package name.
Admin
Can assign Owner Role and edit user details. Not specific to a
package name.
Index Storage (Schema)
----------------------
The index is stored in a set of relational database tables:
**packages**
Lists package names and holds package-level metadata (currently
just the stable release version)
**releases**
Each package has an entry in **releases** for each version of the
package that is released. A row holds the bulk of the information
given in the package's PKG-INFO file. There is one row for each
package (*name*, *version*).
**trove_discriminators**
Lists the Trove discriminator text and assigns each one a unique
ID.
**release_discriminators**
Each entry maps a package (*name*, *version*) to a *discriminator_id*.
We map to releases instead of packages because the set of
discriminators may change between releases.
**journals**
Holds information about changes to package information in the
index. Changes to the **packages**, **releases**, **roles**,
and **release_discriminators** tables are listed here by
package *name* and *version* if the change is release-specific.
**users**
Holds our user database - user name, email address and password.
**roles**
Maps *user_name* and *role_name* to a *package_name*.
An additional table, **rego_otk** holds the One Time Keys generated
during registration and is not interesting in the scope of the index
itself.
Distutils *register* Command
----------------------------
@ -185,7 +230,7 @@ with three options:
On systems where the ``$HOME`` environment variable is set, the user
will be prompted at exit to save their username/password to a file
in their ``$HOME`` directory in the file ``.pythonpackagerc``.
in their ``$HOME`` directory in the file ``.pypirc``.
Notification of changes to a package entry will be sent to all users
who have submitted information about the package. That is, the original
@ -199,7 +244,7 @@ submission. This is useful for verifying correctness of Trove
discriminators.
Distutils Trove Categorisation
Distutils Trove Classification
------------------------------
The Trove concept of *discrimination* will be added to the metadata
@ -212,13 +257,13 @@ web, and added to the package like so::
version = __version__,
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console (Text Based)',
'Environment :: Console',
'Environment :: Web Environment',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Python License',
'Operating System :: MacOS X',
'License :: OSI Approved :: Python Software Foundation License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python',
@ -242,16 +287,33 @@ limitation.
The list of classification values on the module index has been merged
from FreshMeat and SourceForge (with their permission). This list
will be made available through the web interface as a text list which
may then be copied to the ``setup.py`` file. The *register* command's
``--verify`` option will also check classifiers values.
will be made available both through the web interface and through the
*regsiter* command's ``--list-classifiers`` option as a text list
which may then be copied to the ``setup.py`` file. The *register*
command's ``--verify`` option will check classifiers values against
the server's list.
Unfortunately, the addition of the "classifiers" property is not
backwards-compatible. A setup.py file using it will not work under
Python 2.1.3. It is hoped that a bugfix release of Python 2.2 will
relax the argument checking of the setup() command to allow new
keywords, even if they're not actually used. It is preferable that
a warning be produced, rather than a show-stopping error.
Python 2.1.3. It is hoped that a bugfix release of Python 2.2 (most
likely 2.2.3) will relax the argument checking of the setup() command
to allow new keywords, even if they're not actually used. It is
preferable that a warning be produced, rather than a show-stopping
error. The use of the new keyword should be discouraged in situations
where the package is advertised as being compatible with python
versions earlier than 2.2.3 or 2.3.
In the PKG-INFO, the classifiers list items will appear as individual
``Classifier:`` entries::
Name: roundup
Version: 0.5.2
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console (Text Based)
.
.
Classifier: Topic :: Software Development :: Bug Tracking
Url: http://sourceforge.net/projects/roundup/
Reference Implementation
@ -265,19 +327,18 @@ A demonstration will be available at:
http://www.amk.ca/cgi-bin/pypi.cgi
===== ===================================================
===== =============================================================
Done Feature
===== ===================================================
Y Submission
Y Index
Y Display
Y Search
Y User registration
Y User verification
Y Password reset
Y Admin interfaces for user/package maintenance
N Trove
===== ===================================================
===== =============================================================
Y Submission via *register* command (register.py module)
Y Web interface
Y Handling of the *classifiers* setup() keyword (dist.py.patch)
Y Patch Python 2.2.3 to relax keyword argument checks in the
distutils setup() function
N Patch Python 2.3 to apply the dist.py.patch
N Library reference documentation of the *register* command and
additional *classifiers* keyword
===== =============================================================
In the two days of the 22nd and 23rd October 2002, after the first
announcement to the Catalog-SIG (22nd) and Distutils-SIG (23rd), the
@ -285,6 +346,7 @@ initial prototype had 45 visitors (not including myself), two of whom
used the *register* command to submit package information.
Rejected Proposals
==================
@ -319,7 +381,7 @@ References
.. [5] PAUSE
(http://pause.cpan.org/)
.. [6] PEP 243, Module Repository Upload Mechanism
. [6] PEP 243, Module Repository Upload Mechanism
(http://www.python.org/peps/pep-0243.html)
.. [7] PEP 262, A Database of Installed Python Packages
@ -357,4 +419,3 @@ ideas over the years.
sentence-end-double-space: t
fill-column: 70
End: