AWS Thinkbox Discussion Forums

the Deadline API, Draft, and Python 3

I am trying to future proof my Python code, which means I am trying to write code in Python 3. However, from what I understand Draft and the Deadline API were built using Python For .NET. According to the Python For .NET website:

Python for .NET is currently compatible and tested with Python releases 2.7, 3.3, 3.4, 3.5, and 3.6.

Does this mean I can use those packages with Python 3? If not, should I just try to write code that is compatible with Python 2 and 3? Or am I stuck using Python 2.7?

Looks like this answers my question. I am writing a tool in Python 3 that uses Draft to watermark a movie. Here is a result from a unit test.

======================================================================
ERROR: watermark_unit_tests (unittest.loader._FailedTest)

ImportError: Failed to import test module: watermark_unit_tests
Traceback (most recent call last):
File “C:\Program Files\Python36\lib\unittest\loader.py”, line 153, in loadTestsFromName
module = import(module_name)
File “R:\WatermarkTool\watermark_unit_tests.py”, line 12, in
from watermark import watermark_movie
File “R:\WatermarkTool\watermark.py”, line 12, in
import Draft
ImportError: Module use of python27.dll conflicts with this version of Python.


Ran 1 test in 0.000s

FAILED (errors=1)

docs.thinkboxsoftware.com/produ … l#overview

Thanks for the feedback. Currently, Deadline/Draft ships with cPy 2.7 only and we are tracking the progress of other DCC apps as they look towards providing cPy 3.x support. We are also tracking the VFX Platform community as they look to lockdown CY2019 spec and agree upon a specific version of Py 3.x: vfxplatform.com/ An active discussion is taking place around Py 3.6 / 3.7.
I would recommend writing with compatibility in mind, using ‘future’ imports where practical, thereby making the transition to Py 3 easy for you, when Deadline starts to offer it:

[code]from future import print_function

print(“print statements are now encapsulated”)[/code]

Hi Mike,

Bumping the topic, is there a roadmap for deadline / python 3 ?

Regardless of the progress on the DCCs side, it will soon become a major security risk to run Workers with “deep host access” in python 2

Cheers,

Alexis

Team is very aware of the need for Python 3 and it’s very much on the roadmap. ETA: not sure.
Any particular requests for Python3 or anything we should be aware of?

Cool, thanks !
What would help us a lot is being able to write events and plugins in python 3 (for anything not directly DCC related, like chat integration, emails etc… we are stuck with old libs since many non M&E projects have dropped python 2 support a while ago

Hi all,

Checking on an eventual update on this topic, any news ?

Python-2 has been dead for more than a year…

Thx,
Alexis

2 Likes

Also interested in this. pip and setuptools have stopped support already (among others), and it is becoming an increasing pain.

Would like to third this. echoing what has been said above.

+1 from me. I only noticed that this is an issue because I couldn’t get Deadline to work with the Py3 Build from Houdini. Currently, they are offering Py2 and Py3 builds for all releases but I’m unsure for how long they will support Py2.

  • 1000
    Many program will drop Python 2 support soon.
Privacy | Site terms | Cookie preferences