sympy-live icon indicating copy to clipboard operation
sympy-live copied to clipboard

Python 3 support

Open asmeurer opened this issue 5 years ago • 15 comments

We need to figure out how to get SymPy Live to support Python 3. I saw https://stackoverflow.com/questions/24229203/does-google-app-engine-support-python-3 but I couldn't figure out how to get it working.

SymPy will drop Python 2 support at the end of 2019, so we won't be able to update SymPy Live after that unless we get Python 3 working.

asmeurer avatar Jul 30 '18 21:07 asmeurer

Hey Can I take this. is it resolved.

thefreakingmind avatar Jan 26 '19 04:01 thefreakingmind

No it hasn't been fixed yet.

asmeurer avatar Jan 27 '19 02:01 asmeurer

is it fixed?

james-n-007 avatar Jan 17 '20 07:01 james-n-007

@asmeurer @oscarbenjamin I want to work on this issue

prshnt19 avatar Jan 26 '20 19:01 prshnt19

@asmeurer @oscarbenjamin I have made some changes and now SymPy Live supports Python3. I made it run on my localhost. I wanted to discuss about where to host it because the changes I made are very significant. Link: http://160.50.70.34.bc.googleusercontent.com/ Id: test pass: test9876

prshnt19 avatar Feb 24 '20 07:02 prshnt19

Is it based on the changes here? I would start a pull request here. Even if there are a lot of changes, that is the best way to discuss them.

I played with your test instance a bit and it seems like quite a few things are broken. What I found so far

  • import sys does not work
  • x = 1 followed by x gives x.

asmeurer avatar Feb 24 '20 20:02 asmeurer

As python2 is not supported anymore and to use python3 on google AppEngine, we need to use a web framework, and I think Django will be better than Flask. I have deployed many web apps and have good experience in the same. I think using GoogleCompute Engine instead of AppEngine is better as it is more flexible and economic. I have been working on this for 15 days. I have used function-based views in Django and used inbuilt Django sessions for storing statements. It could be extended to sympy-gamma also. These changes may contain many bugs and work is still in progress. For now, I have fixed the import issue. Will work on the x=1 issue. I will make a PR as soon as I fix it.

But there is an issue. PR made by me will not get reflected on the simpy-live because it is hosted on AppEngine and my changes are for ComputeEngine. The reason for using ComputeEngine is mentioned at [Discussion] GSOC 2020: Python3 support for sympy-live. Need to know what platform we are going to use.

Thanks

prshnt19 avatar Feb 24 '20 21:02 prshnt19

Even if there is a significant rewrite we should keep the code in this repository. So even if there are a lot of changes it's good to do it in this repo and make a PR there. We can worry about deploying it later.

asmeurer avatar Feb 24 '20 21:02 asmeurer

Ok sure. I will make a PR.

prshnt19 avatar Feb 24 '20 21:02 prshnt19

ping @asmeurer

prshnt19 avatar Mar 04 '20 08:03 prshnt19

@asmeurer @certik what is the current progress of this issue?

evan0greenup avatar Oct 12 '21 22:10 evan0greenup

I don't know what the progress is.

certik avatar Oct 12 '21 22:10 certik

@certik frankly speaking, if the online sympy shell can upgrade to Python 3 , and the sympy version can always stick to master branch daily. It would be really awesome.

In the classroom or laboratory, user have no administrator or superuser privilege, They can not install sympy locally, the online shell is essential to them.

What is the major difficulties to upgrade online shell?

evan0greenup avatar Oct 12 '21 22:10 evan0greenup

You have to ask @asmeurer or @oscarbenjamin. I am not involved with the sympy-live much.

certik avatar Oct 12 '21 22:10 certik

What is the major difficulties to upgrade online shell?

The major difficulty is that most of us are not web developers.

oscarbenjamin avatar Oct 13 '21 19:10 oscarbenjamin