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

Remove requests.Session passthrough functionality #58

Merged
merged 5 commits into from
Dec 22, 2021
Merged

Conversation

j4mie
Copy link
Member

@j4mie j4mie commented Dec 7, 2021

This PR removes the feature that passes the request ID through to outgoing requests using a requests.Session subclass.

Reasoning:

  1. This is not commonly used. I don't think we've ever actually used this feature.
  2. It's entirely based on the requests library, but other HTTP libraries are emerging e.g. https://www.python-httpx.org/ - should we add functionality to django-log-request-id for every one?
  3. It's very tied to the internal API of requests - I have no idea whether it still works for newer versions of requests.
  4. It's pretty trivial to implement yourself in your own code, so no need to have it in the library.

We'd have to do a major version bump if we decide to merge this.

@@ -1 +0,0 @@
requests<3
Copy link
Member

Choose a reason for hiding this comment

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

requests</3

j4mie added 2 commits December 8, 2021 09:47
* origin/master:
  Pass get_response callables to middleware in tests and remove MIDDLEWARE_CLASSES
  Add Django 4 to test matrix, remove unsupported versions
* origin/master:
  Document request ID attribute
@j4mie j4mie merged commit c0ca3ec into master Dec 22, 2021
@j4mie j4mie deleted the remove-client branch December 22, 2021 16:49
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.

2 participants