Mercurial > hgrepos > Python > libs > ConfigMix
view configmix/constants.py @ 542:f71d34dda19f
Add an optional C-implementation for configmix.config.unquote and configmix.config.pathstr2path.
This is currently for Python 3.5+.
It is tested with Python 3.7 and Python3.8 (FreeBSD 12.2 amd64, LLVM 10.0.1).
A build for the stable API ("abi3") fails because PyUnicode_New() is currently
not in the stable API.
Also includes are extended tests for unquote() and pathstr2path().
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 31 Dec 2021 21:24:16 +0100 |
| parents | 8ce46c9e70ab |
| children | f454889e41fa |
line wrap: on
line source
# -*- coding: utf-8 -*- # :- # :Copyright: (c) 2015-2021, Franz Glasner. All rights reserved. # :License: BSD-3-Clause. See LICENSE.txt for details. # :- """Some important public contants """ from .compat import u as _u COMMENTS = [ _u("__comment"), _u("__doc"), ] """Prefixes for comment configuration keys that are to be handled as comments """ DIR_PREFIX = _u("<dir>") """Prefix for configuration values to read other configuration files from given directory """ DEL_VALUE = _u("{{::DEL::}}") """Value for configuration items to signal that the corresponding key-value is to be deleted when configurations are merged """ REF_NAMESPACE = _u("ref") """Special internal namespace used for implementation of tree `references` """ NONE_FILTER = _u("None") """The public name of the special `None` filter""" EMPTY_FILTER = _u("Empty") """The public name of the special `None` filter"""
