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

fix: do not crash on cpython 3.11 #1

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

korniltsev
Copy link
Contributor

  File "/tmp/build-env-dxzj3a1v/lib/python3.11/site-packages/milksnake/setuptools_ext.py", line 226, in make_ffi
    from milksnake.ffi import make_ffi
  File "/tmp/build-env-dxzj3a1v/lib/python3.11/site-packages/milksnake/ffi.py", line 8, in <module>
    _directive_re = re.compile(r'^\s*#.*?$(?m)')
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/korniltsev/.asdf/installs/python/3.11.0/lib/python3.11/re/__init__.py", line 227, in compile
    return _compile(pattern, flags)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/korniltsev/.asdf/installs/python/3.11.0/lib/python3.11/re/__init__.py", line 294, in _compile
    p = _compiler.compile(pattern, flags)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/korniltsev/.asdf/installs/python/3.11.0/lib/python3.11/re/_compiler.py", line 743, in compile
    p = _parser.parse(p, flags)
        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/korniltsev/.asdf/installs/python/3.11.0/lib/python3.11/re/_parser.py", line 980, in parse
    p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/korniltsev/.asdf/installs/python/3.11.0/lib/python3.11/re/_parser.py", line 455, in _parse_sub
    itemsappend(_parse(source, state, verbose, nested + 1,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/korniltsev/.asdf/installs/python/3.11.0/lib/python3.11/re/_parser.py", line 841, in _parse
    raise source.error('global flags not at the start '
re.error: global flags not at the start of the expression at position 9

fix crash

@omarabid omarabid merged commit fe2b61a into omarabid:master Nov 30, 2022
@korniltsev
Copy link
Contributor Author

@omarabid Could you please also publish it to pypi ?

@korniltsev
Copy link
Contributor Author

Oh shoot, I think I broke 2.7 according to gh actions :(

@korniltsev
Copy link
Contributor Author

or not, maybe it was red before me as well

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

Successfully merging this pull request may close these issues.

2 participants