-
Notifications
You must be signed in to change notification settings - Fork 100
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
Convert the code to Python 3 #11
Comments
Hum... Hello, @shlomif ! I want to contribute to that project! I played pysolfc since the times I used Arch Linux. Now I use NixOS distribution[1], and contribute to it by creating install scripts for some pieces of software [2]. How can I help? 1 - NixOS Official Site: http://www.nixos.org; |
Hi @AndersonTorres ! Thanks for your enthusiasm and desire to contribute. I appreciate it a lot. Currently, the main pending item is to convert the code to Python 3, but it has some prerequisites. If you can GitHub-fork the repository, create a branch and send me a pull-request that will involve one of those: 1 . Merging some duplicate code (see the recent commits into https://github.com/shlomif/PySolFC/tree/master/pysollib/ui/tktile but others may be needed).
I will review your changes, test them and given enough merged pull reqs , I can give you a commit bit. Welcome aboard and thanks again! |
@AndersonTorres : hi! Ping! Did you get my latest message? Can you please let me know what you think? |
Hey. I'm interested in helping convert to Python 3. If you still need help, let me know what you would like me to work on. |
@shlomif I am also interested in helping the conversion to Python 3. Let me know what you would like me to work on |
Also interested in helping out here! 🙋 |
Thanks for your enthusiasm, people! Let's do it like that - the three of you will run the "2to3" tool locally on the tree and each will handle a range of letters of files under pysollib to check for breakages. Let's start with: @lostmyaccount : [a-c]*.py @josecolella : [d-f]*.py @niharathomas : [g-i]*.py Thanks! |
let me know if you need more help. |
How can I help? |
Sorry, real life issues! I will clone it asap. |
@AndersonTorres : ok, thanks for returning to me. Good luck! |
Hi all! To facilitate coordination about contributing to PySol, please join me for a real time Internet chat on ##pysol on Freenode (note the double octhothrope) . I am usually "rindolf" there with a fallback "shlomif" nickname. We may set up chat rooms on different services in the future. |
Well, as far as I have seen, the diff produced by What is the best way to do it? Testing unit by unit? |
Should this feature request "we need to convert the code to use Python 3 instead", be "... Python 3 AS WELL"? Many systems still ship with Python 2 (e.g. 2.7) by default. |
I don't think it would be a good idea to use a "dual version" - it would be duplicating the work. |
Hi Anderson, I wasn't imagining duplicating work, I agree that would be a bad idea. https://docs.python.org/3/howto/pyporting.html First paragraph: With Python 3 being the future of Python while Python 2 is still in active use, it is good to have your project available for both major releases of Python. This guide is meant to help you figure out how best to support both Python 2 & 3 simultaneously. |
@hairspring , @AndersonTorres : hi! It is often possible to write code that will run on both python 2.x and py 3.x. However, it may not always be worth the trouble. I should not that a recent python 3 environment can be easily installed alongside the system's python 2 environment (and it's open source and gratis), so it should not be a major concern. So I suggest we try to keep python 2 compat, but not at all costs. |
Does dropping Python 2 support can cause any issues for the users? I guess the Windows and macOS versions will be just shipped with Python 3, and when it comes to Linux, I have found Python 3 even in the Debian repo (and Debian is known to be quite a conservative distro). |
Sorry, I'm late to the party got busy with family obligations around the
holiday. .
I've done work with python that supports both 2 and 3, and it's not that
difficult, as long as the dependent libraries are supported in both 2 and 3.
The biggest hurdle, in my experience, is around the unicode string
literals, 2.7.9 and newer supports unicode literal.
I was not able to get PySol to run, even on python 2.7 /Ubuntu after
cloning the repository. It was unable to find the data directories. Is
there a setup step that must be performed to "install" it?
…--Nate
On Tue, Apr 18, 2017 at 9:04 AM, Jan Kleks ***@***.***> wrote:
Does dropping Python 2 support can cause any issues for the users? I guess
the Windows and macOS versions will be just shipped with Python 3, and when
it comes to Linux, I have found Python 3 in Debian repo (and Debian is
known to be quite a conservative distro).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AJkoF-zJoh2mRaOh5XCaNuADW49xA4odks5rxN7wgaJpZM4Hx0ro>
.
|
Hi Nate,
On Tue, 18 Apr 2017 10:13:27 -0700
whitenj <notifications@github.com> wrote:
Sorry, I'm late to the party got busy with family obligations around the
holiday. .
welcome aboard!
I've done work with python that supports both 2 and 3, and it's not that
difficult, as long as the dependent libraries are supported in both 2 and 3.
The biggest hurdle, in my experience, is around the unicode string
literals, 2.7.9 and newer supports unicode literal.
ah.
I was not able to get PySol to run, even on python 2.7 /Ubuntu after
cloning the repository. It was unable to find the data directories. Is
there a setup step that must be performed to "install" it?
If what is described in the README does not work for you, try removing the
system's cardset directory structure (possibly by uninstalling the packages). I
recall that Debian and Ubuntu remove some files which confuses PySol FC without
their downstream patches. I'll try it myself in an Ubuntu VM tomorrow and will
report my findings, but it is late here.
… --Nate
On Tue, Apr 18, 2017 at 9:04 AM, Jan Kleks ***@***.***> wrote:
> Does dropping Python 2 support can cause any issues for the users? I guess
> the Windows and macOS versions will be just shipped with Python 3, and when
> it comes to Linux, I have found Python 3 in Debian repo (and Debian is
> known to be quite a conservative distro).
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#11 (comment)>, or
> mute the thread
> <https://github.com/notifications/unsubscribe-auth/AJkoF-zJoh2mRaOh5XCaNuADW49xA4odks5rxN7wgaJpZM4Hx0ro>
> .
>
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Original Riddles - http://www.shlomifish.org/puzzles/
The number of items on an open source project’s to‐do list always grows or
remains constant.
Please reply to list if it's a mailing list post - http://shlom.in/reply .
|
@shlomif Of course Python 2 support at all costs would be a mistake, but I don't get the impression it's a nightmare. @jan-kleks Yes, Python 3 is in repositories. But you're saying that while wearing your programmer's hat! Remember, most of those interested in running PySol want to press a download button, click install, and if it gets harder than that, game over! Admittedly, right now this github fork (?) is not for them, there's no install media as there is on SourceForge. But eventually, that's the scenario we have to keep in mind if the work here is to be reintegrated with skomoroh's project or to gain widespread support as an alternative. So it will be easier to achieve that if the code runs on 2.7 and 3 upwards. I discount versions prior to 2.7 because I'm unaware of any mainstream platforms that aren't at least at that level. |
In fact the link you provided says it is better to maintain only Py27 from 2x series if there is some need to dual porting. The veredict was spoken, however. |
ok I'm up and running now, ran the 2to3 tool on the code
Is there a branch on the repo that we are working out of? I imagine
someone has already ran 2to3 on the code? and checked in the result?
…On Tue, Apr 18, 2017 at 6:40 PM, Anderson Torres ***@***.***> wrote:
In fact the link you provided says it is better to maintain only Py27 from
2x series if there is some need to dual porting.
But this isn't a serious problem I think. The major Linux distros already
have Py3 in repos, and Py2 is to be deprecated someday.
The veredict was spoken, however.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AJkoF16p5Q4VKc1zHEn9iDjXS_7XYtKyks5rxWYEgaJpZM4Hx0ro>
.
|
Hi!
On Tue, 18 Apr 2017 22:29:36 -0700 whitenj ***@***.***> wrote:
ok I'm up and running now, ran the 2to3 tool on the code
Is there a branch on the repo that we are working out of? I imagine
someone has already ran 2to3 on the code? and checked in the result?
This is the latest branch currently -
https://github.com/shlomif/PySolFC/tree/add-flake8-tests - please start from
it. I ran 2to3 previously but ended up with non-python2-compatible code.
…-- @shlomif
|
@whitenj : hi! I've updated the build instructions in the README file - there was a bug there. Please try again. |
Hi all! I've been making headway with the conversion (after using flake8 and 2to3) here - https://github.com/shlomif/PySolFC/tree/try-to-fix-py3-bugs . It now kinda works in both python 2 and python 3, but some functionality was temporarily removed, and some may still be broken. It also needs some cleanups. |
Hi all! If you wish to contribute, you can tackle some of the issues with the label "bug", or do extensive testing on the py3 branch to see if there are more bugs. |
Still looking for any help? I have experience with building python2/3 compatible GUIs in tkinter/Tkinter (depending on 2/3 heh) and recently with Kivy to build cross-platform touch-enabled app. I'm looking for something to help out on in any way I can. Hopefully talk soon! |
@saltycraig : the transition to python2/3 compatible code is mostly complete in the relevant branch. Nevertheless, more testing will be appreciated and one can also work on some of the feature requests or bug reports. I am going to close this bug to avoid misleading people. |
As Python 2.x is going away, we need to convert the code to use Python 3 instead. A prerequisite for that is to merge duplicate or mostly duplicate code that uses the APIs that were removed in Python 3.
The text was updated successfully, but these errors were encountered: