Update dependencies, fix test failures and documentation regressions #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
High-level summary
Need to upgrade this to use the latest version of
sixto solve a dependency issue.I tried to run the tests to confirm it worked with the new version of
six, found several issues, fixed them. Getting them to run required further dependency upgrades. In the process also discovered some documentation regressions (changes made in past without updating documentation), fixed them too.Replaced Travis CI with GitHub Actions to get CI for the changes.
Detailed change list
setup.pytests_require:noseis no longer maintained and not compatible with Python 3.12. Replace withpynoseforkdev-requirements.txtdocs/api.rstanddocs/request-objects.rstdjango_wsgi.handler.APPLICATIONhad been replaced withdjango_wsgi.handler.get_wsgi_application()in commit 1aacf23 (March 2020) but these documentation pages were not updated accordinglytests/dummy_django_project/urls.pydjango.conf.urls.patternswhich does not exist anymore in Django 3.x. Replaced with use ofdjango.conf.urls.re_pathtests/requirements.txtcoverage,webOb,coverallsfor Python 3.12 compatibilitynosewithpynose(seesetup.pyabove for why)tests/test_handler.pyAPPLICATION=>get_wsgi_application()change mentioned above, fix it.gitignore__pycache__,.coverage,.venvtests/test_embedded_wsgi.pytest_closure_responsewas failing because it was wrongly asserting onapp.app_iter.closed, which is actually the request closure status not the response closure status. Changed it to assert ondjango_response.closedinsteadtest_original_environ_not_modifiedwas failing due to newer WebOb version addingCONTENT_LENGTHandwebob.is_body_seekableto the request environment. Given the point of the test is to check thatcall_wsgi_app()isn't changing the request environment, the check is just move the capturing of the environment for comparison to after WebOb has set up the requesttest_headers_are_copied_overandtest_right_pathwere broken in Django 3.2.x (but not 3.1.x). This is because the undocumentedresponse._headersin 3.1.x is replaced byresponse.headersin 3.2.x, which also has a different format. To make the tests work with either Django version, added a new method totests/__init__.pycalledget_response_headerswhich hides the difference. (Note the reading of the response headers only happens in the tests, not the runtime code, so no code change is needed to the runtime code to handle this issue.).travis.yml.github/workflows/run-tests.yaml: Travis is no longer (since Decemeber 2020) free for open source projects, but GitHub Actions still isubuntu-latestrunner: output of above tool usesubuntu-18.04, but GitHub no longer supports it, hence there are no available runners for it, hence the job hangs forever before starting