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

xeger: avoid deprecated sre_parse module in python-3.11+ #28

Merged
merged 3 commits into from
Apr 18, 2023

Conversation

slyon
Copy link
Contributor

@slyon slyon commented Nov 8, 2022

The undocumented sre_parse module got deprecated in Python 3.11 which leads to build/test failures on Linux distributions making use of this version, e.g. Ubuntu 23.04.

See bpo-47152: python/cpython#91308

@bjmc
Copy link
Collaborator

bjmc commented Nov 8, 2022

Thanks for this fix! Please add Python 3.11 to tox.ini to make sure we have test coverage for this.

@slyon
Copy link
Contributor Author

slyon commented Nov 8, 2022

Hmm.. looks like we need some more work on the CI: ERROR: InterpreterNotFound: python3.11

Do you have any hints what needs to be done here? Do we need to switch to a newer CI runner, supporting python3.11?

@bjmc
Copy link
Collaborator

bjmc commented Nov 8, 2022

Sounds like it. Either a newer CI runner, or get Py3.11 added to this one. This project uses https://github.com/mikicz/docker-tox-base as the Docker image for CI runs - you could add (or request) support for 3.11 there.

I'm busy now, but I can take a look at it this weekend.

@bjmc
Copy link
Collaborator

bjmc commented Nov 8, 2022

There's also an unrelated mypy failure around typing, so that needs to be fixed as well.

@slyon slyon force-pushed the slyon/python311-compat branch from 4db70dc to abe796b Compare November 8, 2022 11:44
slyon added 2 commits November 8, 2022 12:52
The undocumented sre_parse module got deprecated in Python 3.11 which leads
to build/test failures on Linux distributions making use of this version, e.g.
Ubuntu 23.04.

See bpo-47152: python/cpython#91308
@slyon slyon force-pushed the slyon/python311-compat branch from abe796b to 81e4db6 Compare November 8, 2022 11:52
@slyon
Copy link
Contributor Author

slyon commented Nov 8, 2022

I silenced the two mypy errors, as those seem to be false positives to me.

It would be great if you could have a look into the docker-tox-base CI image, to enable py311, thanks!
I already applied this patch in Ubuntu (slightly modified, to match downstream sources): https://launchpad.net/ubuntu/+source/python-rstr/2.2.6-3ubuntu1

@bjmc
Copy link
Collaborator

bjmc commented Nov 9, 2022

https://launchpad.net/ubuntu/+source/python-rstr/2.2.6-3ubuntu1

This isn't rstr v2.2.6 any more - this should be at least 3.2.0 and it will probably be 3.2.1 🙂

@slyon
Copy link
Contributor Author

slyon commented Nov 21, 2022

Right, that's why I backported the patch in Ubuntu. And we'll move ahead to a more recent upstream version, once the Debian mantainer decides to do so: https://tracker.debian.org/pkg/python-rstr

@bjmc bjmc merged commit b4df740 into leapfrogonline:master Apr 18, 2023
@bjmc
Copy link
Collaborator

bjmc commented Apr 18, 2023

Sorry for the delay. Thanks for your contribution @slyon! Would you like to be listed in AUTHORS?

@slyon
Copy link
Contributor Author

slyon commented Apr 24, 2023

Sorry for the delay. Thanks for your contribution @slyon! Would you like to be listed in AUTHORS?

Thanks for getting it landed. No need to give credit in AUTHORS for this tiny "drive-by fix".

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