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
bring back set_version (or similar) to restore ability to dynamically set package version in plugins #6223
Comments
Please consider that the version of a I only see two options at the moment:
The first option carries a certain risk since we might use The second option is not exactly setting the version, so you have to check if it even covers your use case. |
previously #5486 (comment) (but presumably the plugin author in that conversation didn't care enough to submit an MR) |
@radoering thanks for the feedback. I see your point about the mutability of versions and hashability of the FWIW, in my PR (python-poetry/poetry-core#447) I tried approach 1. The poetry-core tests are satisfied. But many upstream poetry tests fail with the unhashable exception I'm raising: https://github.com/python-poetry/poetry-core/runs/7998228448?check_suite_focus=true. |
Yeah, in the downstream tests I see that approach 1 can't succeed. We don't use I suppose setting There might be one more option considering the hash method: We could overwrite |
Okay I updated my PR. The it makes the |
IMO it's acceptable, at least I can't think of a better solution for now. I added a test that checks that the hash does not change when changing the version so we should notice if we break |
Resolved by python-poetry/poetry-core#447 |
Thank you @radoering! I'm grateful that our 1.2 migration path is preserved! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature Request
Hello. I am current trying to move from poetry 1.2.0a2 to 1.2.0rc1. I'm maintaining a custom version plugin that relies on the set_version function which was removed in this commit: a5ab9ce.
I'm struggling to find an alternative for this function. I noticed this idea:
#144 (comment)
...but it alters the pyproject.toml file, which dirties up my version control story.
I headed over to discord to discuss it there. It sounds like a PR to add this feature back would be welcome.
The text was updated successfully, but these errors were encountered: