Skip to content

Conversation

@torresxb1
Copy link
Contributor

@torresxb1 torresxb1 commented Oct 14, 2021

Note: this won't pass on Python 2 because of the mock -> unittest.mock changes. I guess this other PR (where python 2 testing is removed) has to be merged first:
#2182

Issue #, if available:

Description of changes:

  • replace mock imports with unittest.mock (part of python 2 deprecation, mock is part of the standard library as unittest.mock from Python 3.3 onwards)
  • fix a deprecation warning

Description of how you validated changes:

Checklist:

  • Add/update tests using:
  • make pr passes
  • Update documentation
  • Verify transformed template deploys and application functions as expected

Examples?

Please reach out in the comments, if you want to add an example. Examples will be
added to sam init through https://github.com/awslabs/aws-sam-cli-app-templates/

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@torresxb1 torresxb1 changed the title eiifccvjrngrigkvgnlrjtjjgggftffvevdurfeckvdnModernize code Modernize code Oct 14, 2021
@torresxb1 torresxb1 marked this pull request as draft October 14, 2021 21:55
@torresxb1 torresxb1 changed the title Modernize code refactor: Modernize code Oct 15, 2021
@torresxb1 torresxb1 marked this pull request as ready for review October 15, 2021 23:31
@torresxb1 torresxb1 marked this pull request as draft October 18, 2021 21:51
remove mock from requirements

refactor one more use of mock
@torresxb1 torresxb1 changed the title refactor: Modernize code refactor: Replace mock with unittest.mock Oct 18, 2021
# Test requirements
pytest~=6.1.1; python_version >= '3.6'
pytest~=4.6.11; python_version < '3.6' # pytest dropped python 2 support after 4.6.x
mock>=3.0.5,<4.0.0 # 4.0.0 drops Python 2 support
Copy link
Contributor Author

Choose a reason for hiding this comment

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

removing package, since this PR replaces all uses

@torresxb1 torresxb1 marked this pull request as ready for review October 18, 2021 23:10
@torresxb1 torresxb1 requested a review from hawflau October 18, 2021 23:10
@torresxb1
Copy link
Contributor Author

should now be handled by merged PR: #2299

@torresxb1 torresxb1 closed this Jan 20, 2022
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.

3 participants