Open yjqiang opened 6 years ago
use python2 and edit some line in 'git.py'.
modify 'urlparse.urlparse(...)' to 'urlparse(...)' (modify 'urlparse.urlunparse(...)' too)
import 'urlunparse' from 'six.moves.urllib.parse'
delete 'config.write_to_path()' from 'get_config_or_prompt()'
@l1m0n3 Thanks. But I want to keep this issue open since it looks like this project will abandon python2. So I think it is a bug for python3 user.
Unfortunately, some libraries are not compatible with python3... So its kind of hard to fix it :(
since it looks like this project will abandon python2
It is unlikely that we abandon python2 anytime soon. There is simply no reason to do so. The only reason we may have sometime in the future to abandon python2 would be if pythonista stopped supporting python2.
Yes, it is a problem for this python 3 user ;-) (Note the app is called "Pythonista 3" on the apple store.) Is there an alternate way to clone a git repo into pythonista using StaSh, or otherwise?
Are other packages required: there was also a "dulwich" requirement to run git: Installing StaSh on an iPhone 6s I get the same startup messages as the OP, but then typing [~/Documents]$ git Produces: dulwich was not found. Will attempt to download. ... [y/n]? y which, as with OP above, ends with: stash: <class 'ModuleNotFoundError'>: No module named 'urlparse'
@dan3dewey Well, you can still run StaSh in python2 (works also in pythonista 3) until git is ported. You could even run a py2 StaSh-instance and a py3 StaSh-instance next to each other at the same time, so you could use 'git' in py2 StaSh and do your py3 work in the py3 StaSh instance.
@bennr01 Yes, that works fine - thanks.
@l1m0n3 thanks, your edits made git push work with py2. @ywangd will you make these changes part of StaSh?
Is there a fix for it yet on Pythonista 3?
Is there a fix for it yet on Pythonista 3?
Not yet for now. You should use python2 to run stash. Or if you just want to clone it, you can use wget.
thanks
Could we please fix our git dependencies to work on Python instead of requiring StaSH to run on legacy Python? https://github.com/jsbain/gittle seems to be many commits behind the Python 3 changes to its upstream. 213 days until Python 2 end of life.
Could we please fix our git dependencies to work on Python instead of requiring StaSH to run on legacy Python? https://github.com/jsbain/gittle Seems to be many commits behind the Python 3 changes to its upstream. 213 days until Python 2 end of life.
What exactly do you mean? Are you proposing that we should completeley drop py2 and only focus on py3? I dont think that would be a good idea. Before we should discontinue support for py2, we should have at least one version of StaSh supporting both py2 and py3, otherwise we create some sort of frankenstein monster which neither runs on py2 nor py3 correctly.
If you mean we should just switch to mainstream gittle
then i support that idea. I have experimented with porting git
to py3 a few times and it seems that using pip install <dependencies here>
for dependency installation would fix a few things.
Honestly i think git
does need a complete rewrite, but that would be a ton of work. IIRC dulwich.porcelain
could largely replace gittle
, but last time i checked (~half a year ago), it was still missing some important features regarding remote, merge and status. If anyone is interested, i still have code from an old attempt for a complete rewrite somewhere in my files.
I am fine with 2+3 but at a minimum, StaSH git should work on Python 3.
There are many things like basestring and urlparse. Even I fixed this, then I got KeyError "thin-pack".
Okey, with python 2 now officially dead, how's it going?
Okey, with python 2 now officially dead, how's it going?
But python is still supported on pythonista. And we don’t know what’s omz’s plan about this.
@luckydonald unfortunately the reality is, sometimes py2 is still dead required
Py2 is still required on iOS?
@cclauss i have no affiliation with this repo (just bookmarked this issue since it comes up often), and idk much about iOS Py2 programming, but I use an amazing package called pwntools
, and it pretty much requires Py2. The sooner we move on to Py3, the sooner we will live the up-to-date programming life
These repos WANT to be on Python 2... pwntools: https://github.com/Gallopsled/pwntools/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed pupy: https://github.com/n1nj4sec/pupy/pulls?q=is%3Apr+author%3Acclauss+is%3Aclosed
StaSh v0.7.0 on python 3.6.1 Warning: you are running StaSh in python3. Some commands may not work correctly in python3. Please help us improving StaSh by reporting bugs on github. Tip: Use mc to access files in your Dropbox or on a FTP-Server [~/Documents]$ git Opening: https://github.com/jsbain/gittle/archive/master.zip
Save as: /private/var/mobile/Containers/Data/Application/****/tmp//gittle.zip (??? bytes) 28334 Opening: https://github.com/FriendCode/funky/archive/master.zip
Save as: /private/var/mobile/Containers/Data/Application/****/tmp//funky.zip (??? bytes) 8474 stash: <class 'ModuleNotFoundError'>: No module named 'urlparse'
[~/Documents]$