iteration_utilities icon indicating copy to clipboard operation
iteration_utilities copied to clipboard

Python 3.10 support

Open blakeNaccarato opened this issue 3 years ago • 12 comments

Hello. Thank you for the latest bump to support Python 3.9. Are there plans to support Python 3.10 as well? At least one package (copier-org/copier) would benefit from this support.

blakeNaccarato avatar Mar 15 '22 20:03 blakeNaccarato

Hey @blakeNaccarato

thank you for opening the issue. Unfortunately the github actions workflows are "a bit" oudated. I'll have a look at it in the next days.

Is the package actually not supporting Python 3.10 or are just the wheels missing?

MSeifert04 avatar Mar 15 '22 23:03 MSeifert04

Yes it's just the wheels missing from PyPi for my particular arch, 64-bit Windows 10 on Python 3.10. In fact I can build it on a similar machine that I happen to have the build tools on.

I'm using the self-built package in service of copier and it seems to work fine, but copier only depends on deepflatten, so it's probably not the most robust test.

blakeNaccarato avatar Mar 16 '22 00:03 blakeNaccarato

Specifically the wheel that I can build for myself on my more developer-focused machines is iteration_utilities-0.11.0-cp310-cp310-win_amd64.whl.

I also checked out the repo at the 11.0.0 tag, as well as at HEAD, and ran your test suite. 1288/1288 tests passed on my machine in both cases. So that's a good sign!

blakeNaccarato avatar Mar 16 '22 16:03 blakeNaccarato

Thank you for checking the test suite. If it compiles and the tests work it's probably just updating the github actions so I can build the wheels for the different OSes. I think I can allocate some time in the next days (probably weekend) to do that.

MSeifert04 avatar Mar 16 '22 16:03 MSeifert04

Thanks for looking into it. Also, please don't feel pressured to highly prioritize this, as I can still manage to build my own wheel for 0.11.0 in the meantime, and it's not a major blocking issue over at copier-org/copier in any case. It's just a nice-to-have for the future.

blakeNaccarato avatar Mar 16 '22 16:03 blakeNaccarato

Yeah, I think having Python 3.10 wheels might be really good - especially because most Windows users won't have a C compiler at hand. I also made some good progress today and I can confirm that Python 3.10 doesn't break anything. However it will take me a few more days to get this in a state where I can comfortably publish additional wheels on pypi. However if you need additional wheels the pipeline did create some wheels that passed the tests: https://github.com/MSeifert04/iteration_utilities/actions/runs/2008739611 (you may need to scroll down a bit)

MSeifert04 avatar Mar 19 '22 13:03 MSeifert04

Hello again. Just checking in to see what is left to do regarding Python 3.10 support, and if there is any way I can help you?

Of course I understand that CICD and release workflows are just about the least user-friendly for a drive-by contributor, but I figured I'd offer to help nonetheless. 😅

blakeNaccarato avatar Apr 21 '22 04:04 blakeNaccarato

Sorry for dropping the ball on this, I'm currently pretty much swamped by work and private live. Just no energy and time to wrap up the commit.

MSeifert04 avatar Apr 21 '22 16:04 MSeifert04

Thank you for offering help :)

But most of what needs to be done is stuff where I need to decide how I want to develop the package in the future (or not) and what I want to support (or not).

MSeifert04 avatar Apr 21 '22 16:04 MSeifert04

No worries, I figured that the main blockers were big-picture things.

If you do end up deciding to put out a call for maintainers, I'm sure that asking around in a community like the Python Discord could help point you in the right direction.

blakeNaccarato avatar Apr 21 '22 21:04 blakeNaccarato

Ran into this problem myself recently under windows, as a quick fix I just dropped down to python 3.9

Hecatron avatar Jun 24 '22 23:06 Hecatron

@MSeifert04 Hi Michael, is there any plan to publish wheel for python 3.10? It's a block issue for us to upgrade to latest python now. Looking forward to seeing progress, and many thanks for your supporing in advance :)

zlogz101 avatar Jul 11 '22 03:07 zlogz101

Hi any update for 3.10 ?

ningen1 avatar Nov 14 '22 10:11 ningen1

Any Update in 3.10 or 3.11?

swiedernix avatar Dec 26 '22 16:12 swiedernix

I've updated my top-level comment with some useful information, including a workaround for Windows users and some leads on replacing your dependency on iteration_utilities.

blakeNaccarato avatar Jan 01 '23 22:01 blakeNaccarato

Based on the great work of @fcollonval there is now a new release of iteration_utilities including wheels for Python 3.10, 3.11, and 3.12. 🎉

But that's as far as the (purely) good news goes. I also want to include a word of caution and the future of the library at this point.

I cannot promise that such a situation might not happen again in the future. While this project is still very fascinating to me, I just haven't found the time to really dig into the new toolchains (and changes) surrounding Python with C extensions. I will attempt to find some more free time to keep up-to-date with the build-tools so that such a missing-wheels situation hopefully won't go unaddressed for that long.

I have also considered asking for an additional maintainer but I wouldn't accept someone that I don't know personally because the risk of a "random" person hijacking the package and including malware (or other nefarious things) is something I don't want to take. And unfortunately I've read about such incidents a few times...

In summary: I hope I can keep the package in working condition in the future. Probably not always instantaneous, but hopefully it will only be days/weeks instead of years. I'm also not planning to add new features at this point in time. I'm not saying it won't happen, but at the moment I'm not using Python much and thus don't need additional stuff.


Also I cannot recommend to add this (or any) library as a dependency of libraries or production code if you're only using one function from the package and you don't really need the better performance (some of the) functions here provide over alternatives. Additional dependencies carry risks, especially if it's a C extension based library like iteration_utilities. If there's a bug in the code it might have more serious consequences than just an unexpected result or exception.[1] And this library has only one maintainer (me). Always make sure the utility/usability of the library outweighs the risks for you!

I don't want to discourage the use of this project for fun and personal projects. And if you're actually using iteraton_utilities in a library or production feel free to drop a issue in this repo. I would love to hear what you've been doing with the library 😍


[1] iteration_utilities does have a lot of tests to minimize that risk and prevent regressions, but that's no guarantee there's no problem in the code. If you ever find a exploitable bug in the C code of a public function in my library I will do my best (and fast) to fix it or if that's not possible, remove the affected release from PyPI.

MSeifert04 avatar Oct 13 '23 01:10 MSeifert04