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

Make the code Python 3 compatible #1740

Merged
merged 2 commits into from
May 25, 2021

Conversation

replaceafill
Copy link
Member

@replaceafill replaceafill commented May 25, 2021

This updates the MCPServer, MCPClient and dashboard to run in Python
2.7 and Python 3.6:

  • All the shebangs of the Python scripts have been updated to
    #!/usr/bin/env python so they can run in both versions

  • All the gearman tasks are now registered with a binary name and
    several encoding issues raised by the AMAUATs have been fixed

  • The clientScripts directory has been added to the MCPClient
    PYTHONPATH and all the sys.path modifications in its tests have
    been removed

  • A Django migration script has been added to make all the FPR
    pythonScripts compatible with both versions

  • A PYTHON_VERSION argument has been added to the docker development
    environment which allows the components to be run in both versions
    with Python 3.6 being the default one

  • The ensure-no-mutable-globals.py and checkformigrations.sh
    scripts are now also run in Python 3.6 in the GitHub test CI
    workflow

  • The archivematica-acceptance-tests submodule has been updated to
    include a fix for the @transfer-backlog tag

  • The GitHub AMAUAT CI workflow runs in both versions at the same time

Connected to archivematica/Issues#1317

@replaceafill replaceafill added the AMAUAT Issues relating to the improvement of the AM Automated Acceptance tests label May 25, 2021
Copy link
Member

@sevein sevein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big day! Thank you so much. Lots of smart decisions here. Running it locally, it seems to work great too. It feels kind of magical to recreate my containers and boom! I'll update Ansible and packages with the new path consequently.

@sevein sevein added this to the 1.13.0 milestone May 25, 2021
This updates the MCPServer, MCPClient and dashboard to run in Python
2.7 and Python 3.6:

* All the shebangs of the Python scripts have been updated to
  `#!/usr/bin/env python` so they can run in both versions

* All the gearman tasks are now registered with a binary name and
  several encoding issues raised by the AMAUATs have been fixed

* The `clientScripts` directory has been added to the MCPClient
  `PYTHONPATH` and all the `sys.path` modifications in its tests have
  been removed

* A Django migration script has been added to make all the FPR
  `pythonScript`s compatible with both versions

* A `PYTHON_VERSION` argument has been added to the docker development
  environment which allows the components to be run in both versions
  with Python 3.6 being the default one

* The `ensure-no-mutable-globals.py` and `checkformigrations.sh`
  scripts are now also run in Python 3.6 in the GitHub test CI
  workflow

* The `archivematica-acceptance-tests` submodule has been updated to
  include a fix for the `@transfer-backlog` tag

* The GitHub AMAUAT CI workflow runs in both versions at the same time
@replaceafill replaceafill force-pushed the dev/issue-1317-python3-compatibility branch from d05c613 to d4b9529 Compare May 25, 2021 15:22
@replaceafill replaceafill merged commit 4a3073d into qa/1.x May 25, 2021
@replaceafill replaceafill deleted the dev/issue-1317-python3-compatibility branch May 25, 2021 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMAUAT Issues relating to the improvement of the AM Automated Acceptance tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants