-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Cleanup unconditional imports #1753
Conversation
This may aid Gallopsled#1725
@@ -1,19 +1,5 @@ | |||
from __future__ import absolute_import | |||
|
|||
from pwnlib.util import crc |
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.
It seems that this will break import pwnlib.util
and then doing e.g. pwnlib.util.cyclic.xyz
, no?
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.
Yes, it will. But!
But this removal saves us partially from the hell of circular imports. Like when pwnlib.xyz
uses pwnlib.util.misc
, but pwnlib.util.fiddling
uses pwnlib.xyz
, this is not a circular import normally, but all those imports here make it such if from . import fiddling
is before from . import misc
. And this sometimes depends on the order of imports elsewhere. So I decided that we can sacrifice convenience in favor of flexibility here.
pwnlib/gdb.py
Outdated
@@ -1009,6 +1006,9 @@ def preexec_fn(): | |||
|
|||
if api: | |||
# connect to the GDB Python API bridge | |||
from rpyc import BgServingThread |
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.
👍
XXX: see why this matters
This may aid #1725