Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

[MRG] Python 3 support #177

Merged
merged 3 commits into from Mar 1, 2015
Merged

[MRG] Python 3 support #177

merged 3 commits into from Mar 1, 2015

Conversation

ndawe
Copy link
Member

@ndawe ndawe commented Feb 25, 2015

It's coming soon...

TODO:

  • Fix failing tests
  • Add ROOT + Python 3 builds on Travis

Notes:

  • Cython 0.22 is buggy. The generated C++ does not compile due to the incorrect handling of a vector<bool> bit reference.
  • ROOT 5 versions v5-34-19 and above have issues with Python 3 because of a new import hook in PyROOT: https://sft.its.cern.ch/jira/browse/ROOT-7108

@ndawe ndawe changed the title Python 3 support [WIP] Python 3 support Feb 25, 2015
@ndawe ndawe mentioned this pull request Feb 25, 2015
@ndawe ndawe changed the title [WIP] Python 3 support [MRG] Python 3 support Feb 27, 2015
@ndawe
Copy link
Member Author

ndawe commented Feb 27, 2015

Here we go. Python 2 and 3 compatibility and the Travis tests are green. @piti118 @kratsg any comments on this before we merge?

@kratsg
Copy link
Collaborator

kratsg commented Feb 27, 2015

@ndawe -- Few comments:

  • six.py is what you use to have the cython working in python 2 and python 3? I thought it was for python projects.. not cython projects.
  • We need to support ROOT=5-34-25 ; this is the final root version being used before Run 2 commences. I believe Root5 is now closed for support and bugs there will not be fixed anymore. Root6 is being fully developed.
  • explain the switch between basestring and string_types ? In particular, what's going on here that you changed the type outright: https://github.com/rootpy/root_numpy/pull/177/files#diff-06942ee9ba64664fb84fa1b8cd8ce667L87 [looking at PY2 versus PY3, those are major differences that it seems confusing]

I'm mostly more worried about the ROOT versions. There have been a lot of huge bug fixes related to PyROOT in ROOT 5.34/25 that help with the newer AOD files that people will eventually be using (if they're not using ROOT6).

@ndawe
Copy link
Member Author

ndawe commented Feb 27, 2015

Just quickly:

  • six.py is used on the python side of things here.
  • We still support ROOT=5-34-25 of course. That still works with python 2.X. It just seems that beyond v5-34-19 ROOT is not compatible with python 3.X due to this new import hook in PyROOT. So we can't handle the build matrix as easily with tags above v5-34-19 since they should only be used with python 2.X.
  • string_types is the six.py way of being python 2 and 3 compatible since basestring is no longer available in python 3. In python 2 bytes is just an alias for str, but it is a different thing in python 3. Cython handles the python 2 and 3 compatibility here with unicode combined with the Cython options c_string_type=str, c_string_encoding=ascii.

@kratsg
Copy link
Collaborator

kratsg commented Mar 1, 2015

🔫 all good then!

ndawe added a commit that referenced this pull request Mar 1, 2015
[MRG] Python 3 support
@ndawe ndawe merged commit e395c37 into scikit-hep:master Mar 1, 2015
@ndawe ndawe deleted the py3 branch March 1, 2015 23:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants