Python3 port for protocol.py & test_protocol.py#1786
Conversation
b6df0f8 to
6d88130
Compare
5ec2ffc to
c83bb1e
Compare
|
Why are you turning the code into the Ramen? Where are you tests? You should write new tests before editing the code. |
| from . import pyelliptic | ||
| from .bmconfigparser import BMConfigParser | ||
| from .pyelliptic import OpenSSL | ||
| from .pyelliptic import arithmetic as a |
There was a problem hiding this comment.
Note that pyelliptic may eventually become a separate package
| except ImportError: | ||
| from . import defaults | ||
| from . import highlevelcrypto | ||
| from . import state |
There was a problem hiding this comment.
These imports merge:
from . import defaults, highlevelcrypto, stateThere was a problem hiding this comment.
That leads to Code quality error: Pylint E401 multiple imports on one line
There was a problem hiding this comment.
No, it's the same as from addresses import ... above.
There was a problem hiding this comment.
Yes, because it's from the same module addresses but when importing different modules keeping them separate is best practice as per https://www.python.org/dev/peps/pep-0008/#imports
Also, I tried what you mentioned I got Pylint E401 multiple imports on one line
There was a problem hiding this comment.
. is an abbrev to pybitmessage (i.e. this package) in this case. But in any case, you don't need theses try: import .. except: at all.
There was a problem hiding this comment.
Yes, understood. Saw your comment on #1792. I'm making those changes.
There was a problem hiding this comment.
The proper change is to revert this all together. Did you try to rebase?
There was a problem hiding this comment.
... and it's still failing, and my #1788 passes with no pasta
Oh, it's the same as mine: https://buildbot.bitmessage.org/#/builders/23/builds/1357/steps/8/logs/stdio
I separated it in 94082ab.
335a671 to
9757758
Compare
|
Closing, Fixed via #1792 |
Ported protocol.py & test_protocol.py
-> Resolved import errors
-> Fixed encoding/decoding issues
-> Python 2/3 compatibility