Page 1 of 1

Compatibility breaking updates

Posted: Thu Feb 11, 2016 2:35 pm
by Ayuto
We have updated many getters and setters and exposed them as properties. This means that you might need to update your plugins!

Old example how getters/setters were used:

Syntax: Select all

from cvars import ConVar

x = ConVar('my_test_var')

print(x.get_name())
print(x.get_default())

New example:

Syntax: Select all

from cvars import ConVar

x = ConVar('my_test_var')

print(x.name)
print(x.default)

Please use this as a reference for all changes:
https://github.com/Source-Python-Dev-Team/Source.Python/commit/c07816668933393a9ca4a2aa4937346909499fb5

We have decided this change a long time ago and already exposed new getters/setters as properties. But now we have also updated all old occurences for consistency.