Skip to content
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

Add Python 3.12 Support #752

Merged
merged 7 commits into from
Nov 15, 2023
Merged

Conversation

anton-petrov
Copy link
Contributor

@anton-petrov anton-petrov commented Oct 5, 2023

Description

Added support for Python 3.12

All tests passed ✌️

Ready for merge.

Pinned dependencies:

  • cython==0.29.36
  • pydantic==1.10.13
  • flask==2.1.3
  • werkzeug==2.2.2
  • aiohttp==3.9.0b1

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

@anton-petrov anton-petrov mentioned this pull request Oct 5, 2023
@batazor
Copy link

batazor commented Oct 9, 2023

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

@abdullah-retorio
Copy link

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
Copy link
Contributor Author

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

@macieyng
Copy link

macieyng commented Nov 9, 2023

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

@anton-petrov
Copy link
Contributor Author

@rmk135 Hi, please, could you review?

@zeshuaro
Copy link

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
Copy link
Contributor Author

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

@rmk135 rmk135 changed the base branch from master to feature/python-3.12 November 15, 2023 01:24
@rmk135 rmk135 self-assigned this Nov 15, 2023
@rmk135 rmk135 added the feature label Nov 15, 2023
@rmk135
Copy link
Member

rmk135 commented Nov 15, 2023

@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
Copy link

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

@nerlijman
Copy link

Is there a new tag containing this ?

@brunns brunns mentioned this pull request Jun 5, 2024
@fgreinacher
Copy link

@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
Copy link

@fgreinacher see #765

rmk135 pushed a commit that referenced this pull request Aug 7, 2024
* 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
rmk135 added a commit that referenced this pull request Aug 7, 2024
* Add Python 3.12 Support (#752)

* 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

* Update publishing pipeline to use Python 3.12

* Test environment updates

* Update Cython to the latest prior 3.0 version and remove tracing from CI/CD

* Give up using editable tox installation in the coverage job

* Add mypy test fixes

* Remove tracing from the coverage job

* Fix typing test

* Remove PyPy 2.7

* Fix typing test

* Fix the typing issue with pydantic

* Remove pypy 3.9

* Fix the typing issue with mypy

* Update pydantic version to the latest from 1.x

* Update scipy deprecation warning filter

* Fix the tox job running coveralls

* Update changelog

---------

Co-authored-by: Anton Petrov <[email protected]>
@rmk135
Copy link
Member

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.

PS: anton-petrov thank you for this PR again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants