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

fix: SublimeText 2 load of util #6

Merged
merged 1 commit into from
Jul 25, 2013
Merged

Conversation

Iristyle
Copy link
Contributor

Util.py was not loading with the following error:

Writing file /C/Users/Parity/AppData/Roaming/Sublime Text 2/Packages/OpenSearchResult/open_search_result.py with encoding UTF-8
Reloading plugin C:\Users\Parity\AppData\Roaming\Sublime Text 2\Packages\OpenSearchResult\open_search_result.py
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 62, in reload_plugin
    m = imp.load_module(modulename, *m_info)
  File ".\open_search_result.py", line 3, in <module>
    from .util import parse_line_number, is_file_path
ValueError: Attempted relative import in non-package

I have not verified this also works in ST3 -- but before pulling, you should do that.

@abrookins
Copy link
Owner

Thanks. It appears Python 3 deprecated implicit relative imports, so
I'll need to do some fiddling to get imports to work in both ST 2 and
ST 3.

As it stands, this patch will drop ST 3 support. ST 3 is in public
beta now, if you're interested in taking a look at the issue.

If not, I'm a bit swamped right now but will try to get to it soon.

On Tue, Jul 16, 2013 at 9:17 AM, Ethan J. Brown
notifications@github.com wrote:

Util.py was not loading with the following error:

Writing file /C/Users/Parity/AppData/Roaming/Sublime Text
2/Packages/OpenSearchResult/open_search_result.py with encoding UTF-8
Reloading plugin C:\Users\Parity\AppData\Roaming\Sublime Text
2\Packages\OpenSearchResult\open_search_result.py
Traceback (most recent call last):
File ".\sublime_plugin.py", line 62, in reload_plugin
m = imp.load_module(modulename, *m_info)
File ".\open_search_result.py", line 3, in
from .util import parse_line_number, is_file_path
ValueError: Attempted relative import in non-package

I have not verified this also works in ST3 -- but before pulling, you should
do that.


You can merge this Pull Request by running

git pull https://github.com/Iristyle/OpenSearchResult patch-2

Or view, comment on, or merge it at:

#6

Commit Summary

fix: SublimeText 2 load of util

File Changes

M open_search_result.py (2)

Patch Links:

https://github.com/abrookins/OpenSearchResult/pull/6.patch
https://github.com/abrookins/OpenSearchResult/pull/6.diff

@Iristyle
Copy link
Contributor Author

No worries... Will see if I can learn enough python to fix it.

I'm a licensed sublime user, so I've had st3 installed for a while, but all
the plugins I use weren't ported yet, so was stuck on 2.

When I get home, will see if this is applicable ...

http://stackoverflow.com/questions/1875259/importing-a-module-based-on-installed-python-version

-e
On Jul 21, 2013 4:57 AM, "Andrew Brookins" notifications@github.com wrote:

Thanks. It appears Python 3 deprecated implicit relative imports, so
I'll need to do some fiddling to get imports to work in both ST 2 and
ST 3.

As it stands, this patch will drop ST 3 support. ST 3 is in public
beta now, if you're interested in taking a look at the issue.

If not, I'm a bit swamped right now but will try to get to it soon.

On Tue, Jul 16, 2013 at 9:17 AM, Ethan J. Brown
notifications@github.com wrote:

Util.py was not loading with the following error:

Writing file /C/Users/Parity/AppData/Roaming/Sublime Text
2/Packages/OpenSearchResult/open_search_result.py with encoding UTF-8
Reloading plugin C:\Users\Parity\AppData\Roaming\Sublime Text
2\Packages\OpenSearchResult\open_search_result.py
Traceback (most recent call last):
File ".\sublime_plugin.py", line 62, in reload_plugin
m = imp.load_module(modulename, *m_info)
File ".\open_search_result.py", line 3, in
from .util import parse_line_number, is_file_path
ValueError: Attempted relative import in non-package

I have not verified this also works in ST3 -- but before pulling, you
should
do that.


You can merge this Pull Request by running

git pull https://github.com/Iristyle/OpenSearchResult patch-2

Or view, comment on, or merge it at:

#6

Commit Summary

fix: SublimeText 2 load of util

File Changes

M open_search_result.py (2)

Patch Links:

https://github.com/abrookins/OpenSearchResult/pull/6.patch
https://github.com/abrookins/OpenSearchResult/pull/6.diff


Reply to this email directly or view it on GitHubhttps://github.com//pull/6#issuecomment-21307135
.

util was not loading with the following error:

Writing file /C/Users/Parity/AppData/Roaming/Sublime Text 2/Packages/OpenSearchResult/open_search_result.py with encoding UTF-8
Reloading plugin C:\Users\Parity\AppData\Roaming\Sublime Text 2\Packages\OpenSearchResult\open_search_result.py
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 62, in reload_plugin
    m = imp.load_module(modulename, *m_info)
  File ".\open_search_result.py", line 3, in <module>
    from .util import parse_line_number, is_file_path
ValueError: Attempted relative import in non-package
@Iristyle
Copy link
Contributor Author

FYI -- I think this should do the trick on the import....

@Iristyle
Copy link
Contributor Author

I just verified in ST3 as well -- no problemo -- works like a charm.

@abrookins
Copy link
Owner

Thanks! I appreciate you looking into this.

abrookins added a commit that referenced this pull request Jul 25, 2013
fix: SublimeText 2 load of util
@abrookins abrookins merged commit 497b197 into abrookins:master Jul 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants