Skip to content

Conversation

@eliben
Copy link
Contributor

@eliben eliben commented Jan 24, 2026

Several tests expect precise error messages from pycparser, which pycparser doesn't guarantee. While testing CFFI with pycparser 3.0, some tests needed to be made more resilient. I've used the .startswith() approach already used in this file, instead of exact string matching.

Ref #223

Several tests expect precise error messages from pycparser, which pycparser
doesn't guarantee. While testing CFFI with pycparser 3.0, some tests needed
to be made more resilient. I've used the .startswith() approach already used
in this file, instead of exact string matching.

Ref python-cffi#223
@eliben
Copy link
Contributor Author

eliben commented Jan 24, 2026

The only failing CI check (https://github.com/python-cffi/cffi/actions/runs/21318284561/job/61364325190?pr=224) seems to be pulling pycparser 2.23 instead of the new 3.00; I'm not sure why, this is probably specific to how this check is set up?

It would be possible to make the failing test even more resilient - succeeding on both pycparser 2.23 and 3.00; I can amend the PR to do that, if you're interested.

Alternatively, the check can be fixed to pull the newest pycparser - like all the other CI checks.

@mattip
Copy link
Contributor

mattip commented Jan 24, 2026

If possible loosening the error checking specificity to accommodate both versions would be great

@eliben
Copy link
Contributor Author

eliben commented Jan 24, 2026

If possible loosening the error checking specificity to accommodate both versions would be great

Thank you for the quick review.

Done - all CI checks pass now.

@mattip mattip merged commit c36c02f into python-cffi:main Jan 25, 2026
37 checks passed
@mattip
Copy link
Contributor

mattip commented Jan 25, 2026

Thanks @eliben

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