Python 3.8?

Given that 3.8 is slated for a 2019-10-21 release, anyone willing to hazard a guess as to when Blender will use it? I badly need the new shared memory stuff new in 3.8

Thanks to any brave souls willing to guess :slight_smile: I have not been in the community long enough to have seen such a cycle…

Donald

Typically we follow the latest Python releases, although there is sometimes delay in adopting them for official builds - if upgrading Python too soon before a release.

That’s good to know. Thank you.

So I’m curious what you’re doing that shared memory will be useful? It’s only for multiprocessing, which I’ve rarely seen in python addons.

One downside of moving to the latest python available is compatibility of course. Say you’re doing an addon that relies on some PIP module that hasn’t moved to 3.8 what then? Or if your addon uses c-extensions to python, you have to have a version of the c-extension for each python version unless you stick to the limited ABI https://docs.python.org/3/c-api/stable.html which usually will negate some of the features.

I’m just saying there’s often a reasonable stability/compatibility reason to trail the bleeding edge.

It is for a Live Link between Blender and Daz Studio. Right now I use a local socket to transfer the data, but even with the localhost optimization, the data is still copied from one process to the other. So an already subdivided character model with mesh hair is huge and can still take a minute and a half per frame. With shared memory, there is no copying, and my tests (at least on Linux) show the transfer is virtually instantaneous (as it should be).

I am a professional developer as well, and so your point about the bleeding edge versus stability is well received; not knowing the dev’s position on that same point, I decided to ask and was prepared for something other than the answer I wanted :slight_smile: I’m rather new to Python, but if it follows the strict Unix-y convention for version numbers (and I see so much of Unix in Python), a minor version upgrade should not break compatibility, making trivial whatever upgrades should be necessary. I can already hear you saying “That’s a really nice theory, Donald…” but sometimes when the planets align, it does work that way in practice, too. Thanks for your thoughtful points.

1 Like

Interesting.

Generally Python code is forward compatible across 3.x versions. Like I said though… c-extensions get a little more sticky.

The pros of updating Python 3.8:

  • ???

The cons of updating to Python 3.8

  • Breaking compatibility with https://vfxplatform.com/ CY2020
  • Making the life of anyone who wants to use compiled Python modules in Blender a lot harder.

Just to add: Pybind11 and Numpy make it very easy to pick and existing C++ computer graphics project (which there are countless), and integrate it into Blender with an easy to use UI. Here’s as an example: https://github.com/amb/QuadriFlow

The trouble being that Pybind11 targets a specific Python version and needs recompilation if the version changes.

1 Like

Well as the guy above stated, shared memory for multiprocressing, if that’s your thing.

Plus, I guess you get to use walrus operators? :man_shrugging:

Hi, I am new in blender community. I am trying to use Blender for ploting purposes in a Python program I am developping, using Python 3.8. I encountered issues installing Blender.
With pip install blender : I get a blender module under my python installation containing bpy.so and when calling blender in my application with “import blender” it can not find bpy (I guess I should get dll libraries instead)
With pip install bpy : this is ending in error

Moreover I understand under bpy webpage that it has not been tested with pyton 3.8 ?

Update

I finally succeeded in compiling Blender as a Python module but have still compatibility issues with my Python version 3.8 as Blender is coming with python37.dll.
I guess I should have to use Python 3.7…or will Blender be compatible with 3.8 in a near future ?

I absolutely := the walrus operator!

  • new type hints /, typing.Protocol, typing.Literal, typing.TypedDict
  • nice new syntax for f string f'{expr=}'

I use those a lot, but i know they are no big deal in context of Blender.