Giter Club home page Giter Club logo

Comments (4)

pedrohc avatar pedrohc commented on July 18, 2024

https://github.com/ralphbean/bugwarrior/blob/dd96577c77949c8f07852785a8c8def368391970/bugwarrior/config.py#L232C98-L232C98

Had to include interpolation=None argument there to fix this. Can we make it permanent?

from bugwarrior.

ryneeverett avatar ryneeverett commented on July 18, 2024

https://github.com/ralphbean/bugwarrior/blob/dd96577c77949c8f07852785a8c8def368391970/bugwarrior/config.py#L232C98-L232C98

Had to include interpolation=None argument there to fix this. Can we make it permanent?

Note that one option is to work around this by escaping each instance of the percent sign with a double-percent sign. % -> %%

That said, I'd be inclined to agree that your proposal is a good idea. Technically it is a breaking change but that ship has mostly sailed since the last release. Some context:

  • Since the last release I've implemented strict validation that will not permit arbitrary variables. If somebody were using same-section interpolation this would be broken, but they could still use interpolation with the [DEFAULT] section.
  • Even though I've taken pains to minimize breaking changes, practically speaking everybody is going to have to update their configuration files for the next release anyway because it is next to impossible to write even a very small configuration file that is valid without automated validation.
  • Since the last release I've implemented TOML configuration as an alternative, which does not have this interpolation support. I don't think we should encourage use of features like interpolation that are specific to a single configuration language.
  • The only use case I've seen presented for interpolation in bugwarrior configuration is to reuse secrets, but I don't think we should encourage writing plaintext secrets in the config file anyway.

from bugwarrior.

pedrohc avatar pedrohc commented on July 18, 2024

Agreed with your points there.

I tried escaping the '%' characters with another '%' to no success.

Also, tried using TOML syntax but was having other unrelated parsing errors.

So that was my last alternative which fixed the issue without too much complex tinkering with the code.

IMHO, if there are only few use cases for interpolation, a better way would be to make it contained to those special cases if its really needed. But I'm more inclined to your third point there.

Thanks for reviewing this. If you want me to make a PR, please let me know.

from bugwarrior.

ryneeverett avatar ryneeverett commented on July 18, 2024

Also, tried using TOML syntax but was having other unrelated parsing errors.

Please open an issue if you ran into bugs with the TOML syntax.

Thanks for reviewing this. If you want me to make a PR, please let me know.

Go for it!

from bugwarrior.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.