Skip to content
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

linkcheck builder: ensure error response is removed-from-scope before fallback request #11349

Conversation

jayaddison
Copy link
Contributor

Feature or Bugfix

  • Bugfix

Purpose

  • Ensures that the connection from the initial HTTP HEAD request may be re-used for the HTTP GET in the case of failures.

Detail

Relates

…n initial HTTP HEAD request is out-of-scope before performing a fallback HTTP GET request (ensuring that the associated 'response' object's resources can be collected)

(cherry picked from commit d6f29be)
@jayaddison
Copy link
Contributor Author

(please hold-off on merging until after the 6.2.0 release)

@jayaddison
Copy link
Contributor Author

I'm undecided about whether this is a valid fix. It is included in #11340 currently, where linkchecker unit test failures continue to occur. I'll move this into draft status.

@jayaddison jayaddison marked this pull request as draft April 26, 2023 18:09
@jayaddison
Copy link
Contributor Author

I don't believe that the change here is required, so I'm going to close this and drop the relevant commits while rebasing #11340.

@jayaddison jayaddison closed this Apr 27, 2023
@jayaddison jayaddison deleted the issue-11299/flaky-test-isolate-linkcheck-response-scope branch April 27, 2023 13:39
@jayaddison
Copy link
Contributor Author

My best-effort attempt to explain why I think this may have been useful is that I'm not convinced that client-side resources (particularly, connections and sockets) are being closed and returned to the urllib3 connection pool.

Although I don't think that an unused variable continuing to exist within the scope of a method should make a semantic difference, I felt that by explicitly removing it from scope using del, it might make garbage-collection and cleanup of the associated object more likely.

I don't feel like I've proven or disproven that, though - and so it seems better not to include the change at all.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky unit tests: linkcheck builder (tests/test_build_linkcheck.py)
1 participant