-
-
Notifications
You must be signed in to change notification settings - Fork 315
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 interpolate option #495
base: develop
Are you sure you want to change the base?
Add interpolate option #495
Conversation
4b4d6a8
to
5e6d49c
Compare
#415 suggested to disable interpolation by default. Would this not be safer to avoid impacting existing users? |
Thanks for the reviews, commits and comments 🙏
We can do that for sure, but that would be a breaking change of the default logic :) Perhaps it can be done in another PR, since the changes would be mainly unrelated. The hereby patch is implementing the fact that interpolation can be deactivated basically - so there should be no change to the current default behaviour.
to:
meaning that people currently calling
|
Thanks for the explanation! I agree that making it explicit in the changelog would be a good thing. |
I pushed more documentation in the CHANGELOG @mschoettle |
Looks good to me! |
@David-Wobrock I've merged #500 to fix #499. And now this branch has conflicts that must be resolved. Could you please rebase |
The argument is already documented but not implemented yet. Fixes joke2k#415
Co-authored-by: Matthias Schoettle <[email protected]>
0825d60
to
eb50590
Compare
Thanks for the review @sergeyklay |
Is there an end goal of all the changes with the interpolation/variable expansion described anywhere? I'm trying to figure out what you want to achieve, based on the recent pull requests, erratic releases, and yanking released versions from PyPI. The way I see it:
So, in terms of the interpolation / variable expansion, we are back in v0.10.0. In my opinion, bringing back the
What I believe should be done (already working on it, I can make a PR once done):
I put the "(Maybe)" in the first point, as this parameter has been added as a workaround for the breaking changes introduced with the variable expansion. Since the feature that made the parameter necessary is reverted, I believe there is no reason to add it back. But if you really want to do it, at least both mechanisms should be kept alongside each other to ensure backward compatibility. Simply replacing the aliasing/proxying mechanism with a proper interpolation will result in breaking changes in projects where anything resembling a $-prefixed variable is used in the middle of any any value. EDIT: Added my proposal in #510 |
Hey @potasiak Thanks for your thorough message.
To be honest, I haven't dug into the past about this.
My reasoning is fairly straightforward on this patch:
Arguably, the parameter is documented, thus not entirely unexpected behaviour.
Fair point. I admit that I made the minimal fix to make my use case work, and to match the code to the documentation. It's mainly that the project is perhaps lacking maintenance (and no blame for that 🤗). So the "minimal" patch here, even if largely sub-optimal, seemed to me more likely to be accepted and released than a larger undertaking. I hope that makes sense 🙂 |
Hello @potasiak @mschoettle @sergeyklay Any chance we can move forward on this? :) |
I'm still against the change in its current state but also decided to switch to https://github.com/sloria/environs in the meantime as it does what I need. I have also created #510 to show how I believe it should be done. Regardless, since I've switched to another package, I no longer have vested interest in how this issue will be resolved, so please proceed as you see fit. |
Understood. Thanks for submitting the patch @potasiak. The approaches are similar, except that yours goes a step further into what I'm fine with whatever approach, as the hereby patch is the minimal change that I require (to re-use your phrasing) for the usage of this package :) |
Second try, after #419 was reverted here #486.
The reason of the revert was these two issues that arise following the release of a new version: #485 and #490 - however, it seems that these were related to #468 instead.
This time, the PR adds unit tests that prove that it is not breaking existing behaviour.