Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Successful build with recent gcp-devrel-py-tools, flake8, App Engine SDK #142

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

AniX
Copy link

@AniX AniX commented Nov 6, 2018

Resolve failing builds for old code-base as reported in #139 and #140.

#140: upgrade gcp-devrel-py-tools to 0.0.15
reason: travis build environment upgraded pip from 6.0.7 to 9.0.1,
which is incompatible with gcp-devrel-py-tools 0.0.8; otherwise
build-job tests_gaesdk would keep failing with ImportError

#140: Replace webapp1 tests by webapp2 tests
It seems that somewhere between 1.9.54 and 1.9.66, App Engine SDK
removed support of webapp1, probably because support of Python 2.5 also
had been removed from App Engine Python standard environment. As a
result, the behavior with using old style request handlers changed, and
so two tests in webapp1_test.py would fail.

Resolution: Replace tests regarding old WSGIApplication and/or old
RequestHandler. All gaesdk tests use WSGIApplication and RequestHandler
of webapp2. Asserts reflect behavior of webapp2 app and handler.

#139: resolve lint errors after changes in more recent flake8 versions

  • add .flake8, ignore must also include (replaced) default-ignore, and a few of them are mutually exclusive
  • ignore class I, for import rules that are in conflict with Google Python Style Guide
  • reformatting some places in code to avoid errors
  • address W504 line break after binary operator and E501 line too long
  • resolve W605 invalid escape sequence '\x', see
    https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
  • flake8 3.6.0 produces W605 in docstrings that are not raw-string

AniX added 6 commits November 5, 2018 21:34
reason: travis build environment upgraded pip from 6.0.7 to 9.0.1,
which is incompatible with gcp-devrel-py-tools 0.0.8; otherwise
build-job `tests_gaesdk` would keep failing with `ImportError`
…cent flake8 versions

- add .flake8, ignore must also include (replaced) default-ignore,
 and a few of them are mutually exclusive
- ignore class I, for import rules that are in conflict with Google
 Python Style Guide
- reformatting some places in code to avoid errors
- not yet addressed: W605 invalid escape sequence '\d'
…cent flake8 versions

- address W504 line break after binary operator and E501 line too long
- not yet addressed: W605 invalid escape sequence '\d'
…cent flake8 versions

resolve `W605 invalid escape sequence '\x'`, see
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior

flake8 3.6.0 produces W605 in docstrings that are not raw-string
It seems that somewhere between 1.9.54 and 1.9.66, App Engine SDK
removed support of webapp1, probably because support of Python 2.5 also
had been removed from App Engine Python standard environment. As a
result, the behavior with using old style request handlers changed, and
so two tests in webapp1_test.py would fail.

Resolution: Replace tests regarding old WSGIApplication and/or old
RequestHandler. All gaesdk tests use WSGIApplication and RequestHandler
of webapp2. Asserts reflect behavior of webapp2 app and handler.
@codecov
Copy link

codecov bot commented Nov 6, 2018

Codecov Report

Merging #142 into master will decrease coverage by 0.99%.
The diff coverage is 50%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master     #142    +/-   ##
========================================
- Coverage   95.81%   94.82%    -1%     
========================================
  Files          17       16     -1     
  Lines        1818     1604   -214     
  Branches      274      252    -22     
========================================
- Hits         1742     1521   -221     
- Misses         19       33    +14     
+ Partials       57       50     -7
Impacted Files Coverage Δ
webapp2_extras/sessions.py 96.37% <ø> (ø) ⬆️
webapp2_extras/jinja2.py 95.45% <ø> (ø) ⬆️
webapp2_extras/routes.py 92.06% <ø> (ø) ⬆️
webapp2.py 92.86% <0%> (-2.63%) ⬇️
webapp2_extras/auth.py 96.85% <100%> (ø) ⬆️
tests/resources/i18n.py

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 deb3444...8922317. Read the comment docs.

@AniX
Copy link
Author

AniX commented Nov 6, 2018

Sorry, didn't foresee impact on codecov. Decline in test coverage probably caused by replacing old WSGIApplication and old RequestHandler in gaesdk tests, basically replaced webapp1 tests by webapp2 tests.

What would be the best course of action here?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants