Mercurial > repos > shellac > sam_consensus_v3
comparison env/lib/python3.9/site-packages/configparser-5.0.2.dist-info/METADATA @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author | shellac |
---|---|
date | Mon, 22 Mar 2021 18:12:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4f3585e2f14b |
---|---|
1 Metadata-Version: 2.1 | |
2 Name: configparser | |
3 Version: 5.0.2 | |
4 Summary: Updated configparser from Python 3.8 for Python 2.6+. | |
5 Home-page: https://github.com/jaraco/configparser/ | |
6 Author: Łukasz Langa | |
7 Author-email: lukasz@langa.pl | |
8 Maintainer: Jason R. Coombs | |
9 Maintainer-email: jaraco@jaraco.com | |
10 License: UNKNOWN | |
11 Keywords: configparser ini parsing conf cfg configuration file | |
12 Platform: any | |
13 Classifier: Development Status :: 5 - Production/Stable | |
14 Classifier: Intended Audience :: Developers | |
15 Classifier: License :: OSI Approved :: MIT License | |
16 Classifier: Programming Language :: Python :: 3 | |
17 Classifier: Programming Language :: Python :: 3 :: Only | |
18 Requires-Python: >=3.6 | |
19 Provides-Extra: docs | |
20 Requires-Dist: sphinx ; extra == 'docs' | |
21 Requires-Dist: jaraco.packaging (>=8.2) ; extra == 'docs' | |
22 Requires-Dist: rst.linker (>=1.9) ; extra == 'docs' | |
23 Provides-Extra: testing | |
24 Requires-Dist: pytest (>=4.6) ; extra == 'testing' | |
25 Requires-Dist: pytest-checkdocs (>=1.2.3) ; extra == 'testing' | |
26 Requires-Dist: pytest-flake8 ; extra == 'testing' | |
27 Requires-Dist: pytest-cov ; extra == 'testing' | |
28 Requires-Dist: pytest-enabler ; extra == 'testing' | |
29 Requires-Dist: pytest-black (>=0.3.7) ; (platform_python_implementation != "PyPy") and extra == 'testing' | |
30 Requires-Dist: pytest-mypy ; (platform_python_implementation != "PyPy") and extra == 'testing' | |
31 | |
32 .. image:: https://img.shields.io/pypi/v/configparser.svg | |
33 :target: `PyPI link`_ | |
34 | |
35 .. image:: https://img.shields.io/pypi/pyversions/configparser.svg | |
36 :target: `PyPI link`_ | |
37 | |
38 .. _PyPI link: https://pypi.org/project/configparser | |
39 | |
40 .. image:: https://github.com/jaraco/configparser/workflows/tests/badge.svg | |
41 :target: https://github.com/jaraco/configparser/actions?query=workflow%3A%22tests%22 | |
42 :alt: tests | |
43 | |
44 .. image:: https://img.shields.io/badge/code%20style-black-000000.svg | |
45 :target: https://github.com/psf/black | |
46 :alt: Code style: Black | |
47 | |
48 .. image:: https://readthedocs.org/projects/configparser/badge/?version=latest | |
49 :target: https://configparser.readthedocs.io/en/latest/?badge=latest | |
50 | |
51 .. image:: https://tidelift.com/badges/package/pypi/configparser | |
52 :target: https://tidelift.com/subscription/pkg/pypi-configparser?utm_source=pypi-configparser&utm_medium=readme | |
53 | |
54 | |
55 This package is a backport of the refreshed and enhanced ConfigParser from | |
56 later Python versions. To use the backport instead of the built-in version, | |
57 simply import it explicitly as a backport:: | |
58 | |
59 from backports import configparser | |
60 | |
61 To use the backport on Python 2 and the built-in version on | |
62 Python 3, use the standard invocation:: | |
63 | |
64 import configparser | |
65 | |
66 For detailed documentation consult the vanilla version at | |
67 http://docs.python.org/3/library/configparser.html. | |
68 | |
69 Why you'll love ``configparser`` | |
70 -------------------------------- | |
71 | |
72 Whereas almost completely compatible with its older brother, ``configparser`` | |
73 sports a bunch of interesting new features: | |
74 | |
75 * full mapping protocol access (`more info | |
76 <http://docs.python.org/3/library/configparser.html#mapping-protocol-access>`_):: | |
77 | |
78 >>> parser = ConfigParser() | |
79 >>> parser.read_string(""" | |
80 [DEFAULT] | |
81 location = upper left | |
82 visible = yes | |
83 editable = no | |
84 color = blue | |
85 | |
86 [main] | |
87 title = Main Menu | |
88 color = green | |
89 | |
90 [options] | |
91 title = Options | |
92 """) | |
93 >>> parser['main']['color'] | |
94 'green' | |
95 >>> parser['main']['editable'] | |
96 'no' | |
97 >>> section = parser['options'] | |
98 >>> section['title'] | |
99 'Options' | |
100 >>> section['title'] = 'Options (editable: %(editable)s)' | |
101 >>> section['title'] | |
102 'Options (editable: no)' | |
103 | |
104 * there's now one default ``ConfigParser`` class, which basically is the old | |
105 ``SafeConfigParser`` with a bunch of tweaks which make it more predictable for | |
106 users. Don't need interpolation? Simply use | |
107 ``ConfigParser(interpolation=None)``, no need to use a distinct | |
108 ``RawConfigParser`` anymore. | |
109 | |
110 * the parser is highly `customizable upon instantiation | |
111 <http://docs.python.org/3/library/configparser.html#customizing-parser-behaviour>`__ | |
112 supporting things like changing option delimiters, comment characters, the | |
113 name of the DEFAULT section, the interpolation syntax, etc. | |
114 | |
115 * you can easily create your own interpolation syntax but there are two powerful | |
116 implementations built-in (`more info | |
117 <http://docs.python.org/3/library/configparser.html#interpolation-of-values>`__): | |
118 | |
119 * the classic ``%(string-like)s`` syntax (called ``BasicInterpolation``) | |
120 | |
121 * a new ``${buildout:like}`` syntax (called ``ExtendedInterpolation``) | |
122 | |
123 * fallback values may be specified in getters (`more info | |
124 <http://docs.python.org/3/library/configparser.html#fallback-values>`__):: | |
125 | |
126 >>> config.get('closet', 'monster', | |
127 ... fallback='No such things as monsters') | |
128 'No such things as monsters' | |
129 | |
130 * ``ConfigParser`` objects can now read data directly `from strings | |
131 <http://docs.python.org/3/library/configparser.html#configparser.ConfigParser.read_string>`__ | |
132 and `from dictionaries | |
133 <http://docs.python.org/3/library/configparser.html#configparser.ConfigParser.read_dict>`__. | |
134 That means importing configuration from JSON or specifying default values for | |
135 the whole configuration (multiple sections) is now a single line of code. Same | |
136 goes for copying data from another ``ConfigParser`` instance, thanks to its | |
137 mapping protocol support. | |
138 | |
139 * many smaller tweaks, updates and fixes | |
140 | |
141 A few words about Unicode | |
142 ------------------------- | |
143 | |
144 ``configparser`` comes from Python 3 and as such it works well with Unicode. | |
145 The library is generally cleaned up in terms of internal data storage and | |
146 reading/writing files. There are a couple of incompatibilities with the old | |
147 ``ConfigParser`` due to that. However, the work required to migrate is well | |
148 worth it as it shows the issues that would likely come up during migration of | |
149 your project to Python 3. | |
150 | |
151 The design assumes that Unicode strings are used whenever possible [1]_. That | |
152 gives you the certainty that what's stored in a configuration object is text. | |
153 Once your configuration is read, the rest of your application doesn't have to | |
154 deal with encoding issues. All you have is text [2]_. The only two phases when | |
155 you should explicitly state encoding is when you either read from an external | |
156 source (e.g. a file) or write back. | |
157 | |
158 Versioning | |
159 ---------- | |
160 | |
161 This project uses `semver <https://semver.org/spec/v2.0.0.html>`_ to | |
162 communicate the impact of various releases while periodically syncing | |
163 with the upstream implementation in CPython. | |
164 `The changelog <https://github.com/jaraco/configparser/blob/master/CHANGES.rst>`_ | |
165 serves as a reference indicating which versions incorporate | |
166 which upstream functionality. | |
167 | |
168 Prior to the ``4.0.0`` release, `another scheme | |
169 <https://github.com/jaraco/configparser/blob/3.8.1/README.rst#versioning>`_ | |
170 was used to associate the CPython and backports releases. | |
171 | |
172 Maintenance | |
173 ----------- | |
174 | |
175 This backport was originally authored by Łukasz Langa, the current vanilla | |
176 ``configparser`` maintainer for CPython and is currently maintained by | |
177 Jason R. Coombs: | |
178 | |
179 * `configparser repository <https://github.com/jaraco/configparser>`_ | |
180 | |
181 * `configparser issue tracker <https://github.com/jaraco/configparser/issues>`_ | |
182 | |
183 For Enterprise | |
184 ============== | |
185 | |
186 Available as part of the Tidelift Subscription. | |
187 | |
188 This project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use. | |
189 | |
190 `Learn more <https://tidelift.com/subscription/pkg/pypi-PROJECT?utm_source=pypi-PROJECT&utm_medium=referral&utm_campaign=github>`_. | |
191 | |
192 Security Contact | |
193 ---------------- | |
194 | |
195 To report a security vulnerability, please use the | |
196 `Tidelift security contact <https://tidelift.com/security>`_. | |
197 Tidelift will coordinate the fix and disclosure. | |
198 | |
199 Conversion Process | |
200 ------------------ | |
201 | |
202 This section is technical and should bother you only if you are wondering how | |
203 this backport is produced. If the implementation details of this backport are | |
204 not important for you, feel free to ignore the following content. | |
205 | |
206 The project takes the following branching approach: | |
207 | |
208 * The ``3.x`` branch holds unchanged files synchronized from the upstream | |
209 CPython repository. The synchronization is currently done by manually copying | |
210 the required files and stating from which CPython changeset they come. | |
211 | |
212 * The ``master`` branch holds a version of the ``3.x`` code with some tweaks | |
213 that make it compatible with older Pythons. Code on this branch must work | |
214 on all supported Python versions. Test with ``tox`` or in CI. | |
215 | |
216 The process works like this: | |
217 | |
218 1. In the ``3.x`` branch, run ``pip-run -- sync-upstream.py``, which | |
219 downloads the latest stable release of Python and copies the relevant | |
220 files from there into their new locations and then commits those | |
221 changes with a nice reference to the relevant upstream commit hash. | |
222 | |
223 2. Check for new names in ``__all__`` and update imports in | |
224 ``configparser.py`` accordingly. Optionally, run the tests on a late | |
225 Python 3. Commit. | |
226 | |
227 3. Merge the new commit to ``master``. Run tests. Commit. | |
228 | |
229 4. Make any compatibility changes on ``master``. Run tests. Commit. | |
230 | |
231 5. Update the docs and release the new version. | |
232 | |
233 | |
234 Footnotes | |
235 --------- | |
236 | |
237 .. [1] To somewhat ease migration, passing bytestrings is still supported but | |
238 they are converted to Unicode for internal storage anyway. This means | |
239 that for the vast majority of strings used in configuration files, it | |
240 won't matter if you pass them as bytestrings or Unicode. However, if you | |
241 pass a bytestring that cannot be converted to Unicode using the naive | |
242 ASCII codec, a ``UnicodeDecodeError`` will be raised. This is purposeful | |
243 and helps you manage proper encoding for all content you store in | |
244 memory, read from various sources and write back. | |
245 | |
246 .. [2] Life gets much easier when you understand that you basically manage | |
247 **text** in your application. You don't care about bytes but about | |
248 letters. In that regard the concept of content encoding is meaningless. | |
249 The only time when you deal with raw bytes is when you write the data to | |
250 a file. Then you have to specify how your text should be encoded. On | |
251 the other end, to get meaningful text from a file, the application | |
252 reading it has to know which encoding was used during its creation. But | |
253 once the bytes are read and properly decoded, all you have is text. This | |
254 is especially powerful when you start interacting with multiple data | |
255 sources. Even if each of them uses a different encoding, inside your | |
256 application data is held in abstract text form. You can program your | |
257 business logic without worrying about which data came from which source. | |
258 You can freely exchange the data you store between sources. Only | |
259 reading/writing files requires encoding your text to bytes. | |
260 | |
261 |