Tweak name rules for export groups and extensions
This commit is contained in:
parent
1f417b8a9e
commit
2dd26998ec
18
pep-0426.txt
18
pep-0426.txt
|
@ -259,6 +259,10 @@ of the qualified name of the containing module or package, a colon (``:``)
|
|||
and the qualified name of the object relative to the containing module or
|
||||
package.
|
||||
|
||||
A "prefixed name" starts with a qualified name, but is not necessarily a
|
||||
qualified name - it may contain additional dot separated segments which are
|
||||
not valid identifiers.
|
||||
|
||||
|
||||
Integration and deployment of distributions
|
||||
-------------------------------------------
|
||||
|
@ -1591,7 +1595,7 @@ previously installed, distribution.
|
|||
Example::
|
||||
|
||||
"commands": {
|
||||
"wrap_console": [{"wrapwithpython": "chair.run_cli"}],
|
||||
"wrap_console": [{"wrapwithpython": "chair:run_cli"}],
|
||||
"wrap_gui": [{"wrapwithpythonw": "chair:run_gui"}],
|
||||
"prebuilt": ["notawrapper"]
|
||||
}
|
||||
|
@ -1601,7 +1605,7 @@ Example::
|
|||
Exports
|
||||
-------
|
||||
|
||||
The ``exports`` field is a mapping containing qualified names as keys. Each
|
||||
The ``exports`` field is a mapping containing prefixed names as keys. Each
|
||||
key identifies an export group containing one or more exports published by
|
||||
the distribution.
|
||||
|
||||
|
@ -1624,6 +1628,14 @@ appropriate definition for the export name format can allow the importing
|
|||
distribution to determine whether or not an export is relevant without
|
||||
needing to import every exporting module.
|
||||
|
||||
Example::
|
||||
|
||||
"exports": {
|
||||
"nose.plugins.0.10": {
|
||||
"chairtest": "chair:NosePlugin"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Install hooks
|
||||
=============
|
||||
|
@ -1738,7 +1750,7 @@ Metadata Extensions
|
|||
===================
|
||||
|
||||
Extensions to the metadata may be present in a mapping under the
|
||||
'extensions' key. The keys must be valid qualified names, while
|
||||
'extensions' key. The keys must be valid prefixed names, while
|
||||
the values may be any type natively supported in JSON::
|
||||
|
||||
"extensions" : {
|
||||
|
|
|
@ -191,7 +191,8 @@
|
|||
},
|
||||
"extensions": {
|
||||
"description": "Extensions to the metadata may be present in a mapping under the 'extensions' key.",
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/extensions"
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -271,7 +272,7 @@
|
|||
"exports": {
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^[A-Za-z]([0-9A-Za-z_])*([.][A-Za-z]([0-9A-Za-z_])*)*$": {
|
||||
"^[A-Za-z][0-9A-Za-z_]*([.][0-9A-Za-z_]*)*$": {
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
".": {
|
||||
|
@ -284,6 +285,13 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"extensions": {
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^[A-Za-z][0-9A-Za-z_]*([.][0-9A-Za-z_]*)*$": {}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"command_map": {
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
|
@ -324,6 +332,10 @@
|
|||
"qualified_name" : {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z_][A-Za-z_0-9]*([.][A-Za-z_][A-Za-z_0-9]*)*$"
|
||||
},
|
||||
"prefixed_name" : {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z_][A-Za-z_0-9]*([.][A-Za-z_0-9]*)*$"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue