Skip to content
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

WIP python3 port #99

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

WIP python3 port #99

wants to merge 6 commits into from

Conversation

samueljohn
Copy link

first WIP version of a Python3 version of nflgame.

@samueljohn samueljohn mentioned this pull request Sep 21, 2014
@BurntSushi
Copy link
Owner

This is awesome! Really great work!

Unfortunately, there's just no way I can switch to Python 3 only in the middle of the season. It will break every single installation of nflgame, and that's going to cause way too much pain. Moreover, nfldb depends on nflgame which is Python 2 only at the moment.

There are two paths forward here:

  1. We wait until the 2014 season is done and migrate to Python 3 exclusively then.
  2. We make nflgame work with Python 2 and 3 simultaneously now.

Thoughts?

@samueljohn
Copy link
Author

Thanks.
I totally understand - I wouldn't switch in the middle of a season right now.

I have no strong opinion on nfldb as I don't know or use it. Other ppl may want to weigh in.
Also I have no idea how much pain it is to maintain both versions. Personally I am trying to get everything for Python 3 because that is the future and once one wraps ones head around the UTF vs. bytes concept it actually makes more sense than it ever did in Python 2.

@samueljohn
Copy link
Author

Most of the porting was done by 2to3, together with @wonbyte, I just needed to manually fix the __cmp__ method that has been removed in Python3 and also the .format('utf-8') thingy.

@wonbyte
Copy link

wonbyte commented Sep 21, 2014

Since @samueljohn and I are more interested in using the library as a means to gather data for Statistical Analysis and Machine Learning algorithms, I have no problem updating the code to python 3 as we encounter necessary changes. I think this will afford us the opportunity to keep both 2 and 3 running simultaneously for 2014. Then if it makes sense, we move to Python 3 for the 2015 season

@BurntSushi
Copy link
Owner

I have no strong opinion on nfldb as I don't know or use it.

Right. But if nflgame is Python 3 only, then nfldb must also be Python 3 only because nfldb depends on nflgame. (You should check out nfldb btw. It's like nflgame, but with a database and more convenient API. It's much faster.)

Also I have no idea how much pain it is to maintain both versions.

Heavens, no. I will not maintain two code bases. By supporting Python 2 and 3 simultaneously, I mean that the same code works with both Python 2 and 3. I do this for my pdoc project.

Personally I am trying to get everything for Python 3 because that is the future and once one wraps ones head around the UTF vs. bytes concept it actually makes more sense than it ever did in Python 2.

Yes, Python 3 arguably handles Unicode better. The semantics of either Python 2 or 3 on their own are easy to understand. Combining them into one codebase is when it gets painful. :-(

Since @samueljohn and I are more interested in using the library as a means to gather data for Statistical Analysis and Machine Learning algorithms, I have no problem updating the code to python 3 as we encounter necessary changes. I think this will afford us the opportunity to keep both 2 and 3 running simultaneously for 2014. Then if it makes sense, we move to Python 3 for the 2015 season

This sounds great. Keep doing what you're doing then. If I get a chance, I will take your PR and make it Python 2 backwards compatible so we can all work from the same code.

@samueljohn
Copy link
Author

Thanks for your replies. I get all your points - very valid.
I don't have the time to rebase this PR onto master right now.
We can leave this as a reference to come back later.
Perhaps I'll continue (in December?) on my project with @wonbyte and by doing that updating our fork again.
Since @mlenzen has also done a Python3 fork, interest seems to increase. I haven't looked at your stuff @mlenzen but if your are actively into it, you might want to check my (this) PR and see whether I or you are missing something or introduced a bug by porting over.

@derek-adair
Copy link
Contributor

Ha - JFC @BurntSushi you made pdoc?

@derek-adair
Copy link
Contributor

Also sorry to necro - py3 is ready and being tested in the pre-season.

pip install nflgame-redux==2.0.1a1

@BurntSushi
Copy link
Owner

@derek-adair Yes, and lots of other stuff. :P Although, with pdoc, unfortunately a presumed Nazi (or Nazi-troll) has made a hostile fork of it: pdoc3/pdoc#64

The real pdoc project is currently maintained here: https://github.com/mitmproxy/pdoc

@derek-adair
Copy link
Contributor

derek-adair commented Aug 16, 2019

Ohhh buddy. Thats a legit Buddhist symbol tho... Note how its cocked 90 degrees and inverted? Totally get how if you're not familiar with it you'd be outraged. Pretty shameful what they did w/ the swastika actually. It's been around since 3000 B.C.E

I'd be pissed about the python wiki entry tho... very odd.

EDIT: Also not trying to say you are wrong, because i'd not want my name associated w/ that symbol either. People dont look at it and go, "Oh, thats one of the oldest religious symbols known to man dating back to 3000 B.C. and zoroastrinism!" they think... "NAZIS!"

Regardless... you legend you... What other major python packages have you released???

@BurntSushi
Copy link
Owner

Thats a legit Buddhist symbol tho... Note how its cocked 90 degrees and inverted? Totally get how if you're not familiar with it you'd be outraged.

I'm quite familiar with it and the symbol's history actually. Nazis used the rotated version too. And the web site has both the inverted symbol and the inverse of it. Let's not debate this please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants