#518 Please don't drop arguments in Commands.__init__
Closed: Won't fix 3 years ago by onosek. Opened 3 years ago by praiskup.

It would be much better to keep them, and not use them. Many
third-party packages call the constructor and don't care about that
argument. See complaints in:
https://bodhi.fedoraproject.org/updates/FEDORA-2020-e41cfba160
https://bodhi.fedoraproject.org/updates/FEDORA-2020-1d768cb488

And e.g. this report:
https://pagure.io/rpkg-util/issue/27

Perhaps a verbose warning would be good idea for transition period.


@praiskup @clime @frostyx @sergiomb
Guys,
I am sorry for the inconvenience you had with this. I didn't realize that it will harm 3rd party apps. Now it is obvious. It was really old stuff and I was convinced nobody uses it. But I forgot on the init argument list.
I was thinking about how to resolve the situation. It looks both rpkg-util and rfpkg were already fixed (in case of rfpkg it was very quick). If I modify arguments and or take my changes back it will break 3rd party apps again. And (at least some) the historical code will be there.
Yes, I should notify you thoroughly when I did this change or (better) do more clever design of arguments and keep old methods with some printed warning.
Do you know whether there is other affected dependent code? Or do you have another suggestion?

we fixed rfpkg with
https://github.com/rpmfusion-infra/rfpkg/commit/d0ec0eb608024ecd6df60b1c567fd552d7e7e41d

but running just rpkg I still see 'Namespace' object has no attribute 'command' on F32

@sergiomb I looked at the issue you are talking about.
rpkg (from https://pagure.io/rpkg-util) really shows this message. But maybe it doesn't have a negative effect on functionality (I tried just rpkg verrel or rpkg --help).
But I believe that this message has nothing to to with issue #518. I installed older packages (python3-rpkg, rpkg-util) and this message was there even before.

we fixed rfpkg with
https://github.com/rpmfusion-infra/rfpkg/commit/d0ec0eb608024ecd6df60b1c567fd552d7e7e41d

but running just rpkg I still see 'Namespace' object has no attribute 'command' on F32

Yes, this unrelated problem with argument parser of rpkg-util. It appears if you run rpkg without any arguments. It should be fixed in the latest but not yet released version. Sorry for that.

Metadata Update from @onosek:
- Issue close_status updated to: Won't fix
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata