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

Remove python2 support #64

Merged
merged 8 commits into from
Nov 30, 2021
Merged

Remove python2 support #64

merged 8 commits into from
Nov 30, 2021

Conversation

AlexanderWells-diamond
Copy link
Collaborator

This PR standardises Python 3.6 as the lowest supported version of Python, dropping support for Python 2.7.

3.6 was chosen as that's where our CI runs tests, although it wasn't declared as such in the setup.cfg until I edited it. If this should actually be Python3.7 we should also remove 3.6 from CI.

I have removed all references to 2.7, mostly by removing all Python version checking code, and done some fairly trivial refactoring where appropriate.

This also adds some auto-formatting of whitespace/newlines on save to VSCode, as we don't use an autoformatter.

Closes #61

@AlexanderWells-diamond
Copy link
Collaborator Author

This PR is parked until #63 is merged and released, then this branch will need to be rebased.

@codecov
Copy link

codecov bot commented Nov 24, 2021

Codecov Report

Merging #64 (daf58b2) into master (d83ecbf) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #64   +/-   ##
=======================================
  Coverage   85.37%   85.38%           
=======================================
  Files          13       13           
  Lines         834      814   -20     
=======================================
- Hits          712      695   -17     
+ Misses        122      119    -3     
Impacted Files Coverage Δ
softioc/device_core.py 96.19% <100.00%> (-0.04%) ⬇️
softioc/fields.py 91.66% <100.00%> (-1.09%) ⬇️
softioc/imports.py 100.00% <100.00%> (+3.77%) ⬆️
softioc/softioc.py 87.85% <100.00%> (+0.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d83ecbf...daf58b2. Read the comment docs.

As we don't have Black formatter running, this at least provides some
of the functionality without breaking any existing formatting.
@Araneidae Araneidae removed the parked label Nov 30, 2021
Copy link
Collaborator

@Araneidae Araneidae left a comment

Choose a reason for hiding this comment

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

Looks like we also have some Python version checks in softioc/extension.c; these can also go.

softioc/imports.py Outdated Show resolved Hide resolved
@AlexanderWells-diamond
Copy link
Collaborator Author

AlexanderWells-diamond commented Nov 30, 2021

@Araneidae I've made all the changes requested, and CI is now passing. Please let me know if this is good to merge.

It seems the previous error is a transient problem with codecov that disappeared on re-runs.

Copy link
Collaborator

@Araneidae Araneidae left a comment

Choose a reason for hiding this comment

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

Couple more tweaks, then we're there.

softioc/device_core.py Show resolved Hide resolved
softioc/imports.py Outdated Show resolved Hide resolved
softioc/extension.c Outdated Show resolved Hide resolved
@Araneidae
Copy link
Collaborator

Looks good to me.

@AlexanderWells-diamond AlexanderWells-diamond merged commit 5034531 into master Nov 30, 2021
@AlexanderWells-diamond AlexanderWells-diamond deleted the remove_python2 branch November 30, 2021 15:18
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.

Remove Python2 support
2 participants