Skip to content

Commit

Permalink
pin gevent versions for pycparser error
Browse files Browse the repository at this point in the history
  • Loading branch information
cjackson authored and cjackson committed Jul 18, 2024
1 parent 95d04fb commit 31afaea
Show file tree
Hide file tree
Showing 9 changed files with 1,287 additions and 1,315 deletions.
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ docstring-min-length=-1
[FORMAT]

# Maximum number of characters on a single line.
max-line-length=80
max-line-length=120

# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
Expand Down
6 changes: 3 additions & 3 deletions ait/core/cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ class AitConfigError(Exception):
pass


class AitConfigMissing(Exception):
class AitConfigMissingError(Exception):
"""Raised when a AIT configuration parameter is missing."""

def __init__(self, param):
values = param, ait.config._filename
format = "The parameter %s is missing from config.yaml (%s)."
super(AitConfigMissing, self).__init__(format % values)
super(AitConfigMissingError, self).__init__(format % values)
self.param = param


Expand Down Expand Up @@ -342,7 +342,7 @@ def _datapaths(self):
paths["mib"] = data["mib"]["path"]

except KeyError as e:
raise AitConfigMissing(str(e))
raise AitConfigMissingError(str(e))
except Exception as e:
raise AitConfigError("Error reading data paths: %s" % e)

Expand Down
6 changes: 3 additions & 3 deletions ait/core/server/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(self, name, inputs=None, outputs=None, zmq_args=None, kwargs=None):
**kwargs: (optional) Dependent on requirements of child class.
"""
if name is None:
raise (cfg.AitConfigMissing("plugin name"))
raise (cfg.AitConfigMissingError("plugin name"))

self.name = name
self.inputs = inputs if inputs is not None else []
Expand Down Expand Up @@ -122,7 +122,7 @@ def build_from_ait_config(ait_plugin_config, zmq_args=None):
PluginConfig - New PluginConfig built from config
Raises:
AitConfigMissing: if any of the required config values are missing
AitConfigMissingError: if any of the required config values are missing
"""

if zmq_args is None:
Expand All @@ -134,7 +134,7 @@ def build_from_ait_config(ait_plugin_config, zmq_args=None):
# Extract name and ensure it is defined
name = other_args.pop("name", None)
if name is None:
raise (cfg.AitConfigMissing("plugin name"))
raise (cfg.AitConfigMissingError("plugin name"))

plugin_inputs = other_args.pop("inputs", None)
if plugin_inputs is None:
Expand Down
4 changes: 2 additions & 2 deletions ait/core/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def _create_api_telem_stream(self):
def _get_stream_name(self, config):
name = config.get("name", None)
if name is None:
raise (cfg.AitConfigMissing("stream name"))
raise (cfg.AitConfigMissingError("stream name"))
if name in [
x.name
for x in (
Expand Down Expand Up @@ -275,7 +275,7 @@ def _create_inbound_stream(self, config=None):
stream_handlers = self._get_stream_handlers(config, name)
stream_input = config.get("input", None)
if stream_input is None:
raise (cfg.AitConfigMissing(f"inbound stream {name}'s input"))
raise (cfg.AitConfigMissingError(f"inbound stream {name}'s input"))

# Create ZMQ args re-using the Broker's context
zmq_args_dict = self._create_zmq_args(True)
Expand Down
2,568 changes: 1,270 additions & 1,298 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ bottle = '0.12.23'
jsonschema = '3.0.2'
pyyaml = '5.3.1' # Temporarily pinning this to 5.3.1 because pyyaml and Cython 3 don't get along
requests = '>= 2.22.0'
greenlet = '1.1.3'
gevent = '*'
greenlet = '3.0.3'
gevent = '22.10.2'
gevent-websocket = '0.10.1'
pyzmq = '24.0.0'
gipc = "^1.1.0"
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ omit = */_version.py,*/__init__.py,*/bin/*,*/test/*

[flake8]
extend-exclude = versioneer.py,_version.py,docs,doc,tests,test,setup.py

max-line-length = 120
# Ignoring:
# E203 prevents flake8 from complaining about whitespace around slice
# components. Black formats per PEP8 and flake8 doesn't like some of
Expand All @@ -28,7 +28,7 @@ extend-exclude = versioneer.py,_version.py,docs,doc,tests,test,setup.py
# E402 prevents flake8 complaining about module level imports not appearing
# at the top of a file. We need to run gevent monkeypatching which triggers
# this on every import where that's the case.
extend-ignore = E203, E501, E402
extend-ignore = E203, E501, E402, E266, E701, E704, W503, B905, B907, B108

# Selects following test categories:
# D: Docstring errors and warnings
Expand Down
6 changes: 3 additions & 3 deletions tests/ait/core/server/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def test_no_stream_name(self, server_stream_plugin_mock_mock, broker_class_mock)
config = {"input": "some_stream", "handlers": [{"name": "some-handler"}]}
server = Server()
with pytest.raises(
cfg.AitConfigMissing,
cfg.AitConfigMissingError,
match="The parameter stream name is missing from config.yaml",
):
server._get_stream_name(config)
Expand Down Expand Up @@ -324,7 +324,7 @@ def test_no_inbound_stream_input(
config = {"name": "some_stream", "handlers": [{"name": "some-handler"}]}

with pytest.raises(
cfg.AitConfigMissing,
cfg.AitConfigMissingError,
match="The parameter {} is missing from config.yaml".format(
"inbound stream {}'s input".format("some_stream")
),
Expand Down Expand Up @@ -489,7 +489,7 @@ def test_plugin_missing_name(self, server_stream_plugin_mock_mock, broker_mock):

config = {"inputs": "some_inputs"}
with pytest.raises(
cfg.AitConfigMissing,
cfg.AitConfigMissingError,
match="The parameter plugin name is missing from config.yaml",
):
server._create_plugin(config)
Expand Down
2 changes: 1 addition & 1 deletion tests/ait/core/test_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def test_datapaths():
try:
paths = config._datapaths
assert False
except cfg.AitConfigMissing as e:
except cfg.AitConfigMissingError as e:
assert True


Expand Down

0 comments on commit 31afaea

Please sign in to comment.