Skip to content

Conversation

chadrik
Copy link
Contributor

@chadrik chadrik commented Jul 22, 2019

There are two reasons to make this change:

  • It is a waste of time to import all of the lib2to3 package just to do e.g. from past import unicode
  • More importantly, the import of lib2to3 does not work on certain python distributions, including zipped python installations. See issue Import from past causes traceback #209 on this repo and this core python issue.

This is a backward incompatible change due to the change of location for autotranslate, but I think it's the right thing to do for the start of the version 18.x line.

(edited for clarity)

@danbradham
Copy link

Just wanted to throw some additional weight behind this PR. This PR appears to fix python-future for embedded/zipped installations and that's a pretty big deal!

To frame this in my own context, this issue effects users in the domain of visual effects because most DCC applications -- Autodesk Maya, SideFX Houdini, and The Foundry Nuke -- embed a zipped version of python. Having this implemented can really help users like me in the coming year as the VFX industry prepares for a push to Python 3 in 2020. Obviously dropping python-future is an option, but, it's such a convenient library!

Cheers!

@chadrik
Copy link
Contributor Author

chadrik commented Aug 22, 2019

To frame this in my own context, this issue effects users in the domain of visual effects because most DCC applications -- Autodesk Maya, SideFX Houdini, and The Foundry Nuke -- embed a zipped version of python.

Yep, I'm in VFX as well. VFX/animation is a bit late to this party, but we need our pythons futurized too!

Obviously dropping python-future is an option, but, it's such a convenient library!

Unfortunately, if it's a dependency of a third-party library, like it is in our case, we can't drop it.

@jmadler jmadler merged commit b0ac9d5 into PythonCharmers:master Oct 9, 2019
@chadrik
Copy link
Contributor Author

chadrik commented Oct 10, 2019 via email

@danbradham
Copy link

Awww yeah!

pmolodo pushed a commit to LumaPictures/pymel that referenced this pull request Nov 14, 2020
version needs to be at least 0.18.0, as that's the first version with
Chad's fix for importing modules inside a .zip:

PythonCharmers/python-future#487
PythonCharmers/python-future@d2a61c1
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.

3 participants