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
qtvcp needs testing with python3 #819
Comments
Ok Rene sounds good.- i'll try to get to this soon. |
Hello Thank you so much ! |
well having some issues but fixing them |
https://github.com/kcjengr/qtpyvcp/tree/Python3 installs with
|
hello, managed to fix more errors but got a strange message on file load maybe from canon
|
There is a separate issue #825 for that. |
Thanks |
this PR started: #934 |
@rene-dev Am I misunderstanding that qtpyvcp and qtvcp aren't quite the same thing? Should a separate issue be made for each? or should this one be re-titled to qtvcp and let the qtpyvcp project handle its own issue? |
I cannot answer this question, I never used any QT stuff in linuxcnc. |
I can port this to python3 but sadly i can't keep it working for python 2 and 3 at the same time |
my proposal would be to update to python3 in master, the next release after 2.8 cannot realistically support python2. |
qtpyvcp is a separate project. I don't think this is the place to work on their problems unless it's something reasonable they need different in linuxcnc to function. as for python3 and qtvcp - I agree python3 only for master as soon as I can get it to function/test a bit. (which shouldn't be long) |
ah, I didnt know that. why do we need 2 qt python implementations? how do they differ? |
If I understand it right qtvcp uses gtk signalling and qtpyvcp uses well qt signalling. |
Is there a way to detect what version of python linuxcnc was compiled with? Maybe an environment variable. |
on an release version Im not aware how. |
It seems that you can look at the "magic number" in one of the pyc files: |
I really need to support both for a while. buster can be compiled with python2 support and of course people can use older distributions with master. If I add my python3 only code to qtvcp now, I break peoples configs. |
andypugh: I'll see if I can make that technique work - thanks |
We can make Python3 a dependency for Master. All supported platforms have it available. |
The problem isn't that python3 isn't available, it's that its an all or nothing deal. Right now if you use python2 everything works. Not true for python3 yet and you can't run both at the same time. |
What doesn't work with python3? Switching python versions doesn't necessarily break a configuration. We need to make the switch at some point. |
I believe gladevcp, isn't converted yet? |
I have a branch where glade works, conveted to gtk3. All the widgets work(gremlin is still wip), its the gladevcp UIs that need work. Not much, probably a weekend per ui. |
well that confirms my point then. My point is linuxcnc isn't completely python3 ready yet - and even when it is it will still likely break configs. Anyways it seems i can get python version from code with if sys.version_info.major > 2: |
I think that the fact that Python2 is officially over, finsihed, dead and buried is a good enough reason to abandon it. I think we should announce that Master / 2.9 will be Py3 only. At that point you can stop trying to support Py2 in Master. I am not expecting 2.9 to be 7 years after 2.8. I wouldn't be surprised if it is nearer 6 months. Master is probably more releasable now than 2.8 was a year ago. |
Well when master can actualy be python3 only that could make some sense. I don't really understand the problem with python2 - we have buster so it can support both so the work has already been done. In the time we have discussed this i have the principal parts of qtvcp working on python2 and python3 - it's really not that hard. I think 6 months for master this time is too fast actually. - well I guess it depends on when the six months starts from :) |
The 6 months starts now. The 2.8 release is uploading now. |
Hallo Chris,I think we will need to do the switch to python 3 in a strong way. I tried to stay compatible between the releases 1 ; 2 and 3 of gmoccapy, but I found out quite fast, that it does not work out due to some very small changes. That is exactly the reason, why I decided to not take care about users configs. If someone changes on purpose the release (i.e. from 2.8 to master) he must be aware, that confics etc will not run any more.I will convert gmoccapy as soon as possible to use python 3 and also glade 3. I am pretty sure this change will brake a lot of confics. With that conversion I will announce, that there is no more support for gmoccapy 2 and gmoccapy 3 will only get bug fixes. All effort will be on the new python 3 release.I recommend to not put any effort in Python 2 projects.NorbertVon meinem Huawei-Tablet gesendet-------- Ursprüngliche Nachricht --------Von: c-morley <notifications@github.com>Datum: Fr., 4. Sep. 2020, 21:50An: LinuxCNC/linuxcnc <linuxcnc@noreply.github.com>Cc: Subscribed <subscribed@noreply.github.com>Betreff: Re: [LinuxCNC/linuxcnc] qtvcp needs testing with python3 (#819)
well that confirms my point then.
Does the buldbot build binaries with python3 compiled in? I don't think so.
Are you ready to remove python2 from the build system?
My point is linuxcnc isn't completely python3 ready yet - and even when it is it will still likely break configs.
I don't want to break configs for no good reason until it is - if I can reasonably help it.
Anyways it seems i can get python version from code with if sys.version_info.major > 2:
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.
|
As soon as master is actually python3 only then qtvcp will be python3 only and I'll be happy about it. As I mentioned I don't believe buildbot even produces python3 binaries - so why would I make qtvcp unusable until they do? |
buildbot does run the test with python3, but no packages currently. sys.version_info.major does give you the version of the interpreter is running, not the version linuxcnc was compiled with. important difference, you cant load linuxcnc/hal modules compiled in one version in another version! yes there are still some problems, but we might as well fix them now, and not in 2 years. |
Chris, I did not recommend to destroy anything, but make 2.8 work with python 2 and 2.9 only with Python3. For sure we will need to support both for some time. Gmoccapy 3 will get support till we launch 2.9, or may be 3.0 (jumping the 2.9 release may make sense to demonstrate also the big changes) and after the release I will only fix bugs in that gui. The new gui should be ready with the next release and will only work with python3NorbertVon meinem Huawei-Tablet gesendet-------- Ursprüngliche Nachricht --------Von: c-morley <notifications@github.com>Datum: Sa., 5. Sep. 2020, 10:21An: LinuxCNC/linuxcnc <linuxcnc@noreply.github.com>Cc: Norbert Schechner <nieson@web.de>, Comment <comment@noreply.github.com>Betreff: Re: [LinuxCNC/linuxcnc] qtvcp needs testing with python3 (#819)
As soon as master is actually python3 only then qtvcp will be python3 only and I'll be happy about it.
The burden for python2 and 3 has not (so far anyways) been too much.
Things in linuxcnc seem to always to take much longer then we like.
As I mentioned I don't believe buildbot even produces python3 binaries - so why would I make qtvcp unusable until they do?
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.
|
Now following versioning systems a complete break of the program is a major change. And typically versioning in major.minor.patch. So in that effect, is master going to python 3 only not a major change and should be going to 3.0.0 as well? |
most minor versions broke configs so far. just changing python version doesn't necessarily break configs. master cant be relied on anyway. |
@rene-dev, @satiowadahc has a point, if a new version is not backwards compatible, then the major version should be increased (see https://semver.org/ and specifically https://semver.org/#how-should-i-handle-deprecating-functionality). The fact that minor version bumps have broken configs so far is a kind of a red flag for any user without deep linuxcnc knowledge, because upgrading minor versions should be done in an incremental manner. Now, adding python3 support can be an incremental change if both versions are supported at the same time, meaning you can have scripts written for py2 and py3 and the same time in the linuxcnc universe, but as soon as you remove python2 support, you're breaking the incremental changes and so I agree with @satiowadahc, linuxcnc should move to version 3.0 at that point. |
thats not how linuxcnc versions used to work in the past, most versions where the second number changed required config changes, the last number was bugfixing only.
|
The "2" is a reference to EMC2, and I anticipate it will always be there. :-) |
I think the version of emc was set to 2 when HAL was added. Which seems a very good reason to raise the major version. Qtvcp works with python2 and 3 now, depending on how linuxcnc is compiled. |
I tested it today, and all seems to work fine. Thanks! |
qtpyvcp needs testing with python3, this should be an easy task.
running 2to3 -w should get most of the syntax problems fixed.
The text was updated successfully, but these errors were encountered: