Skip to content

Add Python 3.12 Support (#752) #765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Aug 7, 2024
Merged

Add Python 3.12 Support (#752) #765

merged 17 commits into from
Aug 7, 2024

Conversation

rmk135
Copy link
Member

@rmk135 rmk135 commented Nov 15, 2023

  • Ignore .vscode

  • Python 3.12 Support

  • Change base python to 3.12 and pin pydantic to V1

  • all tests passed

  • ci: change default python to 3.12

  • remove legacy python versions

  • annotate pydantic models for tests

@macieyng
Copy link

👋 Can you estimate when this PR will be finished?

@anton-petrov
Copy link
Contributor

@rmk135 please, can you give us (community) some expectations about this pr?

@anton-petrov
Copy link
Contributor

Maybe temporarily merge PR despite of some failed unit tests...

@zeshuaro
Copy link

zeshuaro commented Dec 3, 2023

@rmk135 can you please look into this PR when you have the chance? This package is at least used by 2.5k repositories (based on GitHub stats) and Python 3.12 has been released 2 months ago. All the projects that are using this package are being blocked from updating to Python 3.12.

If you no longer have the capacity to maintain this project, would you be able to look for collaborators or transfer ownership to someone who can maintain it? @anton-petrov who is the maintainer of pyenv has offered to help maintain this project #688 (comment) Maybe you can work out something with them for the future of this project?

@macieyng
Copy link

macieyng commented Dec 5, 2023

@boonya @ustims, you guys seem to be working for ets-labs. Can you contact @rmk135?

@anton-petrov
Copy link
Contributor

As a temporary solution, anyone can install directly from the repository https://github.com/anton-petrov/python-dependency-injector or create their own fork.

@MahmudulHassan5809
Copy link

hello @rmk135 , is there any update about this PR.

@Pentusha
Copy link

@anton-petrov
I would be very grateful if you could publish compiled wheels to PyPI.

@MahmudulHassan5809
Copy link

@anton-petrov
I would be very grateful if you could publish compiled wheels to PyPI.

Yeah plz do it if possible. Will help me a lot

@JacobGeoGeek
Copy link

@rmk135 any update on this PR?

@alexted
Copy link

alexted commented Jan 27, 2024

@rmk135 you're alive?

@MahmudulHassan5809
Copy link

MahmudulHassan5809 commented Jan 28, 2024

@rmk135 please give a reply. I need to upgrade our project to python 3.12 . it is now mandatory for us but due to this package can not upgrade . and it will be difficult for us to use others alternative packages cause in that case need to change lot of things . Please give some update .
Thanks

@s-maheshbabu
Copy link

@rmk135 has no Github activity over the last two months. They are probably not just ignoring the requests here but are unable to check Github for whatever reasons.

@StummeJ as a previous contributor of this repo, are you able to help merging this PR? Or advice on who might be able to help?
(sorry for the random ping.. just chose the last person to contribute to this repo that is not @rmk135)

@benvdh-incentro
Copy link

As mentioned in the issues referenced here:
#763 (comment)

it seems @rmk135 does not have a lot of time available to implement new features on the repo. He even mentioned that he's looking for an additional/new maintainer link. @anton-petrov offered his help, but not sure if that went any further than the offer.

@alexted
Copy link

alexted commented Jan 29, 2024

Unfortunately, this is the main problem - he himself has already stopped working on the library, but also he has not handed it over to anyone for further maintenance.
So the project hangs in the air.

@macieyng
Copy link

If any of you have LinkedIn Premium than you can go ahead and ping @rmk135 there. Here is a link to his profile. All I could do was to left a comment.

@StummeJ
Copy link
Contributor

StummeJ commented Jan 29, 2024

I've actually switched to using Neoteroi's Rodi (along with their configuration manager). They'er actively building a web framework for python so it's still maintained (be it a bit slow (days) sometimes)

Rodi and essentials-configuration was inspired by dotnet's dependency injection and config manager.

@Pentusha
Copy link

Pentusha commented Jan 29, 2024

First, python 3.12 support was initiated by @rmk135 and then he disappeared. Then @anton-petrov started developing of his fork and disappeared too. Well, now it's my time to take that risk.

I took Anton's PR and made some improvements to the point where it become possible to build and publish to PyPI. I didn't bother figuring out how to build packages for old interpreters and dropped this code.
I'm not sure I have time to maintain the library either, so I can't promise I'll be merging any other PRs, but I can try.

pip install dependency-injector-fork

UPD: arm64 wheels not built yet, in progress
UPD2: arm64 wheels are ready

@gokturkDev
Copy link

this is sad :/ I guess this is end for this library in production environments.

wax911 added a commit to AniTrend/anitrend that referenced this pull request Apr 28, 2024
- Drop python image version to 3.9.* due to dependency python support limitation: see ets-labs/python-dependency-injector#765
wax911 added a commit to AniTrend/anitrend that referenced this pull request Apr 28, 2024
- Drop python image version to 3.9.* due to dependency python support limitation: see ets-labs/python-dependency-injector#765
@PunRabbit
Copy link

Oh, is it really no more update...? 😢

@biyani701
Copy link

Any update on this? If this library is no longer maintained, what are the alternative options?

@alexted
Copy link

alexted commented Jun 28, 2024

we've switched our projects to https://github.com/adriangb/di

@graham-atom
Copy link

any news on when this will be released? this is blocking us from migrating to python 3.12

@MahmudulHassan5809
Copy link

@rmk135 please give us some updates.

@zjpiazza
Copy link

zjpiazza commented Jul 6, 2024

Its a damn shame. I absolutely love this library and it is so useful for building well designed Python applications. Hopefully we get a resolution on the ownership of the repository. But also, everyone should chill out on harassing people to get what you want. That is always the danger of using open-source libraries in production.

@osminogin
Copy link

Nobody owes you anything. It’s not clear where the complaints come from, if you don’t buy commercial support, you don’t pay for the developer’s time. A person may have his own priorities, problems, including health or personal ones. Solve the issue of owning the repositories of your projects, and not those of others.

I really hope that Roman will return to active development, but in the current situation I just spent 30 minutes of time and put together my own version for my projects, including several patches, including support for 3.12, no problems with that either.

@biyani701
Copy link

@osminogin
if you are able to compile this library with Python 3.12, will you be able to share steps as to how you accomplished it?

@osminogin
Copy link

osminogin commented Jul 11, 2024

@biyani701 The way I recommend is to fork this project and cherry-pick needed commits from @anton-petrov and @Pentusha forks. Repositories and a list of commits that may interest you can be found here master...osminogin:python-dependency-injector:master

As an option (I don’t recommend it), you can take my fork, which already has these changes applied.

Next you need a compiler, required libraries and headers, as usual, building wheel is done with the command python setup.py bdist_wheel

Don't forget to add some kind of suffix to your version or increment the version in src/dependency_injector/__init__.py to avoid conflicts with the existing original version.

As far as I understand, this patch allows this project to be built with Python 3.12 and old version of Cython ABI. Supporting Python 3.12 with the new Cython ABI version requires some big changes, and apparently some of the difficulties are caused by this.

@rmk135
Copy link
Member Author

rmk135 commented Aug 7, 2024

Hi all!

I'm planning to release this version as a beta release4.42.0b. The version of Cython that this release is built on seems to be deficient. The tests are passing, but the coverage calculation doesn't work. Since there were a lot of C API changes in Python 3.12 I think it'd be fair to assume that there are potentially more degraded parts. Releasing this branch as a beta version will prevent automatic updates for people who didn't pin their current versions.

@rmk135 rmk135 force-pushed the feature/python-3.12 branch from 5f56dc8 to 7de9443 Compare August 7, 2024 02:01
@rmk135 rmk135 merged commit a5166bf into develop Aug 7, 2024
22 checks passed
@rmk135
Copy link
Member Author

rmk135 commented Aug 8, 2024

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.

@rmk135
Copy link
Member Author

rmk135 commented Aug 13, 2024

Hi all!

Here's the roadmap for 2024: #812

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.