Не подтверждена Коммит 278fb8ec создал по автору Dealga McArdle's avatar Dealga McArdle Зафиксировано автором GitHub
Просмотр файлов

Request drop 2 (#2155)

* add requests file

* add sv_requests to init

* fixes numerous importing legacy errors urlopen

* make it callable again
владелец dc5a2bb8
......@@ -101,7 +101,7 @@ utils_modules = [
"voronoi", "sv_script", "sv_itertools", "script_importhelper", "sv_oldnodes_parser",
"csg_core", "csg_geom", "geom", "sv_easing_functions", "sv_text_io_common",
"snlite_utils", "snlite_importhelper", "context_managers", "sv_node_utils",
"profile", "logging", "testing", "sv_prefs",
"profile", "logging", "testing", "sv_prefs", "sv_requests",
# UI text editor ui
"text_editor_submenu", "text_editor_plugins",
# UI operators and tools
......
# This file is part of project Sverchok. It's copyrighted by the contributors
# recorded in the version control history of the file, available from
# its original location https://github.com/nortikin/sverchok/commit/master
#
# SPDX-License-Identifier: GPL3
# License-Filename: LICENSE
import json
import urllib.request as rq
# we dont use requests for anything significant other than getting
# a json, this is a dummy module with one feature implemented (.get )
def get(url):
def get_json():
json_to_parse = rq.urlopen(url)
found_json = json_to_parse.read().decode()
wfile = json.JSONDecoder()
return wfile.decode(found_json)
processed = lambda: None
processed.json = get_json
return processed
......@@ -16,7 +16,6 @@
#
# ##### END GPL LICENSE BLOCK #####
import requests
import os
import urllib
import urllib.request
......@@ -24,6 +23,7 @@ from zipfile import ZipFile
import bpy
import sverchok
from sverchok.utils import sv_requests as requests
# pylint: disable=w0141
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать