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

Updates dependencies for Python 3.10 support #557

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

evankirkiles
Copy link
Contributor

Had been running into many issues with packages on newer versions of Python (3.10+). This commit updates most, if not all, the packages to their latest versions to allow for 3.10. It also removes 3.6 from the python-app.yaml, as GitHub actions no longer supports 3.6 (which recently reached EOL) on ubuntu-latest and thus fails Github workflows. Most of the newer package versions similarly no longer support 3.6.

Additional small changes, mostly for fixing failing test cases:

  • In psiturk/experiment_server_controller.py: The check_server_process_running function was throwing exceptions in all psiturk_shell tests on my machine, as some processes returned in psutil.process_iter had already been terminated and thus proc.as_dict would just throw. I wrapped in a try/catch block to remedy, which matches desired functionality.
  • In test_noaws.py, the Github Action similarly fails to pass the last test of because pytest would disable socket use without explicitly specifying it using @pytest.mark.enable_socket.
  • In experiment_server_controller.py, I was only able to pass the psiturk version test by removing sys.exit() from the server when not connected to AWS MTurk. I'm actually quite iffy on this change, because the psiturk CLI shouldn't depend on the server being run to function. I'd love input from someone who understands the functionality a bit better than me.

Related PRs which this solves:

@coveralls
Copy link

coveralls commented Dec 16, 2022

Coverage Status

Coverage increased (+0.03%) to 60.251% when pulling 93b4697 on evankirkiles:master into af00724 on NYUCCL:master.

@evankirkiles
Copy link
Contributor Author

evankirkiles commented Dec 16, 2022

Newer versions of SQLAlchemy requires postgresql:// in the place of postgres://, hence commit 93b4697. This further addresses the following issue, though we might want to log something as well here:

Unfortunately, Heroku enforces its own DATABASE_URL as postgres://, which is unchangeable, so can't simply instruct users to always use postgresql://.

@jacob-lee
Copy link
Collaborator

Not sure why sys.exit() is used at all in psiturk_shell.py, tbh.

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

Successfully merging this pull request may close these issues.

3 participants