From 3d0aca420011c8c441eb1da772e5b4963e5360d6 Mon Sep 17 00:00:00 2001 From: joamag Date: Thu, 5 Jul 2018 11:18:14 +0100 Subject: [PATCH 1/9] new ignores --- src/netius/base/asynchronous.py | 4 ++-- src/netius/base/common.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/netius/base/asynchronous.py b/src/netius/base/asynchronous.py index d4c64be06..8cfa25888 100644 --- a/src/netius/base/asynchronous.py +++ b/src/netius/base/asynchronous.py @@ -40,10 +40,10 @@ # imports the base (old) version of the async implementation # that should be compatible with all the available python # interpreters, base collection of async library -from .async_old import * #@UnusedWildImport +from .async_old import * #@UnusedWildImport pylint ignore=W0614 # verifies if the current python interpreter version supports # the new version of the async implementation and if that's the # case runs the additional import of symbols, this should override # most of the symbols that have just been created -if is_neo(): from .async_neo import * #@UnusedWildImport +if is_neo(): from .async_neo import * #@UnusedWildImport pylint ignore=W0614 diff --git a/src/netius/base/common.py b/src/netius/base/common.py index 668de5683..35d7f40a4 100644 --- a/src/netius/base/common.py +++ b/src/netius/base/common.py @@ -738,7 +738,7 @@ def ensure( # creates the coroutine that is going to be used to # encapsulate the callable, note that the result of the # callable is set as the result of the future (as expected) - def coroutine(future, *args, **kwargs): + def coroutine(future, *args, **kwargs): #pylint ignore=E0102 yield result = coroutine_c(*args, **kwargs) future.set_result(result) From 31017364dc850a13bc5be6fdae568c21362632cd Mon Sep 17 00:00:00 2001 From: joamag Date: Thu, 5 Jul 2018 11:24:30 +0100 Subject: [PATCH 2/9] new disabling of warnings --- src/netius/base/asynchronous.py | 4 ++-- src/netius/base/protocol.py | 4 ++-- src/netius/base/server.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/netius/base/asynchronous.py b/src/netius/base/asynchronous.py index 8cfa25888..ae7e37a1a 100644 --- a/src/netius/base/asynchronous.py +++ b/src/netius/base/asynchronous.py @@ -40,10 +40,10 @@ # imports the base (old) version of the async implementation # that should be compatible with all the available python # interpreters, base collection of async library -from .async_old import * #@UnusedWildImport pylint ignore=W0614 +from .async_old import * #@UnusedWildImport pylint: disable=W0614 # verifies if the current python interpreter version supports # the new version of the async implementation and if that's the # case runs the additional import of symbols, this should override # most of the symbols that have just been created -if is_neo(): from .async_neo import * #@UnusedWildImport pylint ignore=W0614 +if is_neo(): from .async_neo import * #@UnusedWildImport pylint: disable=W0614 diff --git a/src/netius/base/protocol.py b/src/netius/base/protocol.py index 47ce3af53..a22e106eb 100644 --- a/src/netius/base/protocol.py +++ b/src/netius/base/protocol.py @@ -260,8 +260,8 @@ def _flush_send(self): if not self._delayed: break if not self._writing: break data, address, callback = self._delayed.pop(0) - if address: self.send(data, address, callback = callback) - else: self.send(data, callback = callback) + if address: self.send(data, address, callback = callback) #pylint: disable=E1101 + else: self.send(data, callback = callback) #pylint: disable=E1101 class DatagramProtocol(Protocol): diff --git a/src/netius/base/server.py b/src/netius/base/server.py index bd52647f6..b1cba8e94 100644 --- a/src/netius/base/server.py +++ b/src/netius/base/server.py @@ -229,7 +229,7 @@ def serve( # checks the type of service that is meant to be created and # creates a service socket according to the defined service family = socket.AF_INET6 if ipv6 else socket.AF_INET - family = socket.AF_UNIX if is_unix else family + family = socket.AF_UNIX if is_unix else family #@UndefinedVariable pylint: disable=E1101 if type == TCP_TYPE: self.socket = self.socket_tcp( ssl, key_file = key_file, @@ -257,7 +257,7 @@ def serve( # in case the set user id value the user of the current process should # be changed so that it represents the new (possibly unprivileged user) - if setuid: os.setuid(setuid) + if setuid: os.setuid(setuid) #pylint: disable=E1101 # in case the selected port is zero based, meaning that a randomly selected # port has been assigned by the bind operation the new port must be retrieved From 5e752b5a3e11ea7e689b7fb9873524414480b40e Mon Sep 17 00:00:00 2001 From: joamag Date: Thu, 5 Jul 2018 11:31:11 +0100 Subject: [PATCH 3/9] new pylint ignores --- src/netius/base/server.py | 2 +- src/netius/clients/http.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/netius/base/server.py b/src/netius/base/server.py index b1cba8e94..6c6fc2fc1 100644 --- a/src/netius/base/server.py +++ b/src/netius/base/server.py @@ -37,7 +37,7 @@ __license__ = "Apache License, Version 2.0" """ The license for the module """ -from .common import * #@UnusedWildImport +from .common import * #@UnusedWildImport pylint: disable=W0614 BUFFER_SIZE_S = None """ The size of both the send and receive buffers for diff --git a/src/netius/clients/http.py b/src/netius/clients/http.py index b2cdf4e99..4d74e43d8 100644 --- a/src/netius/clients/http.py +++ b/src/netius/clients/http.py @@ -826,7 +826,7 @@ def wrap_request( buffer = tempfile.NamedTemporaryFile(mode = "w+b") if use_file else [] self.request = dict(code = None, data = None) - def on_close(protocol): + def on_close(protocol): #pylint: disable=E0102 if _on_close: _on_close(protocol) protocol._request = None if self.request["code"]: return @@ -836,7 +836,7 @@ def on_close(protocol): request = self.request ) - def on_data(protocol, parser, data): + def on_data(protocol, parser, data): #pylint: disable=E0102 if _on_data: _on_data(protocol, parser, data) if use_file: buffer.write(data) else: buffer.append(data) @@ -844,7 +844,7 @@ def on_data(protocol, parser, data): self.request["received"] = received + len(data) self.request["last"] = time.time() - def callback(protocol, parser, message): + def callback(protocol, parser, message): #pylint: disable=E0102 if _callback: _callback(protocol, parser, message) if use_file: cls.set_request_file(parser, buffer, request = self.request) else: cls.set_request(parser, buffer, request = self.request) @@ -1420,7 +1420,7 @@ def on_message(protocol, parser, message): self.available[protocol.key] = protocol netius.compat_loop(loop).stop() - def on_close(protocol): + def on_close(protocol): #pylint: disable=E0102 # verifies if the protocol if the protocol is currently in # the pool of protocol, so that decisions on the stopping # of the event loop may be made latter on From 9a057771dd396bd653b42045d5d8aa0eac3eca5c Mon Sep 17 00:00:00 2001 From: joamag Date: Thu, 5 Jul 2018 11:33:18 +0100 Subject: [PATCH 4/9] new if condition --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7bfffeaf1..dbbdb9a64 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ install: - pip install -r requirements.txt - pip install coveralls - pip install twine - - pip install pylint + - if [[ $TRAVIS_PYTHON_VERSION == "2.7" ]] || [[ $TRAVIS_PYTHON_VERSION == "3.6" ]]; then pip install pylint; fi env: - HTTPBIN=httpbin.bemisc.com script: From 00d114981234243086c7410d940688346db5506d Mon Sep 17 00:00:00 2001 From: joamag Date: Thu, 5 Jul 2018 13:02:43 +0100 Subject: [PATCH 5/9] extra space --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dbbdb9a64..6438c5165 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ env: script: - if [[ $TRAVIS_PYTHON_VERSION == "2.7" ]] || [[ $TRAVIS_PYTHON_VERSION == "3.6" ]]; then pylint --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" src/netius; fi - if [[ $TRAVIS_PYTHON_VERSION != "3.2" ]]; then coverage run --source=netius setup.py test; else python setup.py test; fi -after_success: if [[ $TRAVIS_PYTHON_VERSION != "3.2" ]]; then coveralls; fi +after_success: if [[ $TRAVIS_PYTHON_VERSION != "3.2" ]]; then coveralls; fi deploy: provider: pypi user: joamag From 4554cfd90a1b325eec33e56a2ce4cb4647362e65 Mon Sep 17 00:00:00 2001 From: joamag Date: Thu, 5 Jul 2018 13:07:31 +0100 Subject: [PATCH 6/9] reversed change --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6438c5165..dbbdb9a64 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ env: script: - if [[ $TRAVIS_PYTHON_VERSION == "2.7" ]] || [[ $TRAVIS_PYTHON_VERSION == "3.6" ]]; then pylint --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" src/netius; fi - if [[ $TRAVIS_PYTHON_VERSION != "3.2" ]]; then coverage run --source=netius setup.py test; else python setup.py test; fi -after_success: if [[ $TRAVIS_PYTHON_VERSION != "3.2" ]]; then coveralls; fi +after_success: if [[ $TRAVIS_PYTHON_VERSION != "3.2" ]]; then coveralls; fi deploy: provider: pypi user: joamag From c6284dfd82b935059c25874be2c5f82cc87c2001 Mon Sep 17 00:00:00 2001 From: joamag Date: Thu, 5 Jul 2018 13:07:41 +0100 Subject: [PATCH 7/9] tiny change --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index b1f3e0f97..856a56fd4 100644 --- a/README.rst +++ b/README.rst @@ -18,7 +18,7 @@ Installation pip install netius Usage ------ +----- WSGI Server ~~~~~~~~~~~ From c074e2ede6c5666bf2e52f0b58a1f3fc0f3ea829 Mon Sep 17 00:00:00 2001 From: joamag Date: Thu, 5 Jul 2018 13:07:52 +0100 Subject: [PATCH 8/9] reversed change --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 856a56fd4..b1f3e0f97 100644 --- a/README.rst +++ b/README.rst @@ -18,7 +18,7 @@ Installation pip install netius Usage ------ +----- WSGI Server ~~~~~~~~~~~ From b4227590e0f6653614641f082be6fd15899c9b91 Mon Sep 17 00:00:00 2001 From: joamag Date: Mon, 11 Mar 2019 17:32:59 +0000 Subject: [PATCH 9/9] Removed common --- src/netius/base/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/netius/base/__init__.py b/src/netius/base/__init__.py index 8c48d47b4..d8b63d2e0 100644 --- a/src/netius/base/__init__.py +++ b/src/netius/base/__init__.py @@ -37,7 +37,6 @@ from . import agent from . import asynchronous from . import client -from . import common from . import compat from . import config from . import conn