Py-KMS-Organization / py-kms

KMS Server Emulator written in Python
https://py-kms.readthedocs.io/en/latest/readme.html
The Unlicense
628 stars 113 forks source link

Py-KMS on Python Version 3.10 not working #36

Closed lodiabloc closed 2 years ago

lodiabloc commented 2 years ago

Hello

I want to use py-kms for my homelab test but cannot start the service

here step by step what i have done

c:\KMS\py-kms>



I would like to get some help to know if i missed one step 

thanks you in advance
Matthew-Beckett commented 2 years ago

Hi @lodiabloc

In Python 3.3 it seems Sequence was moved from collections to collections.abc which explains this behaviour you're seeing in 3.10.

You can either back date to 3.3 or alternatively you can use our Docker container to work around the issue.

I will mark this as a confirmed bug and we'll set to work fixing this.

Thanks, Matt

AraHaan commented 2 years ago

Another issue as well is that it also will try to use the SO_REUSEPORT which does not exist on windows.

simonmicro commented 2 years ago

This is not a bug per-se as we clearly state that we are using Python 3.6.9+ in our readme and as https://endoflife.date/python reports the versions before that breaking change are far beyond their end-of-life dates.

I would prefer to close this - what do your think @Matthew-Beckett ?

Matthew-Beckett commented 2 years ago

This is not a bug per-se as we clearly state that we are using Python 3.6.9+ in our readme and as https://endoflife.date/python reports the versions before that breaking change are far beyond their end-of-life dates.

I would prefer to close this - what do your think @Matthew-Beckett ?

@simonmicro I'm a little confused as to your comment. You state that we use 3.6.9 however if so Sequence would have been moved from collections to collections.abc and thus this would be an actual bug as our import reference is for a version that is EoL no?

3.6.9 is going EoL in two weeks anyway, I think we should upgrade to 3.9 or 3.10, squash this bug and complete the chore of upgrading whilst we're there.

simonmicro commented 2 years ago

Nvm - I can confirm it.

simonmicro commented 2 years ago

On it.

simonmicro commented 2 years ago

Should work now?!

Matthew-Beckett commented 2 years ago

Should work now?!

Can we try and not commit to master? PRs are here for a reason...

simonmicro commented 2 years ago

You are right. I'll create PRs from now on... The next branch will be used from now on for direct commits :)

lodiabloc commented 2 years ago

Thanks for the fix its now work fine @simonmicro

CRCinAU commented 2 years ago

This is a much better fix - as it supports both:

try:
    from collections.abc import Sequence
except ImportError:
    from collections import Sequence