Description of problem: DNF api return a VectorString instead of a Python List Version-Release number of selected component (if applicable): libdnf-0.22.3-1.fc29.x86_64 dnf-4.0.9-2.fc29.noarch How reproducible: Always Steps to Reproduce: python3 16:13 Python 3.7.1 (default, Nov 23 2018, 10:01:49) [GCC 8.2.1 20181105 (Red Hat 8.2.1-5)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import dnf >>> base = dnf.Base() >>> base.read_all_repos() >>> base.repos['updates'].excludepkgs Actual results: <libdnf.module.VectorString; proxy of <Swig Object of type 'std::vector< std::string > *' at 0x7f24fa275180> > Expected results: [] Additional info: https://dnf.readthedocs.io/en/latest/api_repos.html#dnf.repo.Repo.excludepkgs The documentation state its a python list
Please could you provide additional information what's the problem? We tried to provide compatibility vector<string> with list by adding many functions. Please could you try the latest libdnf and provide what exactly could be improved? What we cannot do is to provide a copy of configuration values in python list, because the modification of list will not result in modification of dnf.conf object.
Thank you for your explanation about what does vector<string> Before the docs stated that excludepkgs was a python list therefore I assumed I could JSON serialize it. With the migration to vector<string>, which is not JSON serializable, you have to convert it to a python list first. It may be worth to add a word about the type used by excludepkgs/includepkgs on the docs (https://dnf.readthedocs.io/en/latest/search.html?q=vectorstring&check_keywords=yes) Because I do not think you can provide a way to make it work with the default JSONEncoder.
I've created a PR that documents the returned types. PR: https://github.com/rpm-software-management/dnf/pull/1447
FEDORA-2019-d4b6ede072 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-d4b6ede072
dnf-4.2.5-4.fc29, dnf-plugins-extras-4.0.4-2.fc29, libdnf-0.31.0-6.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-d4b6ede072
dnf-4.2.5-4.fc29, dnf-plugins-extras-4.0.4-2.fc29, libdnf-0.31.0-6.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.