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

Fix regression in API caused by commit 85400d8d6751071ef78f042d1efa72… #4052

Merged
merged 1 commit into from
May 27, 2017
Merged

Conversation

hile
Copy link
Contributor

@hile hile commented May 24, 2017

…bdcf76cc0e

  • The added optional parameter changes API and should default to None

    This utility call is used by for example requestbuilder package directly
    which breaks because it passes only one argument to the function as it
    used to be.

  - The added optional parameter changes API and should default to None

    This utility call is used by for example requestbuilder package directly
    which breaks because it passes only one argument to the function as it
    used to be.
@kennethreitz
Copy link
Contributor

I don't believe this is a public API, and therefore we don't gaurentee API compatibility.

But, I could be wrong — either way, it seems like a nice change to make if it doesn't hurt anything.

@nateprewitt any objections?

@Lukasa
Copy link
Member

Lukasa commented May 24, 2017

I think this is a good idea, but we should work out why the builders are failing first. ;)

@nateprewitt
Copy link
Member

Yeah, I don't see any issue with this, even if we're not supporting this API publicly.

As for the build, something in our dependency pipeline must have changed yesterday or earlier. Python <= 3.3 builds started failing on test_https_warnings, but I wasn't able to determine why at a quick glance. @Lukasa probably has more background about the architecture underneath this.

@Lukasa
Copy link
Member

Lukasa commented May 24, 2017

I think this has to be a pytest-httpbin thing. The error is ultimately because we now believe that the cert that pytest-httpbin is presenting on the secure endpoint now has a subjectAlternativeName field. I'm trying to locate it and work out why that warning isn't firing.

@Lukasa
Copy link
Member

Lukasa commented May 24, 2017

Hrm, no, that's not true. This test passes if run by itself, so this is a new state based test failure for some reason.

@Lukasa
Copy link
Member

Lukasa commented May 24, 2017

Ok I have a theory, testing now.

@nateprewitt
Copy link
Member

The new release of Pytest from yesterday has some interesting notes in the changelog.

  • The pytest-warnings plugin has been integrated into the core, so now pytest automatically captures and displays warnings at the end of the test session. Thanks @nicoddemus for the PR.

  • pytest.warns now checks for subclass relationship rather than class equality. Thanks @lesteve for the PR (Requests support HTTPS proxies timeout #2166)

@Lukasa
Copy link
Member

Lukasa commented May 24, 2017

Yeah, this is the warning issue: see #4056.

@Lukasa
Copy link
Member

Lukasa commented May 24, 2017

Ok cool, can we rebase this on the new master?

@kennethreitz
Copy link
Contributor

@Lukasa no conflicts!

@nateprewitt
Copy link
Member

@kennethreitz, I kicked the Travis builds and they seem to be working with the changes to master. If you can kick appveyor, we should be able to merge.

@nicoddemus
Copy link
Contributor

Hi everyone, sorry for barging in, but was this regression related to pytest's 3.1.0 warnings capture?

@nateprewitt
Copy link
Member

nateprewitt commented May 25, 2017

Hey @nicoddemus, no need to apologize 😊 The regression is unrelated to the pytest 3.1.0 changes but those changes were effecting our build when this PR was opened. We've since implemented the suggested workaround in #4056.

@nicoddemus
Copy link
Contributor

Great, thanks for the answer! 👍

@sigmavirus24
Copy link
Contributor

So I'm not in favor of merging this. As was said earlier, this is not a public API.

@nateprewitt
Copy link
Member

nateprewitt commented May 26, 2017

@sigmavirus24, if we're not going to maintain this as a public API, it should probably be moved to _internal_utils.py? The doctstring for utils.py states "This module provides utility functions that are used within Requests that are also useful for external consumption." which to me reads they're fair game for public use.

Edit: or modify the docstring. There's a fair amount of stuff in utils.py that probably shouldn't be depended on externally.

@codecov-io
Copy link

codecov-io commented May 27, 2017

Codecov Report

Merging #4052 into master will increase coverage by 1.5%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #4052     +/-   ##
=========================================
+ Coverage   88.15%   89.65%   +1.5%     
=========================================
  Files          15       16      +1     
  Lines        1941     1962     +21     
=========================================
+ Hits         1711     1759     +48     
+ Misses        230      203     -27
Impacted Files Coverage Δ
requests/utils.py 86% <100%> (ø) ⬆️
requests/__version__.py 100% <0%> (ø)
requests/adapters.py 92.92% <0%> (+0.47%) ⬆️
requests/models.py 93.42% <0%> (+2.26%) ⬆️
requests/_internal_utils.py 100% <0%> (+6.25%) ⬆️
...es/urllib3/packages/ssl_match_hostname/__init__.py 92.68% <0%> (+9.34%) ⬆️
requests/packages/chardet/compat.py 100% <0%> (+35.13%) ⬆️

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 0ba21a7...a9470fe. Read the comment docs.

@kennethreitz kennethreitz merged commit 4c3d307 into psf:master May 27, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 6, 2021
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.

8 participants