My name is Sanjeet Bhatti and I am an MSc. student in Computer Science
from University of Saskatchewan, Canada. I was going through the list
of GSOC project ideas of GRASS GIS and I found one that caught my
interest: "Full support of Python 3 in GRASS GIS".
I am familiar with python programming as well as have a basic
understanding of wxPython. Currently, I am setting up my development
environment by checking out the development branch (trunk) of GRASS 7
available at this link[0].
Are there any initial tasks that I should be doing apart from listing
the generally used solutions for migrating from Python 2 to 3? And,
where do I need to submit these?
On Tue, Feb 27, 2018 at 3:08 AM, Sanjeet <edu.sanjeet@gmail.com> wrote:
Hi,
My name is Sanjeet Bhatti and I am an MSc. student in Computer Science
from University of Saskatchewan, Canada. I was going through the list
of GSOC project ideas of GRASS GIS and I found one that caught my
interest: "Full support of Python 3 in GRASS GIS".
That's great and for sure an important topic to work on!
I am familiar with python programming as well as have a basic
understanding of wxPython. Currently, I am setting up my development
environment by checking out the development branch (trunk) of GRASS 7
available at this link[0].
Are there any initial tasks that I should be doing apart from listing
the generally used solutions for migrating from Python 2 to 3? And,
where do I need to submit these?
My name is Sanjeet Bhatti and I am an MSc. student in Computer Science
from University of Saskatchewan, Canada. I was going through the list
of GSOC project ideas of GRASS GIS and I found one that caught my
interest: “Full support of Python 3 in GRASS GIS”.
That’s great and for sure an important topic to work on!
I am familiar with python programming as well as have a basic
understanding of wxPython. Currently, I am setting up my development
environment by checking out the development branch (trunk) of GRASS 7
available at this link[0].
Are there any initial tasks that I should be doing apart from listing
the generally used solutions for migrating from Python 2 to 3? And,
where do I need to submit these?
→
In order to tolerate differences across platforms, all new code that needs to invoke the Python interpreter should not specify python, but rather should specify either python2 or python3 (or the more specific python2.x and python3.x versions; see the Migration Notes). This distinction should be made in shebangs, when invoking from a shell script, when invoking via the system() call, or when invoking in any other context.
←
… unless scripts are deliberately written to be source compatible with both Python 2.x and 3.x
Currently packagers replace python with python2 in the shebang of GRASS scripts.
Markus M
I suppose that more tickets should carry that keyword but they need to
be identified by scanning those with “python” keyword.
On Mon, Feb 26, 2018 at 9:08 PM, Sanjeet <edu.sanjeet@gmail.com> wrote:
Hi,
My name is Sanjeet Bhatti and I am an MSc. student in Computer Science
from University of Saskatchewan, Canada. I was going through the list
of GSOC project ideas of GRASS GIS and I found one that caught my
interest: "Full support of Python 3 in GRASS GIS".
I am familiar with python programming as well as have a basic
understanding of wxPython. Currently, I am setting up my development
environment by checking out the development branch (trunk) of GRASS 7
available at this link[0].
Are there any initial tasks that I should be doing apart from listing
the generally used solutions for migrating from Python 2 to 3? And,
where do I need to submit these?
I would leave that up to you, you can send it in email, post it on
your github or whatever seems convenient for you.
Regarding the GUI, you can look at this ticket: https://trac.osgeo.org/grass/ticket/3510
Basically, the GUI is mostly ported to work with wxPython4 (phoenix),
which is (unlike wxpython 3) Python 3 ready. So far we are running the
GUI on Python 2.7 only. There are some loose ends and depreciation
warnings, which would be nice to get rid of. Since we need to keep
backwards compatibility with wxpython 3, we wrapped some GUI classes
(gui/wxpython/gui_core/wrap.py), so you can start there. You need to
test your changes under both wxpython 3 and 4. Let me know if you need
more clarification. More info what is Attribute Table manager:
Basically, the GUI is mostly ported to work with wxPython4 (phoenix),
which is (unlike wxpython 3) Python 3 ready. So far we are running the
GUI on Python 2.7 only. There are some loose ends and depreciation
warnings, which would be nice to get rid of. Since we need to keep
backwards compatibility with wxpython 3, we wrapped some GUI classes
(gui/wxpython/gui_core/wrap.py), so you can start there. You need to
test your changes under both wxpython 3 and 4. Let me know if you need
more clarification. More info what is Attribute Table manager:
Meanwhile, I've setup my development environment and compiled the
source code. I did not see the warning messages when I opened the
Attribution Table Manager as mentioned in the ticket #3510 even when I
installed wxpython 4 (on system Ubuntu 16.04 with Python 2.7.x).
Is it supposed to be displaying in the console? Because I did not get
any warnings.
I even tried to set the g.gisenv set="DEBUG=5" to print the debugging
messages along with WX_DEBUG. Am I missing some step?
Basically, the GUI is mostly ported to work with wxPython4 (phoenix),
which is (unlike wxpython 3) Python 3 ready. So far we are running the
GUI on Python 2.7 only. There are some loose ends and depreciation
warnings, which would be nice to get rid of. Since we need to keep
backwards compatibility with wxpython 3, we wrapped some GUI classes
(gui/wxpython/gui_core/wrap.py), so you can start there. You need to
test your changes under both wxpython 3 and 4. Let me know if you need
more clarification. More info what is Attribute Table manager:
Meanwhile, I've setup my development environment and compiled the
source code. I did not see the warning messages when I opened the
Attribution Table Manager as mentioned in the ticket #3510 even when I
installed wxpython 4 (on system Ubuntu 16.04 with Python 2.7.x).
Is it supposed to be displaying in the console? Because I did not get
any warnings.
I even tried to set the g.gisenv set="DEBUG=5" to print the debugging
messages along with WX_DEBUG. Am I missing some step?
Look in the GUI console (second tab at the bottom in Layer Manager).
You can check if you are indeed running wxpython 4 easily from GUI, go
to Python tab and try:
On Mon, Mar 5, 2018 at 6:43 PM, Anna Petrášová <kratochanna@gmail.com> wrote:
Look in the GUI console (second tab at the bottom in Layer Manager).
You can check if you are indeed running wxpython 4 easily from GUI, go
to Python tab and try:
On Sat, Mar 3, 2018 at 10:50 PM, Anna Petrášová <kratochanna@gmail.com> wrote:
Basically, the GUI is mostly ported to work with wxPython4 (phoenix),
which is (unlike wxpython 3) Python 3 ready. So far we are running the
GUI on Python 2.7 only. There are some loose ends and depreciation
warnings, which would be nice to get rid of. Since we need to keep
backwards compatibility with wxpython 3, we wrapped some GUI classes
(gui/wxpython/gui_core/wrap.py), so you can start there. You need to
test your changes under both wxpython 3 and 4. Let me know if you need
more clarification. More info what is Attribute Table manager:
On Tue, Mar 6, 2018 at 5:37 AM, Sanjeet <edu.sanjeet@gmail.com> wrote:
On Sat, Mar 3, 2018 at 10:50 PM, Anna Petrášová <kratochanna@gmail.com>
wrote:
> Basically, the GUI is mostly ported to work with wxPython4 (phoenix),
> which is (unlike wxpython 3) Python 3 ready. So far we are running the
> GUI on Python 2.7 only. There are some loose ends and depreciation
> warnings, which would be nice to get rid of. Since we need to keep
> backwards compatibility with wxpython 3, we wrapped some GUI classes
> (gui/wxpython/gui_core/wrap.py), so you can start there. You need to
> test your changes under both wxpython 3 and 4. Let me know if you need
> more clarification. More info what is Attribute Table manager:
>
> https://grass.osgeo.org/grass75/manuals/wxGUI.dbmgr.html
> https://grasswiki.osgeo.org/wiki/WxGUI_Attribute_Table_Manager
Basically, the GUI is mostly ported to work with wxPython4 (phoenix),
which is (unlike wxpython 3) Python 3 ready. So far we are running the
GUI on Python 2.7 only. There are some loose ends and depreciation
warnings, which would be nice to get rid of. Since we need to keep
backwards compatibility with wxpython 3, we wrapped some GUI classes
(gui/wxpython/gui_core/wrap.py), so you can start there. You need to
test your changes under both wxpython 3 and 4. Let me know if you need
more clarification. More info what is Attribute Table manager:
__NOTE: This email correspondence and any attachments to and from this sender is subject to the Freedom of Information Act (FOIA) and may be disclosed to third parties.__
I'm waiting for 'mantra' to create the osgeo user id, so that I can
upload the patch file.
What's your username?
Hi Margherita,
I got the email from osgeo and I was able to proceed further and create id.
So, my osgeo userid is 'sanjeet'. Is this the username that you were
referring to?