appdaemon icon indicating copy to clipboard operation
appdaemon copied to clipboard

Python 3.12 support

Open canassa opened this issue 2 years ago • 7 comments

Is there an existing feature request for this?

  • [X] I have searched the existing issues

Your feature request

Hello,

I tried installing AppDaemon with Python 3.12 and I got this error:

      aiohttp/_websocket.c: In function ‘__Pyx_PyInt_As_long’:
      aiohttp/_websocket.c:3042:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
       3042 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
            |                                                     ^~
      aiohttp/_websocket.c:3097:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
       3097 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
            |                                                     ^~
      aiohttp/_websocket.c: In function ‘__Pyx_PyInt_As_int’:
      aiohttp/_websocket.c:3238:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
       3238 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
            |                                                     ^~
      aiohttp/_websocket.c:3293:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
       3293 |             const digit* digits = ((PyLongObject*)x)->ob_digit;
            |                                                     ^~
      aiohttp/_websocket.c: In function ‘__Pyx_PyIndex_AsSsize_t’:
      aiohttp/_websocket.c:3744:45: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
       3744 |     const digit* digits = ((PyLongObject*)b)->ob_digit;
            |                                             ^~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for aiohttp
  ERROR: Could not build wheels for uvloop, aiohttp, which is required to install pyproject.toml-based projects

This seems to be related to this aiohttp issue. Looks like it can be workaround by installing aiohttp==3.9.0b0

canassa avatar Jan 01 '24 17:01 canassa

We will have a look at 3.12 support soon - the package dependencies haven't been updated in a few months, which isn't helping. When we get that done we'll take a look at 3.12

acockburn avatar Jan 28 '24 14:01 acockburn

So it looks like the 3.9 versions of aiohttp didn't resolve this, or we ran into another problem. Checking into it now. My goal is to have Python 3.12 support in the next release.

acockburn avatar Feb 02 '24 17:02 acockburn

Just ran into this the hard way after upgrading to Python 3.12 for Home Assistant's requirement. Any update on this? Thanks!

brent20 avatar Apr 12 '24 01:04 brent20

@brent20 the current git-version works with python3.12 and can be installed with: pip install git+https://github.com/AppDaemon/appdaemon.git

sqozz avatar Apr 19 '24 14:04 sqozz