Skip to content

Make AsyncMock stubs available for python 3.6+ #5948

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

Merged
merged 1 commit into from
Aug 23, 2021

Conversation

GDYendell
Copy link
Contributor

  • AsyncMock is available in 3.6+ with the third party mock package
  • The 3.8+ restriction only exists in stdlib unittest.mock

@GDYendell
Copy link
Contributor Author

Fixes #5947

@GDYendell
Copy link
Contributor Author

I initially just removed the version check, but the python2 section of the tests failed, so I have now changed the check to >3.6, as the mock package states. However, it also doesn't actually claim compatibility with python 2, so I wonder if the correct fix is to again remove the version check entirely and instead remove the python2 = true key.

@srittau
Copy link
Collaborator

srittau commented Aug 23, 2021

The homepage explicitly says "This package [...] compatible with Python 3.6 and up." So I think we should remove the python2 key as you suggest.

- AsyncMock is available in 3.6+ with the third party mock package
- The 3.8+ restriction only exists in stdlib unittest.mock
Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thanks!

@srittau srittau merged commit 28f2953 into python:master Aug 23, 2021
GDYendell added a commit to DiamondLightSource/odinprocservcontrol that referenced this pull request Jun 9, 2023
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