newrelic / newrelic-python-agent

New Relic Python Agent
https://docs.newrelic.com/docs/agents/python-agent
Apache License 2.0
176 stars 99 forks source link

Update botocore tests. #1051

Closed umaannamalai closed 8 months ago

umaannamalai commented 8 months ago

This PR updates the moto decorators used in botocore tests and removes py27 dependencies listed in tox.ini. It also drops testing for Python 3.7 since botocore no longer supports this version.

github-actions[bot] commented 8 months ago

🦙 MegaLinter status: ❌ ERROR

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 7 0 0 0.75s
❌ PYTHON flake8 7 7 0.46s
✅ PYTHON isort 7 0 0 0.18s
❌ PYTHON pylint 7 8 2.61s

See detailed report in MegaLinter reports _Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff_

_MegaLinter is graciously provided by OX Security_

codecov-commenter commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (2eda775) 80.82% compared to head (31fb18e) 81.20%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1051 +/- ## ========================================== + Coverage 80.82% 81.20% +0.37% ========================================== Files 190 190 Lines 19745 19745 Branches 3468 3468 ========================================== + Hits 15959 16033 +74 + Misses 2787 2723 -64 + Partials 999 989 -10 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lrafeei commented 8 months ago

Could we take this out as well since v1.3.1 was released in 2018 and 3.7 support was dropped?

# patch earlier versions of moto to support py37
if sys.version_info >= (3, 7) and MOTO_VERSION <= (1, 3, 1):
    import re
    moto.packages.responses.responses.re._pattern_type = re.Pattern
umaannamalai commented 8 months ago

Could we take this out as well since v1.3.1 was released in 2018 and 3.7 support was dropped?

# patch earlier versions of moto to support py37
if sys.version_info >= (3, 7) and MOTO_VERSION <= (1, 3, 1):
    import re
    moto.packages.responses.responses.re._pattern_type = re.Pattern

Sure thing! I'll add that in a followup PR.