-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
refactor: use re-exports in requests rather than assignments #8485
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
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks great! I haven't examined in detail whether all of these re-exports are strictly necessary, but this is definitely a big improvement on the existing stub, so I'm happy for it to go in as it is.
I'll wait till the other two requests
PRs are merged, and then merge master
in, before merging this, but it looks good.
Makes sense, I was looking at requests after the last PR from how can I break it up into smaller, easier to review sections. It'll lead to more pull requests, but my hope was that being more focused in the PR should simplify the review and merging process. So some files, like this one, I expect will get touched multiple times as the details get refined |
Smaller, more focussed PRs are definitely good! |
Diff from mypy_primer, showing the effect of this PR on open source code: sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/builders/linkcheck.py:18: note: ... from here:
bokeh (https://github.com/bokeh/bokeh)
+ bokeh/_testing/plugins/bokeh_server.py:32: note: ... from here:
cwltool (https://github.com/common-workflow-language/cwltool)
+ cwltool/docker.py:15: note: ... from here:
schemathesis (https://github.com/schemathesis/schemathesis)
+ src/schemathesis/cli/__init__.py:15: note: ... from here:
+ src/schemathesis/cli/__init__.py:15: note: ... from here:
+ src/schemathesis/cli/__init__.py:15: note: ... from here:
- src/schemathesis/service/client.py:7: note: ... from here:
- src/schemathesis/service/client.py:7: note: ... from here:
- src/schemathesis/service/client.py:7: note: ... from here:
+ src/schemathesis/cli/__init__.py:15: note: ... from here:
+ src/schemathesis/cli/__init__.py:15: note: ... from here:
+ src/schemathesis/cli/__init__.py:15: note: ... from here:
+ src/schemathesis/cli/__init__.py:15: note: ... from here:
- src/schemathesis/service/client.py:7: note: ... from here:
- src/schemathesis/service/client.py:7: note: ... from here:
- src/schemathesis/runner/events.py:6: note: ... from here:
schema_salad (https://github.com/common-workflow-language/schema_salad)
+ schema_salad/tests/test_cwl11.py:13: note: ... from here:
|
This is weird, but I think it's fine. |
@hauntsaninja do you have any idea what's causing the mypy-primer diff above? |
Probably related to switching imports around: primer is probably also obscuring the real change in message because: hauntsaninja/mypy_primer#12 |
Partial: #8439
Uses re-exports of various items, adds SOCKSProxyManager and associated requirement.
X-Ref benefits from: #8467
Source:
https://github.com/psf/requests/blob/main/requests/adapters.py