clemos / haxe-sublime-bundle

Sublime Text bundle for Haxe programming language
Apache License 2.0
235 stars 86 forks source link

Broken in ST4 #278

Closed rwols closed 3 years ago

rwols commented 3 years ago

This package doesn't work anymore in ST4. The following diff makes it start:

diff --git a/.python-version b/.python-version
new file mode 100644
index 0000000..cc1923a
--- /dev/null
+++ b/.python-version
@@ -0,0 +1 @@
+3.8
diff --git a/HaxeComplete.py b/HaxeComplete.py
index b7fd051..5323682 100644
--- a/HaxeComplete.py
+++ b/HaxeComplete.py
@@ -73,7 +73,7 @@ except (AttributeError):
 # For parsing xml

 from xml.etree import ElementTree
-from xml.etree.ElementTree import XMLTreeBuilder
+from xml.etree.ElementTree import TreeBuilder as XMLTreeBuilder

 try :
     from elementtree import SimpleXMLTreeBuilder # part of your codebase

Consider patching it with this diff.

Lbones-ai commented 3 years ago

hey man, I've made the pull up request for HaxeComplete.py, but how do you change the python version? I'm a bit out of my depth here

clemos commented 3 years ago

Hi :wave: Can you please file a PR with the .python-version file ? The rest has already been merged as per https://github.com/clemos/haxe-sublime-bundle/pull/277 Thanks :pray: :)

rwols commented 3 years ago

You can copy the above diff to a file and use something like git apply path/to/patch.file.

Can you please file a PR with the .python-version file ?

That would require me to fork this entire repo, a simple patch would suffice no? Though I've see you've already committed 0dccea21ee890b0c266a231defc6f258453ed4d6. I don't know if that would work in the python 3.3 runtime.

But it's as simple as creating a .python-version file with content 3.8.

https://www.sublimetext.com/docs/api_environments.html

clemos commented 3 years ago

Alright, I did it directly through github https://github.com/clemos/haxe-sublime-bundle/commit/4455bd1375d831532b6b43d6ef7d13bbeee26715 Let me know if it fixes your issues :ok_hand:

rwols commented 3 years ago

Alright, I did it directly through github

Err... What if my patch doesn't work at all? Please verify locally.

clemos commented 3 years ago

:ok_hand:

rwols commented 3 years ago

Note that this package is still a branch-based entry in package_control_channel; so all ST3 users are getting this modification immediately. While the .python-version file for those users is harmless, make sure the modified import works for ST3 as well.