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] refactor, new features and bugfixes #387
Conversation
I split into several commits:
|
Hello, it's too big of a change to be done in a single PR.
I'm not opposed to merging big refactors, but they must be complete and not break anything. Please make different changes into different branches so that I can respond and evaluate them. |
Basically every point should probably be a separate pull request, of one or many commits, depending how big or deep the change is. At the very least existing tests should be passing. |
As said, the commit 'lot of changes' is not yet split. Also I've not yet fix packaging and tests (for packaging it would be nice if you could help me), that's a draft. It's standard to log with the logging python package, it writes on stderr, journald reads stderr. |
I know how it works. But it also discards log level information, which gets lost forever. The log module has a syslog driver that needs to be used in order to preserve this information. |
try:
from systemd.journal import JournalHandler
except ImportError:
pass
else:
logging.root.addHandler(JournalHandler()) Something like that would be ok? I guess if you want to let people configure their log handlers, you should let them give a |
That's an external dependency… could be done but I'm not too happy about those. Anyway I'm ok with extra configuration… logging.yml makes no sense because it's not how the rest is configured. Default behaviour has to remain unchanged if possible. |
I don't understand why using syslog instead of journald for an application. But if you want I can add an extra parameter |
It fixes ME/edit/delete notification in IM
It crashed if a user deletes a message in a thread where the first message was already deleted
Slack.tload log errors
Also, handle user_change in the common way instead of a custom condition. 'message.message_replied' was not handled, as it's a subtype of 'message', we can't ignore it, so handle as a dataclass but ignore it.
journald is only present with systemd. syslog is way more widespread. If we don't use any specific journald features, there is no reason to require an external dependency. I'd like the behaviour to remain the same: always log to syslog, and log to terminal if it's running in a terminal. No extra option should be required just to switch to the logging module |
Ignore these errors: - E501 line too long - W504 line break after binary operator
I fixed tests, maybe you can help me to change packaging? |
Hello, thanks for this. I'm going to have to ask you to split this into multiple pull requests, "title and phone in profiles" should not be in the same as "coloured logs". After that I can review/merge/reject on the changes. |
If it's easier for you you can just post the pull requests one by one, if the later commits are already based on the previous ones. |
Ok, but it'll be complicated if you require to edit a commit or to reject ones. |
I can either reject the whole thing or review and decide case by case though… as it is, there could be anything in there. |
Done. |
Maybe, before reviewing separate PR or commit, pull all commits and read the whole code. |
Ok I don't care to be merged into your repository, I maintain my own fork. Bye. |
As it is, the whole code, can't be merged and has several issues. Since you put everything into one single branch, the issues are too many to even list all of them. Having separate independent branches would have made it possible to comment on the issues.
Ok. No problem. |
New features:
gethostname
for server name and user hostnamesRPL_AWAY
message--thread-replies
parameter to display thread answers in IM/channels instead of creating a new channel/me
messagesUSERHOST
displays away/admin flagsCAP
command (currently empty)JOIN :
command sent by recent irssi versions during connection (I don't know why, but if it doesn't get the right answer it freezes)MODE
with parameters to display an errorMODE +b
to display an emply banlistWHOWAS
Internal changes:
localslackirc
module (requires to usepython -m localslackirc
to run it locally, it will need to change packaging to create alocalslackirc
script)irc.py
intodaemon.py
andirc.py
logging
module instead of syslog