ets-labs / python-dependency-injector

Dependency injection framework for Python
https://python-dependency-injector.ets-labs.org/
BSD 3-Clause "New" or "Revised" License
3.89k stars 304 forks source link

Python 3.12 support #737

Closed toinbis closed 1 month ago

toinbis commented 1 year ago

As python 3.12 RC is released and a release is planned in 1.5months, I like to report in advance that there are issues with installing dependency-injector. On mac,

pip install dependency-injector for python 3.12RC1 gives:

src/dependency_injector/containers.c:39078:47: error: no member named 'ob_digit' in 'struct _longobject'
          const digit* digits = ((PyLongObject*)b)->ob_digit;
                                ~~~~~~~~~~~~~~~~~~  ^
      114 warnings and 12 errors generated.
      error: command '/usr/bin/clang' 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 dependency-injector
Failed to build dependency-injector

Or maybe it's not an issue with a library, but an issue with the build chain not being ready for 3.12? Thanks in advance!

danieljoris commented 11 months ago

Did you find any solution to the problem?

I am prevented from updating my project's Python because of this library 😭

mayapmathews commented 9 months ago

@rmk135 , when can we expect a new release for this with the support for python 3.12?

JacobGeoGeek commented 8 months ago

Is there any update on this issue?

mighty-nyaina commented 8 months ago

Any update on python 3.12 support ?

xoxwgys56 commented 6 months ago

There is some progress about supporting python@3.12 https://github.com/ets-labs/python-dependency-injector/pull/765

rmk135 commented 2 months ago

The release with Python 3.12 support is on PyPI: https://pypi.org/project/dependency-injector/4.42.0b1/

pip install dependency-injector==4.42.0b1

Please report any issues you notice by opening an issue here: https://github.com/ets-labs/python-dependency-injector/issues

I'll publish the plan for future steps a bit later. There is a lot of work to do.

mgaitan commented 1 month ago

@rmk135 do you have an ETA for the stable 4.42?

rmk135 commented 1 month ago

Hi @mgaitan ! I think it's ready to go live this week. It's been available for 3 weeks. Based on the number of downloads, a few projects have been already updated with it and there have been no reported bugs.

I'll post an update when 4.42 is live.

Screenshot 2024-08-26 at 9 59 42 AM
babanin commented 1 month ago

This is great news! Thanks @rmk135!

rmk135 commented 1 month ago

The release 4.42.0 is not officially live on PyPI: https://pypi.org/project/dependency-injector/4.42.0/

Please upgrade your environments and projects to the most recent version:

pip install dependency-injector==4.42.0

I'm closing this issue. Please open a new issue if you face any problems.