-
Notifications
You must be signed in to change notification settings - Fork 2
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
Updated to *isort 5.9.3* #2
Conversation
… compatible with older versions of *Sublime Text* that have *Python 3.3*
@stevenxxiu Have you gotten any response from the current repo managers on this PR? Very useful improvement indeed, I am hoping this could be merged! |
Thanks. I haven't got any response yet, as you can see here. Yes I've been using this for some time and it works fine for me. You can report back any issues here. Note that as stated in a commit, this requires Sublime Text 4, as isort 5.9.3 isn't compatible with Sublime Text's Python 3.3. |
Thanks @stevenxxiu - I am wondering how exactly I should go about swapping the old isort with your new sublime-isort version? Here's what I have done (on my Ubuntu system), but was unsuccessful in getting it to work (I'm sure I am missing something stupid on my side):
I have been using the following settings with the old isort in
Let me know your thoughts on this, and thanks in advance for your help! |
Try to change the name of the package folder first, as I mentioned in this PR. That's important in order to avoid an import conflict. Rename the folder to say |
I see, but calling it in |
Well that should be fine. Test it out and see if your options work. |
Hmm, that doesn't seem to work unfortunately :( If it is ok with you, will you be able to share the way you use isort in your sublime project with me? Then I can probably extrapolate to see what works in my situation. Also, the settings to be used with isort in the old version were defined here: https://github.com/asfaltboy/sublime-text-isort-plugin/blob/master/isort/main.py#L175 . Is there something equivalent in the new code (if yes, could you point me to it) or does the new code just follow the command line arguments for isort 5.9.3? |
I have in my project folder an
You need to restart Sublime Text upon updating this. |
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.
My bad for replying late, I have missed it in my GitHub notifications (I have just seen it now because @nk9 emailed me).
Thanks for contributing a PR, I've got a few questions about it:
- Version 5.9.3 on PyPi does not support python 3.3; though, I don't know for certain whether isort is (or it's deps are) backward compatible with 3.3. Has anyone tested this branch on ST3 to see if it still works?
- Could you kindly clarify what you mean by?:
I think you will need to rename this package, perhaps to Sublime Isort.
Note: I have been using the plugin myself in ST4 without any particular problems. I think because Sublime loads it with its python 3.3 compatibility layer on startup:
reloading python 3.3 plugin isort.argparse
reloading python 3.3 plugin isort.isort_file
Perhaps we could ship this change for ST4 only, under a sub-dir?
@@ -0,0 +1,8 @@ | |||
# Default ignored files |
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.
We don't want the .idea
folder committed to git.
For easier exclusion, you may want to ignore the .idea
folder in your global .gitignore
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.
Sure I can do that, if we get the other problems solved. I just thought this was abandoned, so that's why I commited my .idea/
folders.
Globally though this is useful to me.
isort · PyPI says it requires Python 3.6+. I did run it with Python 3.3 once, and it didn't work at all. This is why I added the
Sublime Text 4 is required due to the Python version requirement above, so it makes more sense to just break incompatability with Sublime Text 3. Sublime Text 3 users can use the old version.
Is this for my branch? I had import conflicts and wasn't able to get it to work. |
Would love to be using this on ST4. Is anything preventing this PR from being accepted at this point? |
I'm keen on not braking things for current users. How about we tag the st3- version, then update the repo with a compatibility mapping, as described in package_control release docs? If we can agree on a release strategy (and clean up anything not relating to isort in the PR changes), then I don't see any reason not to merge this. |
I'm guessing that file isn't in this repository? I moved this PR to #3, so it excludes the PyCharm files. Lets discuss it there. |
This updates to the latest isort 5.9.3. There are many changes in isort that make this worthwhile.
I updated the API as well.
isort
's own internal imports conflict with the name of this package. I don't really see ways around this.I think you will need to rename this package, perhaps to Sublime Isort.