Pyramid-hypernova

Latest version: v9.3.1

Safety actively analyzes 621363 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

9.1.0

Changed

The tween will now loop over `app_iter` chunks rather than accessing `response.text` directly: this should be backwards-compatible.

9.0.0

Changed

Python 2.7 support has been dropped. This package now requires py3.7+.

8.0.0

Changed

`BatchRequest` now accepts a function, `get_job_group_url`, in place of `batch_url`. This allows for increased flexibility in routing hypernova requests.

You'll need to update your `pyramid_hypernova.get_batch_url` to the `pyramid_hypernova.get_job_group_url` setting.

Before:
py
def get_batch_url():
return 'https://localhost:8080/batch'

registry.settings.update({
'pyramid_hypernova.get_batch_url': get_batch_url,
})


After:
py
def get_job_group_url():
return 'https://localhost:8080/batch'

registry.settings.update({
'pyramid_hypernova.get_job_group_url': get_job_group_url,
})


-----

Additionally, If you were manually supplying a BatchRequest factory via the `pyramid_hypernova.batch_request_factory` setting, you'll need
to update its API to accept `get_job_group_url` and pass it along to the `BatchRequest` class. Example:

Before:
py
def batch_request_factory(batch_url, plugin_controller, json_encoder, pyramid_request):
return BatchRequest(
batch_url=batch_url,
plugin_controller=plugin_controller,
json_encoder=json_encoder,
pyramid_request=pyramid_request,
)

registry.settings.update({
'pyramid_hypernova.batch_request_factory': batch_request_factory,
})


After:
py
def batch_request_factory(get_job_group_url, plugin_controller, json_encoder, pyramid_request):
return BatchRequest(
get_job_group_url=get_job_group_url,
plugin_controller=plugin_controller,
json_encoder=json_encoder,
pyramid_request=pyramid_request,
)

registry.settings.update({
'pyramid_hypernova.batch_request_factory': batch_request_factory,
})


`get_job_group_url` will be supplied two parameters - the **job group** that pyramid_hypernova will be making a request for and the **pyramid request**:

py
def get_batch_url(job_group, pyramid_request): ...


This will be called right before send _on every job group request_. If you're doing an expensive operation to retrieve this url, consider memoizing it.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.