-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Feature request: Support for Python 2.x #38
Comments
I had a look at this just now, and have committed a minimal working version into the python2 branch. You will need to install dependencies manually: python -m pip install configobj cryptography pillow pystray pywebview==2.4 timeago aenum pathlib2 configparser2 future For macOS I also had to work around a dependency issue with pystray: python -m pip install pyobjc-framework-Quartz
python -m pip install --no-deps pystray Many aspects of the proxy will probably not work with this version, and most of it is completely untested. A major issue is that the authentication popup (and also the local server auth option) do not work. However, by copying an existing configuration file that was already authenticated, I was able to get the proxy to log in to a Gmail account using Python 2.7. I don't use Python 2, and am unlikely to have time to work on this any more, but it should be a good enough starting point to get things working. I'm happy to incorporate improvements too of course. |
@simonrob FWIW, I used to maintain python 2.7 compatibility for my packages but I was persuaded by python3statement.org that the time has come where as a project maintainer I shouldn't expend effort on Python 2.7 support anymore. |
I would normally agree, but given that the whole purpose of this project is to support clients/apps that have been obsoleted or made more challenging to use by the imposition of OAuth I'm inclined to be a little more accommodating here. Still, I don't intend to put much (if any) more effort into supporting Python 2 - the branch discussed here should be enough to use an account that has already been authenticated elsewhere via the proxy. |
I've just updated this branch to fix the authorisation window popup and update Local server auth mode and secure local connections (and connections to servers for which you don't have up-to-date certificates) will definitely not work. The same applies for any of the less essential features I haven't tested, such as starting at login, and full multi-platform support. I'd be interested to hear how you get on. |
Thank you very much! I will report how the program works with Python 2 + Windows XP as soon as I test it - probably on tuesday or wednesday. |
Hi, I finally tested the Python2 branch on Windows XP SP2 computer and I am getting this error:
|
Please could you post the output of |
These are the packages installed yesterday from
|
Thanks. Do you still get this issue if you upgrade pystray? ( |
That updated
|
Ok - for the time being the proxy's GUI will not work until this is resolved, but you could try non-GUI mode with the local server auth option and see whether it works that way? (See this comment for instructions.) |
...actually, ignore that - I forgot that local server auth mode will not work with Python 2. Next time I have access to an old Windows environment I'll take a look. |
Maybe I've solved the problem with According to this and this There is this code in
As a workaround I just commented out that code and the problem seems to be solved but the next problem is now:
BTW, in the meantime I uninstalled and reinstalled |
Proxy did run with
I was using
Then I tried
I am not sure if that is related with this problem. As for the GUI, after reading this anwser I solved the problem with
for which I still didn't find a solution. |
I had another quick look at this, and wondered whether it wouldn't just be simpler to install Python 3.x? The latest version officially supported on Windows XP is 3.4, but there is a custom version of 3.6.15 as well. Would this be an easier route to allowing use of the proxy on this system? |
I tried this branch in a Windows XP (SP3) virtual machine with Python 2.7.18 just now. After a bit of tweaking of both code and requirements I was able to get the proxy working, and successfully retrieved email from both O365 and Gmail. The proxy's system tray aspect mostly works (the icon is incorrect, but the menu does show). As previously mentioned, authentication via the proxy's inbuilt popup window does not work, and having looked a little further there is essentially zero chance of getting this working without significant effort. However, importing a configuration file from another device that has already authenticated works well. You can also use the 8b3323f has all the changes I made in order to get all this working (mostly just different dependency versions). This works around almost all of the issues you mentioned, but I also had to make a change to the pystray code in a similar way to yours – this is far harder to fix in the proxy itself, so it's easier just to make an edit to the imported module. I also had install all of the files in this repository to fix certificate errors. Of course, I was happy to install arbitrary updates/registry files in a virtual machine, but you might be less willing. Your call, but I'd be interested to hear whether this works for you. |
I'm going to close this issue for now, but the python2 branch will remain available with partial support as discussed above. Feel free to reopen if you make any further progress here. |
I am opening an issue upon this suggestion by Email OAuth 2.0 Proxy author @simonrob from issue #34 thread where I asked this question:
and the suggestion by author was:
I am sure there will be many more use-cases for running Email OAuth 2.0 Proxy with Python 2.x
The text was updated successfully, but these errors were encountered: