Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix support for display hints being applied #7

Merged
merged 1 commit into from
Oct 29, 2024

Commits on Oct 29, 2024

  1. Fix support for display hints being applied

    While recent commit git-84be3ff resolved an issue with stacked textual
    conventions, it broke support for display hints, by changing the method
    resolution order (MRO) of types based on textual conventions. The
    orginal MRO was necessary for pysnmp to apply display hints.
    
    This commit replaces the previous solution with a new one. The new fix
    preserves the original MRO and also avoids subclassing the
    TextualConvention class multiple times for any type, thereby resolving
    both the original issue and the one newly introduced by git-84be3ff.
    
    This new fix does (necessarily) add to "recompilation creep": in order
    to know whether or not to subclass TextualConvention for a new type,
    information needs to be carried over between MIBs about whether imported
    types are simple types or textual conventions. That means that if one
    MIB is changed (e.g. by changing a type from simple to textual
    convention or vice versa), the MIBs importing that MIB may have to be
    recompiled as well. pysmi is not yet smart enough to know about that,
    and may therefore skip recompiling the importing MIBs, leading to a
    possible desynchronization. That same issue was already present for
    handling of DEFVALs as well.
    
    New tests are added to ensure that display hint information is indeed
    not only available, but also applied.
    
    Please note that this commit extends the pysmi JSON output format.
    dcvmoole committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    8663d9c View commit details
    Browse the repository at this point in the history