-
Notifications
You must be signed in to change notification settings - Fork 48
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
Implement user/channel objects #15
Comments
This is extremely backwards-incompatible with v0.8 as it changes many interfaces for interacting with user and channel information, namely: - All previous dictionary fields have been converted to attributes, e.g. user['username'] is now user.username (BREAKING). - Instead of nicknames and channel names, User and Channel models are now passed to on_* hooks (BREAKING). - _sync_user has been completely removed and replaced with _parse_and_sync_user (and, to some extent, _get_or_create_user). Everything that made use of _parse_user now also synchronizes with the user database for consistency (may be breaking). - A new metaclass, ClientMeta, has been introduced to allow dynamic composition of the User and Channel classes on the feature classes (internal only). - User/Channel objects have the message() method when RFC1459 support is active (feature).
This is extremely backwards-incompatible with v0.8 as it changes many interfaces for interacting with user and channel information, namely: - All previous dictionary fields have been converted to attributes, e.g. user['username'] is now user.username. This extends to results from WHOIS (WhoisInfo) and WHOWAS (WhowasInfo). - Instead of nicknames and channel names, User and Channel models are now passed to on_* hooks (BREAKING). - _sync_user has been completely removed and replaced with _parse_and_sync_user (and, to some extent, _get_or_create_user). Everything that made use of _parse_user now also synchronizes with the user database for consistency (may be breaking). - A new metaclass, ClientMeta, has been introduced to allow dynamic composition of the User and Channel classes on the feature classes (internal only). - User/Channel objects have the message() method when RFC1459 support is active (feature).
This is extremely backwards-incompatible with v0.8 as it changes many interfaces for interacting with user and channel information, namely: - All previous dictionary fields have been converted to attributes, e.g. user['username'] is now user.username. This extends to results from WHOIS (WhoisInfo) and WHOWAS (WhowasInfo). - Instead of nicknames and channel names, User and Channel models are now passed to on_* hooks (BREAKING). - _sync_user has been completely removed and replaced with _parse_and_sync_user (and, to some extent, _get_or_create_user). Everything that made use of _parse_user now also synchronizes with the user database for consistency (may be breaking). - A new metaclass, ClientMeta, has been introduced to allow dynamic composition of the User and Channel classes on the feature classes (internal only). - User/Channel objects have the message() method when RFC1459 support is active (feature).
This is extremely backwards-incompatible with v0.8 as it changes many interfaces for interacting with user and channel information, namely: - All previous dictionary fields have been converted to attributes, e.g. user['username'] is now user.username. This extends to results from WHOIS (WhoisInfo) and WHOWAS (WhowasInfo). - Instead of nicknames and channel names, User and Channel models are now passed to on_* hooks (BREAKING). - _sync_user has been completely removed and replaced with _parse_and_sync_user (and, to some extent, _get_or_create_user). Everything that made use of _parse_user now also synchronizes with the user database for consistency (may be breaking). - A new metaclass, ClientMeta, has been introduced to allow dynamic composition of the User and Channel classes on the feature classes (internal only). - User/Channel objects have the message() method when RFC1459 support is active (feature).
This is extremely backwards-incompatible with v0.8 as it changes many interfaces for interacting with user and channel information, namely: - All previous dictionary fields have been converted to attributes, e.g. user['username'] is now user.username. This extends to results from WHOIS (WhoisInfo) and WHOWAS (WhowasInfo). - Instead of nicknames and channel names, User and Channel models are now passed to on_* hooks (BREAKING). - _sync_user has been completely removed and replaced with _parse_and_sync_user (and, to some extent, _get_or_create_user). Everything that made use of _parse_user now also synchronizes with the user database for consistency (may be breaking). - A new metaclass, ClientMeta, has been introduced to allow dynamic composition of the User and Channel classes on the feature classes (internal only). - User/Channel objects have the message() method when RFC1459 support is active (feature).
This is extremely backwards-incompatible with v0.8 as it changes many interfaces for interacting with user and channel information, namely: - All previous dictionary fields have been converted to attributes, e.g. user['username'] is now user.username. This extends to results from WHOIS (WhoisInfo) and WHOWAS (WhowasInfo). - Instead of nicknames and channel names, User and Channel models are now passed to on_* hooks (BREAKING). - _sync_user has been completely removed and replaced with _parse_and_sync_user (and, to some extent, _get_or_create_user). Everything that made use of _parse_user now also synchronizes with the user database for consistency (may be breaking). - A new metaclass, ClientMeta, has been introduced to allow dynamic composition of the User and Channel classes on the feature classes (internal only). - User/Channel objects have the message() method when RFC1459 support is active (feature).
This is extremely backwards-incompatible with v0.8 as it changes many interfaces for interacting with user and channel information, namely: - All previous dictionary fields have been converted to attributes, e.g. user['username'] is now user.username. This extends to results from WHOIS (WhoisInfo) and WHOWAS (WhowasInfo). - Instead of nicknames and channel names, User and Channel models are now passed to on_* hooks (BREAKING). - _sync_user has been completely removed and replaced with _parse_and_sync_user (and, to some extent, _get_or_create_user). Everything that made use of _parse_user now also synchronizes with the user database for consistency (may be breaking). - A new metaclass, ClientMeta, has been introduced to allow dynamic composition of the User and Channel classes on the feature classes (internal only). - User/Channel objects have the message() method when RFC1459 support is active (feature).
This is extremely backwards-incompatible with v0.8 as it changes many interfaces for interacting with user and channel information, namely: - All previous dictionary fields have been converted to attributes, e.g. user['username'] is now user.username. This extends to results from WHOIS (WhoisInfo) and WHOWAS (WhowasInfo). - Instead of nicknames and channel names, User and Channel models are now passed to on_* hooks (BREAKING). - _sync_user has been completely removed and replaced with _parse_and_sync_user (and, to some extent, _get_or_create_user). Everything that made use of _parse_user now also synchronizes with the user database for consistency (may be breaking). - A new metaclass, ClientMeta, has been introduced to allow dynamic composition of the User and Channel classes on the feature classes (internal only). - User/Channel objects have the message() method when RFC1459 support is active (feature).
This is extremely backwards-incompatible with v0.8 as it changes many interfaces for interacting with user and channel information, namely: - All previous dictionary fields have been converted to attributes, e.g. user['username'] is now user.username. This extends to results from WHOIS (WhoisInfo) and WHOWAS (WhowasInfo). - Instead of nicknames and channel names, User and Channel models are now passed to on_* hooks (BREAKING). - _sync_user has been completely removed and replaced with _parse_and_sync_user (and, to some extent, _get_or_create_user). Everything that made use of _parse_user now also synchronizes with the user database for consistency (may be breaking). - A new metaclass, ClientMeta, has been introduced to allow dynamic composition of the User and Channel classes on the feature classes (internal only). - User/Channel objects have the message() method when RFC1459 support is active (feature). Oh, and now the contents parameter of ctcp() actually does something.
This is extremely backwards-incompatible with v0.8 as it changes many interfaces for interacting with user and channel information, namely: - All previous dictionary fields have been converted to attributes, e.g. user['username'] is now user.username. This extends to results from WHOIS (WhoisInfo) and WHOWAS (WhowasInfo). - Instead of nicknames and channel names, User and Channel models are now passed to on_* hooks (BREAKING). - _sync_user has been completely removed and replaced with _parse_and_sync_user (and, to some extent, _get_or_create_user). Everything that made use of _parse_user now also synchronizes with the user database for consistency (may be breaking). - A new metaclass, ClientMeta, has been introduced to allow dynamic composition of the User and Channel classes on the feature classes (internal only). - User/Channel objects have the message() method when RFC1459 support is active (feature). Oh, and now the contents parameter of ctcp() actually does something.
This is a somewhat backwards-incompatible with v0.8 as it changes many interfaces for interacting with user and channel information, namely: - All previous dictionary fields have been converted to attributes, e.g. user['username'] is now user.username. This extends to results from WHOIS (WHOISInfo) and WHOWAS (WHOWASInfo). __getitem__ and __setitem__ are implemented, for the time being, to maintain backwards compatibility. - Instead of nicknames and channel names, User and Channel models are now passed to on_* hooks (BREAKING). - _sync_user has been completely removed and replaced with _parse_and_process_user (and, to some extent, _get_user). Everything that made use of _parse_user now also synchronizes with the user database for consistency (may be breaking). - A new metaclass, ClientType, has been introduced to allow dynamic composition of the User and Channel classes on the feature classes (internal only). - User/Channel objects have the message() method when RFC1459 support is active (feature). Oh, and now the contents parameter of ctcp() actually does something.
This is a somewhat backwards-incompatible with v0.8 as it changes many interfaces for interacting with user and channel information, namely: - Instead of nicknames and channel names, User and Channel models are now passed to on_* hooks (BREAKING). Additionally, on_nick_change has been changed to take the arguments (user, original_nick). - All previous dictionary fields have been converted to attributes, e.g. user['username'] is now user.username. This extends to results from WHOIS (WHOISInfo) and WHOWAS (WHOWASInfo). __getitem__ and __setitem__ are implemented, for the time being, to maintain backwards compatibility. - _sync_user has been completely removed and replaced with _parse_and_process_user (and, to some extent, _get_user). Everything that made use of _parse_user now also synchronizes with the user database for consistency (may be breaking). - A new metaclass, ClientType, has been introduced to allow dynamic composition of the User and Channel classes on the feature classes (internal only). - User/Channel objects have the message() method when RFC1459 support is active (feature). Oh, and now the contents parameter of ctcp() actually does something.
If you wanted to have fun, but also kill support for anything not Python 3.7, dataclasses would be nice for this. |
I believe there is a backport for dataclasses, but would require adding an additional dependency to the project for python versions <3.7. For the time being, i plan to support Python versions 3.5 or newer, as to give downstream users a bit more leeway on their target python versions. Also, I will be exploring re-implementing soon. |
Given that Pydle suports Python >=3.5 the standard library To prevent re-inventing the wheel and thus a LOT of boilerplate, the best course forward for this is probably to use the |
TODO list:
Channels
Data members
Base implementation
rfc 1459
Isupport (optionals)
Methods
TBD
Users
data members
Base
RFC 1459
Account support
methods
TBD
Original message is as follows:
Currently, users and channels are dicts – they would be better off and less gross as objects.
The text was updated successfully, but these errors were encountered: