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

[WIP] IRC stack and protocol revamp #475

Merged
merged 62 commits into from Jul 3, 2017

Conversation

Projects
1 participant
@jlu5
Owner

jlu5 commented Jun 25, 2017

This is a giant cleanup merge that encompasses issues #454 and #371, along with other related work as well:

  • Replace camel case variables in Irc with snake case
    • Leave a migration stub with a deprecation warning
    • Do this in plugins/coremods too
  • Remove the Irc prefix from classes as needed (e.g. IrcChannel is now just Channel)
    • Make other parts of PyLink follow this change
  • Split Irc up into multiple classes
    • As of 2a978c4, this involves 3 classes inheriting in this order: IRCNetworkPyLinkNetworkCoreWithUtilsPyLinkNetworkCore
    • The goal so far is to keep PyLinkNetworkCore consistent for all protocols, while PyLinkNetworkCoreWithUtils and its subclasses can be replaced with more relevant code on other protocols (things like mode handling, get_hostmask, etc. are especially relevant here)
  • Merge the IRC controller and protocol stacks together - realistically, both will need to be override-able for future extensions to non-IRC protocols, so having this
    • This new setup involves IRC Protocol base classes such as ircs2s_common.IRCCommonProtocol directly inheriting from IRCNetwork
    • Check for namespace conflicts and rename things as needed
      • proto.connect()proto.post_connect() - this is an API breaking change!
      • proto._send()proto._send_with_prefix() - ok since this is an internal function
    • Figure out what to do with outgoing command function names: names like irc.mode() and irc.numeric() are a bit ambiguous IMO now that the protocol distinction is gone... - keep as-is but rename functions to snake case
    • Update protocol spec docs #478
  • Finish off #454
  • Make sure things like autoconnect, queue processing, etc. work - we could really use some unit tests at this point...
  • Check and update plugins as needed
    • Make sure REHASH works (especially regarding network reconnections)
    • Check the networks plugin (i.e. disconnect)
    • Do some basic Relay tests
    • Check contrib plugins
  • Consider if we're better off breaking some more things and making this v2.0 already :)

jlu5 added some commits Jun 3, 2017

classes: break Irc into three classes: PyLinkNetworkCore, PyLinkNetwo…
…rkCoreWithUtils, PyLinkIRCNetwork (aliased to Irc)
Rename PyLinkIRCNetwork -> IRCNetwork
The "PyLink" prefix is sort of redundant here...
WIP: merge IRCNetwork and Protocol classes together
Eventually, the goal is to have both of these hotswappable with inheritance, so this distinction becomes moot.
Rewrite network intitialization bits
- Move protocols.connect -> protocols.post_connect to fix namespace conflict
- Starting an IRC connection is now explicit (via irc.connect instead of __init__)

@jlu5 jlu5 modified the milestones: v2.0, v1.2 Jun 30, 2017

@jlu5 jlu5 added this to Protocol API enhancements in Enhanced protocol abstraction Jul 3, 2017

@jlu5 jlu5 merged commit 06ef421 into devel Jul 3, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

jlu5 added a commit that referenced this pull request Jul 3, 2017

Merge branch 'wip/irc-explosion-2' into devel (#475)
This brings in a major refactor of the IRC/protocol stack, to start off 2.0-dev.

@jlu5 jlu5 deleted the wip/irc-explosion-2 branch Jul 3, 2017

@jlu5 jlu5 added the cleanup label Aug 7, 2017

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