You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
argparse is included with python... unless you're using an ancient python (pre-2.7 or pre-3.2 if on 3.x). the effect of this inclusion as a dependency in sensu-plugin is that anything depending on sensu-plugin will also pull in the 3rd party argparse module, which then takes precedence over the builtin module. this is bad primarily because users of sensu-plugin are being unwittingly pinned to an ancient, unsupported version of argparse, without recent features & bugfixes. I only discovered this because some newer code (from a different 3rdparty lib) was choking with an error:
__init__() got an unexpected keyword argument 'allow_abbrev'
allow_abbrev is a valid parameter for the python's argparse.ArgumentParser, but not the 3rd party legacy version.
it seems reasonable to simply remove the dependency, and force users who are on very old versions of python to manually include the 3rd party argparse in their dependencies.
i've made the relevant 2-line fix in this fork's branch. wasn't sure what to do about changelog etc since technically this is a "breaking" change... but only for (hopefully) a tiny subset of users. for the rest of the universe, it fixes (IMHO) a serious issue.
The text was updated successfully, but these errors were encountered:
argparse is included with python... unless you're using an ancient python (pre-2.7 or pre-3.2 if on 3.x). the effect of this inclusion as a dependency in
sensu-plugin
is that anything depending onsensu-plugin
will also pull in the 3rd partyargparse
module, which then takes precedence over the builtin module. this is bad primarily because users ofsensu-plugin
are being unwittingly pinned to an ancient, unsupported version ofargparse
, without recent features & bugfixes. I only discovered this because some newer code (from a different 3rdparty lib) was choking with an error:allow_abbrev
is a valid parameter for the python'sargparse.ArgumentParser
, but not the 3rd party legacy version.it seems reasonable to simply remove the dependency, and force users who are on very old versions of python to manually include the 3rd party
argparse
in their dependencies.i've made the relevant 2-line fix in this fork's branch. wasn't sure what to do about changelog etc since technically this is a "breaking" change... but only for (hopefully) a tiny subset of users. for the rest of the universe, it fixes (IMHO) a serious issue.
The text was updated successfully, but these errors were encountered: