lopq icon indicating copy to clipboard operation
lopq copied to clipboard

[MRG] Fix relative imports & improve package discovery

Open mohamed-ali opened this issue 5 years ago • 4 comments

Fixes #20.

As described in pep-0404:

In Python 3, implicit relative imports within packages are no longer available - only absolute imports and explicit relative imports are supported.

The solution to the recent import problems, that is compatible with both python2 and python3 is to use explicit relative import.

A more thorough discussion about this subject can be found here.

This PR:

  • [x] Fixes the above import problem.
  • [x] Improves package discovery.

mohamed-ali avatar Apr 10 '19 13:04 mohamed-ali

Thank you for submitting this pull request, however I do not see a valid CLA on file for you. Before we can merge this request please visit https://yahoocla.herokuapp.com/ and agree to the terms. Thanks! :smile:

yahoocla avatar Apr 10 '19 13:04 yahoocla

CLA signed.

mohamed-ali avatar Apr 10 '19 13:04 mohamed-ali

Coverage Status

Coverage remained the same at 88.443% when pulling 1f5834d2595275642d867c43247de697a7f210e3 on mohamed-ali:fix-relative-imports into 0f17655b901e6dfabe5c2aa62b4c8e492f34b05a on yahoo:master.

coveralls avatar Apr 10 '19 13:04 coveralls

@pumpikano could you have a look at this PR, it fixes the import problem in python3 and is compatible with both python2 & 3.

mohamed-ali avatar Apr 11 '19 14:04 mohamed-ali