Allow [ ] brackets in table regex #281

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

Projects

None yet

2 participants

@WalkerCodeRanger

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 sebdah added a commit that referenced this issue Dec 26, 2015
@sebdah Customize ConfigParser section regexp
This is addressing #281, so that `]` will be allowed in section names.
cc365e8
@sebdah sebdah added a commit that referenced this issue Dec 26, 2015
@sebdah Add release notes for #281 795fcae
@sebdah sebdah self-assigned this Dec 26, 2015
@sebdah sebdah added this to the 2.3.x milestone Dec 26, 2015
@sebdah
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

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.

@sebdah sebdah closed this Jul 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment