Created attachment 1161061 [details] Log of a run that spawns deprecation warnings Description of problem: When using ksvalidator it generates a lot of deprecation messages making it unusable for actual validating. (The errors generated are cryptic and not straight forward) Version-Release number of selected component (if applicable): recent Fedora Package How reproducible: Allways Steps to Reproduce: 1. ksvalidator ~/sample.ks -e 2. observe errors from file pykickstarterrors.log (attached) Actual results: Cryptic errors and deprecation warnings are mixed with actual validation errors. Expected results: Nice and clean display of actual errors example: The following problem occurred on line 21 of the kickstart file: no such option: --help Additional info: By installing most recent git (tag: r3.3-1) all of this works as expected.
It'd be nice to fix this for F24. There's a simple patch to do so (cf1da553452aa9df198253139f5d1b066dadffd0) from pykickstart-2 branch.
"It'd be nice to fix this" != release blocker. We are not currently frozen for Final, so there is no Fedora process need for this to be a blocker or a freeze exception. If you need it to be a blocker or FE for anaconda team process reasons, nominating it as an FE would be more appropriate than blocker...
Alright, whatever, removing the blocking part there. When that ends up being wrong because now it's on the list for some meeting so it can be discussed how this doesn't need to be discussed, I don't want to hear about it.
pykickstart-2.25-4.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-53fde35ec9
pykickstart-2.25-4.fc24 has been pushed to the Fedora 24 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-2016-53fde35ec9
So the update... Is it supposed to remove the deprecation messages or just to ignore them? Because even with the update from updates-testing I do get a horrible amount of deprecation messages. As a User I would prefer not seeing any deprecation messages since they are not useful to me. Thanks for the Quick update though!
Please post exactly what you are running and seeing here, including the output of rpm -q pykickstart.
Created attachment 1162008 [details] Call of ksvalidator with new pykickstart The complete requested info is in the attachment: > rpm -q pykickstart pykickstart-2.25-4.fc24.noarch The messages that bug me: callback=csv_parse_callback, nargs=1, type="string") /usr/lib/python3.5/site-packages/pykickstart/commands/repo.py:173: PendingDeprecationWarning: add_option is deprecated and will be removed in pykickstart-3. Use add_argument instead.
Can you also post your kickstart file? You can remove passwords and other sensitive information. That shouldn't affect things.
Created attachment 1162160 [details] kickstrart file used Hey sure thing... I don't think that this is relevant though! As I get those messages on prettymuch everything I call ksvalidator with. Example below with an empty file. It could be a local issue if everything works for you I recheck my stuff - Its on a Computer that has been upgraded and tinkered with for quite some years now. $ touch test.ks $ ksvalidator test.ks /usr/lib/python3.5/site-packages/pykickstart/version.py:59: PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp # type: ignore /usr/lib/python3.5/site-packages/pykickstart/commands/repo.py:173: PendingDeprecationWarning: add_option is deprecated and will be removed in pykickstart-3. Use add_argument instead. op.add_option("--name", dest="name", required=1) ....
Huh, I feel like one of us is testing the wrong thing then. If I touch a blank file and run ksvalidator on it, I see: /usr/lib/python3.5/optparse.py:999: PendingDeprecationWarning: The KSOption class is deprecated and will be removed in pykickstart-3. Use the argparse module instead. option = self.option_class(*args, **kwargs) General error in input file: stat: can't specify None for path argument Note that I don't think I can do much about that first deprecation warning I am seeing. It's pretty tricky to deal with. So basically the best you can hope for with this update is that the number of deprecation warnings is really calmed down, but one or two are still going to sneak through. Oh, what version of python3-kickstart do you have installed? That could be what's going on.
Ok Python3 was the Thing! So parsing the valid file I get the following which is nicer than at first but still has some deprecation messages. I guess its acceptable though not beautiful so I give karma to the update. and thanks for your help! $ ksvalidator ownCloud/ks.cfg /usr/lib64/python3.5/optparse.py:999: PendingDeprecationWarning: The KSOption class is deprecated and will be removed in pykickstart-3. Use the argparse module instead. option = self.option_class(*args, **kwargs) _setToSelf has been renamed to set_to_self. The old name will be removed in a future release. _setToSelf has been renamed to set_to_self. The old name will be removed in a future release. _setToSelf has been renamed to set_to_self. The old name will be removed in a future release. _setToSelf has been renamed to set_to_self. The old name will be removed in a future release. _setToObj has been renamed to set_to_obj. The old name will be removed in a future release. _setToObj has been renamed to set_to_obj. The old name will be removed in a future release. _setToSelf has been renamed to set_to_self. The old name will be removed in a future release. add_option is deprecated and will be removed in pykickstart-3. Use add_argument instead. add_option is deprecated and will be removed in pykickstart-3. Use add_argument instead.
That's still not very clean. (1) _setToSelf and _setToObj is an oversight. I could fix that up both on pykickstart-2 branch and also here, if it's annoying. (2) I wonder if I need to do something in the spec file to make sure the two packages get updated at the same time, so others don't hit this problem.
pykickstart-2.25-4.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.