Skip to content

Conversation

@BirdLearn
Copy link

在最新的requests 版本中,移除了 get_connection 方法,导致tidevice 启动 wdaproxy 时调用到 get_connection_with_tls_context 方法导致报错 "request error: Not supported URL scheme http+usbmux"

request 相关改动issue: psf/requests#6710

requests 包中详细说明如下 :

    def get_connection(self, url, proxies=None):
        """DEPRECATED: Users should move to `get_connection_with_tls_context`
        for all subclasses of HTTPAdapter using Requests>=2.32.2.

        Returns a urllib3 connection for the given URL. This should not be
        called from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param url: The URL to connect to.
        :param proxies: (optional) A Requests-style dictionary of proxies used on this request.
        :rtype: urllib3.ConnectionPool
        """
        warnings.warn(
            (
                "`get_connection` has been deprecated in favor of "
                "`get_connection_with_tls_context`. Custom HTTPAdapter subclasses "
                "will need to migrate for Requests>=2.32.2. Please see "
                "https://github.com/psf/requests/pull/6710 for more details."
            ),
            DeprecationWarning,
        )

@CLAassistant
Copy link

CLAassistant commented Jun 17, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ codeskyblue
❌ lijiazhu


lijiazhu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@hhstore
Copy link

hhstore commented Jun 18, 2024

  • 难怪, 我频繁报这个错误. 搜索竟然找到了这个 PR.
  • 麻烦作者来看一下.

@tenxun123
Copy link

官方不能解决下,然后升级吗

@chaoyuebaihu
Copy link

mac中文件的路径 /Users/xxxx/Library/Python/3.9/lib/python/site-packages/tidevice/requests_usbmux.py

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request addresses a compatibility issue with requests>=2.32.2 where the get_connection method has been deprecated in favor of get_connection_with_tls_context. The change prevents an error ("request error: Not supported URL scheme http+usbmux") that occurs when starting wdaproxy with newer versions of the requests library.

  • Adds the new get_connection_with_tls_context method to the UsbmuxAdapter class to maintain compatibility with requests>=2.32.2
  • Delegates to the existing get_connection method to preserve the custom USB multiplexer connection logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codeskyblue codeskyblue merged commit 45aa32f into alibaba:main Nov 20, 2025
8 of 13 checks passed
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.

6 participants