dynamist / phabfive Goto Github PK
View Code? Open in Web Editor NEWA command line tool to interact with Phabricator
License: Apache License 2.0
A command line tool to interact with Phabricator
License: Apache License 2.0
Implement phabfive maniphest parents list T123
(phabfive-kOPdHCq0) ~/c/d/phabfive ❯❯❯ PHABFIVE_DEBUG=1 phabfive passphrase K30
INFO:phabfive.controller:Loglevel is: DEBUG
DEBUG:phabfive.controller:Loading configuration defaults
DEBUG:phabfive.controller:Loading configuration file: /etc/phabfive.yaml
DEBUG:phabfive.controller:Loading configuration files: /etc/phabfive.d/*.yaml
DEBUG:phabfive.controller:Loading configuration file: /home/nn/.config/phabfive.yaml
DEBUG:phabfive.controller:Loading configuration files: /home/nn/.config/phabfive.d/*.yaml
DEBUG:phabfive.controller:Loading configuration from environment
DEBUG:phabfive.controller:PHABFIVE_DEBUG ........ 1
DEBUG:phabfive.controller:PHAB_TOKEN ............ cli-y...
DEBUG:phabfive.controller:PHAB_URL .............. https://.../api/
DEBUG:phabfive.controller:Controller for https://....com/api/
Traceback (most recent call last):
File "/home/nn/.virtualenvs/phabfive-kOPdHCq0/bin/phabfive", line 11, in <module>
load_entry_point('phabfive', 'console_scripts', 'phabfive')()
File "/home/nn/code/phabfive/phabfive/cli.py", line 153, in cli_entrypoint
sys.exit(run(cli_args, sub_args))
File "/home/nn/code/phabfive/phabfive/cli.py", line 116, in run
c = Controller()
File "/home/nn/code/phabfive/phabfive/controller.py", line 78, in __init__
self.passphrase = passphrase.Passphrase(self.conf)
File "/home/nn/code/phabfive/phabfive/passphrase.py", line 23, in __init__
self.verify_connection()
File "/home/nn/code/phabfive/phabfive/interface.py", line 17, in verify_connection
result = self.phab.user.whoami()
File "/home/nn/.virtualenvs/phabfive-kOPdHCq0/lib/python3.6/site-packages/phabricator/__init__.py", line 248, in __call__
return self._request(**kwargs)
File "/home/nn/.virtualenvs/phabfive-kOPdHCq0/lib/python3.6/site-packages/phabricator/__init__.py", line 308, in _request
conn.request('POST', path, body, headers)
File "/usr/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/usr/lib/python3.6/http/client.py", line 1392, in connect
super().connect()
File "/usr/lib/python3.6/http/client.py", line 936, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.6/socket.py", line 724, in create_connection
raise err
File "/usr/lib/python3.6/socket.py", line 713, in create_connection
sock.connect(sa)
socket.timeout: timed out
Traceback (most recent call last):
File "/home/nn/profile/bin/phabfive", line 11, in <module>
load_entry_point('phabfive', 'console_scripts', 'phabfive')()
File "/home/nn/code/phabfive-github/phabfive/cli.py", line 198, in cli_entrypoint
sys.exit(run(cli_args, sub_args))
File "/home/nn/code/phabfive-github/phabfive/cli.py", line 152, in run
p.print_secret(sub_args["<id>"])
File "/home/nn/code/phabfive-github/phabfive/passphrase.py", line 50, in print_secret
secret = self.get_secret(ids)
File "/home/nn/code/phabfive-github/phabfive/passphrase.py", line 34, in get_secret
response = self.phab.passphrase.query(ids=[ids], needSecrets=1)
File "/home/nn/.virtualenvs/phabfive-kOPdHCq0/lib/python3.6/site-packages/phabricator/__init__.py", line 248, in __call__
return self._request(**kwargs)
File "/home/nn/.virtualenvs/phabfive-kOPdHCq0/lib/python3.6/site-packages/phabricator/__init__.py", line 308, in _request
conn.request('POST', path, body, headers)
File "/usr/lib/python3.6/http/client.py", line 1254, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1300, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1249, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1036, in _send_output
self.send(msg)
File "/usr/lib/python3.6/http/client.py", line 974, in send
self.connect()
File "/usr/lib/python3.6/http/client.py", line 1415, in connect
server_hostname=server_hostname)
File "/usr/lib/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/usr/lib/python3.6/ssl.py", line 817, in __init__
self.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 1077, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
socket.timeout: _ssl.c:835: The handshake operation timed out
Better formatted exception
Bad formatted exception
Given the following exception below
~ » phabfive passphrase K32 mai@maiThinkPad
Traceback (most recent call last):
File "/home/mai/.virtualenvs/phabfive/bin/phabfive", line 11, in <module>
load_entry_point('phabfive', 'console_scripts', 'phabfive')()
File "/home/mai/dynamist/phabfive/phabfive/cli.py", line 278, in cli_entrypoint
sys.exit(run(cli_args, sub_args))
File "/home/mai/dynamist/phabfive/phabfive/cli.py", line 170, in run
p.print_secret(sub_args["<id>"])
File "/home/mai/dynamist/phabfive/phabfive/passphrase.py", line 59, in print_secret
secret = self.get_secret(ids)
File "/home/mai/dynamist/phabfive/phabfive/passphrase.py", line 34, in get_secret
response = self.phab.passphrase.query(ids=[ids], needSecrets=1)
File "/home/mai/.virtualenvs/phabfive/lib/python3.6/site-packages/phabricator/__init__.py", line 248, in __call__
return self._request(**kwargs)
File "/home/mai/.virtualenvs/phabfive/lib/python3.6/site-packages/phabricator/__init__.py", line 308, in _request
conn.request('POST', path, body, headers)
File "/usr/lib/python3.6/http/client.py", line 1254, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1300, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1249, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1036, in _send_output
self.send(msg)
File "/usr/lib/python3.6/http/client.py", line 974, in send
self.connect()
File "/usr/lib/python3.6/http/client.py", line 1415, in connect
server_hostname=server_hostname)
File "/usr/lib/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/usr/lib/python3.6/ssl.py", line 817, in __init__
self.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 1077, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
socket.timeout: _ssl.c:835: The handshake operation timed out
Better formatted exception.
Bad formatted exception printed to enduser
Create a new command "maniphest create" that takes a yaml config file as input that enables to create multiple tickets at one time. It also gives the ability to render the tickets with variables and with Jinja2 to allow for complex logic like for loops, if/else cases etc.
Current functionality
$ phabfive diffusion
Usage:
phabfive diffusion repo list [(active || inactive || all)] [options]
phabfive diffusion repo create <name> [options]
phabfive diffusion uri create (--observe || --mirror) (<credential>) <repo> <uri> [options]
phabfive diffusion uri list <repo> [options]
phabfive diffusion branch list <repo> [options]
Implement following behaviour
$ phabfive diffusion uri remove REPO https://foo/bar.git
Removed https://foo/bar.git from REPO
$ echo $?
0
$ phabfive diffusion uri remove REPO https://foo/non-existant.git
Unable to remove non-existant https://foo/non-existant.git from REPO
$ echo $?
0
Enable ues to remove URI from phabricator
$ phabfive diffusion uri list observed myrepo
[email protected]:dynamist/myrepo.git
$ phabfive diffusion uri list mirrored phabfive
https://github.com/dynamist/phabfive.git
Suggested docopt:
phabfive diffusion uri list [(mirrored || observed || all)] <repo> [options]
Support the features/commands
None
Snap packages is a new way of packaging applications into self contained packages very easily.
For reference and implementation help see https://snapcraft.io/
Run bandit checks and add appropriate exclusions to the source code.
Background: The default for phabfive diffusion list is to print the name field.
Objective: Allow to specify fields of interest. An example:
phabfive diffusion list --fields name,url,type
Where the fields could map directly to data returned by the Phabricator API, but not necessarily, for example the url field would have to be assembled from various data from the API.
The output would be something similar to this:
$ phabfive diffusion list --fields url,type
ssh://[email protected]/source/phabfive.git,git
ssh://[email protected]/source/unifik.git,git
For now we will focus on CSV compliant output, JSON and/or YAML is not in scope.
(This section was suggested by @rholmboe)
OpenStack actually perfected it imho
This is the default output in the cli, which is for all modules (network, server, floating etc etc)
(openstack) $ git:(master) openstack network list -f table
+--------------------------------------+---------+----------------------------------------------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+---------+----------------------------------------------------------------------------+
| 42f2071d-273f-4445-b981-dd05776422ed | private | ae7bdddb-5c99-46f8-bab1-25efab1cba42 |
| 7b6935ef-4a13-41d1-b8fa-087927cb480b | public | 1993b658-8cf1-421a-a93f-e2de7b5dd06a, 5151480f-ae04-4619-b36f-3bdcc4de5342 |
+--------------------------------------+---------+----------------------------------------------------------------------------+
in yaml
(openstack) $ git:(master) openstack network list -c ID -c Subnets -f yaml
- ID: 42f2071d-273f-4445-b981-dd05776422ed
Subnets: ae7bdddb-5c99-46f8-bab1-25efab1cba42
- ID: 7b6935ef-4a13-41d1-b8fa-087927cb480b
Subnets: 1993b658-8cf1-421a-a93f-e2de7b5dd06a, 5151480f-ae04-4619-b36f-3bdcc4de5342
in csv
(openstack) $ git:(master) openstack network list -f csv
"ID","Name","Subnets"
"42f2071d-273f-4445-b981-dd05776422ed","private","ae7bdddb-5c99-46f8-bab1-25efab1cba42"
"7b6935ef-4a13-41d1-b8fa-087927cb480b","public","1993b658-8cf1-421a-a93f-e2de7b5dd06a, 5151480f-ae04-4619-b36f-3bdcc4de5342"
in json
(openstack) $ git:(master) openstack network list -c Name -c Subnets -f json
[
{
"Subnets": "ae7bdddb-5c99-46f8-bab1-25efab1cba42",
"Name": "private"
},
{
"Subnets": "1993b658-8cf1-421a-a93f-e2de7b5dd06a, 5151480f-ae04-4619-b36f-3bdcc4de5342",
"Name": "public"
}
]
Just the values
(openstack) $ git:(master) openstack network list -c ID -f value
42f2071d-273f-4445-b981-dd05776422ed
7b6935ef-4a13-41d1-b8fa-087927cb480b
From the helper
output formatters:
output formatter options
-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}
the output format, defaults to table
-c COLUMN, --column COLUMN
specify the column(s) to include, can be repeated
--sort-column SORT_COLUMN
specify the column(s) to sort the data (columns
specified first have a priority, non-existing columns
are ignored), can be repeated
Protect your secrets using Gitleaks-Action.
Gitleaks is a SAST tool for detecting and preventing hardcoded secrets like passwords, API keys, and tokens in git repos.
$ PHAB_URL=http://google.se/api/ phabfive diffusion repo list
Traceback (most recent call last):
File "/home/mai/.virtualenvs/phabfive-github/bin/phabfive", line 11, in <module>
load_entry_point('phabfive', 'console_scripts', 'phabfive')()
File "/home/mai/phabfive-github/phabfive/cli.py", line 176, in cli_entrypoint
sys.exit(run(cli_args, sub_args))
File "/home/mai/phabfive-github/phabfive/cli.py", line 139, in run
d = diffusion.Diffusion()
File "/home/mai/phabfive-github/phabfive/diffusion.py", line 17, in __init__
super(Diffusion, self).__init__()
File "/home/mai/phabfive-github/phabfive/core.py", line 77, in __init__
self.verify_connection()
File "/home/mai/phabfive-github/phabfive/core.py", line 83, in verify_connection
result = self.phab.user.whoami()
File "/home/mai/.virtualenvs/phabfive-github/local/lib/python2.7/site-packages/phabricator/__init__.py", line 248, in __call__
return self._request(**kwargs)
File "/home/mai/.virtualenvs/phabfive-github/local/lib/python2.7/site-packages/phabricator/__init__.py", line 314, in _request
'Bad response status: {0}'.format(response.status)
httplib.HTTPException: Bad response status: 404
Better wrapped exception
Bad wrapped exception
$ PHAB_URL=http://127.0.0.1/api/ phabfive diffusion repo list
Traceback (most recent call last):
File "/home/mai/.virtualenvs/phabfive-github/bin/phabfive", line 11, in <module>
load_entry_point('phabfive', 'console_scripts', 'phabfive')()
File "/home/mai/phabfive-github/phabfive/cli.py", line 176, in cli_entrypoint
sys.exit(run(cli_args, sub_args))
File "/home/mai/phabfive-github/phabfive/cli.py", line 139, in run
d = diffusion.Diffusion()
File "/home/mai/phabfive-github/phabfive/diffusion.py", line 17, in __init__
super(Diffusion, self).__init__()
File "/home/mai/phabfive-github/phabfive/core.py", line 77, in __init__
self.verify_connection()
File "/home/mai/phabfive-github/phabfive/core.py", line 83, in verify_connection
result = self.phab.user.whoami()
File "/home/mai/.virtualenvs/phabfive-github/local/lib/python2.7/site-packages/phabricator/__init__.py", line 248, in __call__
return self._request(**kwargs)
File "/home/mai/.virtualenvs/phabfive-github/local/lib/python2.7/site-packages/phabricator/__init__.py", line 308, in _request
conn.request('POST', path, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1042, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1082, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 1038, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 882, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 844, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 821, in connect
self.timeout, self.source_address)
File "/usr/lib/python2.7/socket.py", line 575, in create_connection
raise err
socket.error: [Errno 111] Connection refused
Better wrapped exception
Badly wrapped exception
Implement phabfive maniphest workboard list <WORKBOARD>
cd
into a directory in one shellrmdir
that same directory in another shellphabfive K1
in the first shellTraceback (most recent call last):
File "/home/nn/profile/bin/phabfive", line 11, in <module>
load_entry_point('phabfive', 'console_scripts', 'phabfive')()
File "/home/nn/.virtualenvs/phabfive-kOPdHCq0/lib/python3.6/site-packages/pkg_resources/__init__.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/nn/.virtualenvs/phabfive-kOPdHCq0/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2693, in load_entry_point
return ep.load()
File "/home/nn/.virtualenvs/phabfive-kOPdHCq0/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in load
return self.resolve()
File "/home/nn/.virtualenvs/phabfive-kOPdHCq0/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2330, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/nn/code/dynamist/phabfive/master/phabfive/cli.py", line 10, in <module>
from phabfive import passphrase, diffusion, paste, user
File "/home/nn/code/dynamist/phabfive/master/phabfive/passphrase.py", line 9, in <module>
from phabfive.core import Phabfive
File "/home/nn/code/dynamist/phabfive/master/phabfive/core.py", line 18, in <module>
from phabricator import Phabricator, APIError
File "/home/nn/.virtualenvs/phabfive-kOPdHCq0/lib/python3.6/site-packages/phabricator/__init__.py", line 35, in <module>
CURRENT_DIR = os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory
none
none
It should execute properly, or at least give a proper error message.
Got a traceback.
test
pipenv install -e .
phabfive K1
and watch it error outIt to return the K1 passphrase.
Traceback (most recent call last):
File "/home/nn/code/github.com/dynamist/phabfive/.venv/bin/phabfive", line 11, in <module>
load_entry_point('phabfive', 'console_scripts', 'phabfive')()
File "/home/nn/code/github.com/dynamist/phabfive/phabfive/cli.py", line 278, in cli_entrypoint
sys.exit(run(cli_args, sub_args))
File "/home/nn/code/github.com/dynamist/phabfive/phabfive/cli.py", line 169, in run
p = passphrase.Passphrase()
File "/home/nn/code/github.com/dynamist/phabfive/phabfive/passphrase.py", line 22, in __init__
super(Passphrase, self).__init__()
File "/home/nn/code/github.com/dynamist/phabfive/phabfive/core.py", line 50, in __init__
self.conf = self.load_config()
File "/home/nn/code/github.com/dynamist/phabfive/phabfive/core.py", line 114, in load_config
anyconfig.load(site_conf_file, ignore_missing=True)
File "/home/nn/code/github.com/dynamist/phabfive/.venv/lib/python3.8/site-packages/anyconfig/api/_load.py", line 295, in load
return single_load(iois[0], ac_parser=ac_parser, ac_dict=ac_dict,
File "/home/nn/code/github.com/dynamist/phabfive/.venv/lib/python3.8/site-packages/anyconfig/api/_load.py", line 146, in single_load
cnf = _single_load(ioi, ac_parser=ac_parser, ac_template=ac_template,
File "/home/nn/code/github.com/dynamist/phabfive/.venv/lib/python3.8/site-packages/anyconfig/api/_load.py", line 86, in _single_load
return psr.load(ioi, **options)
File "/home/nn/code/github.com/dynamist/phabfive/.venv/lib/python3.8/site-packages/anyconfig/backend/base/loaders.py", line 208, in load
cnf = self.load_from_path(ioi.path, container, **options)
File "/home/nn/code/github.com/dynamist/phabfive/.venv/lib/python3.8/site-packages/anyconfig/backend/base/loaders.py", line 289, in load_from_path
with self.ropen(filepath) as inp:
File "/home/nn/code/github.com/dynamist/phabfive/.venv/lib/python3.8/site-packages/anyconfig/backend/base/loaders.py", line 74, in ropen
return open( # pylint: disable=consider-using-with
FileNotFoundError: [Errno 2] No such file or directory: '/etc/phabfive.yaml'
Implement phabfive maniphest subtasks list T123
After #46 and #47 are done, this feature can be impelmented
See https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/922/diffs for implementation inspiration.
Implement phabfive maniphest show T123
When developing code, i stumbled upon this that when i export a development phabricator url including a port number, it fails a validation step that it should not fail on. We assume that in our regex checks that we have specified a valid URL instead of just trying the URL no matter what it is and letting it fail.
export PHAB_URL=http://phabricator.domain.tld:81/api/
Result: PHAB_URL is malformed, example: http://127.0.0.1/api/
Possible solution to this problem is to either remove the regex check, implement port checking in the regex, change from regex validation to be a requests/curl validation instead
Implement a basic set of pre-commit hooks.
The scope is only hooks from https://github.com/pre-commit/pre-commit-hooks for now.
Add json schema validation to the internal data/config that is using anyconfig to build the config file based on files on disk.
An example/WIP schema.yaml:
type: object
properties:
PHABFIVE_DEBUG: {type: boolean}
PHAB_TOKEN: {type: string}
PHAB_URL: {type: string}
None
None
Implement phabfive maniphest list
Phabfive currently does not make a difference between hidden and visible URIs.
$ phabfive diffusion uri list kubespray
[email protected]:dynamist/kubespray.git
ssh://.../dynamist/kubespray.git
ssh://.../dynamist/kubespray_b.git
Suggested new cli behaviour
$ phabfive diffusion uri list kubespray
[email protected]:dynamist/kubespray.git
$ phabfive diffusion uri list hidden kubespray
ssh://.../dynamist/kubespray.git
ssh://.../dynamist/kubespray_b.git
Suggested docopt: phabfive diffusion uri list [(visible || hidden || all)] <repo> [options]
Examples might not be exact replicas of suggested input/output.
None
Create RPM package for phabfive
phabfive K32
$ phabfive K32
Traceback (most recent call last):
File "/home/nn/profile/bin/phabfive", line 11, in <module>
load_entry_point('phabfive', 'console_scripts', 'phabfive')()
File "/home/nn/code/phabfive-github/phabfive/cli.py", line 184, in cli_entrypoint
sys.exit(run(cli_args, sub_args))
File "/home/nn/code/phabfive-github/phabfive/cli.py", line 139, in run
p = passphrase.Passphrase()
File "/home/nn/code/phabfive-github/phabfive/passphrase.py", line 22, in __init__
super(Passphrase, self).__init__()
File "/home/nn/code/phabfive-github/phabfive/core.py", line 77, in __init__
self.verify_connection()
File "/home/nn/code/phabfive-github/phabfive/core.py", line 83, in verify_connection
result = self.phab.user.whoami()
File "/home/nn/.virtualenvs/phabfive-kOPdHCq0/lib/python3.6/site-packages/phabricator/__init__.py", line 248, in __call__
return self._request(**kwargs)
File "/home/nn/.virtualenvs/phabfive-kOPdHCq0/lib/python3.6/site-packages/phabricator/__init__.py", line 314, in _request
'Bad response status: {0}'.format(response.status)
http.client.HTTPException: Bad response status: 504
Create DEB package for this repo
It seems that tag 0.3.0 was cut in January 2023 but was never uploaded to pypi.org.
## When running this
$ phabfive diffusion list inactive
Traceback (most recent call last):
File "/home/nn/.virtualenvs/phabfive-kOPdHCq0/bin/phabfive", line 11, in <module>
load_entry_point('phabfive', 'console_scripts', 'phabfive')()
File "/home/nn/code/phabfive/phabfive/cli.py", line 119, in cli_entrypoint
run(cli_args, sub_args)
File "/home/nn/code/phabfive/phabfive/cli.py", line 103, in run
print(p.print_secret(p.get_secret(sub_args['<id>'])))
File "/home/nn/code/phabfive/phabfive/passphrase.py", line 33, in get_secret
response = self.phab.passphrase.query(ids=[ids], needSecrets=1)
File "/home/nn/.virtualenvs/phabfive-kOPdHCq0/lib/python3.6/site-packages/phabricator/__init__.py", line 248, in __call__
return self._request(**kwargs)
File "/home/nn/.virtualenvs/phabfive-kOPdHCq0/lib/python3.6/site-packages/phabricator/__init__.py", line 308, in _request
conn.request('POST', path, body, headers)
File "/usr/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/usr/lib/python3.6/http/client.py", line 1392, in connect
super().connect()
File "/usr/lib/python3.6/http/client.py", line 936, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.6/socket.py", line 704, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
A bettter and wrapped exception to be presented to the user.
A low level exception was raised to the user
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.