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

fix: python versions < 3.4 broken by previous addition #1141

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

aghoward
Copy link
Contributor

It occurred to me late last night that my previous PR broke older python versions, here's a fix for that

My addition of quicker checking for python unittest modules breaks python version less than 3.4. importlib.machinery.PathFinder was added in python 3.4 and will fail to import in versions prior to this.

This changes the code to only use the new check if the python version is greater than or equal to 3.4. Note that sys.version_info was added in version 2.0; unittest was added in python 2.1; older versions of pytest support as low as python 2.7, so this change should be safe for any python version supporting unit testing.

My addition of quicker checking for python unittest modules breaks
python verison less than 3.4. `importlib.machinery.PathFinder` was added
in python 3.4 and will fail to import in verions prior to this.

This changes the code to only use the new check if the python version is
greater than or equal to 3.4. Note that `sys.version_info` was added in
version 2.0; unittest was added in python 2.1; older versions of pytest
support as low as python 2.7, so this change should be safe for any
python version supporting unit testing.
@fannheyward fannheyward merged commit 5a06278 into fannheyward:master Feb 12, 2025
3 checks passed
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.

2 participants