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.69k stars 295 forks source link

Add Python 3.12 Support #752

Closed anton-petrov closed 7 months ago

anton-petrov commented 9 months ago

Description

Added support for Python 3.12

All tests passed ✌️

Ready for merge.

Pinned dependencies:

Fixed Github Actions for CI and tox configuration. Removed tests for legacy python versions, supported only CPython >= 3.8 and PyPy >= 3.9

batazor commented 8 months ago

@boonya @ustims @rmk135 Please take a look when you have the opportunity

abdullah-retorio commented 8 months ago

Hello,

I am planning to use your package in my new project. But i saw that you fixed the pydantic version in requirement-dev.txt. I need to use pydantic V2. Does this fix block my usage? If yes, will you support pydantic v2 and when?

anton-petrov commented 8 months ago

@abdullah-retorio Hi, pydantic version doesn't matter, it's only for tests. I successfully use pydanticV2 and this DI in my project.

macieyng commented 7 months ago

Hi 👋 When can we expect this to be merged? https://github.com/aio-libs/aiohttp/issues/7639 seems to be resolved. Linking issue #737.

anton-petrov commented 7 months ago

@rmk135 Hi, please, could you review?

zeshuaro commented 7 months ago

You might also want to update the CI config to also run tests on Python 3.12: https://github.com/ets-labs/python-dependency-injector/blob/master/.github/workflows/tests-and-linters.yml

anton-petrov commented 7 months ago

The reason why I deleted tests for an older python versions is - СPython version 3.7 and lower is no longer supported.

rmk135 commented 7 months ago

@anton-petrov thanks a lot for the PR. For some reason, some of the tests are not passing. Also, I probably would keep Python 3.7 support for a little bit because it's still around 5% of users who haven't upgraded just yet.

I'm going to merge the PR as is into a feature branch and continue working on it there.

mhassan5809 commented 4 months ago

hello @rmk135 when this pr will get merge to main branch . Thanks .

nerlijman commented 3 months ago

Is there a new tag containing this ?

fgreinacher commented 1 week ago

@rmk135 Sorry for the ping, but it would be awesome if you could create a new release with this change. Also happy to help if some preparation work is needed. Just let me know 🙇

macieyng commented 1 week ago

@fgreinacher see #765