-
Notifications
You must be signed in to change notification settings - Fork 6
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
Rebase with Upstream and Port to Python3 #7
Conversation
constantly source rebasing with https://github.com/twisted/constantly
incremental source rebasing with https://github.com/twisted/incremental
twisted source rebasing with https://github.com/twisted/twisted
Zope source rebasing with https://github.com/zopefoundation/zope.interface
Nice; will review it now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewing is tedious, 555 files from the last two commits. Some minor corrections; Will update you with sugar testing
I now found out that we don't need to do this. It will get install when we run - |
Can we depend on distribution specific this will probably reduce the work to be done. for example as has been done with Box2D in |
This comment has been minimized.
This comment has been minimized.
Yeah it is probably a good thing to be done. If others agree I will do that as well.
Yes I tried to join with Polari. |
It is currently very buggy, the UI is better than IRC activity though; I can get to the UI, but can do nothing; Getting lots of repeated errors
Its possible that some files used within is buggy or is a escape character; probably it was not encoded in the proper charset |
The error is in while irc.py inside twisted, seems like after port to python3 because all strings are stored as Unicode in an instance of the str type, there can be bugs in twisted. |
Ok, I am not spamming #sugar any more;
Twisted is a good repository, and maintained. If there was an error, it should have been found out before. It seems like correct data types were not passed as parameters. It will require advance debugging however Btw, there is a typo in PR title |
Yeah possible, I agree with you , It would need debugging of source code. |
@Saumya-Mishra9129 said
Yeah I agree, use distro specific packages where possible. In Didn't review cd8a53e...5814bac as I can't properly view the diff of the aggregate change. |
support the use of distro specific packages
It is done.@chimosky Please review.
I am not able to get the cause of this error. @quozl can you look once. |
What do you need for the UnicodeDecodeError? Are all the source files UTF-8 encoded, and do they contain only UTF-8? |
80869c5
to
a581573
Compare
Fixes error seen while making connection. while sending a line , it takes channel as an encoded object. Unhandled Error Traceback (most recent call last): File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 103, in callWithLogger return callWithContext({"system": lp}, func, *args, **kw) File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 86, in callWithContext return context.call({ILogContext: newCtx}, func, *args, **kw) File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext return func(*args,**kw) --- <exception caught here> --- File "/usr/lib/python3/dist-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite why = selectable.doRead() File "/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 243, in doRead return self._dataReceived(data) File "/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 249, in _dataReceived rval = self.protocol.dataReceived(data) File "/usr/lib/python3/dist-packages/twisted/words/protocols/irc.py", line 2631, in dataReceived basic.LineReceiver.dataReceived(self, data) File "/usr/lib/python3/dist-packages/twisted/protocols/basic.py", line 572, in dataReceived why = self.lineReceived(line) File "/usr/lib/python3/dist-packages/twisted/words/protocols/irc.py", line 2637, in lineReceived line = line.decode("utf-8") builtins.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 121: invalid continuation byte Tested with Ubuntu 20.04 and sucrose version 0.117
Update - UnicodeDecodeError is fixed in d4b7c80. I have tested also works fine. @chimosky @srevinsaju @quozl Please Review. |
Thanks. Fixes #6 Polari upstream has changed from Python to JavaScript. But this code remains Python. When you say you rebased with upstream, what did you do? Reviewed. Prepared a diffstat. Most of the change is to remove the embedded twisted, which is good. Tested. Speaking on #sugar without registration gives no message. A message is sent to the client by the server but is not displayed. |
By rebasing with upstream I thought of rebasing libraries used ( twisted , zope, incremental and constantly) with their upstream sources. So I first did that, but then @chimosky suggested to use distro specific twisted ,which I have done later. Next step would be now to rebase with Polari upstream now probably?? |
I see, thanks. Our toolkit doesn't have support for JavaScript GObject Introspection apps, so rebasing Polari itself would be a major undertaking requiring new toolkit code as well. I don't think we need that yet. But you might check for changes to Polari between the time this source code was copied and before they switched to JavaScript. That could be a separate pull request though. |
Thanks, for Polari source code, I couldn't find source code which was related to Python3 and also that's so old also.
Thanks I will make a different one. Until then you can merge these changes. |
I've checked again, and I no longer think this activity has any association with the GNOME Polari app. Polari activity is an independent implementation using Twisted, and the name is coincidental. |
Twisted uses a module named 'attr' which I couldn't find in sugar . So I installed it manually using pip (apt-get didn't work) with following command-
sudo pip install attrs
Also we need to install OpenSSL with
sudo apt-get install python3-openssl
to get it working.@chimosky @quozl @srevinsaju Please Review.