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

sre_parse is not available in python 3.11 #22

Open
gsemet opened this issue Jun 13, 2023 · 1 comment
Open

sre_parse is not available in python 3.11 #22

gsemet opened this issue Jun 13, 2023 · 1 comment

Comments

@gsemet
Copy link

gsemet commented Jun 13, 2023

Please update to use re.parse directly.

Error:

.venv/lib/python3.11/site-packages/jsonschema_default/__init__.py:28: in create_from
    obj = {p: _get_default(name=p, prop=prop, schema=schema) for p, prop in properties.items()}
.venv/lib/python3.11/site-packages/jsonschema_default/__init__.py:28: in <dictcomp>
    obj = {p: _get_default(name=p, prop=prop, schema=schema) for p, prop in properties.items()}
.venv/lib/python3.11/site-packages/jsonschema_default/__init__.py:61: in _get_default
    default = _get_default(name, any_of[0], schema)
.venv/lib/python3.11/site-packages/jsonschema_default/__init__.py:74: in _get_default
    default = generator(name, prop, schema)
.venv/lib/python3.11/site-packages/jsonschema_default/__init__.py:94: in _create_string
    default = x.xeger(regex_pattern)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <xeger.xeger.Xeger object at 0x7f01ce5b5790>, string_or_regex = '^(.+)$'
    def xeger(self, string_or_regex):
        try:
            pattern = string_or_regex.pattern
        except AttributeError:
            pattern = string_or_regex
    
>       parsed = re.sre_parse.parse(pattern)
E       AttributeError: module 're' has no attribute 'sre_parse'
.venv/lib/python3.11/site-packages/xeger/xeger.py:87: AttributeError
@LanderMoerkerke
Copy link

Fix in PR: #21

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

No branches or pull requests

2 participants