Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Side by Side Diff: Doc/library/packaging.database.rst

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/library/packaging.compiler.rst ('k') | Doc/library/packaging.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 :mod:`packaging.database` --- Database of installed distributions 1 :mod:`packaging.database` --- Database of installed distributions
2 ================================================================= 2 =================================================================
3 3
4 .. module:: packaging.database 4 .. module:: packaging.database
5 :synopsis: Functions to query and manipulate installed distributions. 5 :synopsis: Functions to query and manipulate installed distributions.
6 6
7 7
8 This module provides an implementation of :PEP:`376`. It was originally 8 This module provides an implementation of :PEP:`376`. It was originally
9 intended to land in :mod:`pkgutil`, but with the inclusion of Packaging in the 9 intended to land in :mod:`pkgutil`, but with the inclusion of Packaging in the
10 standard library, it was thought best to include it in a submodule of 10 standard library, it was thought best to include it in a submodule of
(...skipping 15 matching lines...) Expand all
26 metadata and options during the run of a Packaging command. 26 metadata and options during the run of a Packaging command.
27 27
28 Instantiate with the *path* to a ``.dist-info`` directory. Instances can be 28 Instantiate with the *path* to a ``.dist-info`` directory. Instances can be
29 compared and sorted. Other available methods are: 29 compared and sorted. Other available methods are:
30 30
31 .. XXX describe how comparison works 31 .. XXX describe how comparison works
32 32
33 .. method:: get_distinfo_file(path, binary=False) 33 .. method:: get_distinfo_file(path, binary=False)
34 34
35 Return a read-only file object for a file located at 35 Return a read-only file object for a file located at
36 :file:`{project}-{version}.dist-info/{path}`. *path* should be a 36 :file:`{project-version}.dist-info/path}`. *path* should be a
37 ``'/'``-separated path relative to the ``.dist-info`` directory or an 37 ``'/'``-separated path relative to the ``.dist-info`` directory or an
38 absolute path; if it is an absolute path and doesn't start with the path 38 absolute path; if it is an absolute path and doesn't start with the path
39 to the :file:`.dist-info` directory, a :class:`PackagingError` is raised. 39 to the :file:`.dist-info` directory, a :class:`PackagingError` is raised.
40 40
41 If *binary* is ``True``, the file is opened in binary mode. 41 If *binary* is ``True``, the file is opened in binary mode.
42 42
43 .. method:: get_resource_path(relative_path) 43 .. method:: get_resource_path(relative_path)
44 44
45 .. TODO 45 .. TODO
46 46
(...skipping 18 matching lines...) Expand all
65 65
66 Check whether *path* was installed by this distribution (i.e. if the path 66 Check whether *path* was installed by this distribution (i.e. if the path
67 is present in the :file:`RECORD` file). *path* can be a local absolute 67 is present in the :file:`RECORD` file). *path* can be a local absolute
68 path or a relative ``'/'``-separated path. Returns a boolean. 68 path or a relative ``'/'``-separated path. Returns a boolean.
69 69
70 Available attributes: 70 Available attributes:
71 71
72 .. attribute:: metadata 72 .. attribute:: metadata
73 73
74 Instance of :class:`packaging.metadata.Metadata` filled with the contents 74 Instance of :class:`packaging.metadata.Metadata` filled with the contents
75 of the :file:`{project}-{version}.dist-info/METADATA` file. 75 of the :file:`{project-version}.dist-info/METADATA` file.
76 76
77 .. attribute:: name 77 .. attribute:: name
78 78
79 Shortcut for ``metadata['Name']``. 79 Shortcut for ``metadata['Name']``.
80 80
81 .. attribute:: version 81 .. attribute:: version
82 82
83 Shortcut for ``metadata['Version']``. 83 Shortcut for ``metadata['Version']``.
84 84
85 .. attribute:: requested 85 .. attribute:: requested
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 if replacements: 315 if replacements:
316 print('%r %s is obsoleted by' % (name, version), 316 print('%r %s is obsoleted by' % (name, version),
317 ', '.join(repr(r.name) for r in replacements)) 317 ', '.join(repr(r.name) for r in replacements))
318 318
319 This is how the output might look like: 319 This is how the output might look like:
320 320
321 .. code-block:: none 321 .. code-block:: none
322 322
323 'strawberry' 0.6 is obsoleted by 'choxie' 323 'strawberry' 0.6 is obsoleted by 'choxie'
324 'grammar' 1.0a4 is obsoleted by 'towel-stuff' 324 'grammar' 1.0a4 is obsoleted by 'towel-stuff'
OLDNEW
« no previous file with comments | « Doc/library/packaging.compiler.rst ('k') | Doc/library/packaging.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+