Compatibility breaking updates

Official Announcements about Source.Python.
User avatar
Ayuto
Project Leader
Posts: 1577
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Compatibility breaking updates

Postby Ayuto » Thu Feb 11, 2016 2:35 pm

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.

Return to “News & Announcements”

Who is online

Users browsing this forum: No registered users and 1 guest