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

Ensure compatibility with python 3.10 #195

Closed
robons opened this issue Oct 12, 2021 · 4 comments
Closed

Ensure compatibility with python 3.10 #195

robons opened this issue Oct 12, 2021 · 4 comments
Assignees
Labels

Comments

@robons
Copy link
Contributor

robons commented Oct 12, 2021

Python 3.10 has recently been released but causes some problems with our code. Unit tests are failing. We need to find out what's failing, how much of our code needs rewriting/fixing and whether that will impact on our ability to support python 3.9.

To make it clear: we want to be able to support both Python 3.9 and 3.10, so let's not start using any 3.10-specific features if we can avoid it. We might need to do some if statements/branching depending on the version of python that the tool is being run under. e.g.

if 3.9:
  do_thing()
elif 3.10:
  do_other_thing()

Ideally, we could set up multiple docker files for 3.9/3.10 so we can test that all tests pass in both containers before publishing. This doesn't necessarily have to be part of the standard Jenkins build, but could be part of a special build process we do when releasing. We're likely to want to extend this when 3.11, etc. are released in future.

If there is little work to do, do it as part of this task, else convert this into an epic with appropriate sub-tasks.

@CharlesRendle
Copy link
Contributor

CharlesRendle commented Nov 3, 2021

TDL:

  • Get BDD tests working through tox - think this is because the command needs to be executed from the .feature files location

  • Unit tests are not working in the csvcubed package ModuleNotFoundError: No module named 'csvcubedmodels'

  • Apply these changes to all subsequent packages (csvcubed-models, e.c.t)

  • Open container from which tox will be run as a step in the jenkinsfile

  • Add a conditional ensuring this step is only triggered when a build tag ends in '0.9'

@robons
Copy link
Contributor Author

robons commented Nov 9, 2021

Once you've set up the (probably Jenkins) script to run all of the unit/behaviour test steps, could you ensure that that you add a step to the release procedure documentation to ensure that all tests pass in all environments before completing the release.

@CharlesRendle
Copy link
Contributor

Jenkins file/ tox stage now starts the container from pythonversiontesting directory successfully but the subsequent tox commands are not recognised. Jenkins returns tox: not found

@robons
Copy link
Contributor Author

robons commented Dec 31, 2021

@CharlesRendle: pydantic have just released v1.9.0 which has python 3.10 support - I've released an updated csvcubed-version of the project with our bug fixes on top. Upgrading the version of csvcubed-pydantic in the csvcubed project should stop the errors you were seeing coming from pydantic when using python 3.10.

https://pypi.org/project/csvcubed-pydantic/1.9.0/

edit: This change is now in the main branch. So merging that in (and resolving the conficts) will be the best way to approach it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants