Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think - as discussed in slack - this is a nice proposal. that we might be able to use in some 8 months (if we back-port it and release in 2.11, but we need to figure out - as part of it - what we do now and how we do it for the rest of the code.
I proposed a solution there (this needs to be fixed) - #43773 (comment) - not sure if we can figure out something better. I think it's a good idea to discuss it there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the only real material problem with the constants is if someone imports one of these constants across providers. otherwise, it's mostly a non-issue. in any case this will be a generally helpful helper func.
if we want to reduce the likelihood of cross provider imports of these kinds of version constants, we could remove the version_references module from the standard provider. i've done that in latest commit. take a look and lemme know what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, after thinking a bit and seeing it - I think we can have cale And wat it too. Maybe we can generate the constants via
__init__.pytemplate in all providers?This way each procider could have automatically generated own set of constant (possibly even named differently to avoid confusion where to importit from.
I am at family funeral today with my mum and two aunt's but I can propose a PR when I am back if that seems appealing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #44686