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

Update versioneer to enable Python 3.11 #812

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oscargus
Copy link

Updated versioneer as old versions of it use configparser.SafeConfigParser which is removed in Python 3.11.

@oscargus oscargus force-pushed the updateversioneer branch 4 times, most recently from 3bfb690 to 01f5edb Compare January 20, 2022 09:32
@oscargus
Copy link
Author

There is a hack in here to avoid updating the newly copied _version.py file since it is no longer copied before trying to update it.

I think it is related to executing build_ext as part of build, which no longer seems possible (looking at the previous tests, it is clear that build_ext did not try to update this file, which the new version seems to do) but really no idea. Probably it is better to change in setup.py, but then this will really only become a problem next time versioneer has to be updated...

versioneer.py Outdated Show resolved Hide resolved
@oscargus
Copy link
Author

Updated to latest version.

@oscargus oscargus changed the title Updated versioneer to enable Python 3.11 Update versioneer to enable Python 3.11 Apr 15, 2022
@sklam sklam modified the milestones: 0.39.0 RC, PR Backlog Jun 1, 2022
@esc
Copy link
Member

esc commented Oct 25, 2022

@oscargus we are starting to prep for 3.11 support slowly. We haven't noticed any failures in our initial testing. Do you have an idea where and why this may break on 3.11 w/o this patch? Thank you!

@oscargus
Copy link
Author

I do not really recall anything other than what I stated originally. It uses configparser.SafeConfigParser which apparently is removed in Python 3.11.

But if it works, then I guess that there is no immediate point in changing. However, from a quick check it doesn't look like you are testing with 3.11 now (nor any PR?)?

Anyway, if you are in that process, I can try to update once again since I think that there is a newer version of versioneer.

@oscargus oscargus force-pushed the updateversioneer branch 2 times, most recently from 5b7b124 to b9afd9e Compare October 25, 2022 19:49
@esc
Copy link
Member

esc commented Oct 26, 2022

I do not really recall anything other than what I stated originally. It uses configparser.SafeConfigParser which apparently is removed in Python 3.11.

OK, we will have to double check.

But if it works, then I guess that there is no immediate point in changing. However, from a quick check it doesn't look like you are testing with 3.11 now (nor any PR?)?

It was a bit tricky to test with Python 3.11 since Numba/llvmlite are a bit unique in this respect. We have been testing against the RCs for a few months however. The results and information on how we achieved this are here:

numba/numba#8304

Anyway, if you are in that process, I can try to update once again since I think that there is a newer version of versioneer.

Probably a good idea, thank you.

@oscargus
Copy link
Author

I checked a bit further and it may be that your version of versioneer is so old so that it doesn't even use SafeConfigParser... So in that case there may be no need for it.

Unless of course you want to bump it for other reasons... :-)

(Replacing

* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, and pypy

with

* Compatible with: Python 3.7, 3.8, 3.9, 3.10 and pypy3

is a possible motivation as well, and I assume that it has developed. But does indeed not seem required.)

(I made an effort updating versioneer once I was informed about the issue in a number of relevant packages, although I must admit that I didn't really consider this case.)

@oscargus
Copy link
Author

Note that it doesn't state 3.11, but it is the latest available version (0.27) and it doesn't use SafeConfigParser.

@esc
Copy link
Member

esc commented Oct 26, 2022

Note that it doesn't state 3.11, but it is the latest available version (0.27) and it doesn't use SafeConfigParser.

Perhaps then it is better to wait for a 3.11 compat. release?

@oscargus
Copy link
Author

oscargus commented Oct 26, 2022

Maybe. They just added formal testing for 3.11 python-versioneer/python-versioneer#348

All I can say is that other packages have upgraded and works well. Here is the PR that started it: aesara-devs/aesara#721

You are on 0.12, SafeConfigParser was introduced in 0.15 python-versioneer/python-versioneer@1fe079a, and the issue has been fixed since 0.19(?) python-versioneer/python-versioneer#207

@esc
Copy link
Member

esc commented Oct 27, 2022

Maybe. They just added formal testing for 3.11 python-versioneer/python-versioneer#348

All I can say is that other packages have upgraded and works well. Here is the PR that started it: aesara-devs/aesara#721

You are on 0.12, SafeConfigParser was introduced in 0.15 python-versioneer/python-versioneer@1fe079a, and the issue has been fixed since 0.19(?) python-versioneer/python-versioneer#207

OK, well, if nothing is actually broken broken, then perhaps we could just wait until smth. actually breaks?

@oscargus
Copy link
Author

Your call for sure.

(I usually update dependencies for the sake of it every now and then, unless it breaks something, but there is of course also the other way around. And this is not really a dependency in the traditional way either.)

@esc
Copy link
Member

esc commented Nov 10, 2022

Your call for sure.

(I usually update dependencies for the sake of it every now and then, unless it breaks something, but there is of course also the other way around. And this is not really a dependency in the traditional way either.)

Once we get CI testing for llvmlite for Python 3.11 going I'd suggest to try to update the vendored versioneer code to a Python 3.11 compatible version. Does that make sense?

You can subscribe to #885 for updates on when this will happen.

@esc
Copy link
Member

esc commented Jun 9, 2023

@oscargus llvmlite 0.40.0 was released already and supports Python 3.11 -- do you want to give this another spin.

@esc esc removed this from the PR Backlog milestone Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Observing
Development

Successfully merging this pull request may close these issues.

None yet

3 participants