Skip to content
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

Allow [ ] brackets in table regex #281

Closed
WalkerCodeRanger opened this issue Dec 8, 2015 · 2 comments
Closed

Allow [ ] brackets in table regex #281

WalkerCodeRanger opened this issue Dec 8, 2015 · 2 comments

Comments

@WalkerCodeRanger
Copy link

I could not re-open #186. We have a table regular expression like:

[table: ^dev(-lms|-cms)?-[^-]+(?<=\d{4})(?<!2015)$]

This gives the error in the log:

 2015-12-08 19:36:45,097 - dynamic-dynamodb - ERROR - Invalid regular expression:
   "^dev(-lms|-cms)?-[^-"

You can see that the regular expression is being truncated at the right brace. This looks to be that the config library is stopping at the first right bracket it encounters.

sebdah added a commit that referenced this issue Dec 26, 2015
This is addressing #281, so that `]` will be allowed in section names.
sebdah added a commit that referenced this issue Dec 26, 2015
@sebdah sebdah self-assigned this Dec 26, 2015
@sebdah sebdah added this to the 2.3.x milestone Dec 26, 2015
@sebdah
Copy link
Owner

sebdah commented Dec 26, 2015

So I have looked into this and the reason ] is not currently supported is that it's defined as a termination character in Python's ConfigParser library. There has been some discussion about that in the Python community but no change will be introduced now in ConfigParser.

The good news is that there is a way to manually update the regular expression. I have done so in develop. I have also released an alpha version. @WalkerCodeRanger would you mind installing that and give it a try?

It's installed with pip install dynamic-dynamodb==2.3.0a1.

It looks good locally on my machine, but I would like to get some more eyes on it before releasing.

@WalkerCodeRanger
Copy link
Author

Unfortunately, we have already worked around this issue and moved it into production. At this time we have moved onto other things. Eventually, I'm sure we will upgrade dynamic dynamodb at some point in the future, and when we do, we will likely try to test this. However, that will probably not be for quite a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants