forked from espressif/esp-idf
change(esp_prov): remove future usage
drop python2 support for esp_prov
This commit is contained in:
@@ -146,10 +146,6 @@ disable=print-statement,
|
|||||||
invalid-name,
|
invalid-name,
|
||||||
too-few-public-methods,
|
too-few-public-methods,
|
||||||
too-many-locals,
|
too-many-locals,
|
||||||
bad-super-call, # since we still haven't drop python2 support
|
|
||||||
too-many-nested-blocks,
|
|
||||||
too-many-branches,
|
|
||||||
too-many-statements,
|
|
||||||
ungrouped-imports, # since we have isort in pre-commit
|
ungrouped-imports, # since we have isort in pre-commit
|
||||||
no-name-in-module, # since we have flake8 to check this
|
no-name-in-module, # since we have flake8 to check this
|
||||||
too-many-instance-attributes,
|
too-many-instance-attributes,
|
||||||
|
@@ -8,8 +8,8 @@ import re
|
|||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
import jsonschema
|
import jsonschema
|
||||||
|
from idf_ci_utils import IDF_PATH
|
||||||
|
|
||||||
IDF_PATH = os.environ['IDF_PATH']
|
|
||||||
JSON_PATH = os.path.join(IDF_PATH, 'tools', 'requirements.json')
|
JSON_PATH = os.path.join(IDF_PATH, 'tools', 'requirements.json')
|
||||||
SCHEMA_PATH = os.path.join(IDF_PATH, 'tools', 'requirements_schema.json')
|
SCHEMA_PATH = os.path.join(IDF_PATH, 'tools', 'requirements_schema.json')
|
||||||
REQ_DIR = os.path.join(IDF_PATH, 'tools', 'requirements')
|
REQ_DIR = os.path.join(IDF_PATH, 'tools', 'requirements')
|
||||||
|
@@ -1,18 +1,13 @@
|
|||||||
# SPDX-FileCopyrightText: 2018-2022 Espressif Systems (Shanghai) CO LTD
|
# SPDX-FileCopyrightText: 2018-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
from future.utils import tobytes
|
|
||||||
|
|
||||||
try:
|
|
||||||
from http.client import HTTPConnection, HTTPSConnection
|
from http.client import HTTPConnection, HTTPSConnection
|
||||||
except ImportError:
|
|
||||||
# Python 2 fallback
|
from utils import str_to_bytes
|
||||||
from httplib import HTTPConnection, HTTPSConnection # type: ignore
|
|
||||||
|
|
||||||
from .transport import Transport
|
from .transport import Transport
|
||||||
|
|
||||||
@@ -36,8 +31,9 @@ class Transport_HTTP(Transport):
|
|||||||
self.headers = {'Content-type': 'application/x-www-form-urlencoded','Accept': 'text/plain'}
|
self.headers = {'Content-type': 'application/x-www-form-urlencoded','Accept': 'text/plain'}
|
||||||
|
|
||||||
def _send_post_request(self, path, data):
|
def _send_post_request(self, path, data):
|
||||||
|
data = str_to_bytes(data) if isinstance(data, str) else data
|
||||||
try:
|
try:
|
||||||
self.conn.request('POST', path, tobytes(data), self.headers)
|
self.conn.request('POST', path, data, self.headers)
|
||||||
response = self.conn.getresponse()
|
response = self.conn.getresponse()
|
||||||
# While establishing a session, the device sends the Set-Cookie header
|
# While establishing a session, the device sends the Set-Cookie header
|
||||||
# with value 'session=cookie_session_id' in its first response of the session to the tool.
|
# with value 'session=cookie_session_id' in its first response of the session to the tool.
|
||||||
|
@@ -16,13 +16,11 @@ python-gitlab
|
|||||||
pygdbmi
|
pygdbmi
|
||||||
|
|
||||||
# ble
|
# ble
|
||||||
future
|
|
||||||
dbus-python; sys_platform == 'linux'
|
dbus-python; sys_platform == 'linux'
|
||||||
pygobject; sys_platform != 'win32'
|
pygobject; sys_platform != 'win32'
|
||||||
|
|
||||||
# esp_prov
|
# esp_prov
|
||||||
bleak
|
bleak
|
||||||
# future # addressed before under ble
|
|
||||||
protobuf
|
protobuf
|
||||||
|
|
||||||
# tools/test_apps/system/monitor_ide_integration
|
# tools/test_apps/system/monitor_ide_integration
|
||||||
|
Reference in New Issue
Block a user