Skip to content

Conversation

@Fokko
Copy link
Contributor

@Fokko Fokko commented Jul 20, 2022

I've updated the version to 0.14.0.dev0. I'm not sure when we want to release the first version, and still tbd if we do it together with the Java stuff, or if we are going to run a separate release process.

I wanted to add the version to the python side as well, so we can inject it into the HTTP headers of the rest catalog introduced in #5287.

We store the version in __version__, which is the defacto standard way of doing this in Python: https://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package

For Java we use 0.14.0-SNAPSHOT and we fetch it from the version.txt or from the git tag itself. I've dug into replicating this logic in Python, but there it is a bit more cumbersome because we have to make sure that the logic both works when developing, and after doing a release (since we're setting the version dynamically). Just setting it through poetry (poetry version 0.14.0 gives me much more peace of mind since this is the official way of poetry. Instead of having a -SNAPSHOT version, indicating the development version, I've conformed to PEP440 and went for the .dev0 postfix. We could also introduce the .rcN postfixes in the release process. You can upload these artifacts to pypi, and everyone can give them a try, but you can only use them by explicitly stating the rc, which makes the barrier for people to give the RC a try much lower.

[tool.poetry]
name = "pyiceberg"
version = "0.0.1rc1"
version = "0.14.0.dev0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess using 0.14.0 means every time there's major/minor release from java library, there's need to bump up this to keep it in sync. However I feel there's still cognitive benefit so LGTM!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Fokko how would this change for patch releases to the python client?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably set this to 0.1.0.dev0? I don't think that we want to tie Java and Python versions together, right?

Copy link
Contributor Author

@Fokko Fokko Jul 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks all for chiming in! 👍🏻 As I wrote in the initial post, this is up for discussion. I can see benefits on both sides.

The direct reason for adding the version to the Python code is to pass it as a header to the REST API. If we release Python and Java together, we can give some guarantee that they are compatible.
My biggest concern with tying them together is that the release process becomes more involved because we have to test both Java and Python. Especially since the Python codebase is still young, I would expect a faster release cadence until everything settles.

I've changed it to 0.1.0.dev0 for now.

@rdblue rdblue merged commit debad8e into apache:master Jul 21, 2022
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.

4 participants