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

setValue is no longer called before __str__ on registry values #1604

Open
progval opened this issue Dec 1, 2024 · 1 comment
Open

setValue is no longer called before __str__ on registry values #1604

progval opened this issue Dec 1, 2024 · 1 comment

Comments

@progval
Copy link
Owner

progval commented Dec 1, 2024

causing this error:

ERROR 2024-12-01T20:52:03 Exception printing default value of supybot.plugins.ChannelStats.frowns:
Traceback (most recent call last):
  File "/home/dev-irc/Limnoria/src/registry.py", line 161, in close
    lines.append('# Default value: %s\n' % x)
                 ~~~~~~~~~~~~~~~~~~~~~~~~^~~
  File "/home/dev-irc/Limnoria/src/plugins/ChannelStats/config.py", line 58, in __str__
    return self.s
           ^^^^^^
  File "/home/dev-irc/Limnoria/src/registry.py", line 243, in __getattr__
    self.__nonExistentEntry(attr)
  File "/home/dev-irc/Limnoria/src/registry.py", line 225, in __nonExistentEntry
    raise NonExistentRegistryEntry(s)
supybot.registry.NonExistentRegistryEntry: 's' is not a valid entry in 'unset'

this is a regression from #1601.

ChannelStats could easily be adapted to work with this, but I consider this to be a (minor) API breakage, which may affect other plugins. I do not see a way to fix this without re-breaking #1349, which is not worth it.

@BlankEclair any idea?

@BlankEclair
Copy link
Contributor

BlankEclair commented Dec 1, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants