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

Plan for antsibull-core v3 #125

Closed
gotmax23 opened this issue Dec 1, 2023 · 12 comments · Fixed by #153
Closed

Plan for antsibull-core v3 #125

gotmax23 opened this issue Dec 1, 2023 · 12 comments · Fixed by #153

Comments

@gotmax23
Copy link
Collaborator

gotmax23 commented Dec 1, 2023

I created a milestone and have started creating issues to track antsibull-core v3. My impetus for starting up this effort is wanting to add support for pydantic v2, but there's also a good amount deprecated code to remove. @felixfontein, what do you think about the following plan?

For antsibull-core v3, I'd like to completely drop support for pydantic v1 and stick to pydantic v2. antsibull-core v2 can stick to pydantic v3. Maintaining compatibility for both is a bit tricky, and parts of the pydantic API that are exposed/used by antsibull-core as part of the LibContext and AppContext objects are changing in a backwards compatible way, so we would probably want to add support in a new major release anyways.

We might consider dropping support for Python 3.9, as well, to allow us to adopt newer typing features and other improvements. ansible-core has already dropped support for Python 3.9 on the controller.

antsibull and antsibull-docs can keep concurrent support for both antsibull-core v2 and v3 for a little while, like we did for antsibull-core v1. I'm not sure about when we'd want to cut a antsibull-docs v3 release to drop support for antsibull-core v2. antsibull-docs is more your area than mine.

I think I'll be able to write some compat code for antsibull-docs to remain compatible with both pydantic versions (and thus both antsibull-core versions). I already submitted ansible-community/antsibull-build#564 for antsibull. It uses LibContext and AppContext but doesn't have its own pydantic models, so that was easier.

@gotmax23 gotmax23 added the admin label Dec 1, 2023
@gotmax23 gotmax23 added this to the antsibull-core v3 milestone Dec 1, 2023
@felixfontein
Copy link
Collaborator

For antsibull-core v3, I'd like to completely drop support for pydantic v1 and stick to pydantic v2. antsibull-core v2 can stick to pydantic v3. Maintaining compatibility for both is a bit tricky, and parts of the pydantic API that are exposed/used by antsibull-core as part of the LibContext and AppContext objects are changing in a backwards compatible way, so we would probably want to add support in a new major release anyways.

Sounds good to me!

We might consider dropping support for Python 3.9, as well, to allow us to adopt newer typing features and other improvements. ansible-core has already dropped support for Python 3.9 on the controller.

I'm not so sure about that one. antsibull-docs should likely support Python 3.9 for some longer time. Dropping Python 3.9 support for antsibull-core v3 forces antsibull-docs to support both antsibull-core v2 and v3 for a longer time.

(The last ansible-core version to support Python 3.9 is EOL in November 2024.)

antsibull and antsibull-docs can keep concurrent support for both antsibull-core v2 and v3 for a little while, like we did for antsibull-core v1. I'm not sure about when we'd want to cut a antsibull-docs v3 release to drop support for antsibull-core v2. antsibull-docs is more your area than mine.

That depends on what happens to Python 3.9 support. I don't mind getting rid of antsibull-core v2 support sooner than later, but if that requires to drop Python 3.9 support it's not an option.

@gotmax23
Copy link
Collaborator Author

gotmax23 commented Dec 4, 2023

Yeah, I'm fine with keeping Python 3.9 support for antsibull-core v3. I just put that option out there.

I think I'll be able to write some compat code for antsibull-docs to remain compatible with both pydantic versions (and thus both antsibull-core versions). I already submitted ansible-community/antsibull#564 for antsibull. It uses LibContext and AppContext but doesn't have its own pydantic models, so that was easier.

I submitted ansible-community/antsibull-docs#224. I changed everything to use the pydantic.v1 compat module (which is just a copy of the last pydantic v1 release included within pydantic v2's tree) for all models except AppContext which is inherited from antsibull-core. It's a bit messy and touches several files. I'd really prefer not to do this and just keep antsibull-docs v2 tied to antsibull-core v2 and properly port antsibull-docs v3 to pydantic v2, but I just wanted to put this out there.

What do you think?

@felixfontein
Copy link
Collaborator

Sounds good to me!

@gotmax23
Copy link
Collaborator Author

@felixfontein, you mean

keep antsibull-docs v2 tied to antsibull-core v2 and properly port antsibull-docs v3 to pydantic v2

or that we should attempt to maintain compatibility between antsibull-docs v2 and antsibull-core v3 as in ansible-community/antsibull-docs#224?

@felixfontein
Copy link
Collaborator

Ah sorry, yes, I meant making it compatible to both core v2 and v3. I'd lke to avoid doing a new major release for some time...

@gotmax23
Copy link
Collaborator Author

I created a stable-2 branch and filed the following PRs:

@gotmax23
Copy link
Collaborator Author

@felixfontein, what do you think about creating a 3.0.0a1 release later this week?

@felixfontein
Copy link
Collaborator

@gotmax23 sounds good to me! If you have time, can you take a look at #135? Would be nice to get that one in as well.

@gotmax23
Copy link
Collaborator Author

We can cut the release after #144 is reviewed and merged.

@felixfontein
Copy link
Collaborator

So, how should we proceed? Should we do 3.0.0 final soon?

@gotmax23
Copy link
Collaborator Author

gotmax23 commented Mar 6, 2024

Yes, I think so!

@felixfontein
Copy link
Collaborator

antsibull-core 3.0.0 is out! \o/ The remaining task is to eventually limit the minimum antsibull and antsibull-docs versions supporting 3.0.0 in CI; I've created #154 to track this.

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 a pull request may close this issue.

2 participants