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 behavior with empty matches #27

Open
andreasvc opened this issue Apr 6, 2021 · 5 comments
Open

fix behavior with empty matches #27

andreasvc opened this issue Apr 6, 2021 · 5 comments

Comments

@andreasvc
Copy link
Owner

Python 3.7 fixed bugs related to empty matches: https://bugs.python.org/issue1647489

@sarnold
Copy link

sarnold commented Sep 12, 2021

Okay, but I don't yet see anything pointing to this behavior change, or how using the patch you just merged exhibits the old behavior in ubuntu focal with python 3.9.6 but I get the new behavior in python 3.9.6 locally. WTH??

Anyway, I got bounced from the original "this should match perl's behavior" discussion from 2007:

https://bugs.python.org/issue1647489

to a closed bug and then a closed PR with no apparent fix:

python/cpython#4678

to another (later) closed bug on Python 3.7, Python 3.6, Python 2.7:

https://bugs.python.org/issue25054

and now too I'm tired to bisect and I think I'd rather push a few updates on another PR anyway.

@andreasvc
Copy link
Owner Author

It's an obscure issue. If Python cannot make up its mind about it, maybe we should just remove the test and document that the behavior is inconsistent.

@sarnold
Copy link

sarnold commented Sep 14, 2021

I have this one: sarnold#9 and everything is "fine" except coverage.py chokes with a parse error on the first cimport it sees. I tried the exact same config on the datrie extension and coverage works fine, so I'm not sure if it's a coverage.py bug or the extension code itself. It would be really nice to have some test coverage, but I'm not sue exactly what needs "fixing"...

@sarnold
Copy link

sarnold commented Sep 14, 2021

Oh, I also split out 2 problematic tests so they can be deselected/marked with pytest. Right now there are 2 places where the None vs '' test fails with the patch applied (which are accounted for in the workflows and tox.ini).

@sarnold
Copy link

sarnold commented Sep 14, 2021

Finally, this will fail hard in python 3.10: borgbackup/borg#5683

Fixing that ^^ and removing PY2 support should help getting the test coverage enabled.

andreasvc added a commit that referenced this issue Dec 20, 2022
…istent across versions/platforms, maybe the test should be disabled altogether. #27
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