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

Scrunch compatibility with Python 3.11 #449

Closed
shaikh-ma opened this issue Nov 29, 2023 · 6 comments
Closed

Scrunch compatibility with Python 3.11 #449

shaikh-ma opened this issue Nov 29, 2023 · 6 comments

Comments

@shaikh-ma
Copy link
Contributor

Hello,

While attempting to use the scrunch library in one of my project running on Python 3.11 version, I found out that:

The only module that is preventing it, is the collections module in the Python standard library.
The methods Mapping & Iterable had been moved to the collections.abc, in one of Python official versions.

On making slight changes to the imports, I was able to use the scrunch library (0.16.1.dev0+g13c3de1.d20231124) in my Python 3.11 compatible project, without any issues, working as expected.

Below are the changes, which I have tried out,

In the scrunch/datasets.py module.

if sys.version_info.major == 3:
    from collections.abc import Mapping
else:
    from collections import Mapping
  1. In the scrunch/order.py module.
if sys.version_info.major == 3:
    from collections.abc import Iterable
else:
    from collections import Iterable

Please could you have a look and make the scrunch library compatible with Python 3.11, since the above point seems to be only thing blocking it, probably.

@alexbuchhammer
Copy link

@jjdelc Any chance this can be looked at? We are trying to move our infrastructure to 3.11, this would allow us to have Crunch-related processes making a big step in that direction.

Thanks.
Alex

@jjdelc
Copy link
Contributor

jjdelc commented Dec 15, 2023

Hi Alex, currently this isn't in our short term priorities. I can't make that decision. If you have a PR that supports 3.6 and 3.11 we could verify and merge it.

@alexbuchhammer
Copy link

Hey JJ - Aamir (@shaikh-ma ) will soon, around Feb., take care of it then and make a PR.

Aamir - let's chat again about it first!

FYI @jamesrkg

Cheers
Alex

@shaikh-ma
Copy link
Contributor Author

Thank you @jjdelc for merging the pull request #450, please could you also release a tag, when you get a chance, so that we can install the latest version.

Thanks & Regards,
Aamir

@jjdelc
Copy link
Contributor

jjdelc commented Feb 16, 2024

Ah, thanks for this! I just pushed version 0.17.0 with this new PR in it

@shaikh-ma
Copy link
Contributor Author

Thankyou! 🙂

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

3 participants