| Index | index by Group | index by Distribution | index by Vendor | index by creation date | index by Name | Mirrors | Help | Search |
| Name: python313-ConfigArgParse | Distribution: openSUSE Tumbleweed |
| Version: 1.10.2 | Vendor: openSUSE |
| Release: 1.1 | Build date: Fri Nov 20 21:37:41 2026 |
| Group: Development/Languages/Python | Build host: reproducible |
| Size: 495954 | Source RPM: python-ConfigArgParse-1.10.2-1.1.src.rpm |
| Packager: http://bugs.opensuse.org | |
| Url: https://github.com/bw2/ConfigArgParse | |
| Summary: A drop-in replacement for argparse | |
ConfigArgParse allows options to also be set via config files and/or environment variables. Applications with more than a handful of user-settable options are best configured through a combination of command line args, config files, hard-coded defaults, and in some cases, environment variables. Python’s command line parsing modules such as argparse have very limited support for config files and environment variables, so this module extends argparse to add these features
MIT
* Fri Nov 20 2026 Dirk Müller <dmueller@suse.com>
- update to 1.10.2:
* Fixes a regression in 1.10.0 and 1.10.1, and a bug in how
`TomlConfigParser` reads section names.
* **`None` as a command line arg works again** (#372).
`parser.parse_args(['--foo', None])` raised `TypeError:
object of type 'NoneType' has no len()` in 1.10.0 and 1.10.1.
It gives `foo=None` again, as 1.9.0 and plain argparse do.
The same goes for `0` and `False`.
* **A quoted part of a TOML section name can now hold a dot
when it is in single quotes or comes after a space** (#370).
`TomlConfigParser(["tool.'a.b'"])` and
`TomlConfigParser(['tool . "a.b"'])` now read the table
`[tool."a.b"]`. Before, both names were split at the dot
inside the quotes, so that table's settings were silently not
read (`tool."a.b"` already worked). Writing a config file
with such a section name now writes `[tool."a.b"]` too.
* With that fix, the quoted parts of a section name follow
TOML's rules more closely:
* Backslash escapes are read in a double-quoted part and left
as they are in a single-quoted part.
* Spaces inside double quotes are kept. `tool." a "` used to be
read as `tool.a`.
* A quote character in the middle of an unquoted part, which
isn't valid TOML, now starts a quoted part, so `tool.it's.x`
is no longer split at the second dot. Write it as
`tool."it's".x`, which works in earlier versions too.
- update to 1.10.1:
* Fixes two regressions in 1.10.0.
* **Lists before a subcommand work again when the option that
ends them comes from another source.** For a `nargs='+'` or
`nargs='*'` option, 1.10.0 stops with an error when a config
file or env var list would swallow a subcommand, unless an
option after the list ends it. When the list and that option
came from different sources, 1.10.0 could miss the option and
stop with the error anyway: with `FILES="[a, b]"` set and
`name = x` in a config file, `prog run` failed. It now gives
`files=['a', 'b']` and `name='x'` and treats `run` as a
subcommand, as 1.9.0 did.
* **Count options accept values like `+2` again.** 1.10.0
accepted only digits as the number for a `count` option in a
config file or env var, so values that 1.9.0 accepted, such
as `+2`, `1_000` or an env var value that ends in a newline,
became errors. They work again. A negative number such as
`-1` is still an error (1.9.0 ignored it).
- update to 1.10.0:
* ## Behavior changes
* **Config file and env var lists no longer swallow subcommands
or REMAINDER args**
* ConfigArgParse hands config file and env var values to
argparse by adding them to the command line. For an option
with `nargs='+'` or `nargs='*'`, `files = [a, b]` becomes
`--files a b`, and before 1.10.0 it was added just before the
subcommand. So `prog run` was parsed as `prog --files a b
run`: argparse read `run` as a third element in the list, and
the subcommand silently never ran (`files=['a', 'b', 'run']`,
`command=None`).
* Now:
* If an option comes before the subcommand, the list is added
before that option, which ends the list: `prog -v run` gives
`files=['a', 'b']` and treats `run` as a subcommand.
* Otherwise, if no other top-level options are specified,
parsing stops with an error saying to set the list on the
command line instead, or to specify another option before the
subcommand.
* The same applies to a `nargs=REMAINDER` positional: with
`files = [a, b]`, `prog cmd x` used to give `files=['a', 'b',
'cmd', 'x']` and now stops with the same error.
* Known issue in 1.10.0: with a subcommand, the error also
happens when another option is set from a config file but the
list comes from an env var or from a later config file. 1.9.0
handled those cases. Fixed in 1.10.1.
* **For `nargs` options, list elements that start with `-` or
with an args-file prefix such as `@` are now an error**
* For an option with `nargs` (eg. `nargs='+'`), a config file
or env var list is added to the command line as separate args
after the option, so `files = [a, --admin]` becomes `--files
a --admin`. Argparse then reads `--admin` as an option rather
than a file name. In 1.9.0 that silently set `admin=True`,
even from an env var when `--admin` has no env var of its
own. In the same way, with `fromfile_prefix_chars='@'`,
`files = [a, @extra_args.txt]` read more args from
`extra_args.txt`. (A flat list for an `action='append'`
option is passed as `--files=a --files=--admin` instead, and
isn't affected.)
* Now a list element that starts with `-` (or another of the
parser's `prefix_chars`) or with one of its
`fromfile_prefix_chars` stops parsing with an error that
names the key. A lone `-` and negative numbers such as `-2`
still work.
* **Command-line values now win over config file and env var
values in more cases**
* A config file or env var value is meant to be skipped when
the same option is on the command line. 1.9.0 only spotted
the option when it was written out in full, so it missed
other forms argparse accepts and applied both values:
* **An abbreviated name:** `prog --ta e` with `tag = c` in a
config file gave `tag=['c', 'e']` for an `append` option. Now
`tag=['e']`.
* **Bundled short flags:** `prog -vv` with `verbose = 2` gave
`verbose=4` for a `count` option. Now `verbose=2`.
* **A value attached to a short option:** `prog -Ifoo` with
`include = bar` gave `include=['bar', 'foo']` for an `append`
option. Now `include=['foo']`.
* **An abbreviated name in a mutually exclusive group:** with
`--level` and `--quiet` in the group, `prog --lev 3` with
`quiet = true` failed with "argument --level: not allowed
with argument --quiet". Now the config file's `quiet` is
skipped, as it already was for `prog --level 3`.
* When the command line has a subcommand or a `--`, this also
affected options that keep a single value: `prog --na y run`
with `name = x` in a config file gave `name='x'`; now it
gives `name='y'`. Otherwise the command-line value came last
and won anyway.
* Options inside an args file now win too. With
`fromfile_prefix_chars='@'`, `prog @args.txt`, where
`args.txt` holds `--name` and `y` on separate lines (argparse
reads each line as one arg), gave the config file's
`name='x'`; now it gives `name='y'`. A config file path given
in an args file the same way (`-c` and `my.conf` on separate
lines) is now opened; before, it was ignored.
* **Options that belong to a subcommand or to REMAINDER args no
longer block config file and env var values**
* 1.9.0 treated an option as already given when argparse
actually hands it to a subcommand or to REMAINDER args. With
`name = x` in a config file (or set by an env var), 1.9.0
dropped it (`name=None`) in each of these cases, and 1.10.0
gives `name='x'`:
* `prog run --name y`, where the subcommand `run` has its own
`--name` that stores its value under another name (eg.
`dest='run_name'`).
* `prog cmd --name y`, where everything from `cmd` on goes to a
`nargs=REMAINDER` positional.
* `prog --exec cmd --name y`, where `--exec` takes
`nargs=REMAINDER`.
* Likewise, a `-h` after `--` or inside REMAINDER args (`prog
- - -h`, `prog cmd -h`) made 1.9.0 skip config files entirely,
as if help had been asked for. Config files are now read.
* The config file option works the same way. 1.9.0 also opened
a file named by a `-c` in a subcommand's args or in REMAINDER
args, so `prog --exec grep -c pattern` failed with "Unable to
open config file: pattern", and `prog run -c run.conf` (where
`run` has its own `-c`) applied `run.conf` to the main parser
too. Now only the main parser's own `-c` opens a file for it.
* **`BooleanOptionalAction` values from config files and env
vars**
* For `parser.add_argument('--feature',
action=argparse.BooleanOptionalAction)`, a config file key
can be written in its `no-` form, but 1.9.0 did the opposite
of what it says: `no-feature = true` gave `feature=True`, and
`no-feature = false` gave `feature=False`. Now `no-feature =
true` gives `feature=False`, like `--no-feature` on the
command line, and `no-feature = false` gives `feature=True`.
* If the option also has a short alias, as in `("-f", "--
feature")`, a false value from a config file or env var used
to set it to true (#367); it now sets it to false.
* An option with only short names, such as `-f` and `-F`, has
no `no-` form, so nothing on the command line can set it to
false. When an env var asked for false anyway, 1.9.0 set it
to true, or crashed with `IndexError` if the option had a
single name. It now stops with an error such as "FEATURE
can't set feature to False: none of -f/-F does".
* **`parse_intermixed_args()` now reads config files and env
vars like `parse_args()` does**
* The same goes for `parse_known_intermixed_args()`. In 1.9.0,
depending on the Python version, these either ignored config
files and env vars or let their values override the command
line.
* **`exit_on_error=False` now covers ConfigArgParse's own
config file and env var errors**
* With `exit_on_error=False`, errors that ConfigArgParse itself
finds in config files and env vars (eg. `flag = maybe`, or a
line it can't parse) now raise `argparse.ArgumentError`
instead of exiting the program. Errors that argparse reports,
such as a wrong type, already did.
* **Other changes that can turn a previously accepted input
into an error**
* Writing out a config file (with `write_config_file()` or an
arg added with `is_write_out_config_file_arg=True`) now
raises `ValueError` in these cases, where 1.9.0 wrote a file
that read back differently:
* In the default format, a string in square brackets, such as
`[1, 2]` or the regex `[a-z]`, was written as is and read
back as a list.
* With `TomlConfigParser`, some strings with a backslash, such
as `C:tempxdata` (a backslash followed by `x`), were written
so that the file couldn't be read back. Other backslashes, as
in `C:Usersme`, are written correctly in both versions.
* `TomlConfigParser([])` and `IniConfigParser([], ...)`, which
have no section to read from, wrote files that read back as
nothing.
* A negative number for a `count` option in a config file or
env var, such as `verbose = -1`, used to be ignored and is
now an error. 1.10.0 also rejected numbers such as `+2` that
1.9.0 accepted; 1.10.1 accepts them again. `true` and `false`
work as before.
* Calling `YAMLConfigFileParser().serialize()` directly with an
object such as a `Path` raises an error, instead of writing a
`!!python/object` tag its own loader can't read.
* **Other reading changes**
* Default config format: a key with no `=` and a comment after
it, such as `verbose # be loud`, is now read as `verbose =
true`. 1.9.0 read the comment as the value, so it rejected
that line for a flag and set `name #value` to `#value`. `name
= #value` is unchanged.
* Wildcards in `default_config_files` are read in alphabetical
order, so the alphabetically last matching file wins. Before,
the order depended on the file system.
* `IniConfigParser(['my_tool', 'DEFAULT'], ...)`: the named
section now wins over `[DEFAULT]`.
* ## New
* **Python 3.15** is now tested and listed as supported. On
3.15, `parser.print_help(file)` no longer writes terminal
color codes into `file` when stdout is a terminal but `file`
is not (eg. a log file).
* `nargs=1` options accept a list from config files and env
vars (`size = [5]`).
* `configargparse.already_on_command_line()`, the helper that
checks whether an option is already on a command line, takes
an optional `parser=` argument. With it, the helper follows
the rules above: it recognizes abbreviations, bundled short
flags and attached values, and ignores args that go to a
subcommand or to REMAINDER args. Calls without it work as
before.
* ## Fixes
* **Writing config files**
* In the default config format, list values are written as JSON
(eg. `files = ["a,b", "c"]`), so they read back unchanged
(#366); before, `['a,b', 'c']` read back as three items.
ConfigArgParse 1.3 and later can read these files.
* Options given in abbreviated or bundled form (`--gen hg38`,
`-vv`) are written; they used to be left out.
* Values that a `type=` function turned into other objects,
such as `type=json.loads` dicts and `FileType` files, are
written as the string they came from, so they read back.
* Enum members, tuple defaults of multi-value options,
`nargs=1` values, `append_const` flags (each given once), and
`append`/`count` options with defaults now read back with the
values they had when the file was written.
* Defaults that can't be read back (eg. `default=sys.stdout`,
empty lists), defaults of mutually exclusive options, and the
config file path option (when given on the command line, by
an env var or as a default) are left out of written files.
* YAML writes `Path` and `IntEnum` values as plain values. The
default format and `IniConfigParser` quote values that would
otherwise read back differently (tests from #368), and
`IniConfigParser` with `split_ml_text_to_list=True` writes an
empty list as `[]` instead of losing it.
* An arg that writes the config file with `type=pathlib.Path`
no longer crashes after writing.
* **Reading config files and env vars**
* Options inherited through `parents=` from an argparse parser
created before ConfigArgParse was imported no longer crash
parsing or help output.
* Config file and env var values no longer cause an error or
get lost when an option's value is a subcommand name (`prog
- -target build build`), when `--` follows the subcommand
(`prog run -- a`), or when a `nargs=REMAINDER` positional's
args include an option (`prog cmd --opt`).
* The config file path is found in a bundle of short flags
(`-vc conf`), no longer confused with an option whose name
starts the same (`--set` next to `--settings`), and, with
`allow_abbrev=False`, no longer read from an abbreviation
such as `--sett`.
* `IniConfigParser` strips a value written on the line after
`key =`.
* Default format: line numbers in "Unexpected line N" errors
start at 1.
* A YAML key read as a bool or number (`yes: 1`), a stray `%`
in an `IniConfigParser` value, `flag = [a, b]` for a
`store_true` option, and `verbose = lots` for a `count`
option now give a clear error instead of a traceback.
* A TOML file that sets `tool = "x"` when the parser reads
section `tool.my_tool`, and a `bytes` path in
`default_config_files`, no longer crash. An empty or comment-
only YAML file is now read as having no settings instead of
stopping with an error.
* **Help and `print_values()`**
* Calling `format_help()` more than once gives the same text;
later calls used to drop the config file paragraph.
* Env var names from `auto_env_var_prefix` show in the help
before anything is parsed.
* `CompositeConfigParser`'s help labels
`ConfigparserConfigFileParser` instead of showing `??`, and
`IniConfigParser`'s help says keys are lowercased.
* `print_values()` writes to the current `sys.stdout`, shows
`@file` args expanded, and no longer lists a positional's
default when it was given.
* **Full changelog:** https://github.com/bw2/ConfigArgParse/com
pare/v1.9.0...v1.10.0
- update to 1.9.0:
* ## Behavior changes
* **A false value for a flag now overrides lower-priority
sources**
* Previously, setting a flag (an arg that takes no value, such
as `store_true`, `store_false`, `count` or `store_const`) to
false in an environment variable or a higher-priority config
file added nothing to the command line, so a `true` for the
same flag in a lower-priority config file still turned it on.
Now the false value counts as setting the flag, and lower-
priority config files no longer set it. For example,
`VERBOSE=false` now wins over `verbose = true` in a config
file. Args that take a value are unchanged.
* **A bare `--` in a list value is now an error**
* A list value from a config file or environment variable, such
as `items = [a, --]`, used to put a bare `--` on the command
line, which ended option parsing and turned the user's own
command-line options after it into positional args. It now
fails with an error that names the key.
* ## Fixes
* **Options after `--` on the command line no longer block
other sources** (#363). In `prog -- --level`, `--level` is a
positional arg, so environment variables and config files can
still set `--level`.
* **`IniConfigParser.serialize()` escapes `%`** (#364), so
values like `%Y-%m-%d` read back unchanged, and a saved
`%(name)s` is no longer replaced by another key's value when
the file is loaded.
* **Saved config files keep `store_false` and `store_const`
values** (#360). `write_config_file()` now writes `true` or
`false` according to whether the flag was given, rather than
the value the flag stores.
* **`ConfigparserConfigFileParser` reads files that only have a
`[DEFAULT]` section** (#362), including the files its own
`serialize()` writes.
* **`ConfigparserConfigFileParser` round trip**: values written
by `serialize()` read back the same in more cases (for
example strings that look like lists, and list elements
containing `#` or `;`), a value that will be cut short by a
`#` or `;` comment now produces a warning, and interpolation
errors name only the key, not the value, which may be a
secret.
* **Full changelog:**
https://github.com/bw2/ConfigArgParse/compare/v1.8.0...v1.9.0
- update to 1.8.0:
* ## Fixes
* **Values for mutually exclusive options now follow the usual
override order**
* Previously, if a config file or env var set one member of a
mutually exclusive group and a different member was given on
the command line, both were added and argparse failed with
`not allowed with argument`. Now a value is dropped whenever
another option in its mutually exclusive group is already set
by a higher-priority source (command line, then env vars,
then config files), matching how overrides already work for a
single option. Options set together within one source still
raise the conflict error.
* ## Improvements
* **Python 3.14 is now supported and tested in CI**
* **Full changelog:**
https://github.com/bw2/ConfigArgParse/compare/v1.7.7...v1.8.0
- update to 1.7.7:
* ## Fixes
* **Args with a custom `argparse.Action` and `nargs` can now be
set from a config file**
* An arg declared with a custom `Action` subclass and
`nargs="+"` parsed fine from the command line but was
rejected from a config file with `can't be set to a list ...
unless its action type is changed to 'append' or nargs is set
to '*', '+', or > 1`, which is not what the check actually
tested. The check now looks only at `nargs`, as the message
always said. Thanks to @yobeonline for the report and @lo-0l
for the fix.
* ## Improvements
* **`toml` is now a declared optional dependency**
* `TomlConfigParser` reads with the standard library's
`tomllib` on Python 3.11+ and falls back to the toml package
below that, but that dependency was not declared anywhere.
There is now a `toml` extra:
* ```
* pip install configargparse[toml]
* ```
* Note that `tomllib` can only read, so writing a config file
out needs the `toml` package on every Python version.
* **A missing optional dependency is no longer silent.**
`CompositeConfigParser` tries each parser in turn, and a
parser whose optional dependency was not installed used to be
skipped indistinguishably from one that simply could not read
the file. Such a parser now raises
`ConfigFileParserMissingDependency` (a subclass of
`ConfigFileParserException`, so existing handlers keep
working), and the composite emits a warning naming the parser
and how to install it, then continues down the chain.
* **TOML config files can now be read from binary streams on
Python versions before 3.11.**
* Thanks to @TobiasDijkhuis for reporting and implementing
this.
* **Full changelog:**
https://github.com/bw2/ConfigArgParse/compare/v1.7.6...v1.7.7
- update to 1.7.6:
* config file and environment variable values can no longer
trigger writing out a config file
* config file values containing newlines are now rejected when
writing out a config file, rather than written out as
separate keys
* Mon Apr 06 2026 Dirk Müller <dmueller@suse.com>
- update to 1.7.5:
* Add support for tomllib (Python 3.11+)
* Add serialization support for IniConfigParser and TomlConfigParser
* Fix argument injection order (issue #298, #285, #296)
* Improve error handling during config parsing
* Add support for Python 3.13
- drop obsolete py313-skip-exit.patch
* Thu Dec 04 2025 John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 1.7.1
* The primary purpose of this release is to fix the package
metadata on supported python versions.
- Adjust upstream source name in spec file
- Drop py313-tests.patch, fixed upstream
- Update Requires from setup.py
* Mon May 05 2025 Markéta Machová <mmachova@suse.com>
- Convert to pip-based build
* Tue Oct 29 2024 Dirk Müller <dmueller@suse.com>
- add py313-skip-exit.patch, py313-tests.patch
- skip one more test
* Wed Jul 26 2023 Dirk Müller <dmueller@suse.com>
- update to 1.7:
* python 3.11 enablement
* improved apidocs, improved README
* Sat Jul 01 2023 Dirk Müller <dmueller@suse.com>
- update to 1.5.5:
* no upstream changelog available
* Mon Jun 12 2023 ecsos <ecsos@opensuse.org>
- Add %{?sle15_python_module_pythons}
* Wed Mar 09 2022 pgajdos@suse.com
- version update to 1.5.3
* no upstream changelog found
- python-mock actually not required for build
* Tue Jul 20 2021 Matej Cepl <mcepl@suse.com>
- Rename the package according to PyPI
/usr/lib/python3.13/site-packages/__pycache__/configargparse.cpython-313.opt-1.pyc /usr/lib/python3.13/site-packages/__pycache__/configargparse.cpython-313.pyc /usr/lib/python3.13/site-packages/configargparse-1.10.2.dist-info /usr/lib/python3.13/site-packages/configargparse-1.10.2.dist-info/INSTALLER /usr/lib/python3.13/site-packages/configargparse-1.10.2.dist-info/METADATA /usr/lib/python3.13/site-packages/configargparse-1.10.2.dist-info/RECORD /usr/lib/python3.13/site-packages/configargparse-1.10.2.dist-info/REQUESTED /usr/lib/python3.13/site-packages/configargparse-1.10.2.dist-info/WHEEL /usr/lib/python3.13/site-packages/configargparse-1.10.2.dist-info/licenses /usr/lib/python3.13/site-packages/configargparse-1.10.2.dist-info/licenses/LICENSE /usr/lib/python3.13/site-packages/configargparse-1.10.2.dist-info/top_level.txt /usr/lib/python3.13/site-packages/configargparse.py /usr/share/doc/packages/python313-ConfigArgParse /usr/share/doc/packages/python313-ConfigArgParse/README.md /usr/share/licenses/python313-ConfigArgParse /usr/share/licenses/python313-ConfigArgParse/LICENSE
Generated by rpm2html 1.8.1
Fabrice Bellet, Sun Nov 29 22:09:30 2026