stevearc / pypicloud

S3-backed pypi server implementation
MIT License
506 stars 141 forks source link

Support python 3.10 #313

Open yannayh opened 2 years ago

yannayh commented 2 years ago

Greetings..

As python 3.10 is out for nearly a year now, I think that it would be great if the project would support python 3.10. I tried opening a pull request that adds support (as it should be pretty easy, modifying some tox configuration, adding a new github workflow and adding a classifier to the setup.py - as usually there are no code breaks between the python versions).

In doing so I saw two issues:

  1. The docker image which is used in the CI (and in the other docker image repository) has only python versions up to 3.9, but this was fixed in #304 when the base image was changed. It will be solved entirely once the docker image in the other repository will use that image as well.
  2. The unit-tests are ran using nose-test, which is an unmaintained project for a few years now. It worked well until now, but in one of the changes in python 3.10, there is a change that breaks nosetests.

The second issue is pretty big and as nose-tests is unmaintained, and while we use it we won't be able to use any new python version - I think that the project should move to an another test-suite, maybe pytest or nose2.

stevearc commented 2 years ago

Yes, issue 2 is a problem. Switching to a different test runner should work seamlessly for almost everything, but I know of at least one case where it wouldn't. The tests for the DynamoDB cache rely on using a dynamo class variable to inject a DynamoDB connection. This is done via this nose plugin in dynamo3.

I don't have the time to put into large changes on pypicloud anymore (the recent fighting I've had to do with the docker builds is already putting me over budget). If you want to take a stab at it, I think that the majority of the work would just be finding a way to replace that nose plugin using a different test runner.