Skip to content
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

Import localpaths in every __init__ at top of packages in tools/ #10801

Closed
jdm opened this issue May 2, 2018 · 2 comments
Closed

Import localpaths in every __init__ at top of packages in tools/ #10801

jdm opened this issue May 2, 2018 · 2 comments
Assignees
Labels

Comments

@jdm
Copy link
Contributor

jdm commented May 2, 2018

dfeea56#diff-91a3a73ee529ef6adddf10e2e1d045afR16 broke Servo's manifest update tools with this error:

Traceback (most recent call last):
  File "./mach", line 93, in <module>
    main(sys.argv)
  File "./mach", line 23, in main
    mach = mach_bootstrap.bootstrap(topdir)
  File "/Users/servo/buildbot/slave/mac-nightly/build/python/mach_bootstrap.py", line 291, in bootstrap
    mach.load_commands_from_file(os.path.join(topdir, path))
  File "/Users/servo/buildbot/slave/mac-nightly/build/python/_virtualenv/lib/python2.7/site-packages/mach/main.py", line 265, in load_commands_from_file
    imp.load_source(module_name, path)
  File "/Users/servo/buildbot/slave/mac-nightly/build/python/servo/testing_commands.py", line 42, in <module>
    from update import updatecommandline
  File "/Users/servo/buildbot/slave/mac-nightly/build/tests/wpt/update/__init__.py", line 18, in <module>
    from wptrunner.update import setup_logging, WPTUpdate
  File "/Users/servo/buildbot/slave/mac-nightly/build/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/update/__init__.py", line 8, in <module>
    from update import WPTUpdate
  File "/Users/servo/buildbot/slave/mac-nightly/build/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/update/update.py", line 8, in <module>
    from .. import environment as env
  File "/Users/servo/buildbot/slave/mac-nightly/build/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/environment.py", line 12, in <module>
    from wptserve.handlers import StringHandler
  File "/Users/servo/buildbot/slave/mac-nightly/build/tests/wpt/web-platform-tests/tools/wptserve/wptserve/__init__.py", line 1, in <module>
    from .server import WebTestHttpd, WebTestServer, Router  # noqa: F401
  File "/Users/servo/buildbot/slave/mac-nightly/build/tests/wpt/web-platform-tests/tools/wptserve/wptserve/server.py", line 16, in <module>
    from .config import Config
  File "/Users/servo/buildbot/slave/mac-nightly/build/tests/wpt/web-platform-tests/tools/wptserve/wptserve/config.py", line 7, in <module>
    import sslutils
ImportError: No module named sslutils

I fixed it locally by adding the tools directory to the import path in our local code before importing from wptrunner, but it would be nice to not keep encountering problems like this.

@foolip
Copy link
Member

foolip commented May 8, 2018

@gsnedders this is marked urgent and assigned to you. Is it really urgent?

@jgraham
Copy link
Contributor

jgraham commented May 9, 2018

It's no longer urgent, because #10850 landed which solves the underlying problem here. I am going to say that this is WONTFIX, in favour of reducing our dependence on localpaths (e.g. via #10888)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants