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

Towards python 3 support #677

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

Conversation

hayd
Copy link

@hayd hayd commented Aug 18, 2015

This PR goes someway to supporting python 3:

  • print statements become print functions
  • use try/except block for new/old imports
  • use except as syntax*
  • inconsistent indentation (tabs+spaces is a syntaxerror in python 3)
  • a couple of other syntax changes (e.g. see xxx_todo)

*The new exception syntax is not supported in 2.5, so prior versions would not be supported (Note: travis doesn't support testing 2.5-....)

The main/remaining block is that opencv3.0 (with python 3 support) removed the old-api: cv2.cv.


Obviously this is a pretty big diff, breaks 2.5-, and may cause merge conflicts... but I'm throwing it out here nonetheless!

See also the diff without whitespace, which may be helpful (even though this is python).

Using autopep --select=E101,E121
Python 3 requires OpenCV3.0 which has removed (!) support for
cv2.cv. This does not address that aspect but should make later
migration easier...
@auvipy
Copy link

auvipy commented Jul 12, 2016

is this going to be accepted anytime soon?

@tpltnt
Copy link

tpltnt commented Nov 23, 2016

I would like to see the PR merged soon, since I accidentally started to migrate SimpleCV to Python 3 (and thus duplicating this work).

@tpltnt
Copy link

tpltnt commented Nov 23, 2016

see also #689

@tpltnt
Copy link

tpltnt commented Nov 24, 2016

Hey @hayd, i merged your PR in here. Do you think further actions are required to support Python 3?

@hayd
Copy link
Author

hayd commented Nov 24, 2016

@tpltnt My recollection is that the remaining changes needed are updates to opencv3...

@tpltnt
Copy link

tpltnt commented Nov 24, 2016

@hayd thank you for the hint. I added an issue in my (fork) repo.

@fabaff fabaff mentioned this pull request Mar 16, 2017
@mUtterberg
Copy link

Do we know how to contact the maintainers to get this pr merged? Three years seems like an unusually long response time...

@golyalpha
Copy link

@mUtterberg The safest bet right now would be to fork to project, and fully update it to Python3, there's a lot of work to be done, and SightMachine seems to be unresponsive regarding this project.

@mUtterberg
Copy link

@golyalpha You're totally right. Now that I've lurked around this repo a little longer, I'm wondering if Sight Machine has pivoted on their business domain a bit. Regardless, I'll try my luck with some of the forks that've made some progress toward 3.x like @hayd's!

@golyalpha
Copy link

golyalpha commented Sep 19, 2018

@mUtterberg My personal fork has a Python3 branch, where we've (me and a friend of mine) hit a wall with the differences between OCV2 and OCV3, and both of us don't really have much time to work on it now, so it's kinda just stalled, but maybe others will be able to figure that out while we won't be able to...? (By the way, we scrapped the whole compatible with Python2 part, since we felt like that's not something requiring attention - as EOS for Py2 is painfully close)

@tpltnt
Copy link

tpltnt commented Sep 20, 2018

@golyalpha I commented on the differences between openCV2 and openCV3 (and the porting of the Python binding) in issue #689. Maybe that helps a bit.

@golyalpha
Copy link

@tpltnt There's more issues than just the image format. I believe we've hit a wall with a certain function or it's equivalent in OCV2 not being in OCV3. Might've overlooked it, but both of us having a lot of other projects to work on, and this being more of a "You still using Py2? You monster! :P" kind of deal, we decided to focus on projects which we felt were important at the time, or simply had tighter deadlines, and since my use of SimpleCV was declining at the time anyways, updating SCV to Py3 wasn't really something we considered important.

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

5 participants